[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Booting an old PC to SSD that the BIOS cannot see

From: Glenn Washburn
Subject: Re: Booting an old PC to SSD that the BIOS cannot see
Date: Wed, 30 Dec 2020 01:08:21 -0600

On Tue, 29 Dec 2020 15:33:50 -0800
Robert Furber via Support requests for the GRand Unified Bootloader
<> wrote:

> On 2020-12-29 1:31 a.m., Pascal Hambourg wrote:
> > Le 29/12/2020 à 04:54, Robert Furber via Support requests for the 
> > GRand Unified Bootloader a écrit :
> >> Instead of sending them to the landfill, old PCs can be upgraded 
> >> dramatically by replacing or supplementing the HDD by a SSD 
> >> ..specially, a NVMe SSD. In my case, the NVMe SSD is mounted on a 
> >> PCIe adapter card.
> >>
> >> The catch is the BIOS in older PCs cannot see or be aware of a
> >> NVMe SSD. They can only boot from a HDD. However, after booting,
> >> the NVMe SSD becomes visible and accessible.
> >
> > Old BIOS/UEFI firmwares do not have NVMe drivers. The PCIe-NVMe 
> > adapter card may have an expansion ROM providing NVMe BIOS/UEFI 
> > drivers, like SCSI or RAID adapter cards. You can check with "lspci
> > -v".
> >
> >> The challenge is to figure out when, during the Grub boot, does
> >> the NVMe SSD become accessible,
> >
> > Never during GRUB runtime. The SSD becomes visible only after the
> > OS kernel takes over GRUB and uses its own native NVMe driver.
> >
> >> and then figure how to reboot on it. For instance, would it be 
> >> possible to set up a customized Grub on the HDD that would chain a 
> >> second Grub on the SSD
> >
> > No. GRUB relies either on platform (BIOS/UEFI) drivers or GRUB's
> > own native drivers (not enabled by default). AFAIK GRUB does not
> > have a native NVMe driver either (yet).
> >
> > If the adapter card does not provide an expansion ROM for the
> > platform firmware, your only option is to install /boot and GRUB
> > (for BIOS boot) or the EFI partition (for EFI boot) on a drive that
> > the BIOS can manage and boot from.
> Hmmmmm.. It is an old (2012) PC with BIOS. To my knowledge, it is not 
> aware of UEFI and the BIOS is not aware of the PCIe NVMe SSD.
> However, after booting, Gparted can see the NVMe SSD and I can copy
> files to it (after partitioning and formatting).

Yes because you're using the linux kernel drivers to access the NVMe
drive. As said before, grub currently does not natively support NVMe,
but there's no reason it couldn't in the future.

> So, now I am confused as to who does the booting. Before booting my
> PC cannot see the NVMe SSD, but it can see it after booting. Ergo,
> booting brought about this awareness on the PC. Is it that Grub only
> does part of the booting and some other software initializes hardware
> ..hardware such as the NVMe SSD? In other words, is it Grub and
> Company that look after bringing up the PC to full operation? Where
> can I learn about this?

Grubs purpose isn't really to initialize any hardware for the OS.
That's the OS's job. Grub's job is to do what needs to be done to
boot the OS. In this case of GNU/Linux, this is what needs to be done
to read the kernel and initrd into memory. It may initialize some
hardware to access the kernel and initrd, but the OS shouldn't rely on
that. There may be some caveats to this on certain architectures, but I
believe this is the general rule.

I don't know a bunch about NVMe, but from what I do know, its not so
much that NVMe needs to be initialized, and then the "system" can use
it. Its that NVMe has its own protocol (communication language), which
grub would need to know how to speak to get access to the data. So grub
can not chainload to an NVMe drive that is not recognized by the

> Presumably I can put /boot on /dev/sda and '/' and '/home' on 
> /dev/nvme.. as per Chris Greene, if I understand correctly?

Yes. Another option could be to use a USB flash drive as a boot device,
if you don't want the spinning harddrive in the machine at all
(assuming your bios is capable of USB boot).

If you really want /boot on the NVMe, you could boot to a special
kernel+initrd on a USB/hd which is configured to find the kernel and
initrd on the NVMe and kexec into it.

Or, a perhaps really unrealistic option could be to flash your BIOS
with a BIOS that does support NVMe (coreboot?).

> Even so, booting done by Grub & Co. is a ton of work, consuming about 
> 30s. Would there be any way to speed up booting time by doing part of 
> the initialization from /dev/sda, the HDD and the heavy lifting from 
> /dev/nvme.., sthe SSD?

I think the boottime module might be helpful in diagnosing where the
time is being spent, to help in figuring out how to shorten the boot
time (if the problem is even grub). On old computers which have floppy
or cdrom drives, if grub is comfigured to search all devices as part of
the boot, a lot of time can be spent spinning up cds or probing the
floppy drive. You can configure grub not to do that.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]