LinuxSir.cn,穿越时空的Linuxsir!

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

reiserfs下非正常关机后,grub启动特别慢

[复制链接]
发表于 2007-12-17 18:31:06 | 显示全部楼层 |阅读模式
我用的是debian sid,占两个分区/ 和/home,都是reiserfs3.6格式的。
现在的问题是当系统被强制关机,或者掉电后,甚至是在休眠后,再启动的时候我的grub就在loading grub ...那里一直读盘。在加载内核的vmlinuz和initrd时也特别的慢。直到完全加载完内核。
之后挂载文件分区时就有Filesystem is NOT clean,然后是一大堆事务处理。
如果是正常的关机就没有这些问题,速度很快。

一句话,如果文件系统“不干净”,grub的运行就非常慢。不知道该如何解决。
发表于 2007-12-17 20:13:33 | 显示全部楼层
呵呵,确实是这样的,不过过后应该就好了吧?
回复 支持 反对

使用道具 举报

发表于 2007-12-18 10:08:55 | 显示全部楼层
我昨天问了水木这个问题,的确我也有这个问题,原来以为是fdisk的问题,看来还是reiserfs的问题。

不知道这个问题除了换分区格式还有什么办法
回复 支持 反对

使用道具 举报

发表于 2007-12-18 10:11:33 | 显示全部楼层
http://www.linuxquestions.org/qu ... b-very-slow-427442/

Hi,
I had the same problem and in my case I came to suspect grub of wrongly reading my reiserfs filesystem- or checking the journal a long time or something like that.
As stated in grub documentation, it has to interpret every filesystem (ext2,3, reiserfs etc..)
Perhaps the version of reiserfs was too recent vs grub's implementation.

Anyway I solved it by creating a small /boot filesystem under a simple filesystem: ext2
moved all the files there and ran grub

root@t600:/boot/grub# grub
root (hd0,0)
setup (hd0)

and from there it booted fast again.

---
For those interested in the details, I created the partition /boot by reducing slightly my swap space:
swapoff -a,
then fdisk /dev/hda -> delete and recreate swap space minus 40M, created a new partition of 40M type "Linux" 83
mkfs.ext2 /dev/hda3 (in my case it' s the 3rd)
mkswap /dev/hda2 ; swapon -a
mv /boot /boot.orig
mkdir /boot
mount /dev/hda3 /boot
copy the files from /boot.orig to /boot
edit /etc/fstab to have it mounted at boot
then run grub (Note that now the paths have changed from:
kernel /boot/vmlinuz-2.6.21.3 etc...
to
kernel /vmlinuz-2.6.21.3 etc..
in the /boot/grub/menu.lst

Hope it helps...
回复 支持 反对

使用道具 举报

发表于 2007-12-18 10:20:14 | 显示全部楼层
只需
#grub-install /dev/sda   (根据你的情况确定)
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-12-18 12:55:46 | 显示全部楼层
Post by omegao;1796991
只需
#grub-install /dev/sda   (根据你的情况确定)


跟你说的东西没有关系。因为在我1楼说过的NOT clean之后的事务处理之后,文件系统就又“干净”了。这样再正常关机后,再启动速度就又快了。
所以我觉得应该是grub和reiserfs之间的关系处理的还有些欠缺。不知道有什么好的解决方法,除了修改分区。
回复 支持 反对

使用道具 举报

发表于 2007-12-18 13:10:04 | 显示全部楼层
我这里只要是出现了这个问题,以后即使是正常关机,再次启动到grub也是很慢,每次启动都很慢。
我用的是ubuntu7.10 而7.04就没有这个问题。
回复 支持 反对

使用道具 举报

发表于 2007-12-18 14:02:15 | 显示全部楼层
非正常关机的话,会有这种情况,用reiserfsck修复一下根分区。
回复 支持 反对

使用道具 举报

发表于 2007-12-19 12:52:18 | 显示全部楼层
marvel 的说明很详细, 不过为什么会有这样的问题出来? reiserfs 不是号称是可以随时断电的文件系统? 
回复 支持 反对

使用道具 举报

发表于 2007-12-20 01:31:23 | 显示全部楼层
Post by opp;1797484
marvel 的说明很详细, 不过为什么会有这样的问题出来? reiserfs 不是号称是可以随时断电的文件系统? 

好久没看到你了,在做什么呢?
回复 支持 反对

使用道具 举报

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

本版积分规则

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