wip
This commit is contained in:
parent
cc3834f211
commit
e95c2f2a69
1 changed files with 23 additions and 14 deletions
11
entry.sh
11
entry.sh
|
@ -4,6 +4,9 @@ source $(dirname $0)/utils.sh
|
|||
|
||||
function first_stage(){
|
||||
echo foo first_stage
|
||||
|
||||
if [[ ! -e /root/disk.img ]]; then
|
||||
|
||||
echo creating image file
|
||||
dd if=/dev/zero of=/root/disk.img bs=1M count=512
|
||||
LODEV=$(losetup --show -f /root/disk.img)
|
||||
|
@ -17,11 +20,17 @@ function first_stage(){
|
|||
echo w # Write changes
|
||||
) | fdisk ${LODEV}
|
||||
losetup -d ${LODEV}
|
||||
|
||||
fi
|
||||
|
||||
LODEV=$(losetup --show -fP /root/disk.img)
|
||||
|
||||
echo using device $LODEV
|
||||
echo mount divice to $TARGET
|
||||
mount $LODEVp1 $TARGET
|
||||
echo mkfs.ext4 ${LODEV}p1
|
||||
mkfs.ext4 ${LODEV}p1
|
||||
mount ${LODEV}p1 $TARGET
|
||||
echo mount ${LODEV}p1 $TARGET
|
||||
echo debootstrap sid $TARGET
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue