remove not useful feature & add script install.sh

This commit is contained in:
Puechberty Arthur
2026-06-22 21:59:07 +02:00
parent 1a5a5c08c2
commit 37e27c3a81
22 changed files with 151 additions and 233 deletions
+1 -1
View File
@@ -1 +1 @@
archiso
archcustomiso
@@ -1 +0,0 @@
/usr/lib/systemd/system/cloud-config.service
@@ -1 +0,0 @@
/usr/lib/systemd/system/cloud-final.service
@@ -1 +0,0 @@
/usr/lib/systemd/system/cloud-init-local.service
@@ -1 +0,0 @@
/usr/lib/systemd/system/cloud-init-main.service
@@ -1 +0,0 @@
/usr/lib/systemd/system/cloud-init-network.service
@@ -1,14 +0,0 @@
[Unit]
Description=Auto Arch Installer
After=multi-user.target
[Service]
Type=simple
ExecStart=/root/install.sh
TTYPath=/dev/tty1
StandardInput=tty
StandardOutput=tty
Restart=no
[Install]
WantedBy=multi-user.target
@@ -1,13 +0,0 @@
[Unit]
Description=Unmute All Sound Card Controls For Use With The Live Arch Environment
# This needs to run after the audio device becomes available.
Wants=systemd-udev-settle.service
After=systemd-udev-settle.service sound.target
ConditionKernelCommandLine=accessibility=on
[Service]
Type=oneshot
ExecStart=/usr/local/bin/livecd-sound -u
[Install]
WantedBy=sound.target
@@ -1,20 +0,0 @@
[Unit]
Description=Screen reader service
After=livecd-alsa-unmuter.service
Before=getty@tty1.service
ConditionKernelCommandLine=accessibility=on
[Service]
Type=oneshot
TTYPath=/dev/tty13
ExecStartPre=/usr/bin/chvt 13
ExecStart=/usr/local/bin/livecd-sound -p
ExecStartPost=/usr/bin/chvt 1
ExecStartPost=systemctl start espeakup.service
StandardInput=tty
TTYVHangup=yes
TTYVTDisallocate=yes
RemainAfterExit=true
[Install]
WantedBy=multi-user.target
@@ -1 +0,0 @@
/etc/systemd/system/install.service
@@ -1 +0,0 @@
../livecd-alsa-unmuter.service
+144
View File
@@ -0,0 +1,144 @@
#!/bin/bash
set -e
clear
echo "========================"
echo " Arch Custom Installer"
echo "========================"
# =========================
# 1. KEYBOARD
# =========================
echo "Clavier (fr / us / uk / de / es) :"
read -r KEYMAP
loadkeys "$KEYMAP"
# =========================
# 2. NETWORK (AUTO + WIFI MANUEL)
# =========================
if ! ping -c 1 archlinux.org &>/dev/null; then
echo "Pas d'internet détecté."
iwctl device list
echo "Device Wi-Fi (ex: wlan0) :"
read -r DEVICE
iwctl station "$DEVICE" scan
sleep 3
iwctl station "$DEVICE" get-networks
echo "SSID :"
read -r SSID
echo "Password Wi-Fi :"
read -rs PASS
echo
iwctl station "$DEVICE" connect "$SSID" --passphrase "$PASS"
sleep 5
fi
# =========================
# 3. TIMEZONE
# =========================
echo "Fuseau horaire (ex: Europe/Paris) :"
read -r TIMEZONE
# =========================
# 4. LOCALE
# =========================
echo "Langue système (fr_FR.UTF-8 / en_US.UTF-8 / etc) :"
read -r LOCALE
# =========================
# 5. USER
# =========================
DEFAULT_USER="user"
echo "Nom utilisateur [$DEFAULT_USER] :"
read -r USERNAME
USERNAME=${USERNAME:-$DEFAULT_USER}
echo "Mot de passe utilisateur :"
read -rs USERPASS
echo
# =========================
# 6. HOSTNAME
# =========================
DEFAULT_HOST="archbox"
echo "Hostname [$DEFAULT_HOST] :"
read -r HOSTNAME
HOSTNAME=${HOSTNAME:-$DEFAULT_HOST}
# =========================
# 7. DISK
# =========================
lsblk -dpno NAME,SIZE,MODEL
echo "Disque (ex: /dev/sda ou /dev/nvme0n1) :"
read -r DISK
echo "⚠️ TOUT SERA EFFACÉ SUR $DISK"
echo "Taper YES pour confirmer :"
read -r CONFIRM
[[ "$CONFIRM" != "YES" ]] && exit 1
# =========================
# 8. PARTITIONING
# =========================
sgdisk --zap-all "$DISK"
sgdisk -n 1:0:+512M -t 1:ef00 -c 1:"EFI" "$DISK"
sgdisk -n 2:0:0 -t 2:8300 -c 2:"ROOT" "$DISK"
EFI="${DISK}1"
ROOT="${DISK}2"
mkfs.fat -F32 "$EFI"
mkfs.ext4 -F "$ROOT"
mount "$ROOT" /mnt
mount --mkdir "$EFI" /mnt/boot
# =========================
# 9. BASE INSTALL
# =========================
pacstrap -K /mnt \
base linux linux-firmware \
sudo networkmanager iwd
genfstab -U /mnt >> /mnt/etc/fstab
# =========================
# 10. CHROOT
# =========================
arch-chroot /mnt /bin/bash <<EOF
set -e
ln -sf "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
hwclock --systohc
echo "KEYMAP=$KEYMAP" > /etc/vconsole.conf
echo "$LOCALE UTF-8" >> /etc/locale.gen
locale-gen
echo "LANG=$LOCALE" > /etc/locale.conf
echo "$HOSTNAME" > /etc/hostname
useradd -m -G wheel -s /bin/bash "$USERNAME"
echo "$USERNAME:$USERPASS" | chpasswd
echo "%wheel ALL=(ALL:ALL) ALL" > /etc/sudoers.d/wheel
systemctl enable NetworkManager
EOF
echo "========================"
echo " Installation terminée"
echo "========================"
reboot
+1
View File
@@ -4,3 +4,4 @@ if grep -Fqa 'accessibility=' /proc/cmdline &> /dev/null; then
fi
~/.automated_script.sh
~/.install.sh
-54
View File
@@ -1,54 +0,0 @@
#!/bin/bash
clear
echo "=============================="
echo " Arch Custom Installer"
echo "=============================="
# 1. Nom utilisateur
read -p "Nom utilisateur: " USERNAME
# 2. Hostname
read -p "Nom machine (hostname): " HOSTNAME
# 3. Disque
lsblk
read -p "Disque à installer (ex: /dev/sda): " DISK
echo "WARNING: Tout sera effacé sur $DISK"
read -p "Continuer ? (yes/no): " CONFIRM
if [ "$CONFIRM" != "yes" ]; then
echo "Installation annulée"
exit 1
fi
# 4. Partitionnement simple
parted $DISK --script mklabel gpt
parted $DISK --script mkpart primary fat32 1MiB 512MiB
parted $DISK --script set 1 esp on
parted $DISK --script mkpart primary ext4 512MiB 100%
mkfs.fat -F32 ${DISK}1
mkfs.ext4 ${DISK}2
mount ${DISK}2 /mnt
mkdir -p /mnt/boot
mount ${DISK}1 /mnt/boot
# 5. Base system
pacstrap /mnt base linux linux-firmware sudo networkmanager
genfstab -U /mnt >> /mnt/etc/fstab
# 6. Config système
arch-chroot /mnt bash -c "
useradd -m -G wheel $USERNAME
echo '$HOSTNAME' > /etc/hostname
systemctl enable NetworkManager
"
echo "Installation terminée"
echo "Reboot..."
reboot