[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A further question on my "how to move to an NVME disk" question
From: |
sashab |
Subject: |
Re: A further question on my "how to move to an NVME disk" question |
Date: |
Thu, 21 Nov 2019 23:32:33 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
Hi Chris,
you're going in the right direction.
If possible switch
/dev/sdX1 - to be the boot partition for 19.10
/dev/sdX2 - to be the root-partition for 19.04
as I'm not sure if there is still a limit for loading
grub modules (e.g. filesystem-drivers) from first n blocks only.
(If anyone here knows for sure - please correct me.)
About those commands:
update-grub - Is a shell-1.5-liner in debian for both following
grub-install - Installs grub and modules to the specified disk
- For i386-pc the "Stage1" to MBR
- Modules and other stuff to /boot/grub
grub-mkconfig - Creates the grub.cfg
While it is possible to customize the location of those modules,
that might be more tricky than you would like it :)
However, if you're going to do this, please ensure only one
OS is installing grub, not both.
(As different grub-versions may have incompatible modules, etc.)
So if you're @/dev/sda at the moment:
1. (Boot 19.10) Install grub with 19.10 on /dev/sdb
- Create /dev/sdb1, move contents of 19.10/boot there, mount it, ...
- dpkg-reconfigure grub-pc and choose /dev/sdb there
2. (Boot 19.04) Uninstall grub with 19.04 on /dev/sda
- Backup your kernel, initrd and grub.cfg, just for the case...
- e.g. apt-get autoremove --purge grub\*
3. (Boot 19.10) Move 19.04 on /dev/sdb2 and fix /dev/sdb2/etc/fstab
4. update-grub
If you would like it the "hacky"-way,
you could do the following first to boot to 19.10:
On 19.04 edit your /boot/grub/grub.cfg copying a menuentry from
/dev/nvme0n1p2/boot/grub/grub.cfg and editing it to
get the right kernel and initrd from /dev/sda1.
(exchange the set root...id with the id of /dev/sda1)
But keeping the kernel cmdline as it is, so that your 19.10
initrd is able to find your rootfs.
So the boot would look like:
-> GRUB on /dev/sda1
-> kernel, initrd from /dev/sda1
-> initrd mounts rootfs from /dev/nvme0n1p2
Good luck!
Regards,
sashab
On 11/21/19 10:39 PM, Chris Green wrote:
> On Thu, Nov 21, 2019 at 09:27:48PM +0000, Chris Green wrote:
>> On Thu, Nov 21, 2019 at 09:51:03PM +0100, Pascal Hambourg wrote:
>>> Le 21/11/2019 à 20:46, Chris Green a écrit :
>>>>
>>>> However trying to boot 19.10 from /dev/nvme0n1p2 fails with "No such
>>>> device c6ca1c2d-4837-48b9-8fa6-1ef47251d7b7" whereas booting it from
>>>> /dev/sda1 (a spare SATA spinning disk) boots OK. The device UUID is
>>>> correct for /dev/nvme0n1p2 so I guess grub isn't able to read the NVME
>>>> SSD for some reason.
>>>
>>> Of course. GRUB uses the BIOS for disk access, but the BIOS cannot manage
>>> the NVMe SSD.
>>>
>>>> How do I get over *this* issue! :-)
>>>
>>> As explained before : you must put Ubuntu 19.10's /boot in a location which
>>> the BIOS can see, such as the SATA SSD. But DO NOT share the same /boot
>>> between both Ubuntu's, else GRUB won't be able to tell which kernels belong
>>> to which system.
>>>
>> OK, yes, I see. So I need to put the /boot for /dev/nvme0n1p2 on
>> /dev/sda1 or similar. How does one configure that though? I.e. if I
>> clear out my 'spare' /dev/sda1 and just put a /boot on it how do I
>> tell update-grub to configure grub so that the /boot is on /dev/sda1
>> but the rest of the OS is on /dev/nvme0n1p2?
>>
> ... or even better can I configure things so that there are two
> different 'boot' directories (with different names) on my (fairly)
> fast SATA SSD /dev/sdb1r? One would be for the xubuntu 19.04 system
> (which has its files on the SATA SSD /dev/sdb1) and one for the
> xubuntu 19.10 system which has its files on /dev/nvme0n1p2.
>
> I.e. does grub insist on its configuration/files being in a directory
> called /boot?
>
> Further to this I suppose I can create a small new partition on the
> 'relatively fast' SATA SSD in which I create the /boot for the new
> 19.10 installation on /dev/nvme0n1p2. This wouldn't be an issue.
>
> So, I *think* the resulting configuration would be:-
>
> /dev/sda - unused, spare spinning disk
>
> /dev/sdb
> /dev/sdb1 - Linux partition with /boot and the rest of 19.04
> installation
> /dev/sdb2 - Small partition with /boot for 19.10 whose files are on
> /dev/nvme0n1p2
>
> /dev/sdc
> /dev/sdc1 - /home
>
> /dev/nvme0n1
> /dev/nvme0n1p1 - swap
> /dev/nvme0n1p2 - 19.10 installation (but no /boot)
>
>
> ... but I still don't quite know how to tell
> grub-mkconfig/grub-install/update-grub
> how to make things like this.
>
- A further question on my "how to move to an NVME disk" question, Chris Green, 2019/11/21
- Re: A further question on my "how to move to an NVME disk" question, sashab, 2019/11/21
- Re: A further question on my "how to move to an NVME disk" question, Chris Green, 2019/11/21
- Re: A further question on my "how to move to an NVME disk" question, Pascal Hambourg, 2019/11/21
- Re: A further question on my "how to move to an NVME disk" question, Chris Green, 2019/11/21
- Re: A further question on my "how to move to an NVME disk" question, Chris Green, 2019/11/21
- Re: A further question on my "how to move to an NVME disk" question,
sashab <=
- Re: A further question on my "how to move to an NVME disk" question, Pascal Hambourg, 2019/11/21
- Re: A further question on my "how to move to an NVME disk" question, Chris Green, 2019/11/22
- Re: A further question on my "how to move to an NVME disk" question, Pascal Hambourg, 2019/11/22
- Re: A further question on my "how to move to an NVME disk" question, Pascal Hambourg, 2019/11/21