diff options
-rwxr-xr-x | arch-install/arch-setup-0.sh | 74 | ||||
-rwxr-xr-x | arch-install/arch-setup-1.sh | 28 | ||||
-rwxr-xr-x | arch-install/hostname | 1 | ||||
-rwxr-xr-x | arch-install/locale.conf | 1 | ||||
-rwxr-xr-x | arch-install/vconsole.conf | 3 |
5 files changed, 107 insertions, 0 deletions
diff --git a/arch-install/arch-setup-0.sh b/arch-install/arch-setup-0.sh new file mode 100755 index 0000000..eccf38e --- /dev/null +++ b/arch-install/arch-setup-0.sh @@ -0,0 +1,74 @@ +#! /bin/bash + +echo "you must first edit :" +echo " /dev/sda[0-9]" +echo " SGDISK" +exit 1 + +function say() +{ + echo -e "\n$1 *************************************" +} + +loadkeys fr_CH + +say "EFIVARS" +modprobe -r efivars 2>/dev/null +umount /sys/firmware/efi/efivars 2>/dev/null +modprobe -r efivarfs 2>/dev/null +modprobe efivarfs +mount -t efivarfs efivarfs /sys/firmware/efi/efivars + +VARS=$(efivar -l | wc -l) +echo "UEFI VARS : $VARS" +[ $VARS -eq 0 ] && exit 1 + +# http://www.rodsbooks.com/gdisk/sgdisk-walkthrough.html +# to retreive size info $ sgdisk -p $DEV +# N sectors * 512 / 1024 / 1024 / 1024 -> Gb +say "SGDISK" +DEV=/dev/sda +sgdisk -og $DEV || exit 1 +sgdisk -n 1:2048:264191 -c 1:efi -t 1:ef02 $DEV || exit 1 +sgdisk -n 2:264192:209979391 -c 2:rootfs -t 2:8300 $DEV || exit 1 +sgdisk -n 3:209979392 -c 3:homefs -t 3:8300 $DEV || exit 1 +#sgdisk -n 3:209979392:976773168 -c 3:homefs -t 3:8300 $DEV || exit 1 +sgdisk -p $DEV || exit 1 + +say "MKFS" +mkfs.fat -F32 /dev/sda1 || exit 1 +mkfs.ext4 -L root /dev/sda2 || exit 1 +mkfs.ext4 -L home /dev/sda3 || exit 1 +#mkswap /dev/sda4 +#swapon +parted /dev/sda set 1 bios_grub on + +say "MOUNT" +mount /dev/sda2 /mnt +mkdir /mnt/boot +mount /dev/sda1 /mnt/boot +mkdir /mnt/home +mount /dev/sda3 /mnt/home + +say "SWAPFS" +dd if=/dev/zero of=/mnt/swapfile bs=1M count=512 || exit 1 +chmod 600 /mnt/swapfile || exit 1 +mkswap /mnt/swapfile || exit 1 +swapon /mnt/swapfile || exit 1 + +say "BASE SYSTEM" +echo "Server = http://k42.ch/mirror/archlinux/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist +pacstrap /mnt base + +say "ETC" +genfstab -U -p /mnt >> /mnt/etc/fstab +sed -i 's/\/mnt//' /mnt/etc/fstab +sed -i 's/\/mnt//' /etc/fstab +cp hostname locale.conf vconsole.conf /mnt/etc/ +sed -i 's/#fr_CH/fr_CH/; s/#en_GB/en_GB/; s/#en_US/en_US/;' /mnt/etc/locale.gen +sed -i 's/^#\[multilib\]/[multilib]/; T; n; s/^#Include/Include/' /mnt/etc/pacman.conf + +cp arch-setup-1.sh /mnt/ | exit 1 + +say " *** now launch ./arch-setup-1.sh !" +arch-chroot /mnt diff --git a/arch-install/arch-setup-1.sh b/arch-install/arch-setup-1.sh new file mode 100755 index 0000000..f206b46 --- /dev/null +++ b/arch-install/arch-setup-1.sh @@ -0,0 +1,28 @@ +#! /bin/bash + +echo "LOCALTIME" +rm /etc/localtime +ln -s /usr/share/zoneinfo/Europe/Zurich /etc/localtime + +echo "LOCALE" +locale-gen + +echo "MKINITCPIO" +mkinitcpio -p linux + +echo "NETWORK" +systemctl enable dhcpcd.service +systemctl start dhcpcd.service + +echo "PACMAN" +pacman-db-upgrade + +echo "GRUB" +pacman -Syu +pacman -S --noconfirm grub efibootmgr +#grub-install --target=i386-pc --recheck /dev/sda +grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub_uefi --recheck + +grub-mkconfig -o /boot/grub/grub.cfg + +pacman -S vim diff --git a/arch-install/hostname b/arch-install/hostname new file mode 100755 index 0000000..59b25ee --- /dev/null +++ b/arch-install/hostname @@ -0,0 +1 @@ +MYHOSTNAME diff --git a/arch-install/locale.conf b/arch-install/locale.conf new file mode 100755 index 0000000..01ec548 --- /dev/null +++ b/arch-install/locale.conf @@ -0,0 +1 @@ +LANG=en_US.UTF-8 diff --git a/arch-install/vconsole.conf b/arch-install/vconsole.conf new file mode 100755 index 0000000..449a712 --- /dev/null +++ b/arch-install/vconsole.conf @@ -0,0 +1,3 @@ +KEYMAP="fr_CH-latin1" +#KEYMAP="fr-dvorak-bepo" +FONT="/usr/share/kbd/consolefonts/ter-116n.psf.gz" |