如何在Macbook(Intel)上安装Ubuntu 7.04双启动

关键问题有两个:第一,Macbook的EFI不支持启动第三方系统;第二,即使有bootcamp,Ubuntu所使用的GRUB在非MBR方式引导时工作不正常。所以我们需要两样东西来解决这两个问题:
1.rEFIt:第三方的EFI固件,可启动指定分区上的Linux系统;
2.LILO:可以不需要MBR启动LINUX。

具体步骤:
1.下载刻录Ubuntu 7.04 for i386安装CD;

2.去http://refit.sourceforge.net/下载最新版rEFIt,目前是0.10(2007-06-14);

3.使用应用程序->实用工具->Bootcamp助理创建分区,一般大小在5GB以上即可,具体方法不再赘述;

4.安装rEFIt,安装完毕后,在bash中执行:
% cd /efi/refit
% ./enable.sh
设定使用rEFIt引导系统;

5.将Macbook以太网连接至互联网,且在安装中必须始终连接,要求能够访问Ubuntu镜像。不能用无线网卡,因为安装过程中没有相应的Linux驱动。这样做是为了安装程序能正确自动探测并将源地址写入apt的sources.list中,这样后面我们就可以从Live CD的bash登录到硬盘上安装好的Ubuntu中安装LILO了;

6.插入Ubuntu光盘,重启后从光盘引导,执行安装程序。将刚才Bootcamp建立的FAT32分区删除,建立ext3(挂载到/)和swp分区。不要挂载其他分区;

7.完成安装后不要重启!在终端中执行:
$ sudo mkdir /mnt/ubuntu
$ sudo mount /dev/sda3 /mnt/ubuntu
$ sudo mount -t proc none /mnt/ubuntu/proc
$ sudo mount -o bind /dev /mnt/ubuntu/dev
$ sudo chroot /mnt/ubuntu /bin/bash

登录到已安装的系统,继续输入以下命令安装LILO;
$ sudo apt-get install lilo lilo-doc

8.安装完毕后,需要对LILO进行配置。用vim或nano建立/etc/lilo.conf文件,内容如下:
boot=/dev/sda
default=Ubuntu
map=/boot/map
delay=20
image=/vmlinuz initrd=/initrd.img
append="quiet splash"
root=/dev/sda3
label=Ubuntu
read-only
保存后,打开一个新的终端,执行:
$ sudo parted

parted支持GUID分区表。在parted命令行下,执行:
(parted) print
(parted) set 3
注:此处的“3”是Ubuntu安装分区的编号,执行print后会显示
Flag to change? boot/hidden/raid/lvm/hp-service/msftres? boot
New state? on/[off]? on
(parted) quit

回到第一个刚才编辑lilo.conf的终端窗口,执行:
$ sudo lilo

此时会有警告信息,不管。重启,在rEFIt中选择从硬盘启动Linux即可。
另:无限网卡驱动程序请自行安装。

Author: armadillo

傻傻的笨蛋,什么都不懂的Small Kids,总是在幻想,轻轻地走来,静静地站在那里,默默地看着一切,细细地思考,然后悄悄地离开……永远都不愿意留在这里……You mustn't allow yourself to be chained to fate, to be ruled by your genes. Human beings can choose the kind of life that they want to live. What's important is that you choose life... and then live.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.