I have ordered a chepest L13v2, with 128Gb SSD hard drive. Recently I have added M2 ssd and now the system does not automatically boot, I have to press ESC during boot and select the first drive (128GB). Is there a way to make 128Gb bootable without removing the second M2 hard drive and without pressing ESC every time I switch the machine on?
Basically, my first drive is SATA SSD (with PureOS) and the second one is M.2 (I put it the spare M2 slot, PureOS detects it as /dev/sdb). My aim is to carry on loading PureOS from SATA SSD. Do I need to do sudo grub-install /dev/sda?
As far as i understood @mladen the problem here is that that there is no option to change the order in which seabios (the coreboot payload) looks for bootloader. So when an m2 device is installed it will only search for a bootloader there and you have to manually select an other devices if nothing is present on your m.2 device.
This is far from ideal but there is nothing you can do from the OS side. And it has nothing to do with the sda and sdb naming which is given by the OS and the problem lies before the OS is loaded.
So for a solution look into seaBIOS options. I’m not sure what you can do there but it might be possible to change these option if you compile your own Coreboot with custom settings. @kakaroto might have a solution for this. Or look into the coreboot thread:
Be careful with the coreboot stuff. These are just pointeres to possible solutions i have never tried or used. I actually never used coreboot my self. So you might wanna wait gather more informations from more experience users on this first.
I would also choose @mladen solution of a second MBR partition on the M.2 device. Its just some MB extra and i don’t see any big disadvantage on this solution.
The advice from Mladen was such that you boot from your M.2 drive. He was suggesting that you install the MBR on that drive as a result of that.
His suggestion was probably such as it is much more difficult to recompile coreboot with the settings you want. In the future this will probably not be the case for various reasons.
However, as you can select the boot drive now on startup, you could just live with that and select the boot drive on every restart, reinstall the OS on your M.2 drive, or recompile coreboot and use the system as you prefer.
I would split the boot process in 3 parts. First coreboot+seabios which initilies the hardware and then look for a bootloader. Second the bootloader, which can live on any device but is unfortenetlly only automaticaly selected on m2 devices. Selecting the kernel and a initramfs from any drive via bootloader.
After step 3 nothing of the bootloader part is present in ram or anywhere. Its just a step in betwenn which handels the part which is to complex for the corebot but musst handel reading partitions and selecting kernels.
So if you install a adittional bootloader on the m.2 devices and select the pureos on the sata drive, after boot there is no difference from the case where you booted from a bootloader on the sata device.
There is no reinstling or system partition moving involved. This is why it is concidered the esiest solution.
Only down side is if you remove the m.2 device an put an other one without a bootloader on it in, you have to select the sata drive manually like you do now.
You can change the boot order with this script : Change boot order
I think the fact that seabios doesn’t ignore the m.2 device if it doesn’t find it bootable is the real bug here which needs to get fixed at some point.