From b9bc86162f1bb6178b5784814997cf8712304705 Mon Sep 17 00:00:00 2001 From: neodarz Date: Fri, 2 Jun 2017 14:56:17 +0200 Subject: Fix date --- source/notes/2017-05-05-parabola_auto-install.md | 165 +++++++++++++++++++++++ source/notes/2017-05-07-parabola_auto-install.md | 165 ----------------------- 2 files changed, 165 insertions(+), 165 deletions(-) create mode 100644 source/notes/2017-05-05-parabola_auto-install.md delete mode 100644 source/notes/2017-05-07-parabola_auto-install.md (limited to 'source/notes') diff --git a/source/notes/2017-05-05-parabola_auto-install.md b/source/notes/2017-05-05-parabola_auto-install.md new file mode 100644 index 00000000..56b3b4e2 --- /dev/null +++ b/source/notes/2017-05-05-parabola_auto-install.md @@ -0,0 +1,165 @@ +--- +title: "Parabola auto-install" +date: 2017-05-05T12:18:36-08:00 +date_display: May 5, 2017 +--- + +Objectif => Je branche la clé, j'allume le pc, je lui dit de boot sur la clé, je reboot et parabola linux est pret ! + +# Exemples +Au préalable il faut évidamment créer un ISO pour la mettre sur la clé. + +Script d'install après le boot de la clé : + +- [https://shirotech.com/linux/how-to-automate-arch-linux-installation](https://shirotech.com/linux/how-to-automate-arch-linux-installation) +- [https://github.com/ewancoder/eal](https://github.com/ewancoder/eal) +- [https://github.com/ewancoder/aui](https://github.com/helmuthdu/aui) + +# Mes scripts + +Il suffit simplement de lancer `install.sh` et de se faire un café. + +Attention à une chose, il n'y a pas de gestion d'erreur, si une erreur est survenu, le pc reboot et peut donc potentiellement plenter. + +- [install.sh](https://share.neodarz.net/install.sh) + +``` sh +#/bin/sh + +loadkeys fr +pacman-key --refresh-keys +pacman --noconfirm -Syu +pacman --noconfirm -S vim tmux + +echo "Creation of the new MBR/msdos partition table" +parted /dev/sda mklabel msdos + +echo "Creation of the / parition" +parted /dev/sda mkpart primary ext4 1MiB 30GiB +parted /dev/sda set 1 boot on + +echo "Creation of the /home partition" +parted /dev/sda mkpart primary ext4 30GiB 100% + +echo "Creation of the filesystems" +mkfs.ext4 -F /dev/sda1 +mkfs.ext4 -F /dev/sda2 + +echo "mounting partitions" +mount /dev/sda1 /mnt +mkdir -p /mnt/home +mount /dev/sda2 /mnt/home +pacstrap -i /mnt base base-devel + +echo "Generation of an fstab" +genfstab -U -p /mnt >> /mnt/etc/fstab +curl https://share.neodarz.net/chroot-install.sh > /mnt/chroot-install.sh +chmod +x /mnt/chroot-install.sh + +echo "Enter in chroot mode" +arch-chroot /mnt /chroot-install.sh +echo "Done!" + +echo "Unmounting all partition and reboot !" +umount −R /mnt +reboot +``` + +- [chroot-install.sh](https://share.neodarz.net/chroot-install.sh) + +``` sh +#/bin/sh + +echo "Editing locale file" +sed -i -e 's/#en_US.UTF-8/en_US.UTF-8/g' /etc/locale.gen +sed -i -e 's/#fr_FR.UTF-8/fr_FR.UTF-8/g' /etc/locale.gen + +echo "Generating locales" +locale-gen + +echo "Set correct lang & keymap" +echo LANG=en_US.UTF-8 > /etc/locale.conf +export LANG=en_US.UTF-8 +echo KEYMAP=fr > /etc/vconsole.conf + +echo "Set time zone & hardware clock" +ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime +hwclock --systohc --utc + +echo "Set hostname" +echo march > /etc/hostname +sed -i -e 's/localhost$/march/g' /etc/hosts + +echo "Configuration of the network" +systemctl enable dhcpcd.service + +echo "Set root password" +passwd + +echo "Installation of grub" +pacman --noconfirm -S grub os-prober +grub-install --target=i386-pc --recheck /dev/sda +grub-mkconfig -o /boot/grub/grub.cfg + +pacman --noconfirm -S iw wpa_supplicant dialog python python-appdirs python-packaging python-pyparsing python-setuptools python-dbus dbus slim git vim tmux qterminal openssh stow xorg xorg-xinit i3 + +echo "Disable fucking BEEEEP" +echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf + +echo "Add neodarz user" +useradd -m neodarz +passwd neodarz + +echo "Set correct xinit configuration" +echo "i3" > /home/neodarz/.xinitrc + +echo "Configuration of sudoers" +sed -i -e 's/root ALL=(ALL) ALL/root ALL=(ALL) ALL\nneodarz ALL=(ALL) NOPASSWD:ALL/g' /etc/sudoers + +echo "Configuration of slim" +sed -i -e "s/#default_user simone/default_user neodarz/g" /etc/slim.conf +sed -i -e "s/#focus_password no/focus_password yes/g" /etc/slim.conf +sed -i -e "s/# numlock on/numlock on/g" /etc/slim.conf +xorgConf=/etc/X11/xorg.conf.d/10-evdev.conf +echo 'Section "InputClass"' > $xorgConf +echo ' Identifier "evdev keyboard catchall"' >> $xorgConf +echo ' MatchIsKeyboard "on"' >> $xorgConf +echo ' MatchDevicePath "/dev/input/event*"' >> $xorgConf +echo ' Driver "evdev"' >> $xorgConf +echo ' # Keyboard layouts' >> $xorgConf +echo ' Option "XkbLayout" "fr"' >> $xorgConf +echo 'EndSection' >> $xorgConf + +systemctl enable slim.service + +echo "Compiling i3pystatys" +cd /tmp +sudo -u neodarz git clone https://aur.archlinux.org/i3pystatus.git +cd i3pystatus +sudo -u neodarz makepkg --noconfirm -si +cd .. +sudo -u neodarz git clone https://aur.archlinux.org/ttf-font-awesome.git +cd ttf-font-awesome +sudo -u neodarz makepkg --noconfirm -si +cd .. +sudo -u neodarz git clone https://aur.archlinux.org/otf-fira-code.git +cd otf-fira-code +sudo -u makepkg --noconfirm -si +cd /home/neodarz + +echo "Installing some python modules" +sudo easy_install netifaces colour dbus + +echo "Installation my beautiful ascii theme" +sudo -u neodarz git clone https://git.neodarz.net/neodarz/scripts_shit/dotfiles_ascii.git +cd dotfiles_ascii +sudo -u neodarz git checkout t410 +sudo -u neodarz stow i3 +sudo -u neodarz stow i3pystatus +sudo -u neodarz stow qterminal.org + +sed -i -e 's/neodarz ALL=(ALL) NOPASSWD:ALL/neodarz ALL=(ALL) ALL/g' /etc/sudoers + +rm /chroot-install.sh + +``` diff --git a/source/notes/2017-05-07-parabola_auto-install.md b/source/notes/2017-05-07-parabola_auto-install.md deleted file mode 100644 index 9acf1b2e..00000000 --- a/source/notes/2017-05-07-parabola_auto-install.md +++ /dev/null @@ -1,165 +0,0 @@ ---- -title: "Parabola auto-install" -date: 2017-05-04T12:18:36-08:00 -date_display: May 5, 2017 ---- - -Objectif => Je branche la clé, j'allume le pc, je lui dit de boot sur la clé, je reboot et parabola linux est pret ! - -# Exemples -Au préalable il faut évidamment créer un ISO pour la mettre sur la clé. - -Script d'install après le boot de la clé : - -- [https://shirotech.com/linux/how-to-automate-arch-linux-installation](https://shirotech.com/linux/how-to-automate-arch-linux-installation) -- [https://github.com/ewancoder/eal](https://github.com/ewancoder/eal) -- [https://github.com/ewancoder/aui](https://github.com/helmuthdu/aui) - -# Mes scripts - -Il suffit simplement de lancer `install.sh` et de se faire un café. - -Attention à une chose, il n'y a pas de gestion d'erreur, si une erreur est survenu, le pc reboot et peut donc potentiellement plenter. - -- [install.sh](https://share.neodarz.net/install.sh) - -``` sh -#/bin/sh - -loadkeys fr -pacman-key --refresh-keys -pacman --noconfirm -Syu -pacman --noconfirm -S vim tmux - -echo "Creation of the new MBR/msdos partition table" -parted /dev/sda mklabel msdos - -echo "Creation of the / parition" -parted /dev/sda mkpart primary ext4 1MiB 30GiB -parted /dev/sda set 1 boot on - -echo "Creation of the /home partition" -parted /dev/sda mkpart primary ext4 30GiB 100% - -echo "Creation of the filesystems" -mkfs.ext4 -F /dev/sda1 -mkfs.ext4 -F /dev/sda2 - -echo "mounting partitions" -mount /dev/sda1 /mnt -mkdir -p /mnt/home -mount /dev/sda2 /mnt/home -pacstrap -i /mnt base base-devel - -echo "Generation of an fstab" -genfstab -U -p /mnt >> /mnt/etc/fstab -curl https://share.neodarz.net/chroot-install.sh > /mnt/chroot-install.sh -chmod +x /mnt/chroot-install.sh - -echo "Enter in chroot mode" -arch-chroot /mnt /chroot-install.sh -echo "Done!" - -echo "Unmounting all partition and reboot !" -umount −R /mnt -reboot -``` - -- [chroot-install.sh](https://share.neodarz.net/chroot-install.sh) - -``` sh -#/bin/sh - -echo "Editing locale file" -sed -i -e 's/#en_US.UTF-8/en_US.UTF-8/g' /etc/locale.gen -sed -i -e 's/#fr_FR.UTF-8/fr_FR.UTF-8/g' /etc/locale.gen - -echo "Generating locales" -locale-gen - -echo "Set correct lang & keymap" -echo LANG=en_US.UTF-8 > /etc/locale.conf -export LANG=en_US.UTF-8 -echo KEYMAP=fr > /etc/vconsole.conf - -echo "Set time zone & hardware clock" -ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime -hwclock --systohc --utc - -echo "Set hostname" -echo march > /etc/hostname -sed -i -e 's/localhost$/march/g' /etc/hosts - -echo "Configuration of the network" -systemctl enable dhcpcd.service - -echo "Set root password" -passwd - -echo "Installation of grub" -pacman --noconfirm -S grub os-prober -grub-install --target=i386-pc --recheck /dev/sda -grub-mkconfig -o /boot/grub/grub.cfg - -pacman --noconfirm -S iw wpa_supplicant dialog python python-appdirs python-packaging python-pyparsing python-setuptools python-dbus dbus slim git vim tmux qterminal openssh stow xorg xorg-xinit i3 - -echo "Disable fucking BEEEEP" -echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf - -echo "Add neodarz user" -useradd -m neodarz -passwd neodarz - -echo "Set correct xinit configuration" -echo "i3" > /home/neodarz/.xinitrc - -echo "Configuration of sudoers" -sed -i -e 's/root ALL=(ALL) ALL/root ALL=(ALL) ALL\nneodarz ALL=(ALL) NOPASSWD:ALL/g' /etc/sudoers - -echo "Configuration of slim" -sed -i -e "s/#default_user simone/default_user neodarz/g" /etc/slim.conf -sed -i -e "s/#focus_password no/focus_password yes/g" /etc/slim.conf -sed -i -e "s/# numlock on/numlock on/g" /etc/slim.conf -xorgConf=/etc/X11/xorg.conf.d/10-evdev.conf -echo 'Section "InputClass"' > $xorgConf -echo ' Identifier "evdev keyboard catchall"' >> $xorgConf -echo ' MatchIsKeyboard "on"' >> $xorgConf -echo ' MatchDevicePath "/dev/input/event*"' >> $xorgConf -echo ' Driver "evdev"' >> $xorgConf -echo ' # Keyboard layouts' >> $xorgConf -echo ' Option "XkbLayout" "fr"' >> $xorgConf -echo 'EndSection' >> $xorgConf - -systemctl enable slim.service - -echo "Compiling i3pystatys" -cd /tmp -sudo -u neodarz git clone https://aur.archlinux.org/i3pystatus.git -cd i3pystatus -sudo -u neodarz makepkg --noconfirm -si -cd .. -sudo -u neodarz git clone https://aur.archlinux.org/ttf-font-awesome.git -cd ttf-font-awesome -sudo -u neodarz makepkg --noconfirm -si -cd .. -sudo -u neodarz git clone https://aur.archlinux.org/otf-fira-code.git -cd otf-fira-code -sudo -u makepkg --noconfirm -si -cd /home/neodarz - -echo "Installing some python modules" -sudo easy_install netifaces colour dbus - -echo "Installation my beautiful ascii theme" -sudo -u neodarz git clone https://git.neodarz.net/neodarz/scripts_shit/dotfiles_ascii.git -cd dotfiles_ascii -sudo -u neodarz git checkout t410 -sudo -u neodarz stow i3 -sudo -u neodarz stow i3pystatus -sudo -u neodarz stow qterminal.org - -sed -i -e 's/neodarz ALL=(ALL) NOPASSWD:ALL/neodarz ALL=(ALL) ALL/g' /etc/sudoers - -rm /chroot-install.sh - -``` -- cgit v1.2.1