LinuxSir.cn,穿越时空的Linuxsir!

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

怎样在启动时将一个squashfs文件挂载成/呢?

[复制链接]
发表于 2006-8-15 09:24:25 | 显示全部楼层 |阅读模式
怎样在启动时将一个squashfs文件挂载成/呢?

比如,我在/dev/hda1(如果我这个hdX是不确定的呢?)里面有个文件在/x.sqfs,里面的内容是/的内容,在启动的时候想把它挂载到/里面,然后再接下来以这个新的/来完成启动
发表于 2006-8-16 04:38:39 | 显示全部楼层
用 initramfs 来解决这个问题吧。
回复 支持 反对

使用道具 举报

发表于 2006-8-16 14:53:59 | 显示全部楼层
Yes, you need to alter initrd image. Basically,
1. you need a new script to probe where the sqfs file is located. Normally, mount each (not ext and swap)device and search for the file, it found, then mount it under the predefined root location, say /root.
2.  at the end of init, just change the chain init to point to the / dir.
回复 支持 反对

使用道具 举报

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

本版积分规则

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