Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gentoo not booting in virtualbox after installation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
jwtiyar89
n00b
n00b


Joined: 14 Sep 2021
Posts: 5
Location: Iraq

PostPosted: Tue Sep 14, 2021 5:23 am    Post subject: gentoo not booting in virtualbox after installation Reply with quote

Hey
Its first time installing gentoo(virtualbox), I think i did everything correctly according to wiki to install gentoo, but after i did reboot the system gentoo won't boot gives the error that no bootable medium found, i already installed grub and set it up, but when i did :
Code:
grub-mkconfig -o /boot/grub/grub.cfg

i got an warning about os-prober which will no be excuted to find other systems, and I ignored it.
Now after searching there was a solution to add following line to disable os-prober in /etc/default/grub file:
Code:
GRUB_DISABLE_OS_PROBER=false


After this workaround also i still get same error after making mkconfig command:
Code:
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Back to top
View user's profile Send private message
kukibl
Apprentice
Apprentice


Joined: 10 Jun 2008
Posts: 176

PostPosted: Tue Sep 14, 2021 5:54 am    Post subject: Reply with quote

Can you provide more info about your partitions layout and VirtualBox settings?

One of the common mistakes is to pick GPT partition table without dedicated BIOS partition, but I think that GRUB would warn you during install.
Back to top
View user's profile Send private message
jwtiyar89
n00b
n00b


Joined: 14 Sep 2021
Posts: 5
Location: Iraq

PostPosted: Tue Sep 14, 2021 6:04 am    Post subject: Reply with quote

kukibl wrote:
Can you provide more info about your partitions layout and VirtualBox settings?

One of the common mistakes is to pick GPT partition table without dedicated BIOS partition, but I think that GRUB would warn you during install.


Thank you for reply
First made GPT partition table
And created three partitions sda1,2,3
sda1 for efi partition (formated as vfat) with this command:
Code:
mkfs.vfat -F 32 /dev/sda1

sda2 swap
sda3 /
Back to top
View user's profile Send private message
jwtiyar89
n00b
n00b


Joined: 14 Sep 2021
Posts: 5
Location: Iraq

PostPosted: Tue Sep 14, 2021 6:08 am    Post subject: Reply with quote

Forget to mention this command didn't work during installation:
Code:
grub-install --target=x86_64-efi --efi-directory=/boot


which was raiesed and error that:
Code:
EFI variables not supported on this system


But doing this command was worked:
Code:
grub-install --target=x86_64-efi --efi-directory=/boot --removable
Back to top
View user's profile Send private message
kukibl
Apprentice
Apprentice


Joined: 10 Jun 2008
Posts: 176

PostPosted: Tue Sep 14, 2021 6:30 am    Post subject: Reply with quote

You do not need EFI partition unless you selected "Enable EFI" in VirtualBox VM setup.

However, in case of GPT partition, you do need BIOS boot partition (usually few MB) which you do not format, GRUB will recognize it. Note that afaik this case is not treated in Handbook.

Edit:

Quote:
What is the BIOS boot partition?

A BIOS boot partition is only needed when combining a GPT partition layout with GRUB2 in BIOS/Legacy mode. It is not required when booting in EFI/UEFI mode, and also not required when using a MBR table. It is a very small (1 to 2 MB) partition in which boot loaders like GRUB2 can put additional data that doesn't fit in the allocated storage. It will not be used in this guide.


Just reuse current EFI partition as BIOS boot partition (change it's type using cfdisk or gparted, depending what you use) and reinstall GRUB with:

Code:
grub-install /dev/sda
Back to top
View user's profile Send private message
jwtiyar89
n00b
n00b


Joined: 14 Sep 2021
Posts: 5
Location: Iraq

PostPosted: Tue Sep 14, 2021 10:20 am    Post subject: Reply with quote

kukibl wrote:
You do not need EFI partition unless you selected "Enable EFI" in VirtualBox VM setup.

However, in case of GPT partition, you do need BIOS boot partition (usually few MB) which you do not format, GRUB will recognize it. Note that afaik this case is not treated in Handbook.

Edit:

Quote:
What is the BIOS boot partition?

A BIOS boot partition is only needed when combining a GPT partition layout with GRUB2 in BIOS/Legacy mode. It is not required when booting in EFI/UEFI mode, and also not required when using a MBR table. It is a very small (1 to 2 MB) partition in which boot loaders like GRUB2 can put additional data that doesn't fit in the allocated storage. It will not be used in this guide.


Just reuse current EFI partition as BIOS boot partition (change it's type using cfdisk or gparted, depending what you use) and reinstall GRUB with:

Code:
grub-install /dev/sda


Thank you,

change its type to bios_grub or ext2 is enoght?
Back to top
View user's profile Send private message
kukibl
Apprentice
Apprentice


Joined: 10 Jun 2008
Posts: 176

PostPosted: Tue Sep 14, 2021 12:17 pm    Post subject: Reply with quote

ext2 is filesystem. You need to change the type of partition to BIOS boot (use the fdisk or cfdisk or gparted). I am not behind my Linux machine now, so I cannot check what is exact code for this particular partition type.

Maybe it is the best to give us output of lsblk and fdisk /dev/sda here, because I am only assuming the cause.
Back to top
View user's profile Send private message
jwtiyar89
n00b
n00b


Joined: 14 Sep 2021
Posts: 5
Location: Iraq

PostPosted: Tue Sep 14, 2021 2:29 pm    Post subject: Reply with quote

kukibl wrote:
ext2 is filesystem. You need to change the type of partition to BIOS boot (use the fdisk or cfdisk or gparted). I am not behind my Linux machine now, so I cannot check what is exact code for this particular partition type.

Maybe it is the best to give us output of lsblk and fdisk /dev/sda here, because I am only assuming the cause.


thank you very much, just enabled efi mode in vm and it worked well, Only problem that i didn't know that i have to enable efi in vm also.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum