diff --git a/scripts/sandbox-install b/scripts/sandbox-install index 6e4f264..0025ea1 100644 --- a/scripts/sandbox-install +++ b/scripts/sandbox-install @@ -32,11 +32,9 @@ PACKAGES_AUR=( SERVICES=( "systemd-networkd.service" "systemd-resolved.service" "systemd-timesyncd.service" - "fstrim.service" "docker.service" "ovs-vswitchd.service" "marionnet.service" + "fstrim.service" "docker.service" "ovs-vswitchd.service" ) -SWAP_SIZE=16GiB - # Enable time synchronization timedatectl set-ntp true @@ -49,21 +47,6 @@ done # Wait a few seconds for everything to be ready sleep 20 -# Switch the disk to MBR without confirmation -parted /dev/sda mklabel msdos --script - -# Create the swap and root partitions -parted /dev/sda mkpart primary linux-swap 1MiB $SWAP_SIZE --script -parted /dev/sda mkpart primary ext4 $SWAP_SIZE 100% --script - -# Format the partitions -mkswap /dev/sda1 -mkfs.ext4 /dev/sda2 -F - -# Mount the partitions -swapon /dev/sda1 -mount /dev/sda2 /mnt - # Enable parallel downloads in pacman sed -i "s/#ParallelDownloads = 5/ParallelDownloads = 16/" /etc/pacman.conf @@ -99,10 +82,7 @@ echo "LANG=en_US.UTF-8" > /etc/locale.conf echo "KEYMAP=fr-latin1" > /etc/vconsole.conf # Set the hostname -echo "sandbox" > /etc/hostname - -# Set the root password -echo "root:root" | chpasswd +echo "salle222-" > /etc/hostname # Install syslinux syslinux-install_update -iam @@ -119,36 +99,6 @@ Name=en* DHCP=yes " > /etc/systemd/network/20-wired.network -# Enable automatic root login in the console -mkdir -p /etc/systemd/system/getty@tty1.service.d/ -echo "[Service] -ExecStart= -ExecStart=-/usr/bin/agetty --autologin root --noclear %I \$TERM -" > /etc/systemd/system/getty@tty1.service.d/autologin.conf - -# Create a service that runs fstrim -va on startup and shutdown -echo "[Unit] -Description=Discard unused blocks on the root filesystem -After=multi-user.target - -[Service] -Type=oneshot -ExecStart= -ExecStop=/usr/bin/fstrim -va -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target -" > /etc/systemd/system/fstrim.service - -# Create the syslinux configuration file, to instantly boot into the system -echo "DEFAULT arch -LABEL arch - LINUX ../vmlinuz-linux-lts - INITRD ../initramfs-linux-lts.img - APPEND root=/dev/sda2 rw resume=/dev/sda1 -" > /boot/syslinux/syslinux.cfg - # Enable case-insensitive completion echo 'set completion-ignore-case On' >> /etc/inputrc @@ -189,29 +139,9 @@ cd bibliotheque-graphique make make install -# Install Marionnet -cd /tmp -wget -O marionnet_from_scratch https://www.marionnet.org/site/index.php/fr/documentation/installation/from-scratch -chmod +x -PREFIX=$(marionnet --paths | awk '/share.marionnet.filesystem/ {print $3}') -PREFIX=${PREFIX%share/marionnet/filesystems} -./marionnet_from_scratch -O -p $PREFIX -s 0.90.x - # Fix Oracle SQL Developer sed -i '/^#!\/bin\/bash/a export JAVA_HOME=\/usr\/lib\/jvm\/java-17-openjdk\nexport LD_LIBRARY_PATH=\/usr\/lib\/jvm\/java-17-openjdk\/lib\/server:\/usr\/lib\/jvm\/java-17-openjdk\/lib' /usr/bin/oracle-sqldeveloper - -# Create a service for Marionnet -echo "[Unit] -Description=Daemon for Marionnet - -[Service] -ExecStart=/usr/local/bin/marionnet-daemon.native - -[Install] -WantedBy=multi-user.target -" > /etc/systemd/system/marionnet.service - # Enable the services systemctl enable "${SERVICES[@]}" @@ -219,7 +149,3 @@ EOF # DNS configuration ln -sf ../run/systemd/resolve/stub-resolv.conf /mnt/etc/resolv.conf - -# Unmount the partitions -swapoff /dev/sda1 -umount -R /mnt