由于没有大容量U盘,我只能在近两年尝试硬盘安装很多的ubuntu版本,觉得网上的各种说法还是不太清楚,甚至会有误导。
这里只提一些关键性问题:
1. 关于提取ISO内的文件,也就是vmlinuz和initrd.lz一定要与安装版本对应,比如server和desktop的就不一样(服务器版为initrd.gz),另外10.04与12.04的也不一样,所以不要妄想可以通用,一定要从ISO中分别提取
2. 我都是使用grub4dos_0.4.4来做启动,而且之前做过windows7的软激活,也就是grldr已经存在并且不可覆盖,最好是在安装 ubuntu前改名。。经过各种测试,C:\下只需要复制grldr和menu.lst两个文件即可,根本用不着修改BOOT.INI(改了与没改一样, 不能选择性启动双系统),解决方法是修改menu.lst来启动多个系统,比如我就有XP+7的双系统,参考官方写法我修改了一下menu.lst(见# 号内的内容)
#####################################
timeout 2
default /default
title Microsoft Windows XP
fallback 1
find –set-root –ignore-floppies –ignore-cd /ntldr
map () (hd0)
map (hd0) ()
map –rehook
find –set-root –ignore-floppies –ignore-cd /ntldr
chainloader /ntldr
savedefault –wait=2
title Microsoft Windows 7
fallback 2
find –set-root –ignore-floppies –ignore-cd /bootmgr
map () (hd0)
map (hd0) ()
map –rehook
find –set-root –ignore-floppies –ignore-cd /bootmgr
chainloader /bootmgr
savedefault –wait=2
title Ubuntu 12.04 LiveCD
root (hd0,0)
kernel (hd0,0)/vmlinuz boot=casper iso-scan/filename=/ubuntu-12.04-desktop-i386.iso ro quiet splash locale=zh_CN.UTF-8
initrd (hd0,0)/initrd.lz
#######################################
这样默认是启动第一个,等待时间2秒,这样的好处就是你可以将ubuntu LiveCD当做一个临时系统来用,而不用安装,做为体验还是不错的,耗不影响xp/7的正常工作。
但是有一个问题,如果你的win7是软解的话,那么用Grub4dos来启动会使软解失效,貌似有一种改名法可以解决这个问题,但这不属于本文讨论的内容