GNU bug report logs - #37977
Mount options ignored for root file system

Previous Next

Package: guix;

Reported by: Guillaume Le Vaillant <glv <at> posteo.net>

Date: Tue, 29 Oct 2019 10:25:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: 37977 <at> debbugs.gnu.org
Subject: bug#37977: Mount options ignored for root file system
Date: Thu, 07 Nov 2019 19:28:10 +0100
Guillaume Le Vaillant skribis:

> The filesystem options declared for the root file system are apparently
> ignored. This happens for a btrfs root filesystem on a LUKS volume.

This also happens on a basic btrfs root file system (without LUKS).

I tried adding "rootflags=defaults,autodefrag,compress=lzo" in kernel
arguments, but it didn't have any effect.

I then tried adding a one-shot service that remounts the root file
system, and it works, the options declared in '/etc/fstab' are taken
into consideration. This service just does 'mount -o remount /'.

--8<---------------cut here---------------start------------->8---
(define remount-rootfs-service-type
  (shepherd-service-type
   'remount-rootfs
   (const
    (shepherd-service
     (documentation "Remount rootfs with correct options.")
     (requirement '(udev))
     (provision '(remount-rootfs))
     (one-shot? #t)
     (start #~(lambda _
                (invoke (string-append #$util-linux "/bin/mount")
                        "-o" "remount" "/")))))))

(operating-system
  ...
  (services
    (cons* ...
           (service remount-rootfs-service-type #f)
           ...)))
--8<---------------cut here---------------end--------------->8---


I saw that the 'start' function of 'root-file-system-service-type'
doesn't do anything. Is it on purpose? Or could we make it remount the
root filesystem?




This bug report was last modified 5 years and 248 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.