需要用的软件有Easybcd和Ubuntu iso文件。
1.利用Winrar 解压ISO文件中 crasper目录下的pagefile.sys 和vmlinuz 文件并放到Win7 安装盘根目录下。
2. 利用Easybcd 软件,添加一个NeoGrub启动项,并在menu.list文件中,添加如下
title Install Ubuntu 12.04 root (hd0,1) kernel (hd0,1)/vmlinuz boot=casper iso-scan/filename=/ubuntu-12.04-desktop-amd64.iso ro quiet splash locale=zh_CN.UTF-8 initrd (hd0,1)/initrd.lz
其中,hd0 表示自己电脑上的第一块硬盘,后面的1表示第二个分区。 上面就是把ubuntu-12.04-desktop-amd64.iso 文件放在第二块分区的根目录,否则,到时找不到文件。
3. 进入Ubuntu时, 首先不要点击安装,先用Terminal 运行如下命令,
sudo umount -l /isodevice
卸载挂载点。然后点击桌面的安装。
注意安装完后,利用Ctrl+L 查看/boot目录安装的硬盘编码,后面会用到。
4. 修改Window下的menu.list文件,添加如下:
timeout 5 title Ubuntu 12.04 root (hd0,5) #search --no-floppy --fs-uuid --set /dev/sda4 kernel /boot/vmlinuz-3.2.0-23-generic root=UUID=6d89b06d-fa3c-4a1b-abf5-a0c1f2189334 ro quiet splash initrd /boot/initrd.img-3.2.0-23-generic boot
其中, “6d89b06d-fa3c-4a1b-abf5-a0c1f2189334” 为我安装/boot 目录的硬盘序号。
完整的menu.list文件如下:
# NeoSmart NeoGrub Bootloader Configuration File
#
# This is the NeoGrub configuration file, and should be located at C:\NST\menu.lst
# Please see the EasyBCD Documentation for information on how to create/modify entries:
# http://neosmart.net/wiki/display/EBCD/
timeout 5
title Ubuntu 12.04
root (hd0,5)
#search --no-floppy --fs-uuid --set /dev/sda4
kernel /boot/vmlinuz-3.2.0-23-generic root=UUID=6d89b06d-fa3c-4a1b-abf5-a0c1f2189334 ro quiet splash
initrd /boot/initrd.img-3.2.0-23-generic
boot
title Install Ubuntu 12.04
root (hd0,1)
kernel (hd0,1)/vmlinuz boot=casper iso-scan/filename=/ubuntu-12.04-desktop-amd64.iso ro quiet splash locale=zh_CN.UTF-8
initrd (hd0,1)/initrd.lz