On 2022-06-18 17:10, Simon Becherer wrote:
Am 18.06.22 um 16:33 schrieb Simon Becherer:
Am 18.06.22 um 16:13 schrieb Andrei Borzenkov:
On 18.06.2022 16:57, Simon Becherer wrote: ...
grub2-install /dev/nvme0n1 (make sure you have nvme0n1 NOT nvme0n1pX !!)
change /etc/default/grub_installdevice in my system change first line to: /dev/nvme0n1p2 and delete line 2: (activate) and line 3: (generic_mbr) so only one line is left
That's wrong. First you install grub on the whole disk and then you tell openSUSE tools that grub is installed on partition. The end result will be - during grub update new version will be installed in partition /dev/nvme0n1p2 *and* in /boot/grub2 while system will continue to boot using grub core.img already present in MBR/BIOS grub partition. This may appear to work for some time until new version that has incompatible changes will be installed. Then new modules in /boot/grub2 will no more match core.img in BIOS grub partition and in the best case you will have error on boot, in the worst case - hard to debug problems or hung system. This was known to happen in the past, it is not something rare.
Hi andrey,
ok, then i have something misunderstand.
i like to have grub2 inside /boot/grub (as it was with mbr)
i have understand: 1 frist part of boot is inside the first 34 sectors of disk (at least a pointer to the bios-boot-partition) 2 part of grub (in this case some code who is able to read ext4) is now inside that bios-boot-partition (core.img). 3 part of grub is inside /boot/grub2 /the menue and all the other things needed)
that is what i like to have. and what i was thinking i have now installed.
if it is not like this, where is my mistake?
simoN
according to this:
https://www.gnu.org/software/grub/manual/grub/grub.html#Invoking-grub_002din... grub-install /dev/sda is equivalent to grub-install --boot-directory=/boot/ /dev/sda
in my case "/" is "nvme0n1p2" so the command above "grub2-install /dev/nvme0n1" is correct to install a core.img inside the bios-boot-partition and the files inside /boot/
as a result of this analysis you tell me that the content of my: "/etc/default/grub_installdevice" file is wrong ???????? i have inside only one line: /dev/nvme0n1p2
that points to the partition where /boot is. must it point to the partition where the core.img is ? that would be /dev/nvme0n1p1 or must there be not a partition inside instead a whole disk: /dev/nvme0n1 ??
sorry, i have not found any documentation what has to be inside that file. (using google)
When using the MBR, it points to the disk. The system knows that the next stage is in the bios partition, and next in the boot directory or partition, if it is separate. -- Cheers / Saludos, Carlos E. R. (from Elesar, using openSUSE Leap 15.3)