最近在搞LFS,按照 http://www.linuxsir.org/bbs/thread322894.html
的說明來做的。一切順利!
但是開機,重啟的時候卻遇到這樣子的問題:
mounting kernel-based file systems:/proc/etc/rc.d/rcsysinit.d/S00mountkernfs: line 24: mount : command not found
/sys/etc/rc.d/rcsysinit.d/S00mountkernfs: line 29 : mount:command not found
[FALL]
setting the console log level to 7...
/etc/rc.d/rcsysinit.d/S02conslelog: line 30: demsg: command not found
[FAIL]
Populating /dev/ with device nodes...
grep :/proc/mounts :No such file or directory [FAIL]
FAILURE:
Unable to create device without a SysFS filesystem
After you press Enter,this system will be halted and powerd off.
嚴重錯誤如上面綠色標識的,參照了這個文章,http://www.linuxsir.org/bbs/thread346672.html
知道是因為Util-linux包含了這兩個命令,但是我進入Chroot之後,mount顯示正常,但是dmesg則顯示沒有該命令。
我就依照那個文章裡的,把perl,和Util-linux都重新安裝了一邊,但是問題還是一樣的,所以我就又仔細看了一下
http://www.linuxsir.org/bbs/thread322894.html
,看到與Util-linux裡相關的兩次安裝,
Util-linux-2.12r
代碼:
tar xvf /lfs-sources/util-linux-2.12r.tar.bz2cd util-linux-2.12rsed -i 's@/usr/include@/tools/include@g' configure./configuremake -C libmake -C mount mount umountmake -C text-utils morecp -v mount/{,u}mount text-utils/more /tools/bincd ..
rm -rf util-linux-2.12r
和
Util-linux-2.12r
代碼:
tar xvf $LFS/util-linux-2.12r.tar.bz2cd util-linux-2.12rsed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' /-i $(grep -rl '/etc/adjtime' .)mkdir -pv /var/lib/hwclockpatch -Np1 -i $LFS/util-linux-2.12r-cramfs-1.patchpatch -Np1 -i $LFS/util-linux-2.12r-lseek-1.patch./configuremake HAVE_KILL=yes HAVE_SLN=yesmake HAVE_KILL=yes HAVE_SLN=yes installcd ..rm -rf util-linux-2.12r
所以就安裝這兩個的要求重新做了一邊。
重啟,OK,正常!
哈哈!!
如果安裝的是LFS 6.4,那就是Util-linux-ng了。