Telechargement de l'iso + verif md5
This commit is contained in:
parent
8807f95e9f
commit
00fe010192
31
stick_build
31
stick_build
|
@ -1,17 +1,38 @@
|
|||
#!/bin/bash
|
||||
|
||||
# stick_build /path/live-image.iso /dev/sdX
|
||||
# stick_build /dev/sdX
|
||||
|
||||
set -e
|
||||
|
||||
ISO="live-svpro_gnu-amd64.iso"
|
||||
|
||||
# Recuperation iso
|
||||
echo "Téléchargement de l'iso..."
|
||||
sleep 5
|
||||
wget -O ${ISO} https://nuage.svnet.fr/f/0566c7a699eb4960b2ef/?dl=1
|
||||
wget -O ${ISO}.md5 https://nuage.svnet.fr/f/06d1ae10101949bc84d9/?dl=1
|
||||
echo "Vérification de l'image..."
|
||||
|
||||
if ! md5sum -c ${ISO}.md5
|
||||
then
|
||||
echo "ISO Corompue. Abandon !!"
|
||||
rm -f ${ISO} ${ISO}.md5
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Copie de l'image iso sur clé
|
||||
dd if=$1 of=$2 bs=4M status=progress
|
||||
echo "Transfert en cours..."
|
||||
dd if=${ISO} of=$1 bs=4M status=progress
|
||||
sync
|
||||
|
||||
# Création de la partition dédiée à la persistence
|
||||
printf 'n\np\n\n\n\nw' | fdisk $2
|
||||
mkfs.ext4 -L persistence ${2}3
|
||||
echo "Création de la persistence..."
|
||||
sleep 5
|
||||
printf 'n\np\n\n\n\nw' | fdisk $1
|
||||
mkfs.ext4 -L persistence ${1}3
|
||||
|
||||
# Configuratio de la partition
|
||||
mount ${2}3 /mnt
|
||||
mount ${1}3 /mnt
|
||||
echo / union > /mnt/persistence.conf
|
||||
umount /mnt
|
||||
|
||||
|
|
Loading…
Reference in New Issue