diff --git a/mbr.bin b/mbr.bin deleted file mode 100644 index 646a684..0000000 Binary files a/mbr.bin and /dev/null differ diff --git a/mkusb.sh b/mkusb.sh index 7200e08..c7b63ea 100644 --- a/mkusb.sh +++ b/mkusb.sh @@ -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