4

My computer's BIOS does not recognise my PCIe NVME SSD (enough abbreviations?) drive as something I can boot from. The BIOS is old (last update 2011) and possibly the PCIe card does not implement boot support.

Once Ubuntu (on another SATA drive) is running I can see and access the PCIe drive.

As a work-around, I was wondering if I could create a bootable USB with grub on it that is able to then identify and boot from the PCIe SSD? Is this possible and how would I do it? (I don't think I need UEFI boot, it's an old machine.)

7
  • This link: Boot Ubuntu from external drive describes how to boot and run Ubuntu completely from an external drive. It is also possible to chainload from one drive to some other drive (via grub). See this link: help.ubuntu.com/community/Installation/FromUSBStick#Chainloading. We don't know yet, if grub can wake up your PCIe NVME SSD, but the computer can run fast, when booted from an HDD or SSD connected via USB 3.
    – sudodus
    Apr 29, 2018 at 22:26
  • try following this tutorial maybe it helps, it's about the same topic Apr 29, 2018 at 23:19
  • @DrMoishePippik thanks but you can't have a PCIe drive in an external USB dock - it's a different bus (PCIe not USB) and protocol (NVME not SATA) Apr 30, 2018 at 11:22
  • before i can give give any answer @artfulrobot does your old machine accept booting from USB?
    – kishea
    Apr 30, 2018 at 14:05
  • @kishea yes it does. I'll try some of the answers posted in comments as soon as I get a chance Apr 30, 2018 at 15:49

1 Answer 1

5

With Linux you can do a dual step boot if you use initramfs or anything similar.

Linux can boot from mostly anything, like a slow USB stick, memory card, etc., but it must boot from something that BIOS can see.

Said that, there is a dual step boot way to boot any Linux, i will try to explain it.

Linux and Grub2 can boot from USB, while booting the first thing it is done is to load a kernel and an initramfs or equivalent.

To boot from a device not seem by BIOS, you put that part on a USB drive or an internal HDD partition or SSD or where ever the BIOS can boot from.

So basically you put Boot code (MBR) + Grub stages + kernel + initramfs on a device that can be seen by BIOS... aka, the /boot as a partition. The rest you put it on the fast NVMe or where ever you want, but it must be on a device that can be seen from within that initramfs boot step (this is the same trick as booting from inside LVM and/or LUKS, etc).

So there is the trick, put some driver on the initramfs (or compile a kernel, or a kernel module, etc) that will power up your PCIe card and the NVMe, from them the drive is seen and the boot process can go on; the Linux installer will do such automatically on most cases, so do not panic.

Resuming:

  • Boot code, Grub, Kernel and initramfs on a bootable device seen by BIOS (this is basically /boot partition)
  • initramfs with driver to power up PCIe NVMe
  • root filesystem on the PCIe NVMe

And voila, Linux can boot... that is a dual step boot... it first boot a small part from a BIOS bootable device, then from inside the ram drive it loads what it needs to power up the PCIe card and the NVMe (and much more things), then it continue booting with root mounted from the NVMe.

Sound easy, but can be tricky, the part to DEBUG initramfs PCIe and NVMe power up can be as easy as nothing or a real headage.

I can suggest to you, that try a LiceCD, if it sees the NVMe, then plug a USB stick and when installing tell the installer to put /boot on a USB partition and Grub also on the USB MBR; then configure the BIOS to boot from the USB, and magic is done.

Having /boot on a slow device do not slow a lot the boot, since it is a few megabytes.

But some very old PC (one of my old Pentium IV) have a very weird BIOS that on boot time it uses all USB 2.0 at USB 1.x speeds, so booting Grub menu is quite fast, but loading kernel+initramfs can take from two to five minutes.

If you have any USB 3.x stick and USB 3.x port that is bootable (not all motherboards allow to boot from USB 3.x) try with that, it is much faster than USB 2.x and much much faster than old legacy USB 1.x speeds.

And of course, if you have any other storage device (internal) that is seen by the BIOS, like normal HDD or a sata SSD, use such device instead of the USB, since can be faster on most cases.

Solution:

  • Use a device that is seen by BIOS as bootable for Grub + /boot partition when installing Linux
  • And use the PCIe NVMe for root filesystem
  • Configure the BIOS to boot from that device where you put Grub + /boot partition

On most cases is just that simple, most if while on LiveCD the PCie NVMe is seen without installing anything, to test that boot such LiveCD without Internet connection (to ensure nothing is downloaded), see if the NVMe is seen and then connect to Internet if you want.

Hope you get the idea: Grub & /boot partition on a separated device, a device that can be seen by BIOS as bootable, that is the Key.

P.D.: I like to explain why thing works and why i suggest things, not just through the solution without explaining the idea, steps, etc. and forum do not allow me to post comments.

1
  • Hey @Laura, thanks for such an in-depth answer (and welcome to the site!). I'll try to try it out when I get chance. Oct 18, 2018 at 11:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .