You are not logged in.

#1 2021-02-10 16:14:16

AngelicLolipop
Member
Registered: 2021-02-10
Posts: 4

[SOLVED] Troubles booting

I have installed Arch Linux a couple of times before, but now when I try to do it, it wont boot into grub. I was trying to do full disk encryption, and it wouldn't work, now reverting back to normal installation, it still does not work. I followed the Arch Wiki Installation Guide along with the grub bootloader wiki page. I am lost because I believe that I have done everything needed, but still it doesn't boot to grub. When I go into bios and boot to the boot device GRUB (It does show up properly) it immediately exits out. I am currently using OracleVirtualBox to try to figure this out because when I tried to install fully on my laptop it had the same outcome. Below I am going to post what I did to install arch linux, specifically with full disk encryption, but keep in mind, the issue I am facing also is applied when not using full disk encryption:

 gdisk /dev/device

	o
	n
	+512M
	ef00
	n
	
	w

(In summary, make 2 partitions, a boot partition (512M) and a root partition (rest free))

cryptsetup luksFormat /dev/device
cryptsetup open /dev/device cryptroot


mkfs.ext4 /dev/mapper/cryptroot
mkfs.fat /dev/device1 (boot partition)

mount /dev/mapper/vol-root /mnt
mkdir /mnt/boot
mount /dev/device1 /mnt/boot (boot parititon)

pacstrap /mnt base base-devel linux linux-firmware vim grub efibootmgr

genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc
Uncomment respective locale in /etc/locale.gen
locale-gen
add "LANG=en_US.UTF-8" to "/etc/locale.conf"
add your hostname to /etc/hostname
add the following to /etc/hosts:

127.0.0.1	localhost
::1		localhost
127.0.1.1	myhostname.localdomain	myhostname

edit /etc/mkinitcpio.conf and add "keyboard keymap udev encrypt lvm2" to HOOKS
mkinitcpio -P

add and uncomment the following to /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 splash quiet"
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sdXY:cryptroot"
GRUB_ENABLE_CRYPTODISK=y

mkdir /boot/efi
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --recheck
grub-mkconfig -o /boot/grub/grub.cfg

passwd (input password)

add the following to /etc/crypttab:
cryptroot	/dev/mapper/cryptroot		none

sync
exit (exit chroot)
reboot

Something someone might ask is: am I using efi in Virtualbox? Yes
A note about the Virtualbox. The virtual box drive is 8GB, and to just test to see how my partitioning will go,

the partitions are as such for the above installation
8GB /dev/sda
    /dev/sda1 (boot)        /boot/efi
    /dev/sda2 (cryptroot) /


Thank you in advance for helping me solve my (hopefullly) simple and silly mistake in forgetting something. smile

Last edited by AngelicLolipop (2021-02-10 18:40:54)

Offline

#2 2021-02-10 17:00:21

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,733
Website

Re: [SOLVED] Troubles booting

AngelicLolipop wrote:
mkdir /mnt/boot
mount /dev/device1 /mnt/boot (boot parititon)
[...]
mkdir /boot/efi
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --recheck

The --efi-directory option is supposed to point to the root of the EFI system partition rather than a sub-directory. Perhaps try again but mount the ESP under /boot/efi instead (and keep the same grub-install option).

I've never used encryption though so I might be missing something obvious.

If you still have problems then check the boot entries:

efibootmgr -v

Offline

#3 2021-02-10 17:16:15

AngelicLolipop
Member
Registered: 2021-02-10
Posts: 4

Re: [SOLVED] Troubles booting

Thanks that worked for me big_smile Like I thought, it would be a silly error on my part.

You have a great rest of your day smile

(Not super sure how to/if I need to mark this as answered, could I have clarification on that? Thanks)

Last edited by AngelicLolipop (2021-02-10 17:17:24)

Offline

#4 2021-02-10 18:16:33

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,733
Website

Re: [SOLVED] Troubles booting

AngelicLolipop wrote:

Not super sure how to/if I need to mark this as answered, could I have clarification on that?

Edit the title of the thread (in the first post) and prepend [SOLVED].

Offline

Board footer

Powered by FluxBB