Browse Source

Updates Scripts to prepare MH-USB for DebConf Edition

debconf
vinay 8 months ago
parent
commit
d8597166b3
2 changed files with 59 additions and 25 deletions
  1. +32
    -0
      debconf-usb.sh
  2. +27
    -25
      prepare-usb.sh

+ 32
- 0
debconf-usb.sh View File

@ -0,0 +1,32 @@
#bin/bash
dd="sudo dd"
# Script to write debconf-edition image to multiple USBs
#A=/dev/disk/by-path/pci-0000:00:14.0-usb-0:2:1.0-scsi-0:0:0:0
#B=/dev/disk/by-path/pci-0000:00:14.0-usb-0:1:1.0-scsi-0:0:0:0
#C=/dev/disk/by-path/pci-0000:00:14.0-usb-0:4.4:1.0-scsi-0:0:0:0
#D=/dev/disk/by-path/pci-0000:00:14.0-usb-0:4.1:1.0-scsi-0:0:0:0
#E=/dev/disk/by-path/pci-0000:00:14.0-usb-0:4.3:1.0-scsi-0:0:0:0
#F=/dev/disk/by-path/pci-0000:00:14.0-usb-0:4.2:1.0-scsi-0:0:0:0
#Dell USB HUB
#G=/dev/disk/by-path/pci-0000:02:00.0-usb-0:2.3:1.0-scsi-0:0:0:0
#H=/dev/disk/by-path/pci-0000:02:00.0-usb-0:2.1:1.0-scsi-0:0:0:0
#I=/dev/disk/by-path/pci-0000:02:00.0-usb-0:2.4:1.0-scsi-0:0:0:0
while :; do
if [ -h $1 ]; then
#Check whether there is a USB drive at Physical USB port and it is a symlink to the device filename
echo "USB Drive present at $2,copying the image"
$dd if=$HOME/debconf-usb.img of=$1 status=progress bs=5M && notify-send "$2-done"
echo "Done - copied to $2 | Please Unplug the drive and insert another"
exit 1
else
echo "Please insert a USB disk at $2"
continue
fi
done

+ 27
- 25
prepare-usb.sh View File

@ -31,7 +31,6 @@ fi
OS_FOR_16GB="
alpine-standard-3.16.2-x86_64.iso*
debian-11.5.0-amd64-netinst.iso*
Fedora-Workstation-Live-x86_64-36-1.5.iso*
guix-system-install-1.3.0.x86_64-linux.iso*
manjaro-kde-21.3.7-220816-linux515.iso*
netboot.xyz.iso*
@ -44,27 +43,25 @@ OS_FOR_16GB="
zdebian-firmware-11.5.0-amd64-netinst.iso*
"
OS_FOR_32GB="
alpine-standard-3.16.2-x86_64.iso*
debian-11.5.0-amd64-DVD-1.iso*
debian-11.5.0-amd64-netinst.iso*
devuan_chimaera_4.0.0_amd64_netinstall.iso*
Fedora-Workstation-Live-x86_64-36-1.5.iso*
guix-system-install-1.3.0.x86_64-linux.iso*
manjaro-kde-21.3.7-220816-linux515.iso*
netboot.xyz.img*
netboot.xyz.iso*
openwrt-22.03.2-x86-64-generic-ext4-combined.img*
pop-os_22.04_amd64_intel_16.iso*
proxmox-ve_7.2-1.iso*
Qubes-R4.1.1-x86_64.iso*
systemrescue-9.05-amd64.iso*
tails-amd64-5.6.img*
trisquel_10.0.1_amd64.iso*
ubuntu-22.04.1-desktop-amd64.iso*
LibreELEC-Generic.x86_64-10.0.3.img*
zdebian-firmware-11.5.0-amd64-netinst.iso*
OS_FOR_32GB_DEBIAN="
DEBIAN/debian-12.1.0-amd64-netinst.iso*
DEBIAN/debian-12.1.0-amd64-DVD-1.iso*
DEBIAN/debian-live-12.1.0-amd64-kde.iso*
DEBIAN/debian-live-12.1.0-amd64-gnome.iso*
"
OS_FOR_32GB_OTHER="
OTHER/yunohost-bullseye-11.0.9-amd64-stable.iso*
OTHER/AV_Linux_MX_Edition-21.3_ahs_x64.iso*
OTHER/netboot.xyz.img*
OTHER/netboot.xyz.iso*
OTHER/proxmox-ve_8.0-2.iso*
OTHER/systemrescue-9.05-amd64.iso*
OTHER/tails-amd64-5.16.img*
OTHER/trisquel_11.0_amd64.iso*
OTHER/ubuntu-22.04.1-desktop-amd64.iso*
OTHER/devuan_daedalus_5.0.0_amd64_minimal-live.iso*
OTHER/devuan_daedalus_5.0.0_amd64_desktop-live.iso*
"
RPi="
2022-09-22-raspios-bullseye-arm64-lite.img.xz
@ -86,22 +83,26 @@ then
else
$ventoy -i /dev/$usb -L MH-USB -I -g
sleep 20
OS=$OS_FOR_32GB
OS_DEB=$OS_FOR_32GB_DEBIAN
OS_OTH=$OS_FOR_32GB_OTHER
fi
## Copy ISOs
mkdir -p /mnt/mhusb/
mount /dev/$part /mnt/mhusb
mkdir -p /mnt/mhusb/{OS,Tools}
mkdir -p /mnt/mhusb/OS/DEBIAN
mkdir -p /mnt/mhusb/OS/OTHER
mkdir -p /mnt/mhusb/Tools
cd MH-USB/OS/
time $rsync $OS /mnt/mhusb/OS/
time $rsync $OS_DEB /mnt/mhusb/OS/DEBIAN
time $rsync $OS_OTH /mnt/mhusb/OS/OTHER
cd ../Tools/
time $rsync $TOOLS /mnt/mhusb/Tools/
cd ../
time $rsync ventoy /mnt/mhusb
time $rsync /home/vinay/mh/usb/MH-USB/ventoy /mnt/mhusb
#if [ $size -eq 32 ]
#then
@ -111,3 +112,4 @@ time $rsync ventoy /mnt/mhusb
#fi
echo "Done."

Loading…
Cancel
Save