[prev in list] [next in list] [prev in thread] [next in thread] 

List:       initramfs
Subject:    Re: [PATCH 7/8] ensure pre-mount (and resume) run before root fsck
From:       Harald Hoyer <harald () redhat ! com>
Date:       2015-07-01 15:47:54
Message-ID: 55940BAA.2000703 () redhat ! com
[Download RAW message or body]

On 30.06.2015 01:49, Alexander Tsoy wrote:
> В Fri, 26 Jun 2015 16:55:56 +0200
> Thomas Renninger <trenn@suse.de> пишет:
> 
>> From: Andrei Borzenkov <arvidjaar@gmail.com>
>>
>> References:
>> https://bugzilla.suse.com/show_bug.cgi?id=906592
>> Signed-off-by: Thomas Renninger <trenn@suse.de>
>> ---
>>  modules.d/98dracut-systemd/rootfs-generator.sh | 18
>> ++++++++++++++++++ 1 file changed, 18 insertions(+)
>>
>> diff --git a/modules.d/98dracut-systemd/rootfs-generator.sh
>> b/modules.d/98dracut-systemd/rootfs-generator.sh index
>> 5910ce7..7eb0b1a 100755 ---
>> a/modules.d/98dracut-systemd/rootfs-generator.sh +++
>> b/modules.d/98dracut-systemd/rootfs-generator.sh @@ -65,6 +65,23 @@
>> generator_mount_rootfs() fi
>>  }
>>  
>> +generator_fsck_after_pre_mount()
>> +{
>> +    local _name
>> +
>> +    [ -z "$1" ] && return 0
>> +
>> +    _name=$(dev_unit_name "$1")
>> +    [ -d /run/systemd/generator/systemd-fsck@${_name}.service.d ] ||
>> mkdir -p /run/systemd/generator/systemd-fsck@${_name}.service.d
>> +    if !
>> [ -f /run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf
>> ]; then
>> +        {
>> +            echo "[Unit]"
>> +            echo "After=dracut-pre-mount.service"
>> +        }
>>> /run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf
>> +    fi
>> +
>> +}
>> +
>>  root=$(getarg root=)
>>  case "$root" in
>>      block:LABEL=*|LABEL=*)
>> @@ -95,6 +112,7 @@ GENERATOR_DIR="$1"
>>  
>>  if [ "${root%%:*}" = "block" ]; then
>>     generator_wait_for_dev "${root#block:}" "$RDRETRY"
>> +   generator_fsck_after_pre_mount "${root#block:}"
>>     strstr "$(cat /proc/cmdline)" 'root=' || generator_mount_rootfs
>> "${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)" fi
>>  
> 
> Hmmm.. How about systemd >=220? See the following change:
> http://cgit.freedesktop.org/systemd/systemd/commit/?id=4dda4e637e4c17a14db6cd265f36f5e8a5050367
> 
> Shouldn't we also add "Before=systemd-fsck-root.service" to
> dracut-pre-mount.service?
> 

Good point.. yes
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic