2020-01-25 16:41:16 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-01-29 12:33:53 +00:00
|
|
|
|
2020-01-25 16:41:16 +00:00
|
|
|
function first_stage(){
|
|
|
|
echo foo first_stage
|
2020-01-29 12:37:36 +00:00
|
|
|
|
2020-01-29 12:59:43 +00:00
|
|
|
apt install debootstrap
|
|
|
|
|
2020-01-29 19:29:15 +00:00
|
|
|
lsblk -fTpo NAME,FSTYPE,LABEL,UUID,FSAVAIL,MOUNTPOINT
|
|
|
|
select DEVICE in $(lsblk -frpno NAME); do
|
|
|
|
echo using $DEVICE
|
2020-01-29 19:31:35 +00:00
|
|
|
continue
|
2020-01-29 19:29:15 +00:00
|
|
|
done
|
2020-01-29 12:37:36 +00:00
|
|
|
|
2020-01-29 19:29:15 +00:00
|
|
|
echo mkfs.ext4 ${DEVICE}p1
|
|
|
|
mkfs.ext4 ${DEVICE}p1
|
|
|
|
mount ${DEVICE}p1 $TARGET
|
|
|
|
echo mount ${DEVICE}p1 $TARGET
|
2020-01-29 12:33:53 +00:00
|
|
|
echo debootstrap sid $TARGET
|
2020-01-29 12:38:18 +00:00
|
|
|
debootstrap sid $TARGET
|
2020-01-28 22:59:27 +00:00
|
|
|
|
2020-01-29 17:17:26 +00:00
|
|
|
#choose_dialog
|
2020-01-25 16:41:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function second_stage(){
|
|
|
|
echo bar second_stage
|
2020-01-29 19:29:15 +00:00
|
|
|
passwd
|
|
|
|
echo -n > /etc/motd
|
2020-01-25 16:41:16 +00:00
|
|
|
}
|