label hd0
MENU LABEL Boot from first hard disk
kernel chain.c32
append hd0
TEXT HELP
Boot local OS installed on first hard disk
ENDTEXT
label hd1
MENU LABEL Boot from second hard disk
kernel chain.c32
append hd1
TEXT HELP
Boot local OS installed on second hard disk
ENDTEXT
label localhost
localboot -1
MENU HIDE
EOF
step8:生成iso文件。命令如下:
if [ -f myfuntoo.iso ]; then
rm myfuntoo.iso
fi
mkisofs -joliet -joliet-long -full-iso9660-filenames -allow-leading-dots -o myfuntoo.iso \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
CDroot
myfuntoo.iso就是我们得到的LiveCD的cd映像文件了。-joliet -joliet-long -full-iso9660-filenames -allow-leading-dots这些先项使得isofs对长文件名有较好的支持,但在实验的过程中,还是要尽可能避免在CDroot目录下使用长文件名。
step9:用qemu测试iso文件。命令如下:
qemu-system-x86_64 -no-kvm -boot d -cdrom myfuntoo.iso
如果一切正常,最后会出现登录界面,可用root用户(密码funtoo)登录。
如果在这里失败了,看 livecd问题分析。