adding support for dynamic ramdisk size

This commit is contained in:
toby 2018-09-25 22:24:49 +00:00
parent d51c41460f
commit 3b383625a9
1 changed files with 2 additions and 2 deletions

View File

@ -163,7 +163,7 @@ mkdir -p $INITRD_DIR/bin
wget -O $INITRD_DIR/bin/busybox https://www.busybox.net/downloads/binaries/1.26.1-defconfig-multiarch/busybox-x86_64
chmod +x $INITRD_DIR/bin/busybox
cat <<-EOF >$INITRD_DIR/init
cat <<-"EOF" >$INITRD_DIR/init
#!/bin/busybox sh
# Dump to sh if something fails
@ -193,7 +193,7 @@ cat <<-EOF >$INITRD_DIR/init
mdev -s
mkdir -p /newroot
mount -t tmpfs -o size=${SIZE:=10000}m tmpfs /newroot || error
mount -t tmpfs -o size=${size:=10000}m tmpfs /newroot || error
echo "Extracting rootfs... "
xz -d -c -f rootfs.tar.xz | tar -x -f - -C /newroot || error