我下载了一个debian的livecd,我把里面的live文件夹下的filesystem.squashfs解压到我U盘中,作为livecd的文件系统。
然后在ubuntu下使用
代码:
grub-install --root-directory=/media/boot /dev/sdc #/media/boot是我给grub2分的分区挂载的位置,sdc是我移动硬盘
grub-mkconfig -o /media/boot/boot/grub/grub.cfg
安装了一个grub启动器,并且生成了一个配置文件,修改这个配置文件:
代码:
menuentry 'Debian LiveCD' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-3b8d14b0-2a9b-4fbd-94c8-98bb5599cf67' { recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,5'
search --no-floppy --fs-uuid --set=root 4934c698-bb76-4f3b-86e9-ec11dc834071
linux /boot/vmlinuz-3.16.0-4-586 root=UUID=3b8d14b0-2a9b-4fbd-94c8-98bb5599cf67 rw locale=zh_CN quiet splash $vt_handoff 1
initrd /boot/initrd.img-3.16.0-4-586
}
3b8d14b0-2a9b-4fbd-94c8-98bb5599cf67是我的livecd的根分区的uuid,hd0,5是我livecd的根分区,4934c698-bb76-4f3b-86e9-ec11dc834071是我引导分区的UUID,
这样可以启动,也能使用
但是我有三个问题:
1。我在linux 那一行加一个boot=live参数,结果就导致没用硬盘就启动不正常
2。不加live,文件系统是可修改的,那我的网卡怎么样设置才不会每次换电脑都出现ethX网卡名字自动增长呢。经常用在不同的电脑上会不会出问题,比如频繁更改里面的驱动信息
3。我的ubuntu系统linux那一行是ro,启动后就可以写,为什么我livecd这里写一个ro,启动后就read-only了。