Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 35 |
Nodes: | 6 (0 / 6) |
Uptime: | 29:09:41 |
Calls: | 322 |
Calls today: | 1 |
Files: | 959 |
Messages: | 81,833 |
Posted today: | 3 |
I have not updated my Gentoo system since May 31, 2024, so in the
middle of October 2024 I had to install it anew.
Just to remind you: during that time we all had to switch to the new
Gentoo profile scheme, which made an update from my old system more
difficult than a new install.
On October 26, I compiled a new Linux kernel. It had version 6.6.52
and worked quite well.
However, with time it disappeared from the Gentoo portage tree. So,
11 days ago I compiled kernel version 6.6.62 and successfully booted
my Gentoo system with it over the next 9 days.
The old kernel of version 6.6.52 was deleted from the /boot directory
just after compilation of kernel version 6.6.62 just because it could
not support my home ZFS disks any more (because zfs-kmod should be
compiled against the specific kernel version and would not work with
another one).
But yesterday, after booting my Gentoo system, the uname -a command
reported that I have been booted with the deleted old kernel version
6.6.52 compiled on October 26, 2024! And, of course, it did not
mount my ZFS /home.
I have double checked everything: the old kernel of version 6.6.52
together with its initramfs have been deleted from the /boot directory. Moreover, just a day before I deleted /usr/lib/modules/6.6.52-gentoo/ directory.
I tried to reboot and found out that GRUB menu had only an option of
loading the old kernel of version 6.6.52.
However, I soon understood that the latter was because I have attached additional HDD before booting my Gentoo system, and as a result of
this the system decided to boot from another HDD where I have not
installed a new GRUB file. So, I fixed it and my Gentoo system was
finally able to boot with the new kernel of version 6.6.62.
But the mystery of loading my Gentoo system with deleted kernel and
deleted modules remains. How could that happen at all?
My only explanation is that XFS actually had not deleted the old kernel
and the modules directory but only marked them as such. So, the old
GRUB file could load them even when they had been marked as deleted.
But is this explanation actually correct?
Because, as I wrote it, it was easier than to try to change a profile
with the procedure described in the corresponding news.
Moreover, it was written in the same news that the result is not
guaranteed. So, why to do a lot of compilation just to try if it
will work, while I did knew that starting from scratch I will get
the guaranteed result with less compilation.
Well, maybe you are right. I did (NOT) know this and so deleted the old kernel immediately after compiling the new one.
Yes, I manually deleted the /usr/lib/modules/6.6.52-gentoo/ directory
just before the last shutdown before this happened. Moreover,
at the same time I manually deleted everything from directory /usr/src/linux-6.6.52-gentoo/ except for the .config file.
So far, I had no problems with incompatibility of the kernel and the
ZFS kernel module. But I always followed the instruction to recompile zfs-kmod after compiling the kernel.
I do not know if I needed it taking into account that I have
compiled the XFS module into the kernel. But I have created initramfs-6.6.62-gentoo.img file with the command genkernel --install initramfs and I hope that the genkernel was wise enough to create it
based on the /usr/lib/modules/6.6.62-gentoo/ directory and not the /usr/lib/modules/6.6.52-gentoo/ directory that still was present at
that time.
Maybe, the file /boot/vmlinuz-6.6.52-gentoo also was present at the
time of creating initramfs-6.6.62-gentoo.img but I definitely deleted /boot/vmlinuz-6.6.52-gentoo just after that.
No, I never did it in my life even with online documentation present,
so I even have not tried to do it with just a GRUB command line
before me.
All that I managed to do is just to recall the commands
grub-mkconfig -o /boot/grub/grub.cfg
and
grub-install /dev/sdc
and executed them.
But, as far as I know, the UUID does not help to identify the disk,
from which the system starts as it is managed by BIOS.
My alternative explanation was that the uname -a command was actually accessing not the current kernel but the GRUB logs.
Currently, with my new kernel loaded, lsmod does not report XFS kernel
module being loaded into the memory.