2012年9月5日 星期三

ubuntu - How to boot ubuntu 12.04 on EUFI system ?

1. Format the USB disk to fat32.
mkfs.vfat /dev/sdb1
2. Used the live CD and entry the OS.
3. Following the cmd ..

sudo -s
mkdir /mnt/ubuntu && mount /dev/sda5 /mnt/ubuntu
mount --bind /dev /mnt/ubuntu/dev
mount -t sysfs /sys /mnt/ubuntu/sys
mount -t proc /proc /mnt/ubuntu proc
chroot /mnt/ubuntu bash

4. Install the "grub-efi-amd64-bin"
apt-get install grub-efi-amd64-bin grub-efi-amd64
5. Execute the grub 
grub-install

6. Make the grub config file
cd /etc/grub.d
cp 40_custom 06_custom

and edit this file ...

menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
insmod part_gpt
insmod fat
set root='(hd0,gpt1)'
search --no-floppy --fs-uuid --set=root 46bd-600e
chainloader ($root)/EFI/Boot/bootx64.efi
}

7. Execute the grub ...
update-grub2

8. Create the folder on USB disk
mkdir -p efi/boot

9. copy the grub file to USB disk
cp /boot/grub/grub.efi /efi/boot/bootx64.efi

沒有留言: