LinuxSir.cn,穿越时空的Linuxsir!

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

我制作U盘Linux遇到的问题:

[复制链接]
发表于 2005-8-27 14:02:01 | 显示全部楼层 |阅读模式
我想做一个一步启动而不依赖initrd的U盘Linux系统。

      我已经打了usb_boot的补丁,选上所有的USB和SCSI的支持选项,
然后重新编译了内核,并自己在/dev/sda2上面制作了根文件系统,但是
系统启动的时候仍然说找不到根文件系统/dev/sda2,但是与/dev/sda2
同样内容的/dev/hda8却可以顺利启动。

    哪位能指点一二这是为什么?
发表于 2005-8-29 09:13:21 | 显示全部楼层
Post by yhyzh
我想做一个一步启动而不依赖initrd的U盘Linux系统。
As far as I know, when your system starts and begins to scan for USB devices, it takes a few seconds before the USB devices can be recognized by your system. If your filesystem is stored in external USB devices, then init will unable to mount it if the external USB devices is not yet identified, which will lead to kernel panic.

As a result, up to this moment, no matter which distro you are using, you still need to force the system to sleep few seconds, as defined in initrd, so that the external USB device is recognized before init can mount the filesystem.

If you success, then please let us know.  It is definitely a great news.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-8-29 14:48:01 | 显示全部楼层
我已经给内核打了一个补丁,这个补丁就是修改init/do_mounts.c的,
也就是你说的强制系统休息三秒以等待USB初始化。

另外想请教doom3d,我这个问题在国外哪个论坛,或是IRC Maillist可能问到答案?
回复 支持 反对

使用道具 举报

发表于 2005-8-31 19:52:05 | 显示全部楼层
Post by yhyzh
我已经给内核打了一个补丁,这个补丁就是修改init/do_mounts.c的,
也就是你说的强制系统休息三秒以等待USB初始化。
Where did you download the do_mounts.c?  I want to give it a shot.
我这个问题在国外哪个论坛,或是IRC Maillist可能问到答案?
I want to know too.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-9-2 07:58:31 | 显示全部楼层
我使用2.4.22内核,再打这个补丁:

http://www.lammerts.org/software/kernelpatches/boot-usb.patch
回复 支持 反对

使用道具 举报

发表于 2005-9-2 19:19:31 | 显示全部楼层
According to this thread, http://www.linuxsir.cn/bbs/showthread.php?t=153674

It seems 2.4.x kernel may be difficult to get it work, maybe you should try to use a 2.6 kernel.  In fact, I only have experiences with 2.6 kernel.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-9-6 08:46:59 | 显示全部楼层
Post by yhyzh
我想做一个一步启动而不依赖initrd的U盘Linux系统。

      我已经打了usb_boot的补丁,选上所有的USB和SCSI的支持选项,
然后重新编译了内核,并自己在/dev/sda2上面制作了根文件系统,但是
系统启动的时候仍然说找不到根文件系统/dev/sda2,但是与/dev/sda2
同样内容的/dev/hda8却可以顺利启动。

    哪位能指点一二这是为什么?


     现在发现时原来自己的root文件系统建立在/dev/sda3,但是却
写成/dev/sda2的缘故。

   经过打补丁之后,U盘可以不依赖initrd直接启动,只不过这样在功能
上会有些欠缺。
回复 支持 反对

使用道具 举报

发表于 2005-9-6 12:58:04 | 显示全部楼层
Good, you have eventually solved your problem.  Cheers!
回复 支持 反对

使用道具 举报

发表于 2005-9-12 17:29:40 | 显示全部楼层
呵呵……我用的是2.6.9内核,不用打补丁,只要把SCSI,USB,USB mass storage都包含进去就可以。
回复 支持 反对

使用道具 举报

自由狼-台风 该用户已被删除
发表于 2005-9-29 15:28:13 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

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

本版积分规则

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