Skip to content

Commit

Permalink
tools/gen_stage2: fix linux/alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro committed Aug 3, 2022
1 parent f674d4c commit e9e3855
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tools/gen_stage2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ mkdir -p mnt
sudo modprobe nbd max_part=8
sudo qemu-nbd --connect=/dev/nbd0 $after
sudo fdisk /dev/nbd0 -l
sudo mount /dev/nbd0p1 $(pwd)/mnt/

case "$os" in
debian)
sudo mount /dev/nbd0p1 $(pwd)/mnt/
;;
alpine)
sudo mount /dev/nbd0p3 $(pwd)/mnt/
;;
esac

#
# install files
Expand All @@ -47,7 +55,6 @@ esac
# unmount and disconnect
sudo umount $(pwd)/mnt/
sudo qemu-nbd --disconnect /dev/nbd0
sudo rmmod nbd
rm -r mnt

#
Expand Down

0 comments on commit e9e3855

Please sign in to comment.