You are not logged in.
Pages: 1
There seem to be a lot of questions about how to use GPT and EFI installs. I keep a simple text file of what I need to do everytime I install Arch, and I just updated my personal instructions for an EFISTUB install onto a USB. I figured I'd throw this up here in case it helps anybody.
ctrl + alt F2 # Switch to 2nd virtual console
dhcpcd eth0 # Connect via ethernet
elinks https://wiki.archlinux.org/index.php # Open the Arch Linux Wiki - Go to Beginner's Guide
fdisk /dev/sdb
n # New partition
enter # Default start sector
+512M # Create 512MiB partition
t # Change partition type
ef # Designate the partition as an EFI system
a # Toggle boot flag
n
enter
enter # Create root partition
w # Write the DOS table
gdisk /dev/sda # Start GPT fdisk
x # Expert menu
l # Adjust sector alignment value
1
m # Main menu
n
enter
enter
8300 # Designate partiton as a Linux filesystem
w # Write the GPT table and exit
mkfs.vfat -F 32 -n boot /dev/sdb1 # Format the /boot partition to FAT32 for EFI
mkfs.btrfs -L root /dev/sdb2
mkfs.btrfs -L home /dev/sda1
mount -o compress=lzo /dev/sdb2 /mnt
mkdir /mnt/boot
mount /dev/sdb1 /mnt/boot
mkdir /mnt/home
mount -o compress=lzo /dev/sda1 /mnt/home
modprobe efivars
efibootmgr -b X -B # Deletes boot entry X
pacstrap /mnt base base-devel
genfstab -p -U /mnt > /mnt/etc/fstab
# Edit /mnt/etc/fstab
compress=lzo,defaults,ssd 0 1
compress=lzo,defaults,relatime 0 2
arch-chroot /mnt
echo $HOST > /etc/hostname
echo KEYMAP=unicode > /etc/vconsole.conf
echo America/Los_Angeles > /etc/timezone
ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
echo LANG=en_US.UTF-8 > /etc/locale.conf
# Edit /etc/locale.gen
en_US.UTF-8
locale-gen
# Edit /etc/mkinitcpio.conf
add usb after udev
# Edit /etc/mkinitcpio.d/linux.preset
ALL_kver="/boot/vmlinuz-linux.efi"
mkinitcpio -p linux
# Edit /boot/linux.conf
root=/dev/sdb2 ro rootfstype=btrfs add_efi_memmap consoleblank=0 initrd=initramfs-linux.img
pacman -S sudo
EDITOR=nano visudo # Edit the sudoers file
%wheel ALL=(ALL) ALL # Uncomment this line so the wheel group can use sudo
# Edit /etc/pam.d/su
auth required pam_wheel.so use_uid
passwd root
exit
echo "root=/dev/sdb2 ro rootfstype=btrfs add_efi_memmap consoleblank=0 initrd=\\initramfs-linux.img" | iconv -f ascii -t ucs2 | efibootmgr --create --gpt --disk /dev/sdb --part 1 --label "Arch Linux" --loader '\vmlinuz-linux.efi' --append-binary-args -
echo "root=/dev/sdb2 ro rootfstype=btrfs add_efi_memmap initrd=\\initramfs-linux-fallback.img" | iconv -f ascii -t ucs2 | efibootmgr --create --gpt --disk /dev/sdb --part 1 --label "Arch Fallback" --loader '\vmlinuz-linux.efi' --append-binary-args -
umount /mnt/{boot,home}
reboot
pacman -S systemd-sysvcompat # Install for a pure systemd system
Last edited by Elfo (2012-08-21 14:11:56)
Offline
Have you been able to boot the latest install media [2012.08.04] in UEFI mode to do this?
Offline
If you have updated instructions for EFI, check the wiki page for it and either edit it or start a discussion about any edits you think need making. The whole Internet would appreciate that ;-)
Offline
Have you been able to boot the latest install media [2012.08.04] in UEFI mode to do this?
Yes. These are the instructions I used just this morning with the 08.07 media to get a bootable system.
If you have updated instructions for EFI, check the wiki page for it and either edit it or start a discussion about any edits you think need making. The whole Internet would appreciate that ;-)
These are pretty much an amalgamation of the instructions in the wiki; I've just seen quite a few threads recently asking for help, and figured this might be helpful ;-)
Offline
KairiTech wrote:Have you been able to boot the latest install media [2012.08.04] in UEFI mode to do this?
Yes. These are the instructions I used just this morning with the 08.07 media to get a bootable system.
Did you boot the install media in UEFI mode from a USB device? If so, how did you create the UEFI bootable USB from the ISO file?
If not, what boot method did you use for the latest version of the ISO?
Last edited by KairiTech (2012-08-07 18:32:25)
Offline
Did you boot the install media in UEFI mode from a USB device? If so, how did you create the UEFI bootable USB from the ISO file?
If not, what boot method did you use for the latest version of the ISO?
I did not boot archiso from a USB drive. I was installing to a USB device, and I didn't want to bother with multiple USB sticks. I burned a CD, and put it into a USB powered Optical Drive. Selected UEFI via the motherboard config, which dumped me into the EFI shell. Typed startup, and was on my way.
Last edited by Elfo (2012-08-07 18:50:24)
Offline
KairiTech wrote:Did you boot the install media in UEFI mode from a USB device? If so, how did you create the UEFI bootable USB from the ISO file?
If not, what boot method did you use for the latest version of the ISO?
I did not boot archiso from a USB drive. I was installing to a USB device, and I didn't want to bother with multiple USB sticks. I burned a CD, and put it into a USB powered Optical Drive. Selected UEFI via the motherboard config, which dumped me into the EFI shell. Typed startup, and was on my way.
So the latest install media was not used to do this!
Last edited by KairiTech (2012-08-08 14:25:22)
Offline
I'm still looking for confirmation that the latest install media is bootable in UEFI mode.
Last edited by KairiTech (2012-08-08 14:26:44)
Offline
Oh, that was just a brain fart. I used the archlinux-2012.08.07_04-00-01-netinstall-dual.iso.
Offline
Offline
You say that this is for GPT and UEFI but it appears to be for a mixture of GPT and MBR. That is, sda is formatted with GPT and sdb is formatted with MBR. Or have I misunderstood?
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Doesn't the new install media come with instructions for setting this up which don't rely on downloading additional stuff from sourceforge etc.? The README file seems to think the install media itself contains everything needful.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
@cfr - I noticed that it was a mixture as well. The only reason I can think of doing such a thing is that maybe he has Windows on there booting in legacy BIOS mode. This would certainly be a way to implement UEFI with a Windows/BIOS dual boot setup. Elfo, can you explain? I am very curious indeed...
Offline
The fstab looks odd to me, too. I don't use btrfs at all but surely you still need to specify the partitions and mount points?
Note: I don't mean to sound critical. I'm really interested but I find what's been posted rather under-explained.
Last edited by cfr (2012-08-11 00:11:44)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Sorry for the late reply, I was under the impression no one cared about my post.
sdb is a usb stick, one in which I've had difficulties partitioning with gdisk before. So, I left it as a DOS partition table (fdisk) and used gdisk on the home hard drive only.
It doesn't really matter whether you mix it, or go full gpt; seeing as EFI get its' very own partition.
As far as the fstab with specific mounts for btrfs, I don't have any subvolumes here. I could extend btrfs across both partitions, but I prefer to keep my root and home as separate disks.
Offline
I definitely agree that I like my usb sticks w/ a dos partition table, but the point cfr pointed out about the fstab... I still don't get it. Is that just a reference for the parts that don't change? I have not extensively used btrfs (or rather have ot used all the features of btrfs).
Offline
Offline
Oooh, I see the confusion now. This is simply an instruction file that I keep to remind myself how to set up Arch whenver I install. The fstab entries here are not verbatim for what is actually used, you can see that I do a UUID based fstab generation. What's shown in my post is simply a reminder so that I enable the right options in my fstab.
Offline
Ah. Thanks. That's clearer.
Maybe you should edit your original post to make clear you are using a mix of MBR and GPT. Otherwise, somebody trying to install GPT/UEFI is likely to get rather confused. (They shouldn't use fdisk to create the EFI partition in that case, for example. In fact, they shouldn't use fdisk at all.)
Also, 100M is not a good size for the EFI partition as a recommendation. That is, if it works for you, that's great but officially a fat 32 partition should be at least 512M and some firmware will refuse to boot from a smaller EFI partition unless it is formatted as fat 16. (Possibly it will refuse anyway but I suspect it is the size issue - I just didn't realise that when I discovered that fat 16 magically solved my issues with EFI booting.)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Pages: 1