LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1947|回复: 7

为啥要指定 rootfstype 才能启动?

[复制链接]
发表于 2007-2-16 19:07:57 | 显示全部楼层 |阅读模式
我的系统 root 是 软RAID 拼成的,启动的时候一定要指定 rootfstype 才能正确识别 root 分区。
如果不指定,就会出错,不知道改了什么造成这个结果。

有没有碰到过这个问题的人?

谢谢
发表于 2007-2-16 19:23:02 | 显示全部楼层
ArchWiki有编Configuring mkinitcpio讲到software raid,不知道对你有没有帮助
Using raid

First add the raid hook to the HOOKS list in /etc/mkinitcpio.conf

Kernel Parameters: Specify your md arrays with: md= parameter: (see below). Note that only adding the raid array you're booting from is enough.

Example: md=0,/dev/sda3,/dev/sda4 md=1,/dev/hda1,/dev/hdb1

Then add the following to the kernel line in grub/menu.lst:

Example: md=0,/dev/sda3,/dev/sda4 md=1,/dev/hda1,/dev/hdb1

So that it looks like:

kernel /vmlinuz26beyond root=/dev/md0 ro md=0,/dev/sda1,/dev/sdb1

This will setup 2 md arrays with persistent superblocks

Setup:

- for old raid arrays without persistent superblocks:
    md=<md device no.>,<raid level>,<chunk size factor>,<fault level>,dev0,dev1
- for raid arrays with persistent superblocks:
    md=<md device no.>,dev0,dev1,...,devn
- for, to assemble a partitionable array:
    md=d<md device no.>,dev0,dev1,...,devn

Parameters:

- <md device no.> = the number of the md device:
    0 means md0, 1 means md1, ...
- <raid level> = -1 linear mode, 0 striped mode
    other modes are only supported with persistent super block
- <chunk size factor> = (raid-0 and raid-1 only):
    Set  the chunk size as 4k << n.
- <fault level> = totally ignored
- <dev0-devn>: e.g. /dev/hda1,/dev/hdc1,/dev/sda1,/dev/sdb1

我也刚编译了这篇wiki文章,但有些部分,如raid之类的,因为没用过,没有那个硬件条件,所以没有翻译。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-2-16 20:26:16 | 显示全部楼层
谢谢回复。

md=2,/dev/sda2,/dev/sdb2,/dev/sdc2,/dev/sdd2,/dev/sde2 panic=20 rootfstype=xfs
这个是我的,去掉最后一部分的话,就会出错。加上就可以正确启动。。。。:(
回复 支持 反对

使用道具 举报

发表于 2007-2-16 20:50:52 | 显示全部楼层
LFS的老大来装arch,看来是想把pacman移植到Oliver中去了,呵呵,欢迎欢迎
回复 支持 反对

使用道具 举报

发表于 2007-2-17 16:22:45 | 显示全部楼层
就是/etc/mkinitcpio.conf 里面你应该改了东西吧,比方在hook里面加上 filesystems

然后

/sbin/mkinitcpio -k 2.6.20-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img

应该就可以了。。不知道是不是这个问题,反正加上能启动就不用在占资源加这个了。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-2-17 16:30:18 | 显示全部楼层
我有 filesystems 这个 hook 的。这个才是我最郁闷的。

谢谢回复。
回复 支持 反对

使用道具 举报

发表于 2007-2-17 17:40:37 | 显示全部楼层
我也是用的xfs阿。。

这个。。没有这个毛病。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-2-17 18:05:21 | 显示全部楼层
不知道为什么了,,我再看看吧,奇怪的问题。。

谢谢兄弟们帮忙。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表