­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ # # restore/ZYPPER/default/940_generate_fstab.sh # 940_generate_fstab.sh is a finalisation script (see restore/readme) # that generates etc/fstab in the target system # according to what of the target system is currently mounted. # Generating etc/fstab in the target system is needed as prerequirement # for making a valid initrd via finalize/SUSE_LINUX/i386/170_rebuild_initramfs.sh # otherwise when booting the recreated system the kernel panics # with 'unable to mount root fs' # # Try to care about possible errors # see https://github.com/rear/rear/wiki/Coding-Style set -e -u -o pipefail # Determine system partition and swap partition # from what is in LAYOUT_FILE (usually var/lib/rear/layout/disklayout.conf). local keyword device_node mountpoint filesystem_type junk pushd /dev/disk/by-uuid/ 1>&2 # Ensure file name generation (globbing) is enabled (needed below in 'for uuid in *'): set +f # Write swap entries to etc/fstab in the target system: # Format of swap partitions or swap files in LAYOUT_FILE: # swap uuid= label=