chiark / gitweb /
fstab-generator: When parsing the root= cmdline option, set FsckPassNo to 1
authorThomas Bächler <thomas@archlinux.org>
Sun, 29 Sep 2013 22:32:33 +0000 (00:32 +0200)
committerTom Gundersen <teg@jklm.no>
Sat, 19 Oct 2013 10:23:17 +0000 (12:23 +0200)
[tomegun: without this we would never fsck the rootfs if it was directly
mounted 'rw' from the initrd. We now risk fsck'ing it twice in the case it
is mounted 'ro', so that should be addressed in a separate patch.]

src/fstab-generator/fstab-generator.c

index 9e7d55d177650e1a4f2642013dd0ac10d2eafc35..a7536f8f7e5cfc71fe1a39dbaf8a8f64bc79c909 100644 (file)
@@ -442,7 +442,7 @@ static int parse_new_root_from_proc_cmdline(void) {
         }
 
         log_debug("Found entry what=%s where=/sysroot type=%s", what, type);
         }
 
         log_debug("Found entry what=%s where=/sysroot type=%s", what, type);
-        r = add_mount(what, "/sysroot", type, opts, 0, noauto, nofail, false,
+        r = add_mount(what, "/sysroot", type, opts, 1, noauto, nofail, false,
                       SPECIAL_INITRD_ROOT_FS_TARGET, "/proc/cmdline");
 
         return (r < 0) ? r : 0;
                       SPECIAL_INITRD_ROOT_FS_TARGET, "/proc/cmdline");
 
         return (r < 0) ? r : 0;