Commit
bc79205b554396acd1a20538df2e189eb304ec9e removed the fsck
option due to lack of usage. But it can be useful and we have had
customer escalations due to corrupted persistent filesystem, which
are solved by being able to configure this option.
Mailing list thread:
https://lists.debian.org/debian-live/2015/08/msg00107.html
exec 1>&6 6>&-
exec 2>&7 7>&-
kill ${tailpid}
exec 1>&6 6>&-
exec 2>&7 7>&-
kill ${tailpid}
- [ -w "${rootmnt}/var/log/" ] && mkdir -p "${rootmnt}/var/log/live" && cp boot.log "${rootmnt}/var/log/live" 2>/dev/null
+ [ -w "${rootmnt}/var/log/" ] && mkdir -p "${rootmnt}/var/log/live" && ( \
+ cp boot.log "${rootmnt}/var/log/live" 2>/dev/null; \
+ cp fsck.log "${rootmnt}/var/log/live" 2>/dev/null )
sysdev="${1}"
devname="${2}"
skip_uuid_check="${3}"
sysdev="${1}"
devname="${2}"
skip_uuid_check="${3}"
then
devuid=$(blkid -o value -s UUID "$devname")
[ -n "$devuid" ] && grep -qs "\<$devuid\>" /var/lib/live/boot/devices-already-tried-to-mount && continue
then
devuid=$(blkid -o value -s UUID "$devname")
[ -n "$devuid" ] && grep -qs "\<$devuid\>" /var/lib/live/boot/devices-already-tried-to-mount && continue
+
+ for _PARAMETER in ${LIVE_BOOT_CMDLINE}
+ do
+ case "${_PARAMETER}" in
+ forcefsck)
+ FORCEFSCK="true"
+ ;;
+ esac
+ done
+
+ if [ "${PERSISTENCE_FSCK}" = "true" ] || [ "${PERSISTENCE_FSCK}" = "yes" ] || [ "${FORCEFSCK}" = "true" ]
+ then
+ force=""
+ if [ "$FORCEFSCK" = "true" ]
+ then
+ force="-f"
+ fi
+
+ fix="-a"
+ if [ "$FSCKFIX" = "true" ] || [ "$FSCKFIX" = "yes" ]
+ then
+ fix="-y"
+ fi
+
+ fsck $fix $force ${devname} >> fsck.log 2>&1
+ fi
+
mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
[ -n "$devuid" ] && echo "$devuid" >> /var/lib/live/boot/devices-already-tried-to-mount
mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
[ -n "$devuid" ] && echo "$devuid" >> /var/lib/live/boot/devices-already-tried-to-mount
\fBMINIMAL\fR=[\fIy\fR|\fIn\fR]
Build a minimal initramfs. If set to '\fIy\fR' mkinitramfs will build an initramfs without some udev scripts and without rsync.
\fBMINIMAL\fR=[\fIy\fR|\fIn\fR]
Build a minimal initramfs. If set to '\fIy\fR' mkinitramfs will build an initramfs without some udev scripts and without rsync.
+.TP
+\fBPERSISTENCE_FSCK\fR=[\fItrue\fR|\fIfalse\fR]
+Run fsck on persistance filesystem on boot. Will attempt to repair errors. The execution log will be saved in /var/log/live/fsck.log.
+
+.TP
+\fBFSCKFIX\fR=[\fItrue\fR|\fIfalse\fR]
+If PERSISTENCE_FSCK or forcefsck are set, will pass -y to fsck to stop it from asking questions interactively and assume yes to all queries.
+
.SH OPTIONS
\fBlive\-boot\fR currently features the following parameters.
.\" FIXME
.SH OPTIONS
\fBlive\-boot\fR currently features the following parameters.
.\" FIXME
# Wthreads or MaxConnections
.IP "\fBfindiso\fR=\fI/PATH/TO/IMAGE\fI" 4
Look for the specified ISO file on all disks where it usually looks for the .squashfs file (so you don't have to know the device name as in fromiso=....).
# Wthreads or MaxConnections
.IP "\fBfindiso\fR=\fI/PATH/TO/IMAGE\fI" 4
Look for the specified ISO file on all disks where it usually looks for the .squashfs file (so you don't have to know the device name as in fromiso=....).
+.IP "\fBforcefsck\fR" 4
+Run fsck on persistance filesystem on boot. Will attempt to repair errors. The execution log will be saved in /var/log/live/fsck.log.
.IP "\fBfromiso\fR=\fI/PATH/TO/IMAGE\fI" 4
Use a filesystem from within an ISO image that's available on live-media.
.IP "\fBignore_uuid\fR" 4
.IP "\fBfromiso\fR=\fI/PATH/TO/IMAGE\fI" 4
Use a filesystem from within an ISO image that's available on live-media.
.IP "\fBignore_uuid\fR" 4