aboutsummaryrefslogtreecommitdiffstats
path: root/sub/disk-image/make-disk-image
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-03-30 12:00:16 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-03-30 12:00:16 +0000
commit0c1e784df7e69bf08a5569476e0a856f3f248fc5 (patch)
tree5b106f481731d61cc06af51238de6d704eb885eb /sub/disk-image/make-disk-image
parent91195c146cb1d9c4ab69464ea818169284a4a10f (diff)
downloadlh-bootstrap-0c1e784df7e69bf08a5569476e0a856f3f248fc5.tar.gz
Rip out initramfs, remove wireless-db hack for 4.15.12 kernel
Diffstat (limited to 'sub/disk-image/make-disk-image')
-rwxr-xr-xsub/disk-image/make-disk-image10
1 files changed, 4 insertions, 6 deletions
diff --git a/sub/disk-image/make-disk-image b/sub/disk-image/make-disk-image
index 64d2c40..a7a2f97 100755
--- a/sub/disk-image/make-disk-image
+++ b/sub/disk-image/make-disk-image
@@ -1,7 +1,5 @@
#!/bin/sh -e
-# umount is given with -l because some operating systems have triggers that will launch processes keep file descriptors open to the mount, preventing unmounting
-
output="$1"
rootfs_size="$2"
swap_size="$3"
@@ -18,7 +16,9 @@ if s6-test ${KERNEL_GENERIC_ARCH} = x86 ; then
if ${USE_GRAPHIC} ; then
consolearg=
fi
- if s6-test ${KERNEL_ARCH} = x86_64 ; then
+ if ${USE_VIRTIO_DISK} ; then
+ bootpartition=/dev/vda1
+ elif s6-test ${KERNEL_ARCH} = x86_64 ; then
bootpartition=/dev/sda1
else
bootpartition=/dev/hda1
@@ -32,8 +32,7 @@ totaltimeout 1200
say extlinux booting
label linux
linux /boot/vmlinuz
- initrd /boot/initramfs.gz
- append ro root=$bootpartition rootfstype=ext4 loglevel=4 initrd=/boot/initramfs.gz $consolearg
+ append ro root=$bootpartition rootfstype=ext4 loglevel=4 $consolearg
EOF
fi
@@ -84,7 +83,6 @@ losetup -P "$loop" "$output/disk-image.raw"
mkfs.ext4 -O ^huge_file ${loop}p5
mkfs.ext4 -O ^huge_file ${loop}p6
-
s6-mkdir -p "$output/tmp/rootfs" "$output/tmp/rwfs" "$output/tmp/userfs" "$output/tmp/stagingfs"
mount -t ext4 ${loop}p1 "$output/tmp/rootfs"
s6-hiercopy "$output/rootfs" "$output/tmp/rootfs"