#1 [Guide] How to boot linux from NVME with legacy bios by solipsist 22.04.2019 17:56

#This guide describes relocating your /boot directory from your linux distribution to an USB stick.
#install linux (tested with debian buster, should work with any linux with nvme support) on your NVME, as well as the bootloader.
#since your bios is legacy, it cannot boot from the NVME
#boot your pc with a linux live dvd (the same as your installed distro)
#Once it's booted:
#open up a terminal (ctrl+alt+1)

fdisk -l #(lists our disks. look for your usb stick
# in my case:
# the USB stick /dev/sdb
# the NVME /dev/nvme0n1

#we are going to create partitions on the USB stick
fdisk /dev/sdb
d #d is for deleting a partition. Delete all your partitions on your USB stick
n #n Creates a new partition. enter/enter/enter until it's finished
write #to actually write the partition table

#to set the bootable flag
parted /dev/sdb set 1 boot on

#format the newly made partition with:
mkfs.ext4 /dev/sdb1

#This is where the magic happens.
mkdir /drive
mount /dev/nvme0n1p1 /drive
mount --bind /dev /drive/dev
mount --bind /sys /drive/sys
mount --bind /proc /drive/proc
#chroot sets the root partition to /drive. so /drive becomes /
#this is to escape the live cd, and operate the installed linux on the NVME
chroot /drive
mv /boot /boot.old
mkdir /boot
#We are mounting the usb stick's partition as the new /boot directory, and copying the /boot directory from the installation
#This way during boot, grub can find the initramfs, and the initramfs can find the NVME
mount /dev/sdb1 /boot
cp -ax /boot.old/* /boot

blkid #note down your UUID of your usb stick partition

nano /etc/fstab
#paste the following line with your UUID
UUID=188e9abd-255b-4b94-a93e-0f818c2a829d /boot ext4 errors=remount-ro 0 1
ctrl + o #to save
ctrl + x #to exist

grub-install /dev/sdb
update-grub

#your /boot directory is now actually relocated to the partition on the usb stick.
#an upgrade of the kernel will also be placed on your stick automatically

rm -rf /boot.old

#2 RE: [Guide] How to boot linux from NVME with legacy bios by Fernando 22.04.2019 19:28

avatar

@solipsist:
Welcome to the Win-RAID Forum and thanks for your interesting guide!

Regards
Dieter (alias Fernando)

#3 RE: [Guide] How to boot linux from NVME with legacy bios by thod_ris 27.02.2021 01:15

This method worked for my OMV - boot from NVME with legacy bios.

Many thanks @solipsist

Xobor Forum Software von Xobor
Datenschutz