changed ssh path for boot_tiny directory

- include mbr.bin there
This commit is contained in:
2024-01-17 08:46:48 +01:00
parent 23d9299b56
commit ffb80c3ce5
2 changed files with 4 additions and 19 deletions

BIN
mbr.bin

Binary file not shown.

View File

@ -1,25 +1,10 @@
# name of the USB stick to be created
NAME=BOOT_TINY
echo "enter source for tinylinux files, e.g. zolliker@mpc1704:switchdrive/apu/boot_tiny"
echo "enter ssh path of parent directory for boot_tiny, e.g. l_samenv@samenv:boxes"
read SRC
scp -r $SRC ./
# create (overwrite) syslinux.cfg
cat > boot_tiny/syslinux.cfg << "EOF"
SERIAL 0 115200
CONSOLE 0
default centos
ALLOWOPTIONS 0
TIMEOUT 600
label centos
kernel vmlinuz
append initrd=core.gz inst.stage2=hd:LABEL=USBNAME quiet console=ttyS0,115200n8
EOF
sed -i -- "s/USBNAME/$NAME/g" boot_tiny/syslinux.cfg
ls boot_tiny
scp -r $SRC/boot_tiny ./
# list removeable disks
DISKS=()
@ -36,7 +21,7 @@ do
fi
done < <(lsblk -l --output RM,TYPE,NAME,SIZE,LABEL,VENDOR,MODEL)
echo "which device (${DISKS[@]})?"
echo "which device? should be one of: ${DISKS[@]}"
read DEVICE
if [[ " ${DISKS[@]} " =~ " $DEVICE " ]]; then
@ -55,7 +40,7 @@ if [[ " ${DISKS[@]} " =~ " $DEVICE " ]]; then
mkfs.vfat -n $NAME -I ${DEVICE}1
syslinux -i ${DEVICE}1
dd conv=notrunc bs=440 count=1 if=mbr.bin of=${DEVICE}
dd conv=notrunc bs=440 count=1 if=boot_tiny/mbr.bin of=${DEVICE}
parted ${DEVICE} set 1 boot on
mkdir -p /mnt/apusb