From 8807f95e9f3719ffe4a9b8812cf7928351fe73a8 Mon Sep 17 00:00:00 2001 From: SVNET Date: Sat, 11 Jul 2020 20:32:05 +0200 Subject: [PATCH] =?UTF-8?q?Script=20pour=20cr=C3=A9ation=20cl=C3=A9=20usb?= =?UTF-8?q?=20en=20mode=20persistence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stick_build | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 stick_build diff --git a/stick_build b/stick_build new file mode 100755 index 0000000..12aa2ee --- /dev/null +++ b/stick_build @@ -0,0 +1,22 @@ +#!/bin/bash + +# stick_build /path/live-image.iso /dev/sdX + +# Copie de l'image iso sur clé +dd if=$1 of=$2 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 + +# Configuratio de la partition +mount ${2}3 /mnt +echo / union > /mnt/persistence.conf +umount /mnt + +# Fin +echo "Terminé ! Vous pouvez booter sur la clé USB, la persistence sera auto-configurée lors du premier Boot !" + + +exit 0