On Mon, Nov 18, 2019 at 08:20:44PM +0100, Pascal Hambourg wrote: > Le 17/11/2019 à 20:20, Chris Green a écrit : > > > > I want to add a new SSD to my current desktop system. This in itself > > isn't a major problem, I've done similar things before without > > problems (in fact I did this already with the current small and > > relatively slow SATA SSD that has the / filesystem on it). The issue > > is that I suspect the motherboard won't be able to boot from the new > > NVME/PCIe SSD so I'm aiming to have a small, bootable drive to just > > provide the boot files and have everything except for /boot on the > > new, fast, SSD. > > If the motherboard has an M.2 slot with NVMe support, the firmware should be > able to boot from an NMVe SSD. If it has no M.2 slot and you added the NMVe > SSD with a PCIe adapter card, it is unlikely the firmware is able to boot > from an NVMe SSD. > You have the situation *exactly* right, I'm aiming to add an NMVe SSD using a PCIe adapter card.
> > So, I can move all the required OS files to the new hard disk but how > > do I get grub installed on whatever I have as a 'small' boot disk? > > You must install not only GRUB but the whole /boot on the boot drive. > Yes, sorry, I realise I have to put the whole of the contents of /boot onto the 'small' boot disk. > > Basic questions:- > > > > Presumably the disk where the /boot filesystem is has to be marked > > bootable using fdisk. > > You cannot mark a whole drive as bootable. You can mark a primary partition > as bootable, but this is needed only with broken firmwares which require it. > A compliant BIOS does not require a bootable partition. > Ah, OK, I hadn't realised that (that marking bootable isn't necessary). How does the BIOS decide what disk to boot from then, does it search for the MBR signature? > > How do grub-install and grub-mkconfig relate to each other? > > grub-install installs GRUB in the specified locations and grub-mkconfig > generates a configuration script on its standard output that you can write > to the location where GRUB expects to find it, by default > /boot/grub/grub.cfg. update-grub must be run from the target system > (natively or chrooted). grub-install can be run from any other system if you > specify the --boot-directory= location. > > > Which do I run first? > > It does not matter. > > > Do I need to run both? > > Yes. > OK, thanks, this is all really useful. > > What do I need to tell them (parameter-wise)? > > In BIOS/legacy mode, grub-install takes at least one parameter : the device > node you want to install GRUB on. grub-mkconfig takes no parameter. > > > Is there anything else I need to do? > > Update fstab and the initramfs. > OK, fstab is easy enough. Do I just run update-initramfs for the initramfs? Thanks for all this, it's becoming clearer, slowly. -- Chris Green
