wip
This commit is contained in:
parent
3248135caa
commit
4929e8b64a
1 changed files with 5 additions and 4 deletions
9
entry.sh
9
entry.sh
|
@ -4,7 +4,7 @@ function first_stage(){
|
||||||
echo foo first_stage
|
echo foo first_stage
|
||||||
echo creating image file
|
echo creating image file
|
||||||
dd if=/dev/zero of=/root/disk.img bs=1M count=512
|
dd if=/dev/zero of=/root/disk.img bs=1M count=512
|
||||||
losetup --show -f /root/disk.img
|
LODEV=$(losetup --show -f /root/disk.img)
|
||||||
(
|
(
|
||||||
echo o # Create a new empty DOS partition table
|
echo o # Create a new empty DOS partition table
|
||||||
echo n # Add a new partition
|
echo n # Add a new partition
|
||||||
|
@ -13,10 +13,11 @@ function first_stage(){
|
||||||
echo # First sector (Accept default: 1)
|
echo # First sector (Accept default: 1)
|
||||||
echo # Last sector (Accept default: varies)
|
echo # Last sector (Accept default: varies)
|
||||||
echo w # Write changes
|
echo w # Write changes
|
||||||
) | fdisk /dev/loop0
|
) | fdisk ${LODEV}
|
||||||
losetup -d /dev/loop0
|
losetup -d ${LODEV}
|
||||||
losetup --show -fP /root/disk.img
|
LODEV=$(losetup --show -fP /root/disk.img)
|
||||||
lsblk
|
lsblk
|
||||||
|
using device $LODEV
|
||||||
echo mount divice to $TARGET
|
echo mount divice to $TARGET
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue