Installation fails on grub step on virtualbox [no issue]

The Commodore OS Vision Linux distribution and Linux software discussion and help.
Post Reply
antistatic
Posts: 5
pinterest Kuchnie na Wymiar Warszawa
Joined: Sat Jan 04, 2025 12:42 pm
Contact:

Installation fails on grub step on virtualbox [no issue]

Post by antistatic »

Hey,

like the title says I am trying out COS in virtualbox (the 2023-12 iso).

When the installer tries to set up grub it shows an error dialog (no additional information there) and outputs the following.

Code: Select all

Installing GRUB
grub-install --target=i386-pc --recheck --no-floppy --force --boot-directory=/mnt/antiX/boot /dev/sda
/bin/unmount -R /mnt/antiX/run
/bin/unmount -R /mnt/antiX/proc
/bin/unmount -R /mnt/antiX/sys
/bin/unmount -R /mnt/antiX/dev
/bin/unmount -q /mnt/antiX/boot/efi
FAILED Phase 3 - GRUB installation failed. You can reboot to the live medium and use the GRUB Rescue menu to repair the installation.
/usr/bin/mountpoint -q /mnt/antiX/boot/efi
/usr/bin/mountpoint -q /mnt/antiX/proc
/usr/bin/mountpoint -q /mnt/antiX/sys
/usr/bin/mountpoint -q /mnt/antiX/dev/shm
/usr/bin/mountpoint -q /mnt/antiX/dev
The virtualbox version is 7.1.4 (on Linux x86_64 arch). I hope this information helps to address the issue.

--
anits
Last edited by antistatic on Sun Jan 19, 2025 1:59 pm, edited 1 time in total.

User avatar
LeoNigro
Site Admin
Posts: 297
Joined: Mon Aug 14, 2023 1:29 pm
Contact:

Re: Installation fails on grub step on virtualbox

Post by LeoNigro »

That's really weird... Are you sure you did it right?
The VirtualBox install has always gone smoothly.
Did you do a full disk install? It sets up grub automatically.
Image Commodore OS creator. Site Admin. Owns: C64, C128D(Sidekick64), A500, A1000(piStorm), C64x(i7)

antistatic
Posts: 5
Joined: Sat Jan 04, 2025 12:42 pm
Contact:

Re: Installation fails on grub step on virtualbox

Post by antistatic »

Setup is pretty (boring) standard hardware (x86_64 intel laptop). Host is (also boring) up-to-date Manjaro "stable". For reference: Two other Linux guests installed just fine only a few days ago. Looks like some strange race condition with only MX (no clue…).

Out of curiosity I tried several (unsuccessful) configurations:
1. 32-bit guest: Fails on boot telling me to use a proper 64-bit setup… nice! :)
2. UEFI guest: Boots a little faster into live system - otherwise grub fails (exactly same results).
3. Tried wiht VDI and VHD disk formats (20 GiB growing and fixed size)

:?: Only thing I noticed in the installer output:
The `--target=i386-pc` argument in the output is correct? (VM type is set to "Other Linux 64-bit")

:idea: A kernel error shows when booting the live system complaining about not being able to load the virtual box kernel modules. Bets are on some compatibility issue with latest vbox. May as well be complete rubbish… Right now my information is quite vague…


--

antis

User avatar
LeoNigro
Site Admin
Posts: 297
Joined: Mon Aug 14, 2023 1:29 pm
Contact:

Re: Installation fails on grub step on virtualbox

Post by LeoNigro »

Please note: You are talking about an issue with VirtualBox within another linux distro.
On Windows Virtualbox I have noticed that selecting Ubuntu as the Linux subtype works fine.

I think it could be the VirtualBox guest additions from Windows throwing a spanner in the works when you install COS2 on VirtualBox on Linux.
COS2 was generated within the Windows version of Virtualbox at the time.
This means the VirtualBox guest additions must have been included(or at a minimum the config files) in the distro, and therefore could quite easily become incompatible when VirtualBox is updated or newer versions of VirtualBox are released.
I must admit this is probably a noob error on my part. You live you learn.
Having done the same, as I come to test COS3 installation on real hardware I see it complains about the VirtualBox kernel service on boot up.
This means I'll have to generate the final COS3 on real generic hardware and uninstall the guest additions manually.

Anyway, do you encounter the error when you attempt to boot into the Live ISO the for the first time?
Or later when you actually go through the installation process?
Or is it when you attempt to boot the installed COS2 for the first time?

You might want to try the following within Commodore OS, if at any time you can make it to a prompt, to remove the VB guest additions.

Code: Select all

sudo /opt/VBoxGuestAdditions-7.1.4/uninstall.sh
#You might have to manually change the version number above(ls /opt) as I haven't got an instance of COS2 to check at the moment. 
#PROBABLY NO NEED FOR THIS sudo apt --purge remove 'virtualbox-guest-*'
#PROBABLY NO NEED FOR THIS sudo apt autoremove
This should remove the VirtualBox files that may be confusing the issue.
Then again, I could be completely off track with this as a solution.
Image Commodore OS creator. Site Admin. Owns: C64, C128D(Sidekick64), A500, A1000(piStorm), C64x(i7)

antistatic
Posts: 5
Joined: Sat Jan 04, 2025 12:42 pm
Contact:

Re: Installation fails on grub step on virtualbox

Post by antistatic »

Okay thanks!

Selecting Ubuntu (64 bit; no specific version) does not seem to have any effect.

Also tried removing guest addions for the live system (version 6.1.32 btw. -> very likely incompatible with VBox 7). Is this what you mean? Because otherwise this requires a reboot and it is quite complex to mount the sda partition manually.

Without reboot however this also leads to the same grub error.

The direction sounds plausible at least. not unlikely that the MBR is not writable.

antistatic
Posts: 5
Joined: Sat Jan 04, 2025 12:42 pm
Contact:

Re: Installation fails on grub step on virtualbox

Post by antistatic »

Okay… I was able to install grub manually following these steps:
  • 1. Start the Installer as usual. Then select a custom partition layout and uncheck the "Install Grub for Linux0 and Windows" option (click next and continue with the installation as usual)
  • 2. To install grub I ran "mx-boot-repair" (from live system as root):
    sudo -i
    mx-boot-repair
    (correct drive should be pre-selected in the dialog)
  • 3. Reboot into Grub and load Linux:
    grub> set root=(hd0,1)
    grub> linux /boot/vmlinux-6.5… root=/dev/sda1
    grub> initrd /boot/initrd.img-6.5…
    grub> boot
From here I got the plymouth boot logo and then… well… black screen with blinking cursor (X11 missing?). However… now we have a tty to login (ctrl+alt+f4 -> attention: Use vrtualbox OSK keyboard and make sure you stay inside the VM!).

How is the default password please for both root and Commodore user? (Couldn't find it in the installation instructions).

antistatic
Posts: 5
Joined: Sat Jan 04, 2025 12:42 pm
Contact:

Re: Installation fails on grub step on virtualbox

Post by antistatic »

While fiddling around with grub and actually getting everything to work manually I finally saw my issue here. Simply not enough disk space… :o

For a proper installation the virtual disk needs at least 25 GiB (I chose around 30GiB). I tried only once - however installer ran through without any issues after that.

Sorry if this created unnecessary confusion! (Marking as "no issue")

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest