您的位置:首页 > 其它

install ubuntu 12.04 on macbook pro md101 2012-7 version

2012-12-12 14:40 288 查看
i can`t use cdrom, i don`t know why, so i find a way to burn the iso into a udisk.

use following script to burn it. we should download the mac specified ubuntu iso, please refer to the wget line.

===install ubuntu======================================================

# wget http://cdimage.ubuntu.com/releases/12.04/release/ubuntu-12.04-desktop-amd64+mac.iso
UBUNTUISO="/home/cpeng/Downloads/ubuntu-mac/ubuntu-12.04.1-desktop-amd64+mac.iso"

USBDEV="/dev/sdb"

# NOTE: the USBDEV should not have any numbers in it. Replace 'X' with the

# appropriate LETTER ONLY.

# 0) sanity checks

mount | grep "${USBDEV}" | awk '{print $1}' | xargs -n1 sudo umount

[ ! -f "${UBUNTUISO}" ] &&

{ echo >&2 "ERROR: Can't find ${UBUNTUISO}";exit 1; }

# 1) format the usb thumb drive

sudo mkfs.vfat "${USBDEV}" -I

# 2) mount the iso

sudo mkdir /media/iso

sudo mount -o loop "${UBUNTUISO}" /media/iso

# 3) mount the usb drive

sudo mkdir /media/external

sudo mount "${USBDEV}" /media/external

# 4) copy the iso contents to usb drive

sudo rsync -avPh --stats /media/iso/ /media/external/

# 5) prep for syslinux

sudo mv /media/external/isolinux /media/external/syslinux

sudo mv /media/external/syslinux/isolinux.cfg /media/external/syslinux/syslinux.cfg

# 6) add nomodeset to grub parameters (needed for 2011 MBA)

sudo sed -i "s/quiet splash/quiet splash nomodeset/g" /media/external/boot/grub/loopback.cfg

sudo sed -i "s/quiet splash/quiet splash nomodeset/g" /media/external/syslinux/txt.cfg

# 7) unmount

sudo umount /media/iso

sudo umount "${USBDEV}"

# 8) make disk bootable

sudo apt-get install syslinux mtools

sudo syslinux "${USBDEV}"

after burn iso to the udisk, insert the udisk into usb port, then press alt-option key when power on the mbp, choose udisk boot

then press F2,F6,F8(i don`t know whether this can stop the normal install and give us a chance to set acpi-off), when menu show up, choose acpi=off submenu, esc , then enter. now you can see the familiar
install gui.

plug in a usb keyboard and use mouse, because i can`t use the built-in usb input for now.

===drivers====================================================================================

after installation, there are some step you need to take to make ubuntu run perfectly.

first of all, of course, we should install all update package to exclude stupid problem, and reboot. after that , follow the step listed below.

1. press alt-option key to when power on the mbp. select ubuntu boot, in my case, it shows as [windows]

2. when ubuntu grub menu show up, press E to modify start up option, add acpi=off to avoid a hang up.

3. we can`t use built-in keyboard and touch pad, so after enter ubuntu, we should install some module

sudo dmidecode -s system-product-name

apt-get install xserver-xorg-input-synaptics

sudo add-apt-repository ppa:mactel-support/ppa

sudo apt-get update

[sudo apt-get install btusb-dkms applesmc-dkms hid-apple-dkms] error occured in this step, so i choose the following one.

sudo apt-get install applesmc-dkms

then edit the grub.cfg file to set acpi option. just add acpi=off in the parameter line.

then reboot, we can use the touchpad and keyboard now.

enjoy your ubuntu on mbp!

4. i still can`t get my bcm4331 wireless work, but i bought a tenda w811m wireless before, i even don`t have to install driver or do extra work for it, just plug in it, it works ...

so don`t bother the bcm4331 stuff, just use this, when i have time, i will figure it out.

i tried a lot of method, including add blacklist, but by the end, someday, update manager show a update list which includes b43xxx-fwuterxxx, and b43 installer, extracterxxx, after i install,
run sudo modprobe b43, it works...... i don`t know this update show up, maybe i use 163 sources, or add a third party sources?

maybe the following step works, but not immediately, but after this update.

1. First install b43-fwcutter and firmware-b43-installer from ppa:mpodroid/mactel

Open up terminal from the dash home(or press Ctrl+Alt+T), execute following commands:

sudo add-apt-repository ppa:mpodroid/mactel
sudo apt-get update
sudo apt-get install b43-fwcutter firmware-b43-installer


2. Install linux-backports-modules-cw-3.3-precise-generic:

sudo apt-get install linux-backports-modules-cw-3.3-precise-generic


if you have the pae kernel installed, install:

sudo apt-get install linux-backports-modules-cw-3.3-precise-generic-pae


3. Edit the /etc/modprobe.d/blacklist.conf with your favorite editor, here use gedit:

sudo gedit /etc/modprobe.d/blacklist.conf


add this line and save it.

blacklist ndiswrapper


4. Create or edit the file /etc/pm/config.d/modules:

sudo gedit /etc/pm/config.d/modules


make sure the wireless modules (b43 and bcma) are blacklisted:

SUSPEND_MODULES="b43 bcma"


===fix boot of windows=============================================================================

after we install ubuntu, the parition table is changed from gpt to gpt+mbr by ubuntu, but windows8 we install before ubuntu only supports gpt table partition.

so we install change the partition back to gpt.

sudo apt-get install gdisk


and then use the tool to create a protected mbr.

reboot, you will find ubuntu disappear in the boot menu, but after repair, we got windows back.

===fix boot of ubuntu==============================================================================

now we need to replace grub with grub-efi,

insert a rescue cd or udisk, in my case, i use the install udisk, and enter ubuntu, open a terminal, do chroot job following the step listed below.

cd /
mount -t ext3   /dev/sda1 /mnt          #如果你使用pre-0.7.1 CD,sda1就是/dev/discs/disc0/part1
mount -t proc   proc      /mnt/proc
mount -t sysfs  sys       /mnt/sys
mount -o bind   /dev      /mnt/dev

chroot /mnt /bin/bash

now we get my ubuntu root system back, I will modify grub in this environment

then install a grub-efi

sudo apt-get install grub-efi-amd64

then cd to /usr/lib/grub/ 64 base directory

then make a grub.efi

../grub-mkimage -O ${EFI_ARCH}-efi -d . -o grub.efi -p "" part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot configfile linux multiboot
sudo cp grub.efi *.mod *.lst /mnt/EFISYS/efi/grub


Note : The -p "" option is important for creating a portable grub.efi app. Now create a grub.cfg in /mnt/EFISYS/efi/grub :

sudo touch /mnt/EFISYS/efi/grub/grub.cfg


then update-grub2, and copy grub.cfg to /EFISDAX/EFI/grub/

then reboot.

still can`t work, need do more jobs to let EFI boot recoganize the grub

at last, i install rEFIt in my mac os, and the reboot twice,

everything works now.

===applications=================================================================

how to install qq.

enter the following website, download the latest package, this is a self-support wine based qq.

http://www.longene.org/forum/viewtopic.php?f=6&t=4700

install the package, but still can`t run, because we install 64bit ubuntu, so we need to install ia32 environment

sudo apt-get install ia32-libs

now type QQ in app search , run QQ2012, we get QQ2012 running on our ubuntu.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: