View previous topic :: View next topic |
Author |
Message |
P2erut n00b
Joined: 10 Jan 2025 Posts: 3
|
Posted: Fri Jan 10, 2025 2:09 pm Post subject: GRUB doesn't load the system (QEMU VM) |
|
|
I installed gentoo exactly from the handbook (amd64) in QEMU virtual machine.
QEMU options: qemu-system-x86_64 -hda /mnt/ssd/gentoo/gentoo.img -cdrom /mnt/ssd/gentoo/install-amd64-minimal-20241020T170324Z.iso -boot order=dc -m 4G -cpu host,+avx,enforce -enable-kvm -smp 12 -net nic -net user
After installing GRUB, I entered <eject cdrom> from QEMU monitor to remove the .iso image.
After rebooting, this is what i saw: Booting from Hard Disk... ; under it was GRUB with blinking cursor next to the text, no errors or whatsoever, grub is not able to boot the system. |
|
Back to top |
|
|
Ralphred l33t
Joined: 31 Dec 2013 Posts: 701
|
Posted: Fri Jan 10, 2025 6:52 pm Post subject: |
|
|
What does the set-up of the partition table in the gentoo.img file look like? |
|
Back to top |
|
|
P2erut n00b
Joined: 10 Jan 2025 Posts: 3
|
Posted: Sat Jan 11, 2025 9:44 am Post subject: |
|
|
Ralphred wrote: | What does the set-up of the partition table in the gentoo.img file look like? |
sda1 512M /boot
sda2 514M [SWAP]
sda3 19G / (root) |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54700 Location: 56N 3W
|
Posted: Sat Jan 11, 2025 11:03 am Post subject: |
|
|
P2erut,
The grub prompt and a flashing cursor means the grub loaded but could not find its grub.cfg file.
It has a very primitive shell.
You can use the shell to see what grub can see and enter commands to grub to boot the system.
There is even tab completion.
Is this a BIOS or an EFI install?
It matters as grub installs differently for these two cases. QEMU/KVMs can support either. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
P2erut n00b
Joined: 10 Jan 2025 Posts: 3
|
Posted: Sat Jan 11, 2025 11:32 am Post subject: |
|
|
NeddySeagoon wrote: | P2erut,
The grub prompt and a flashing cursor means the grub loaded but could not find its grub.cfg file.
It has a very primitive shell.
You can use the shell to see what grub can see and enter commands to grub to boot the system.
There is even tab completion.
Is this a BIOS or an EFI install?
It matters as grub installs differently for these two cases. QEMU/KVMs can support either. |
This is a BIOS install with MBR partitioning.
I can tell this is not GRUB's shell as the text is QEMU's default font; it's like it got stuck on boot and it wont react to any input.
However, when booting without any contents in /boot directory, except grub folder, the GRUB's shell is displaying (thinner font and bigger window resolution) and i can type in commands, but obviously i can't manually boot the kernel as there is nothing in the /boot directory to boot from. |
|
Back to top |
|
|
FranciscoJaimes n00b
Joined: 15 Jan 2025 Posts: 24 Location: Mexico
|
Posted: Wed Jan 15, 2025 9:58 pm Post subject: |
|
|
It seems like GRUB is installed, but it’s not finding the bootable system correctly. This can happen if:
GRUB Configuration: The grub.cfg might not be properly set up or missing. Ensure the correct entry is in /boot/grub/grub.cfg to boot the kernel.
Bootloader Installation: You may need to reinstall GRUB, making sure it’s installed on the correct disk (usually /dev/sda in your case). Run:
bash
grub-install /dev/sda
Then regenerate grub.cfg:
bash
grub-mkconfig -o /boot/grub/grub.cfg
Partition Setup: Verify that your boot partition is properly mounted and accessible.
Kernel and Initramfs: Ensure the kernel and initramfs are built and placed in /boot. GRUB needs to point to these files in the config.
Double-check these steps and try again. |
|
Back to top |
|
|
|