summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuilder/dnbd3-rootfs/hooks/prepare-root-partition.sh6
-rw-r--r--dev-tools/example-openslx.config3
2 files changed, 5 insertions, 4 deletions
diff --git a/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh b/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh
index 20c06814..5f4996cc 100755
--- a/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh
+++ b/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh
@@ -5,6 +5,7 @@ core.import "/usr/lib/openslx/tools.sh"
core.import exceptions
core.import utils
core.import logging
+type getarg >/dev/null 2>&1 || source /lib/dracut-lib.sh
# endregion
exceptions.try
{
@@ -56,8 +57,8 @@ then
if [ -n "$persistent_device" ]; then
if [ ! -e "$storage_file" ]; then
# create sparse file
- dd of="$storage_file" bs=1k \
- seek="$SLX_WRITABLE_DEVICE_STORAGE_FILE_MAX_SIZE" count=0
+ dd of="$storage_file" bs=1M \
+ seek="$SLX_WRITABLE_DEVICE_STORAGE_FILE_MAX_SIZE_MB" count=0
fi
persistent_device="$(losetup --find)"
losetup "$persistent_device" "$storage_file"
@@ -164,7 +165,6 @@ device-add-write-layer "root" "$read_only_partition" "$writable_device" \
}
exceptions.catch
{
- type getarg >/dev/null 2>&1 || source /lib/dracut-lib.sh
emergency_shell "error in ${BASH_SOURCE[0]}"
}
# region vim modline
diff --git a/dev-tools/example-openslx.config b/dev-tools/example-openslx.config
index eb6dd218..608f5b4e 100644
--- a/dev-tools/example-openslx.config
+++ b/dev-tools/example-openslx.config
@@ -13,7 +13,8 @@ SLX_WRITABLE_DEVICE_STORAGE_FILE='storage.img'
# --install parameter)
SLX_WRITABLE_DEVICE_STORAGE_FILSYSTEM_CREATE_COMMAND='mkfs.ext4'
SLX_WRITABLE_DEVICE_STORAGE_FILSYSTEM_CHECK_COMMAND='fsck.ext4'
-SLX_WRITABLE_DEVICE_PERSISTENT='yes'
+SLX_WRITABLE_DEVICE_STORAGE_FILE_MAX_SIZE_MB='1000'
+SLX_WRITABLE_DEVICE_PERSISTENT='no'
# if empty will use all available ram
SLX_RAMDISK_SIZE=''
SLX_MOUNT_ROOT_OPTIONS='-o subvol=root'