You are not logged in.

#1 2023-04-24 13:47:42

madderhatter
Member
Registered: 2023-04-24
Posts: 49

System Does Not Boot [SOLVED]

I'm installing Arch inside a virtual box and when I restart I get the grub prompt. I am installing Arch with uefi enabled in virtual box and 3D Acceleration disabled. I am on Virtual Box 7 and I had to disable 3D Acceleration otherwise the initial start up just hangs. Virtual Box is 2 CPU 4GB RAM 20GB Hard Disk

I run the following commands:

I'm partitioning the drive with fdisk
I typed g and set the disk to gpt
3 partitions 
300M boot /dev/sda1
2G Swap     /dev/sda2
17GB Root /dev/sda3

mkfs.fat -F 32 /dev/sda1
mkswap /dev/sda2
swapon /dev/sda2

mount /dev/sda3 /mnt
mount --mkdir /dev/sda1 /mnt/boot

pacstrap -K /mnt base linux linux-firmware

genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /user/share/America/Chicago /etc/localtime
hwclock --systohc

pacman -S vim
vim /etc/locale.gen

en_US.UTF-8 UTF-8

locale-gen

echo archvbox > /etc/hostname

vim /etc/hosts

127.0.0.1     localhost
::1                 localhost
127.0.1.1     archvbox.localdomain     archbox

passwd

pacman -S grub

pacman -S efibootmgr
mkdir /boot/EFI
mount /dev/sda1 /boot/EFI
grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=GRUB

exit
reboot

Last edited by madderhatter (2023-04-26 04:26:14)


We're all mad down here Georgie...

Offline

#2 2023-04-24 13:50:59

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: System Does Not Boot [SOLVED]

Why are you mounting the ESP twice? That's no good at all. You also didn't make a grub config.

Offline

#3 2023-04-24 13:58:57

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,471
Website

Re: System Does Not Boot [SOLVED]

Mounting the ESP twice is odd but would it actually do any harm given that it's just mounting it at the same place again? edit: OOPS, it's not mounted to the same place - yes that's definitely a problem.

It also seems no filesystem was created on sda3, though there must be one of some sort already there or the mount for that would have failed.

The actual source of the (current) issue would indeed seem to be a lack of a grub config.

Last edited by Trilby (2023-04-24 14:54:22)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2023-04-24 13:59:30

madderhatter
Member
Registered: 2023-04-24
Posts: 49

Re: System Does Not Boot [SOLVED]

Well you got me because I don't understand where I mounted it twice. As far as I can tell I'm making the EFI directory and mounting sda1 to the EFI directory. Then I'm telling grub the efi directory is /boot/EFI. Might you share what I missed kindly?


We're all mad down here Georgie...

Offline

#5 2023-04-24 14:01:08

madderhatter
Member
Registered: 2023-04-24
Posts: 49

Re: System Does Not Boot [SOLVED]

Trilby wrote:

Mounting the ESP twice is odd but would it actually do any harm given that it's just mounting it at the same place again?

It also seems no filesystem was created on sda3, though there must be one of some sort already there or the mount for that would have failed.

The actual source of the (current) issue would indeed seem to be a lack of a grub config.

The filesystem is there. I can find it and see it using commands at the grub prompt. But I don't know the Linux Kernel information to finishing booting it that way.


We're all mad down here Georgie...

Offline

#6 2023-04-24 14:05:25

madderhatter
Member
Registered: 2023-04-24
Posts: 49

Re: System Does Not Boot [SOLVED]

Scimmia wrote:

Why are you mounting the ESP twice? That's no good at all. You also didn't make a grub config.

I see it now thanks for pointing that out. So I'll remove the mount --mkdir /dev/sda1 /mnt/boot and just handle that at the end. Let me try this again and see what I get.


We're all mad down here Georgie...

Offline

#7 2023-04-24 14:05:32

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: System Does Not Boot [SOLVED]

madderhatter wrote:

mount --mkdir /dev/sda1 /mnt/boot
mount /dev/sda1 /boot/EFI

madderhatter wrote:
Scimmia wrote:

Why are you mounting the ESP twice? That's no good at all. You also didn't make a grub config.

I see it now thanks for pointing that out. So I'll remove the mount --mkdir /dev/sda1 /mnt/boot and just handle that at the end. Let me try this again and see what I get.


Don't do that. You need to mount everything before running genfstab and pacstrap. Pick where you want the ESP and go with it.

See https://wiki.archlinux.org/title/EFI_sy … unt_points

Last edited by Scimmia (2023-04-24 14:13:14)

Offline

#8 2023-04-24 14:49:03

madderhatter
Member
Registered: 2023-04-24
Posts: 49

Re: System Does Not Boot [SOLVED]

So let me know if I understood you.

mount --mkdir /dev/sda1 /mnt/boot

becomes:

mount --mkdir /dev/sda1 /mnt/boot/EFI

Before pacstrab and genfstab

Then my lgrub install becomes:

pacman -S grub
pacman -S efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=GRUB


We're all mad down here Georgie...

Offline

#9 2023-04-24 14:59:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,471
Website

Re: System Does Not Boot [SOLVED]

Note my edit: I was mistaken - as the two mount commands are not mounting to the same place, that'd definitely be a problem.

Whether you mount the esp to [/mnt]/boot or [/mnt]/boot/EFI is really up to you.  There are some pros and cons of each which are touched on in the wiki (personally I much prefer the former).  But once you chose one you need to stick with it.  Whether your new sequence of commands is "right" depends on the "mkdir" behavior of mount; I've never used that flag.  The man page says it can create the mount point directory - but it does not specify whether it would create all needed parent directories.  So `mount --mkdir /dev/sda1 /mnt/boot` would certainly work in that context but `mount --mkdir /dev/sda1 /mnt/boot/EFI` may or may not (as mount has to create two directories).  I'd just stick with `mkdir -p ...` and mount.

But in any case you still need to generate the grub config.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#10 2023-04-24 17:51:25

madderhatter
Member
Registered: 2023-04-24
Posts: 49

Re: System Does Not Boot [SOLVED]

Don't do that. You need to mount everything before running genfstab and pacstrap. Pick where you want the ESP and go with it.

I've made the following changes:

mount --mkdir /dev/sda1 /mnt/boot
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB

I understand why I was mounting it twice now. Mounting the boot partition to the grub/boot directory needs to happen before pacstrap and genfstab and does in the installation guide. However when you go to install grub the wiki tells me to mount the boot partition too.


But in any case you still need to generate the grub config.

I don't understand this. Is there a command to generate the config that I am missing?


We're all mad down here Georgie...

Offline

#11 2023-04-24 17:57:10

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,471
Website

Re: System Does Not Boot [SOLVED]

madderhatter wrote:

I don't understand this. Is there a command to generate the config that I am missing?

Yes, there's an entire section in the wiki page on grub for configuring grub.  Read it.

Last edited by Trilby (2023-04-24 17:58:14)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#12 2023-04-24 21:02:31

madderhatter
Member
Registered: 2023-04-24
Posts: 49

Re: System Does Not Boot [SOLVED]

Trilby wrote:

Yes, there's an entire section in the wiki page on grub for configuring grub.  Read it.

Found it! Also I figured out I wasn't setting my filesystems in fdisk. Took some reading and review but I corrected those errors. Added:

grub-mkconfig -o /boot/grub/grub.cfg

It boots! Cleanest base Arch Installation I've ever done. Thanks for the help and encouragement to learn!


We're all mad down here Georgie...

Offline

#13 2023-04-24 22:33:59

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: System Does Not Boot [SOLVED]

Please remember to mark your thread [SOLVED] (edit the title of your first post).

Offline

Board footer

Powered by FluxBB