[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?
>
> Thanks!
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQIcBAEBAgAGBQJRMZ+5AAoJELJhbl/uPb4SAA4P/3xG4C5viqdgdZhtZ72hFC9v
> VLBWw9CguzTvqYMydO4TTqwpyObW0iPFMWRzlkMt7YjmC83qgQJDAI1P7KR4fpHE
> fHjyqS7IKFnLe4ckKnKJIQMGeEbwcsAaF0Loy/22dW+5U10IRy39NIlvUdWQJKtc
> O7vpch/lZ2DKFd7zmKgKLu2FLuZK0FvwN2cGH91cYP66rloqaXytXWLZ3IIvCtf5
> mGJqwx4CjKWf3FefFANXYsPtb4rmfbE1xl/xeIT4OH0F+0H77EFhFTkBsDknYnHM
> pUg9B5pHmJ+xMiVSDIYYIXpgT/Spk9DWp4+PZN5N8GBE63J8kzWuUqTVV/XVyR1x
> 0aZCJAo0Ke+swBa6cGZ/WSWRqA4kP9nJBtJ00qX+PE3FFFd8vjYyP7Qz0cmIhfqV
> VHx3UXzI9Q8EkMzlENWD79M+WHLeUPQopsdfmWOOI1E7N+5seeFRmekmB+jY1NRJ
> uXNPCq5w0iIaWB4KuAmchbP3qtoGxU5oXJ5IPh3NQOIdbScN0+4l6HtOmnxMQ2H1
> HyR/2nV0e5rvuhsuKBn2ZGyLOvYN6I9AjFBPI5VmY2Ansy750AOOBqXIPLlBouqb
> Oy0h26dfyn8RdlcoYm4QlXzra1p6ZBk5dJ9GxYhVsXxAaUnlrprXtk3HPQcIjpiS
> I4n74T8MiK5TxjSDJO60
> =6UgK
> -----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"
(parted) quit
(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
4. Install
# 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
--efi-directory=/boot/efi --bootloader-id=
arch_grub --recheck
# arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg
# umount /mnt/boot/efi /mnt/boot /mnt
5. reboot
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.
John.
More information about the arch-general
mailing list