[arch-general] UEFI madness
archlinux at jelmail.com
archlinux at jelmail.com
Sat Mar 2 06:29:54 EST 2013
On 02/03/13 06:44, David Benfell wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Hi all,
> So far, my attempt to install Arch Linux on a UEFI system is a total
> facepalm moment. The problem is in booting post-install.
> So, first, does anyone have actual--and successful--experience
> installing Arch on a UEFI system? Yes, I went to the Arch Wiki, which
> initially pointed me at GummiBoot. There are actually two sets of
> instructions, one given where I looked first, for the UEFI entry, and
> another under the entry for GummiBoot. Neither succeeds, but I wound up
> following the latter set of instructions (and cleaning up extra entries
> with efibootmgr, which fortunately makes this relatively easy).
> GummiBoot says it can't find /vmlinuz-linux. I tried modifying the
> configuration to say /boot/vmlinuz-linux, but no joy. Apparently, I'm
> really supposed to copy this file and the initrd image to the EFI
> partition, but nobody says where in the EFI partition, so I have no idea.
> I also tried following the instructions for grub-efi. I'm just
> mystified. I managed to install the right package, but from there I just
> wasn't understanding a thing. I've been using linux since 1999 so this
> shouldn't be so completely mystifying.
> I tried installing rEFInd (from sourceforge). As near as I can tell, it
> does indeed detect all the possible boot options on the system. But when
> I try booting the Arch installation, it says it can't find the root
> partition. It also detects the GummiBoot option, but that leads the same
> place as before. Finally, it detects the Windows option, which I hope
> still works (unfortunately I do need this).
> I guess getting something that just works--like it did with BIOS
> systems--is not in the cards. What do I do now?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> -----END PGP SIGNATURE-----
There is an article in "Linux Format" magazine issue March 2013 (no 168)
about UEFI and it includes a worked example that uses Arch as a guest in
VirtualBox. It uses GPT partitions and Grub as a boot loader and can
boot either via BIOS or UEFI. If there's a chance you can get hold of
that it may help you out. In case you can't here's a gist...
1. Boot system from the Arch November 2012 CD
2. Format disk with gdisk and create 4 partitions, for example (this was
a 10Gb test disk):
Number Start End Size Code Name
1 2048 411647 200.0 MiB EF00 EFI System
2 34 2047 1007.0 KiB EF02 BIOS boot partition
3 411648 821247 200.0 MiB 8300 Linux /boot filesystem
4 821248 20971486 200.0 MiB 8300 Linux /root filesystem
# parted /dev/sda
(parted) unit s
(parted) mktable gpt
(parted) mkpart primary 2048 411647
(parted) set 1 boot on
(parted) name 1 "EFI System Partition"
(parted) mkpart primary 34 2047
(parted) name 2 "BIOS Boot Partition"
(parted) set 2 bios_grub on
(parted) mkpart primary ext2 411648 821247
(parted) name 3 "Linux /boot filesystem"
(parted) mkpart primary ext4 821248 20971486
(parted) name 4 "Linux /root filesystem"
(the BIOS partition is there so you can also install a BIOS boot
partition in case you want to move the disk to a non-UEFI system. You
probably won't need it - it just sits in the wasted space between the
end of the GPT partition table and the first aligned sector).
3. Make and mount filesystems
# mkfs.vfat -F32 /dev/sda1
# mkfs.ext2 /dev/sda3
# mkfs.ext4 /dev/sda4
# mount /dev/sda4 /mnt
# mkdir /mnt/boot
# mount /dev/sda3 /mnt/boot
# mkdir /mnt/boot/efi
# mount /dev/sda1 /mnt/boot/efi
# pacstrap /mnt base
# genfstab -p -U /mnt | sed 's/cp437/437/' >> /mnt/etc/fstab
# arch-chroot /mnt pacman -S grub-efi-x86_64
# modprobe efivars
# arch-chroot /mnt grub-install --target=x86_64-efi
# arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg
# umount /mnt/boot/efi /mnt/boot /mnt
6. If you want to make it BIOS compatible too:
# pacman -S grub-bios
# grub-install --target=i386-pc --recheck /dev/sda
Hope it helps.
More information about the arch-general