如果U盤夠大,可以在一個(gè)U盤安裝slax,pclinuxos,Linux Mint,puppy Linux等多種live linux。移動(dòng)硬盤原理相同,不做區(qū)分。
因?yàn)閁盤常用來(lái)拷貝文件,fat格式在多種操作系統(tǒng)上通用,所以用grub4dos管理U盤引導(dǎo)。
把U盤格成HDD格式:
用DiskGenius 3.2把U盤格式化為USB-HDD格式,推薦使用FAT32分區(qū);或者用U盤格式化工具(HPUSBFW.EXE )格式化為 HDD 格式。還有其它 工具如FlashBoot、 WIN PM 等。
將引導(dǎo)代碼寫入U(xiǎn)盤mbr:
Win32下,運(yùn)行g(shù)rubinst_gui.exe ,在“磁盤”處選中U盤,在“選項(xiàng)”區(qū)選中“不保存原來(lái)的mbr”、“不引導(dǎo)原來(lái)的mbr”、“啟動(dòng)時(shí)不搜索軟盤”、“輸出詳細(xì)信息”,點(diǎn)擊“安裝”即可。
拷貝grub4dos的grub.exe、grldr、menu.lst到u盤根目錄。
現(xiàn)在,U盤已經(jīng)可以用grub引導(dǎo),把電腦設(shè)置為U盤優(yōu)先引導(dǎo),測(cè)試一下grub的引導(dǎo)。
安裝linux live cd的過(guò)程分為兩步,一是把live cd的iso鏡像文件中的相關(guān)目錄和文件復(fù)制到U盤,可以用Virtual CloneDrive加載iso鏡像。二是編輯grub的menu.lst,各個(gè)版本的linux差別較大。
########################
#安裝Linux slax
提取slax-6.1.2.iso中的
boot
slax
目錄(包含文件,其實(shí)boot目錄只需vmlinuz 、initrd.gz即可)到U盤根目錄即可,這個(gè)是最容易的安裝的linux live之一,而且slax啟動(dòng)速度快,對(duì)聲卡等硬件支持更好,至少在我測(cè)試過(guò)的live cd linux中如此。
grub菜單:
title Slax
root (hd0,0)
kernel /boot/vmlinuz root=/dev/ram0 rw max_loop=255 init=linuxrc load_ramdisk=1 ramdisk_size=6666 slax from=/slax/ vga=normal autoexec=startx
initrd /boot/initrd.gz
boot
#安裝pclinuxos-2009.2.iso
打開pclinuxos-2009.2.iso
拷貝到livecd.sqfs到U盤根目錄,拷貝vmlinuz、initrd.gz到相應(yīng)目錄
grub菜單:
title pclinuxos
root (hd0,0)
kernel /isolinux/vmlinuz livecd=livecd root=/dev/rd/3 acpi=on vga=788 keyb=us splash=silent fstab=rw,noauto
initrd /isolinux/initrd.gz
#安裝Linux Mint
從LinuxMint-8.iso中提取文件,
拷貝mint.seed到U盤preseed目錄,拷貝filesystem.manifest
filesystem.manifest-desktop
filesystem.squashfs
initrd.lz
vmlinuz到casper目錄。
復(fù)制.disk目錄,否則不能正常啟動(dòng)。ubuntu系列都可以這樣操作。
grub菜單:
title Linux Mint live
root (hd0,0)
kernel /casper/vmlinuz file=/preseed/mint.seed boot=casper quiet nosplash –
initrd /casper/initrd.lz
#安裝 puppy Linux
grub菜單:
title puppy
root (hd0,0)
kernel /puppy/vmlinuz ramdisk_size=256000 root=/dev/ram0 PMEDIA=idehd
initrd /puppy/initrd.gz
title Puppy-Linux
find –set-root /puppy/pup-431.sfs
kernel /puppy/vmlinuz root=/dev/ram0 PMEDIA=usbhd
initrd /puppy/initrd.gz
#安裝Linux veket
grub菜單:
title Veket
kernel (hd0,0)/puppy/vmlinuz root=/dev/ram0 PMEDIA=idehd acpi=off
initrd (hd0,0)/puppy/initrd.gz
boot
#安裝archinux(未成功)
grub菜單:
ERROR:boot device didn't show up for 30 seconds
在 ramfs$ 提示符下依次輸入:
ln -s /dev/sdb1 /dev/archiso
exit
假定 sdb1 是U盤的掛載位置。
這個(gè)問題僅在U盤啟動(dòng)的時(shí)候產(chǎn)生,更準(zhǔn)確的說(shuō),是僅在沒有使用 dd 命令制作的U盤啟動(dòng)盤上發(fā)生。
為什么呢?因?yàn)檫@種情況下,U盤的標(biāo)簽(Label)與U盤上 boot/grub/menu.lst 中指定的不相符了。
因此,一個(gè)更好的解決辦法是,修改U盤上 boot/grub/menu.lst :
kernel /boot/vmlinuz26 lang=en locale=en_US.UTF-8 archisolabel=ARCHISO_OINGAE2I ramdisk_size=75%
將 “ARCHISO_OINGAE2I” 改為你U盤的標(biāo)簽(Label)。是什么就改成什么,注意,要區(qū)分大小寫。存盤即可。
#安裝Linux Ubuntu live
title Linux Ubuntu live
root (hd0,0)
kernel /casper/vmlinuz boot=casper quiet nosplash –
initrd /casper/initrd.lz
#安裝NimbleX Linux live
grub菜單:
title NimbleX 2008 – Boot in KDM
find –set-root /nimblex/vmlinuz-nx08
kernel /nimblex/vmlinuz-nx08 ramdisk_size=7120 root=/dev/ram0 rw vga=791 splash=silent quiet changes=nimblex.data autoexec=xconf;kdm
initrd /nimblex/initrd-nx08.gz
#安裝knoppix Linux live(推薦)
grub菜單:
title knoppix adriane vga=0×311
root (hd0,0)
kernel /KNOPPIX/linux ramdisk_size=100000 lang=en vt.default_utf8=0 apm=power-off vga=0×311 nomce quiet loglevel=0 tz=localtime adriane
initrd /KNOPPIX/minirt.gz
boot
# 安裝Fedora-12-i686-Live
grub菜單:
title Fedora-12-i686-Live
root (hd0,0)
kernel /LiveOS/vmlinuz0 root=live:CDLABEL=USB2G rootfstype=auto ro liveimg quiet rd_NO_LUKS rd_NO_MD noiswmd
initrd /LiveOS/initrd0.img
CDLABEL修改為分區(qū)的卷標(biāo)名稱。
#####################
#安裝Qomo Linux(前Everest Linux)
grub菜單:
title Qomo-1.0-Live
root (hd0,0)
kernel /LiveOS/vmlinuz0 root=live:CDLABEL=QOMO_USB_2G rootfstype=auto ro liveimg quiet rd_NO_LUKS rd_NO_MD noiswmd
initrd /LiveOS/initrd0.img
CDLABEL修改為分區(qū)的卷標(biāo)名稱。提取Qomo-1.0.0-i686-Live.iso中的文件,復(fù)制LiveOS目錄到u盤,復(fù)制initrd0.img、vmlinuz0到LiveOS目錄。
#####################
#安裝tinycore
grub菜單:
title tinycore
root (hd0,0)
kernel /tinycore/bzImage
initrd /tinycore/tinycore.gz
提取tinycore_3.1.iso中的文件,在u盤建立tinycore目錄,復(fù)制bzImage、tinycore.gz到tinycore目錄。
#####################
#安裝 Centos 5.5 live CD
grub菜單:
title CentOS-5.5-i386-Live
root (hd0,0)
kernel /LiveOS/vmlinuz0 root=live:CDLABEL=CENTOS_USB_2G rootfstype=auto ro liveimg quiet
initrd /LiveOS/initrd0.img
CDLABEL修改為分區(qū)的卷標(biāo)名稱。提取CentOS-5.5-i386-LiveCD.iso中的文件,復(fù)制LiveOS目錄到u盤,復(fù)制initrd0.img、vmlinuz0到LiveOS目錄。