Last active
December 16, 2017 09:00
-
-
Save yukal/81d311ba3fb7a7b4754073e6f7668113 to your computer and use it in GitHub Desktop.
archlinux.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create Partitions | |
cgdisk /dev/sda | |
cgdisk /dev/sdb | |
# Format Partitions (SSD) | |
mkfs.fat -F32 /dev/sda1 | |
mkfs.ext4 /dev/sda2 -L root | |
mkfs.ext4 /dev/sdb5 -L home | |
mkfs.ext4 /dev/sdb6 -L var | |
mkswap /dev/sdb1 -L swap | |
# Mount Partitions (HDD) | |
mount /dev/sda2 /mnt && mkdir /mnt/{boot,home,var} | |
mount /dev/sda1 /mnt/boot | |
mount /dev/sdb5 /mnt/home | |
mount /dev/sdb6 /mnt/var | |
swapon /dev/sdb1 | |
# Add mirror to Pacman mirrorlist | |
# Server = https://archlinux.ip-connect.vn.ua/$repo/os/$arch | |
mcedit /etc/pacman.d/mirrorlist | |
# Installing the Base System | |
pacstrap -i /mnt base base-devel | |
pacstrap -i /mnt ntfs-3g netctl git wget curl mc | |
# Generating fstab | |
genfstab -pU /mnt >> /mnt/etc/fstab | |
# Entering to the new system | |
arch-chroot /mnt /bin/bash | |
# Creating a Bootable RAM Disk | |
# HOOKS << keymap | |
mcedit /etc/mkinitcpio.conf | |
mkinitcpio -p linux | |
# Installing GRUB | |
pacman -S grub efibootmgr | |
grub-install --boot-directory=/boot --recheck /dev/sda | |
grub-mkconfig -o /boot/grub/grub.cfg | |
# | |
# Using GRUB with UEFI | |
# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck | |
# | |
# or immediately in UEFI | |
# efibootmgr -d /dev/sda -c -L "Arch Linux" -l /vmlinuz-linux \ | |
# -u "root=/dev/sda3 rw quiet resume=/dev/sda2 \ | |
# initrd=/intel-ucode.img initrd=/initramfs-linux.img" | |
# Set the root password, exit, unmount partitions and reboot | |
passwd | |
exit | |
umount /mnt/{boot,home,var,} | |
reboot | |
# Entering to the system and Setup | |
hostnamectl set-hostname l76 | |
timedatectl set-timezone Europe/Kiev | |
# Russification of the system | |
mcedit /etc/locale.gen #ru_RU.UTF-8 UTF-8 | |
locale-gen | |
localectl set-keymap ru | |
setfont cyr-sun16 | |
localectl set-locale LANG="ru_RU.UTF-8" | |
export LANG=ru_RU.UTF-8 | |
echo "FONT=cyr-sun16" >> /etc/vconsole.conf | |
mkinitcpio -p linux | |
grub-mkconfig -o /boot/grub/grub.cfg | |
# Configuring Pacman | |
#[multilib] | |
#Include = /etc/pacman.d/mirrorlist | |
#[archlinuxfr] | |
#SigLevel = Never | |
#Server = http://repo.archlinux.fr/$arch | |
mcedit /etc/pacman.conf | |
# Create new user and set a password | |
useradd -m -g users -G audio,games,lp,optical,power,scanner,storage,video,wheel -s /bin/bash am | |
passwd am | |
# Network configuration | |
systemctl enable dhcpcd | |
systemctl start dhcpcd | |
# Upgrade the system | |
pacman -Syu | |
# Install and configure sudo | |
pacman -S sudo | |
nano /etc/sudoers # %wheel ALL=(ALL) ALL | |
exit | |
# Installing the Basic Packages | |
sudo pacman -S xorg-server xorg-xinit xorg-apps xf86-input-libinput | |
# Installing Gnome | |
sudo pacman -S gnome gnome-tweak-tool numix-gtk-theme gedit networkmanager gparted gdm | |
sudo systemctl enable gdm | |
# Install Video Driver | |
sudo pacman -S nvidia-340xx nvidia-340xx-libgl | |
# Update mkinicpio (MODULES << nvidia) | |
mcedit /etc/mkinitcpio.conf | |
mkinitcpio -p linux | |
grub-mkconfig -o /boot/grub/grub.cfg | |
# Install yaourt | |
COMEBACK=$PWD | |
cd /tmp | |
git clone https://aur.archlinux.org/package-query.git | |
git clone https://aur.archlinux.org/yaourt.git | |
cd /tmp/package-query && makepkg -sri | |
cd /tmp/yaourt && makepkg -sri | |
rm -rf /tmp/package-query | |
rm -rf /tmp/yaourt | |
cd $COMEBACK | |
# Install packages | |
yaourt -S ttf-ms-fonts numix-cursor-theme-git | |
yaourt -S google-chrome chrome-gnome-shell-git | |
sudo reboot | |
# GNOME SHELL EXTENSIONS | |
# https://extensions.gnome.org/ | |
# | |
# Plugin for Google Chrome | |
# https://chrome.google.com/webstore/detail/gnome-shell-integration/gphhapmejobijbbhgpjhcjognlahblep?hl=ru | |
# | |
# Dash to Dock | |
# https://extensions.gnome.org/extension/307/dash-to-dock/ | |
# | |
# Activities Configurator | |
# https://extensions.gnome.org/extension/358/activities-configurator/ | |
# | |
# Arch Linux Updates Indicator | |
# https://extensions.gnome.org/extension/1010/archlinux-updates-indicator/ | |
# | |
# Freon | |
# Shows temperature (CPU,HDD,Video), voltage, fan RPM | |
# https://extensions.gnome.org/extension/841/freon/ | |
# | |
# WALLPAPER | |
# curl -LO https://www.artleo.com/images/201511/artleo.com_248851.jpg | |
# curl -LO https://www.artleo.com/images/201606/artleo.com_308626.jpg | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment