if [ -z "${UNIONTYPE}" ]
then
- UNIONTYPE="unionfs"
+ UNIONTYPE="aufs"
export UNIONTYPE
fi
}
modprobe -q af_packet # For DHCP
- udevtrigger
+ udevadm trigger
udevsettle
ipconfig ${DEVICE} | tee /netboot.config
fi
else
# cpio.gz snapshot
- if ! (cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | cpio -i -u -d 2>/dev/null)
+ if ! (cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | cpio --extract --preserve-modification-time --no-absolute-filenames --sparse --unconditional --make-directories > /dev/null 2>&1)
then
log_warning_msg "Impossible to include the ${snapfile} Snapshot"
return 1
rofslist="${image} ${rofslist}"
elif [ -f "${image}" ]
then
- backdev=$(get_backing_device "${image}" "-r")
+ if /sbin/losetup --help 2>&1 | grep -q -- "-r\b"
+ then
+ backdev=$(get_backing_device "${image}" "-r")
+ else
+ backdev=$(get_backing_device "${image}")
+ fi
fstype=$(get_fstype "${backdev}")
if [ "${fstype}" = "unknown" ]
modprobe -q -b ${module}
done
- udevtrigger
+ udevadm trigger
udevsettle
# For some reason, udevsettle does not block in this scenario,
then
cowdevice=${cowprobe}
cow_fstype=$(get_fstype "${cowprobe}")
+ cow_mountopt="rw,noatime"
else
[ "${quiet}" != "y" ] && log_warning_msg "Unable to find the persistent medium"
cowdevice="tmpfs"
cow_fstype="tmpfs"
+ cow_mountopt="rw,noatime,mode=755"
fi
elif [ -n "${NFS_COW}" ] && [ -z "${NOPERSISTENT}" ]
then
nfsmount ${nfs_cow_opts} ${cowdevice} /cow || \
panic "Can not mount ${cowdevice} (n: ${cow_fstype}) on /cow"
else
- mount -t ${cow_fstype} -o rw,noatime ${cowdevice} /cow || \
+ mount -t ${cow_fstype} -o ${cow_mountopt} ${cowdevice} /cow || \
panic "Can not mount ${cowdevice} (o: ${cow_fstype}) on /cow"
fi
devname=$(sys2dev "${sysdev}")
fi
- if [ -n "${LIVE_MEDIA_OFFSET}" ]
- then
- loopdevname=$(setup_loop "${devname}" "loop" "/sys/block/loop*" "${LIVE_MEDIA_OFFSET}" '')
- devname="${loopdevname}"
- fi
-
if [ -d "${devname}" ]
then
mount -o bind "${devname}" $mountpoint || continue
fi
fi
+ if [ -n "${LIVE_MEDIA_OFFSET}" ]
+ then
+ loopdevname=$(setup_loop "${devname}" "loop" "/sys/block/loop*" "${LIVE_MEDIA_OFFSET}" '')
+ devname="${loopdevname}"
+ fi
+
fstype=$(get_fstype "${devname}")
if is_supported_fs ${fstype}