Subject: Re: Filesystems not unmounted on reboot

From: "Ashish SHUKLA" <[email-masked]>
Date: Tue, 29 Apr 2025 20:41:46 +0000

Hi,

Filesystems not unmounted on reboot, or rather I get filesystem check for "/" volume after I power on, even though I shut it down (as rebooting was ending up in this situation almost everytime). This only happens if I do "sudo guix system reconfigure" prior to reboot/shutdown. Of note is, I'm running a custom Linux kernel (linux-xanmod in my custom channel):

==========================================================================================
% lsblk
NAME             MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
nvme0n1          259:0    0 931,5G  0 disk  
├─nvme0n1p1      259:1    0   512M  0 part  /boot
├─nvme0n1p2      259:2    0     4G  0 part  [SWAP]
├─nvme0n1p3      259:3    0   696G  0 part  
│ └─cryptroot    253:0    0   696G  0 crypt 
│   ├─crypt-root 253:1    0   250G  0 lvm   /gnu/store
│   │                                       /
│   └─crypt-home 253:2    0   446G  0 lvm   /home
└─nvme0n1p4      259:4    0   231G  0 part  

% guix describe
Generación 169	28 abr 2025 22:15:25	(actual)
  guix 1710c09
    URL del repositorio: https://codeberg.org/guix/guix-mirror
    rama: master
    revisión: 1710c0941db517453ac2b88c0e854e8348172603
  nonguix f05b33d
    URL del repositorio: https://gitlab.com/nonguix/nonguix
    /rama: master
    revisión: f05b33d75491a6418e7f0b3575207c5c2b2ef8f1
  abbe 673623e
    URL del repositorio: https://codeberg.org/group/guix-modules
    rama: mainline
    revisión: 673623e0abc60eff50b133e74d15ee89eb9f6087
  abbe-emacs 9394d74
    URL del repositorio: https://git.sr.ht/~abbe/guix-emacs-channel
    rama: mainline
    revisión: 9394d749ea88b72173f08f99210b8b81c9e5e47f
==========================================================================================

In terms of filesystems, I have:

 - / ext4 as LVM LV over LUKS2 volume cryptroot
 - /home ext4 as LVM LV over LUKS2 volume cryptroot
 - /boot vfat a separte EFI partition
 - /tmp tmpfs

Unfortunately, nothing in /var/log/messages that could hint what happens at the lat moments before reboot/shutdown, and quite often, I end up with NUL bytes in the log file:

==============================================================================
000592a0  78 77 6e 2d 6f 70 65 6e  72 65 73 6f 6c 76 2d 33  |xwn-openresolv-3|
000592b0  2e 31 33 2e 32 2f 73 62  69 6e 2f 72 65 73 6f 6c  |.13.2/sbin/resol|
000592c0  76 63 6f 6e 66 0a 00 00  00 00 00 00 00 00 00 00  |vconf...........|
000592d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
0005a000  32 30 32 35 2d 30 34 2d  32 39 20 31 39 3a 35 30  |2025-04-29 19:50|
0005a010  3a 33 32 20 6c 6f 63 61  6c 68 6f 73 74 20 73 68  |:32 localhost sh|
0005a020  65 70 68 65 72 64 5b 31  5d 3a 20 5b 73 79 73 63  |epherd[1]: [sysc|
0005a030  74 6c 5d 20 6e 65 74 2e  69 70 76 34 2e 74 63 70  |tl] net.ipv4.tcp|
0005a040  5f 77 69 6e 64 6f 77 5f  73 63 61 6c 69 6e 67 20  |_window_scaling |
==============================================================================

It's sometimes broken /gnu/store as well. Sometimes empty/broken initrds, which I was able to salvage by booting previous entries. To minimize damage to /gnu/store, I try to explicit "sync" after "sudo guix system reconfigure", but the problem is still there with log files, at least.

Also, as I use custom mountpoints (i.e. /home, /tmp), do I need to specify file-system dependencies in my custom filesystem mountpoints, i.e. /boot, /home, /tmp, all depending on "/" ? Right now, I only have mapped-devices dependencies (for the LUKS2 volume) in the definitions for / and /home filesystems which reside on a LVM volume backed by LUKS2 volume.

Anyways, if there is anything I can help with to get to the bottom of this, then I'll be happy help. It's quite annoying, almost making me stop using, so any help is appreciated.

Thanks!
-- 
Ashish SHUKLA | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0

"If I destroy you, what business is it of yours ?" (Dark Forest, Liu Cixin)