Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bios Legacy compatibility [SOLVED]
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
Lawrentyus
n00b
n00b


Joined: 25 Feb 2024
Posts: 2

PostPosted: Sun Feb 25, 2024 4:28 am    Post subject: Bios Legacy compatibility [SOLVED] Reply with quote

Hello! I'm kinda new in Gentoo, and I came across a problem during the "Booting the installation media" part of the Handbook.

Quick context: I've already installed Gentoo in 2022 on an old ThinkPad T400 Core2Duo from 2008 (yes, it took like 24 hours to compile the kernel). But that was a fun experience with no problems at all.

Now I'm trying to install Gentoo on a little bit newer laptop (2012). I started following the Handbook instructions like normal. I download the Gentoo Minimal Installation CD, verified it, burned it into my USB (using dd) and everything was ok.

It caught my attention the phrase from the Handbook:

Quote:
Important
When installing Gentoo on a system with an UEFI firmware interface, ensure the live image has been booted in UEFI mode. In the accidental event that DOS/legacy BIOS boot was initiated, then it will be necessary reboot in UEFI mode before finalizing the Gentoo Linux installation.


But I don't give it much importance since my laptop has BIOS in it.

Then when I restarted and boot from the USB... nothing. Black screen with a white cursor blinking on the top left, no message of any kind.

First I thought it was a BIOS configuration error, but the only thing that I can configure in my BIOS is "Legacy USB support"; which has to be enabled for the system to recognize my USB. No "secure boot" or other thing since is a very old BIOS.

Then I though that I made some kind of mistake when burning the ISO into the USB. So, since I'm currently using Linux Mint in the laptop, I re-burned the ISO using the GUI app that comes with Mint. Same result: black screen, white cursor blinking.

Then I though that maybe my USB was bad, so I tried burning the Linux Mint ISO and that works just fine... Then I tried the SystemRescueCD ISO and it also works fine. Both boot into grub without problem.

So my clue is that at some point between 2022 and now, the developer team dropped the BIOS Legacy compatibility in the Minimal Installation CD, and let the default (and only choice) to be EFI boot.

I've been searching for information in the web about that subject for about three days with no success at all.

I only find that in 2020 the BIOS Compatibility Support Module was discontinued from UEFI systems:

Quote:
In UEFI after 2020 the Compatibility Support Module was discontinued, and with it all BIOS compatibility.


https://wiki.gentoo.org/wiki/BIOS#BIOS_as_a_UEFI_Application_for_Backwards_Compatibility

And this topic were it was a discussion about the Minimal Installation CD only supporting BIOS and not UEFI (the completely opposite of my problem).

https://forums.gentoo.org/viewtopic-t-1041178-postdays-0-postorder-asc-start-25.html

BUT in the LiveUSB section of the Gentoo Wiki it says clearly:

Quote:
Note
Gentoo Minimal Installation CD images support both UEFI and legacy boot.


https://wiki.gentoo.org/wiki/LiveUSB

So that confuses me a lot. Am I doing something wrong? Am I stupid? Do I need to read the Handbook 10 more times to figure this out?

If the Minimal Installation CD effectively doesn't support BIOS Legacy boot anymore, won't it be confusing for newcomers (like me) that are trying to install Gentoo on older machines?

I'm aware that I can install Gentoo using a liveCD from any distro, but it would be preferable for me to do it directly from the original Gentoo source.

Thank you for reading this, and I apologize if there are any misspellings. English is not my native language.


Last edited by Lawrentyus on Sun Feb 25, 2024 3:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sun Feb 25, 2024 10:07 am    Post subject: Reply with quote

Lawrentyus,

Being somewhat curious, I downloaded the ISO and poked about.
Code:
neddy_static ~ # losetup -fP /home/roy/downloads/install-amd64-minimal-20240218T170410Z.iso
neddy_static ~ # fdisk -l /dev/loop0
Disk /dev/loop0: 472.75 MiB, 495710208 bytes, 968184 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8914377B-01AF-43D6-837D-ACD130FB81B3

Device        Start    End Sectors   Size Type
/dev/loop0p1     64    531     468   234K Microsoft basic data
/dev/loop0p2    532   6291    5760   2.8M EFI System
/dev/loop0p3   6292 967535  961244 469.4M Apple HFS/HFS+
/dev/loop0p4 967536 968135     600   300K Microsoft basic data
neddy_static ~ # fdisk -l -t dos /dev/loop0
Disk /dev/loop0: 472.75 MiB, 495710208 bytes, 968184 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device       Boot Start    End Sectors   Size Id Type
/dev/loop0p1          1 968183  968183 472.7M ee GPT
neddy_static ~ #


After losetup its looks for all the world like a UEFI bootable disk. That does not mean that it's UEFI only. It can still be a hybrid and
Code:
# file /home/roy/downloads/install-amd64-minimal-20240218T170410Z.iso
/home/roy/downloads/install-amd64-minimal-20240218T170410Z.iso: ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'ISOIMAGE' (bootable)


Looking with hexedit, grub stage1 appears to be installed in the MBR, so it does indeed look like a hybrid.

As I don't have easy access to a BIOS system any more, I booted it in a Virtualbox guest, which still defaults to BIOS.
It still has dire warnings about choosing UEFI.

All I can say is that it works in BIOS mode in a Virtualbox guest.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4236
Location: Bavaria

PostPosted: Sun Feb 25, 2024 11:43 am    Post subject: Re: Bios Legacy compatibility Reply with quote

Lawrentyus wrote:
[...] I download the Gentoo Minimal Installation CD, verified it, burned it into my USB (using dd) and everything was ok.

How do you have downloaded it ?
Maybe try again to "dd" it to your USB stick and do a "sync" afterwards.

I am using always:
Code:
# dd if=/path/to/install-amd64-minimal-*.iso of=/dev/sdX; sync

_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Lawrentyus
n00b
n00b


Joined: 25 Feb 2024
Posts: 2

PostPosted: Sun Feb 25, 2024 3:54 pm    Post subject: Reply with quote

NeddySeagoon, pietinger,

I was writing a response for you and I was redoing the entire process of Downloading the ISO and suddenly... It works!

But it only works because I re-download the ISO because I deleted the old one.

My guess is that when I downloaded the ISO the first time it was broken for some reason (or I broke it in the process).

Anyway, the process was:

I downloaded the iso from the Gentoo webpage (no mirrors) https://distfiles.gentoo.org/releases/amd64/autobuilds/20240218T170410Z/install-amd64-minimal-20240218T170410Z.iso

I also used the command dd exactly how is written in the Handbook:

Code:

lawrentyus@bangho:~$ sudo dd if=./Downloads/install-amd64-minimal-20240218T170410Z.iso of=/dev/sdb bs=4096 status=progress && sync
[sudo] password for lawrentyus:       
121023+0 records in
121023+0 records out
495710208 bytes (496 MB, 473 MiB) copied, 112,936 s, 4,4 MB/s


Now my usb partitions looks like this:

Code:

lawrentyus@bangho:~$ lsblk /dev/sdb
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sdb      8:16   1   7,5G  0 disk
├─sdb1   8:17   1   234K  0 part
├─sdb2   8:18   1   2,8M  0 part
├─sdb3   8:19   1 469,4M  0 part /media/lawrentyus/ISOIMAGE
└─sdb4   8:20   1   300K  0 part


But if I use fdisk in sdb, a strange error shows up:

Code:

lawrentyus@bangho:~$ sudo fdisk -l /dev/sdb
GPT PMBR size mismatch (968183 != 15669247) will be corrected by write.
The backup GPT table is not on the end of the device.
Disk /dev/sdb: 7,47 GiB, 8022654976 bytes, 15669248 sectors
Disk model: STORE N GO     
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8914377B-01AF-43D6-837D-ACD130FB81B3

Device      Start    End Sectors   Size Type
/dev/sdb1      64    531     468   234K Microsoft basic data
/dev/sdb2     532   6291    5760   2,8M EFI System
/dev/sdb3    6292 967535  961244 469,4M Apple HFS/HFS+
/dev/sdb4  967536 968135     600   300K Microsoft basic data


That "GPT PMBR size mismatch" appears in red in the terminal, but it works anyway.

Sorry for loosing your time, I was driving crazy with this and never though on download the ISO again.

The good part is that this make me create a Gentoo Forum account and now I feel a little more part of the community.

Thank you for your responses, have a great day!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sun Feb 25, 2024 9:14 pm    Post subject: Reply with quote

Lawrentyus,

GPT PMBR size mismatch (968183 != 15669247) will be corrected by write.
The backup GPT table is not on the end of the device.
Is expected and harmless.
The ISO is a byte by byte image of a GPT partitioned drive. This drive never really existed. The fake drive in just big enough to hold the image.
GPT writes two copies of the partition table. The primary copy, starting at LBA 1. and the backup at the end of the disk.

When you dded the image to your USB stick, the stick was bigger than the fake drive used to create the image.
fdisk detected that the backup copy of the partition table was no longer an the end of the drive and offered to fix it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2965
Location: Edge of marsh USA

PostPosted: Sun Feb 25, 2024 10:15 pm    Post subject: Reply with quote

I think you would be much better off doing the Gentoo installation booting from the Linux-Mint boot disk, not the Gentoo minimal install ISO. You'll get to work within a familiar GUI desktop and as many terminal windows as you might want while viewing the handbook in another window.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
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