You are not logged in.

#26 2014-11-15 02:56:49

TE
Member
Registered: 2014-06-21
Posts: 78

Re: I'm a little confused about gpt and partitioning

Let me try and help you using commands -- I installed Virtualbox, went into the settings for a new VM and turned on UEFI. I added the .iso and booted in the default UEFI mode. As out-of-the-box as I could make it so you can do exactly what I did below.

First, partition your device  in GPT format (I prefer gdisk or parted) like so:

/dev/sda1  size:200M  type:ef00
/dev/sda2  size:500M  type:8300
/dev/sda3  size:rest  type:8e00

Now create /dev/sda3 as LVM - I prefer LVM, it's got what partitions crave:

pvcreate /dev/sda3
vgcreate vglocal00 /dev/sda3
lvcreate -L 1G -n swap00 vglocal00
lvcreate -l 100%FREE -n root00 vglocal00

Make your swaps, ext4 and vfat for EFI:

mkswap /dev/vglocal00/swap00
mkfs.vfat /dev/sda1
mkfs.ext4 /dev/sda2
mkfs.ext4 /dev/vglocal00/root00

Mount everything - notice how my /dev/sda1 is a /boot/efi VFAT (aka FAT32) partition type:

swapon /dev/vglocal00/swap00
mount /dev/vglocal00/root00 /mnt
mkdir /mnt/boot
mount /dev/sda2 /mnt/boot
mkdir /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi

Pacstrap the bits and chroot into the mount:

pacstrap /mnt base
genfstab -p /mnt >> /mnt/etc/fstab
arch-chroot /mnt

Prep the system with all the usual things:

export LANG="en_US.UTF-8"
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
local-gen

cat << EOF > /etc/locale.conf
LANG="en_US.UTF-8"
LC_COLLATE="C"
EOF

cat << EOF > /etc/vconsole.conf
KEYMAP="us"
FONT="latarcyrheb-sun16"
EOF

ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
hwclock --systohc --utc
echo "toolbox" > /etc/hostname
hostname "toolbox"

Install grub, headers, os-prober (so grub can see your Windows) and the UEFI tools:

pacman -Sy --noconfirm
pacman -S --noconfirm grub linux-headers os-prober intel-ucode dosfstools efibootmgr

Since I like LVM, add the mkinitcpio hook:

sed -i.bak -r 's/^HOOKS=(.*)block(.*)/HOOKS=\1block lvm2\2/g' /etc/mkinitcpio.conf
mkinitcpio -p linux

Install grub2 in UEFI mode and add the hack for some BIOS that expects the boot bits in a specific place:

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck --debug
grub-mkconfig -o /boot/grub/grub.cfg
mkdir /boot/efi/EFI/boot
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/EFI/boot/bootx64.efi

Finally, set the password for root, back your way out and reboot:

passwd root
exit
umount -R /mnt
reboot

Vioila - Arch in full UEFI mode in Virtualbox. Obviously you have other concerns with wanting to gently integrate your existing Windows in full UEFI mode, so you wouldn't format that partition (that would erase the other Win8 UEFI bits) and so on -- but this should give you enough to practice and get the basics down pat before you wreck your real machine. smile

Side note: gdisk and parted display the UEFI (/dev/sda1 here) in different ways -- gdisk shows it as an ESP (EFI System Partition), parted likes to show it instead with flags "boot,esp" -- this is all the same, it's type ef00 under the hood on a GPT disk. "Linux Filesystem" is how gdisk displays a classic 83 (8300) type partition btw, the same you'd see in fdisk with MBR.

Last edited by TE (2014-11-15 03:29:55)

Offline

#27 2014-11-15 20:39:15

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

Re: I'm a little confused about gpt and partitioning

Hmm, thanks for this, I will definitely try once I get back to work. What is LVM?

Note: I'm reading the wiki just need more laymans term explanation I believe

Ok Read a bit more and figured it out, it's basically a more advanced way of logically partitioning, for example the partition can scale beyond the single physical hard disk.

Thanks

Last edited by LiquidAurum (2014-11-17 16:02:30)

Offline

Board footer

Powered by FluxBB