mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-08-06 17:23:59 +00:00
Merge pull request #423 from justincormack/util-linux-fix
Util linux fix
This commit is contained in:
commit
eb275793a1
@ -3,4 +3,6 @@ FROM justincormack/alpine-qemu
|
|||||||
COPY alpine/initrd.img.gz .
|
COPY alpine/initrd.img.gz .
|
||||||
COPY alpine/kernel/x86_64/vmlinuz64 .
|
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" ]
|
||||||
|
@ -3,4 +3,6 @@ FROM justincormack/alpine-qemu
|
|||||||
COPY alpine/initrd.img.gz .
|
COPY alpine/initrd.img.gz .
|
||||||
COPY alpine/kernel/x86_64/vmlinuz64 .
|
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" ]
|
||||||
|
@ -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
|
||||||
|
@ -10,7 +10,7 @@ start()
|
|||||||
{
|
{
|
||||||
ebegin "Configuring host block device"
|
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
|
[ -z ${DEV} ] && exit 1
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
printf '\n'
|
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"
|
[ $? -eq 0 ] && printf "✓ Drive found: $DEV\n" || printf "✗ No drive found\n"
|
||||||
DEV=$(mount | grep '/dev/.*da. on /var type')
|
DEV=$(mount | grep '/dev/.*da. on /var type')
|
||||||
[ $? -eq 0 ] && printf "✓ Drive mounted: $DEV\n" || printf "✗ No drive mounted\n"
|
[ $? -eq 0 ] && printf "✓ Drive mounted: $DEV\n" || printf "✗ No drive mounted\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user