30 lines
522 B
Bash
Executable file
30 lines
522 B
Bash
Executable file
#!/bin/bash
|
|
|
|
|
|
function first_stage(){
|
|
set -e
|
|
echo foo first_stage
|
|
|
|
apt install debootstrap
|
|
|
|
lsblk -fTpo NAME,FSTYPE,LABEL,UUID,FSAVAIL,MOUNTPOINT
|
|
select DEVICE in $(lsblk -frpno NAME); do
|
|
echo using $DEVICE
|
|
break
|
|
done
|
|
|
|
echo mkfs.ext4 ${DEVICE}p1
|
|
mkfs.ext4 ${DEVICE}p1
|
|
mount ${DEVICE}p1 $TARGET
|
|
echo mount ${DEVICE}p1 $TARGET
|
|
echo debootstrap sid $TARGET
|
|
debootstrap sid $TARGET
|
|
}
|
|
|
|
function second_stage(){
|
|
set -e
|
|
echo bar second_stage
|
|
passwd
|
|
echo -n > /etc/motd
|
|
apt install linux-image-amd64 grub2
|
|
}
|