diff --git a/Dockerfile.qemu b/Dockerfile.qemu index ee7c36907..07ae9c721 100644 --- a/Dockerfile.qemu +++ b/Dockerfile.qemu @@ -3,4 +3,6 @@ FROM justincormack/alpine-qemu COPY alpine/initrd.img.gz . COPY alpine/kernel/x86_64/vmlinuz64 . -ENTRYPOINT [ "qemu-system-x86_64", "-serial", "stdio", "-kernel", "vmlinuz64", "-initrd", "initrd.img.gz", "-m", "2048", "-append", "earlyprintk=serial console=ttyS0 noapic", "-vnc", "none" ] +RUN qemu-img create -f raw disk.img 100M + +ENTRYPOINT [ "qemu-system-x86_64", "-drive", "file=disk.img,format=raw", "-serial", "stdio", "-kernel", "vmlinuz64", "-initrd", "initrd.img.gz", "-m", "2048", "-append", "earlyprintk=serial console=ttyS0 noapic", "-vnc", "none" ] diff --git a/Dockerfile.test b/Dockerfile.test index 1619bd430..5a08b58ea 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -3,4 +3,6 @@ FROM justincormack/alpine-qemu COPY alpine/initrd.img.gz . COPY alpine/kernel/x86_64/vmlinuz64 . -ENTRYPOINT [ "qemu-system-x86_64", "-serial", "stdio", "-kernel", "vmlinuz64", "-initrd", "initrd.img.gz", "-m", "1024", "-append", "earlyprintk=serial console=ttyS0 noapic mobyplatform=test", "-vnc", "none" ] +RUN qemu-img create -f raw disk.img 100M + +ENTRYPOINT [ "qemu-system-x86_64", "-drive", "file=disk.img,format=raw", "-serial", "stdio", "-kernel", "vmlinuz64", "-initrd", "initrd.img.gz", "-m", "1024", "-append", "earlyprintk=serial console=ttyS0 noapic mobyplatform=test", "-vnc", "none" ] diff --git a/alpine/etc/fstab b/alpine/etc/fstab index 7ca1d8cb5..0b20d1a8c 100644 --- a/alpine/etc/fstab +++ b/alpine/etc/fstab @@ -1 +1,2 @@ -tmpfs /run tmpfs defaults,nodev,relatime,size=10%,mode=755,shared 0 0 +tmpfs /run tmpfs defaults,nodev,relatime,size=10%,mode=755 0 0 +tmpfs /run tmpfs remount,bind,shared 0 0 diff --git a/alpine/packages/automount/etc/init.d/automount b/alpine/packages/automount/etc/init.d/automount index 91c686033..294d4b332 100755 --- a/alpine/packages/automount/etc/init.d/automount +++ b/alpine/packages/automount/etc/init.d/automount @@ -10,7 +10,7 @@ start() { ebegin "Configuring host block device" - DEV="$(lsblk -r | grep ' disk $' | awk '{print $1}' | head -1 )" + DEV="$(find /dev -maxdepth 1 -type b ! -name 'loop*' | grep -v '[0-9]$' | sed 's@.*/dev/@@' | head -1 )" [ -z ${DEV} ] && exit 1 diff --git a/alpine/packages/diagnostics/diagnostics b/alpine/packages/diagnostics/diagnostics index 3027e0fb7..30b3e1096 100755 --- a/alpine/packages/diagnostics/diagnostics +++ b/alpine/packages/diagnostics/diagnostics @@ -1,7 +1,7 @@ #!/bin/sh printf '\n' -DEV="$(lsblk -r | grep ' disk $' | awk '{print $1}' | head -1 )" +DEV="$(find /dev -maxdepth 1 -type b ! -name 'loop*' | grep -v '[0-9]$' | sed 's@.*/dev/@@' | head -1 )" [ $? -eq 0 ] && printf "✓ Drive found: $DEV\n" || printf "✗ No drive found\n" DEV=$(mount | grep '/dev/.*da. on /var type') [ $? -eq 0 ] && printf "✓ Drive mounted: $DEV\n" || printf "✗ No drive mounted\n"