diff options
-rwxr-xr-x | builder/dnbd3-rootfs/hooks/mount-root-device.sh | 6 | ||||
-rwxr-xr-x | builder/dnbd3-rootfs/module-setup.sh | 1 | ||||
-rw-r--r-- | dev-tools/example-openslx.config | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/builder/dnbd3-rootfs/hooks/mount-root-device.sh b/builder/dnbd3-rootfs/hooks/mount-root-device.sh index b7a7a80f..d78a209d 100755 --- a/builder/dnbd3-rootfs/hooks/mount-root-device.sh +++ b/builder/dnbd3-rootfs/hooks/mount-root-device.sh @@ -13,7 +13,11 @@ logging.set_level debug if ! getarg root=; then source "/etc/openslx" mount /dev/mapper/root "$NEWROOT" $SLX_MOUNT_ROOT_OPTIONS - genfstab "$NEWROOT" 2>/dev/null > "$NEWROOT/etc/fstab" + if [ -n "$SLX_GENERATE_FSTAB_SCRIPT" ]; then + eval "$SLX_GENERATE_FSTAB_SCRIPT" + else + echo "" > "$NEWROOT/etc/fstab" + fi fi } exceptions.catch diff --git a/builder/dnbd3-rootfs/module-setup.sh b/builder/dnbd3-rootfs/module-setup.sh index 04d594dc..cecd9953 100755 --- a/builder/dnbd3-rootfs/module-setup.sh +++ b/builder/dnbd3-rootfs/module-setup.sh @@ -252,7 +252,6 @@ install() { cat cut \ dd diff dirname dmsetup \ find \ - genfstab \ grep \ insmod \ losetup lsblk \ diff --git a/dev-tools/example-openslx.config b/dev-tools/example-openslx.config index 608f5b4e..0abb93fa 100644 --- a/dev-tools/example-openslx.config +++ b/dev-tools/example-openslx.config @@ -15,6 +15,9 @@ SLX_WRITABLE_DEVICE_STORAGE_FILSYSTEM_CREATE_COMMAND='mkfs.ext4' SLX_WRITABLE_DEVICE_STORAGE_FILSYSTEM_CHECK_COMMAND='fsck.ext4' SLX_WRITABLE_DEVICE_STORAGE_FILE_MAX_SIZE_MB='1000' SLX_WRITABLE_DEVICE_PERSISTENT='no' +SLX_GENERATE_FSTAB_SCRIPT=' +echo "/dev/mapper/root / btrfs subvol=root 0 0" >> "$NEWROOT/etc/fstab" +' # if empty will use all available ram SLX_RAMDISK_SIZE='' SLX_MOUNT_ROOT_OPTIONS='-o subvol=root' |