Boot into NVMe drives from USB

Hi all, I’ve installed Debian in 2 (mdadm RAID 1 formtted with Btrfs) NVMe drives installed into 2 PCIe adapters. The motherboard doesn’t support booting from those drives, so I’ve installed Debian into a USB stick (and it works) and I wanted to add into grub the RAID NVMe drives.

os-prober doesn’t see the other Debian installation. fdisk -l shows the 2 nvme drives, but it doesn’t see md0:


<span style="color:#323232;">Disk /dev/nvme0n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors
</span><span style="color:#323232;">Disk model: SAMSUNG MZVLQ256HBJD-00BH1
</span><span style="color:#323232;">Units: sectors of 1 * 512 = 512 bytes
</span><span style="color:#323232;">Sector size (logical/physical): 512 bytes / 512 bytes
</span><span style="color:#323232;">I/O size (minimum/optimal): 16384 bytes / 131072 bytes
</span><span style="color:#323232;">Disklabel type: dos
</span><span style="color:#323232;">Disk identifier: 0xab581c58
</span><span style="color:#323232;">
</span><span style="color:#323232;">Device         Boot Start       End   Sectors   Size Id Type
</span><span style="color:#323232;">/dev/nvme0n1p1       2048 500118191 500116144 238.5G fd Linux raid autodetect
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">Disk /dev/nvme1n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors
</span><span style="color:#323232;">Disk model: SAMSUNG MZVLQ256HBJD-00BH1
</span><span style="color:#323232;">Units: sectors of 1 * 512 = 512 bytes
</span><span style="color:#323232;">Sector size (logical/physical): 512 bytes / 512 bytes
</span><span style="color:#323232;">I/O size (minimum/optimal): 16384 bytes / 131072 bytes
</span><span style="color:#323232;">Disklabel type: dos
</span><span style="color:#323232;">Disk identifier: 0x863fc92a
</span><span style="color:#323232;">
</span><span style="color:#323232;">Device         Boot Start       End   Sectors   Size Id Type
</span><span style="color:#323232;">/dev/nvme1n1p1       2048 500118191 500116144 238.5G fd Linux raid autodetect
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">Disk /dev/sda: 14.32 GiB, 15376000000 bytes, 30031250 sectors
</span><span style="color:#323232;">Disk model: Ultra Fit
</span><span style="color:#323232;">Units: sectors of 1 * 512 = 512 bytes
</span><span style="color:#323232;">Sector size (logical/physical): 512 bytes / 512 bytes
</span><span style="color:#323232;">I/O size (minimum/optimal): 512 bytes / 512 bytes
</span><span style="color:#323232;">Disklabel type: dos
</span><span style="color:#323232;">Disk identifier: 0x1d46a293
</span><span style="color:#323232;">
</span><span style="color:#323232;">Device     Boot    Start      End  Sectors  Size Id Type
</span><span style="color:#323232;">/dev/sda1  *        2048 28028927 28026880 13.4G 83 Linux
</span><span style="color:#323232;">/dev/sda2       28030974 30029823  1998850  976M  5 Extended
</span><span style="color:#323232;">/dev/sda5       28030976 30029823  1998848  976M 82 Linux swap / Solaris
</span>

mdadm --detail --scan doesn’t output anything. How do I solve this problem?

deadbeef79000,

I do this, except with Ubuntu and a btrfs volume for root.

My motherboard supports UEFI, so it doesn’t care where the EFI partition is. It’s on a USB stick.

The way I did it was by installing to a SATA SSD and then moving the EFI partition to the usb stick and then substituting the SATA SSD with the NVMe SSD using btrfs.

I think I also needed to use reEFInd temporarily to give me an UEFI shell to do some debugging.

Oh! I also setup systemd-boot so I could trivially boot the kernel directly from UEFI, stored on the EFI partition and avoided grub altogether.

CountVon, (edited )
@CountVon@sh.itjust.works avatar

I’m sure there would be a way to do this with Debian, but I have to confess I don’t know it. I have successfully done this in the past with Clover Bootloader. You have to enable an NVMe driver, but once that’s done you should see an option to boot from your NVMe device. After you’ve booted from it once, Clover should remember and boot from that device automatically going forward. I used this method for years in a home theatre PC with an old motherboard and an NVMe drive on a PCIe adapter.

peregus,

Clover Bootloader

Cool, I’ve never hear about it, I’ll test it first thing on Monday, thanks!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • fightinggames
  • All magazines