Le 15/06/2019 à 23:23, François Patte a écrit :
Bonjour,
I sent several messages about kernel updates and grubby.
Once upon a time I made 4 partitions on a ssd drive where the system is
installed. I use raid1+lvm
on sda1 and sdb1 I put the a /boot partition (raid1) for a debian install
on sda3 and sdb3 I also put /boot partition (raid1) for a fedora install
on sda2 and sdb2 I put a / partition (raid1+lvm) with label
"debian-racine" (at that time I had a debian install)
on sda4 and sdb4 I put a / partition (raid1+lvm) with label
"fedora-racine" for a fedora install.
So I had two linux installs: one was debian the other was fedora.
I abandonned debian and used the debian partition to install a fedora
version. I wanted to keep two different partitions: on one partition
fedora-n on the other fedora-(n+1).
Then appears the "dnf system upgrade" and I disabled the my sda3-sda4
partitions and only used sda1-sda2 partitions (with label
"debian-racine") for my system.
Everything was ok untill grubby replaced grub2-mkconfig: when there is a
kernel update, grubby uses the disabled sda3-sda4 partitions as the /
parttion in the /boot/grub2/grub.cfg file.
I have now destroyed these partitions but grubby still uses them and
writes a faulty /boot/grub2/grub.cfg file.
Where does it find that these partitions still exist?
I found the culprit: fstab: this line in my fstab:
/dev/mapper/fedora-racine / ext4
noatime,discard,errors=remount-ro 1 1
This file was created by Anaconda 2 years ago... At that time, maybe the
/ partition was that one. I don't know why it has not been modified by a
next install.
So we can say that the kernel update scriptlet takes some informtion
from the fstab and not only from the current grub.cfg.....
Mysteries remain.
Mystery 1: Why the /dev/mapper/fedora-racine was not mounted in spite of
the fact that it was mentionned in the fstab?
Mystery 2: Why the /dev/mapper/debian-deb--racine (which is the right /
partition) was mounted in spite of the fact that it was not mentionned
in the fstab? (Only in the grub.cfg after running grub2-mkconfig).
Mystery 3: Why grub2-mkconfig has found the right / partition and the
kernel update scriptlet did not.
Mystery 4: When I discovered this line in the fstab, I commented it and
reboot. The result was that the / partition
(/dev/mapper/debian-deb--racine) was mounted read-only. And when I added
this line:
/dev/mapper/debian-deb--racine / ext4
noatime,discard,errors=remount-ro 1 1
the / partition was mounted read-write.
Thank you for any lights...
--
François Patte
UFR de mathématiques et informatique
Laboratoire CNRS MAP5, UMR 8145
Université Paris Descartes
45, rue des Saints Pères
F-75270 Paris Cedex 06
Tél. +33 (0)6 7892 5822
http://www.math-info.univ-paris5.fr/~patte