resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7
----
+**rd.skipfsck**::
+ skip fsck for rootfs and _/usr_. If you're mounting _/usr_ read-only and
+ the init system performs fsck before remount, you might want to use this
+ option to avoid duplication.
**rd.usrmount.ro**:
force mounting _/usr_ read-only. Use this option if your init system
# printf '%s %s %s %s 1 1 \n' "$esc_root" "$NEWROOT" "$rootfs" "$rflags" >/etc/fstab
ran_fsck=0
- if [ -z "$fastboot" -a "$READONLY" != "yes" ] && ! strstr "${rflags},${rootopts}" _netdev; then
+ if [ -z "$fastboot" -a "$READONLY" != "yes" ] && \
+ ! strstr "${rflags},${rootopts}" _netdev && \
+ ! getargbool 0 rd.skipfsck; then
umount "$NEWROOT"
fsck_single "${root#block:}" "$rootfs" "$rflags" "$fsckoptions"
_ret=$?
if [ "x$_usr_found" != "x" ]; then
# we have to mount /usr
- if [ "0" != "${_passno:-0}" ]; then
- fsck_usr "$_dev" "$_fs" "$_opts"
- else
- :
+ _fsck_ret=0
+ if ! getargbool 0 rd.skipfsck; then
+ if [ "0" != "${_passno:-0}" ]; then
+ fsck_usr "$_dev" "$_fs" "$_opts"
+ _fsck_ret=$?
+ echo $_fsck_ret >/run/initramfs/usr-fsck
+ fi
fi
- _ret=$?
- echo $_ret >/run/initramfs/usr-fsck
- if [ $_ret -ne 255 ]; then
+ if [ $_fsck_ret -ne 255 ]; then
if getargbool 0 rd.usrmount.ro; then
info "Mounting /usr (read-only forced)"
mount -r "$NEWROOT/usr" 2>&1 | vinfo