This is actually quite interesting, didn't know about this. I could try this for my permanent mounts. You learn something new every day!
On Wednesday, April 22nd, 2026 at 10:21 PM, Łukasz Michalski <[email protected]> wrote: > On 4/22/26 4:52 PM, Pocket wrote: > > > > On 4/22/26 3:30 AM, Łukasz Michalski wrote: > >> On 4/22/26 2:36 AM, Jan Alexander Steffens (heftig) wrote: > >>> On Wed, Apr 22, 2026 at 12:24 AM Lucie Scarlet <[email protected]> > >>> wrote: > >>>> Hi, > >>>> Whenever I upgrade my Linux kernel, my computer never properly > >>>> boots. I > >>>> have to boot into archiso and reinstall the kernel in chroot before I > >>>> can get it booting again. > >>>> Not very sure where to begin looking, but it's an issue that has been > >>>> bugging me for a good while now. The fix for it is easy enough > >>>> which is > >>>> why I've put off mentioning it before now. > >>> A common issue is that a split /boot partition isn't mounted, which > >>> causes the kernel upgrade to place new kernels and initrds in the root > >>> partition's /boot directory instead. > >>> > >> A good practice is to set chattr +i on directories that are mount > >> points for filesystems. > >> > > Why would/should I want to do that? > > > > What would be the advantage for doing so? > > > > This will save you if the target file system is not mounted for some > reason. In the original post scenario, if the /boot file system had not > been mounted, the kernel update would have failed. > This is because the root file system's /boot has +i, which prevents any > changes from being made. This ensures that you cannot mistakenly write > vmlinuz, initrd, and other files there. > > Not very helpful for non-system directories like /mnt when you mount > stuff as needed, but I set this flag for permanent mounts just for safety. > > Regards, > Łukasz >
publickey - [email protected] - 0x4C91F9E3.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
