|

楼主 |
发表于 2010-1-27 16:49:42
|
显示全部楼层
找到答案了
5.3.2.4. Booting a Debian Live USB/HDD system from a USB stick
with Grub
Suppose you've built your Debian Live USB/HDD image, but want to
install it on an already used USB stick with ext2/3 partition
and Grub bootloader:
First, copy live components in a directory on your key: the
Linux kernel (vmlinuz*), its Initial RAM disk (initrd*) and the
system (filesystem.squashfs):
# mkdir /media/myUsb/boot/live/
# cp binary/vmlinuz1 binary/initrd1.img binary/live/filesystem.squashfs /media/myUsb/boot/live/
Then, add a stanza in Grub's menu definition to boot up this
system:
echo >>/media/myUsb/boot/grub/menu.lst <<EOF
title my Debian Live
root (hd0,1) # my Ext2 partition is the second on this stick
kernel /boot/live/vmlinuz1 boot=live vga=791 persistent union=aufs live-media-path=boot/live
initrd /boot/live/initrd1.img
EOF
The important kernel command line option to add here is
<variablename>live-media-path</variablename>, which tells to
Live initrd's script in which subdirectory to look for the
SquashFS image.
Next, umount your USB stick and reboot on it. That's all! |
|