1 Installing Arch Linux (UEFI/GPT) [PDF]

  • 0 0 0
  • Suka dengan makalah ini dan mengunduhnya? Anda bisa menerbitkan file PDF Anda sendiri secara online secara gratis dalam beberapa menit saja! Sign Up
File loading please wait...
Citation preview

Arch Linux rasheduzzaman February 2015



1



Installing Arch Linux (UEFI/GPT)



Follow the list of command in sequence. When writing these command just write the test part of the command (means don’t write ’#‘ sign).



1.1



Establish an internet connection



# ping -c 3 www.google.com PING www.l.google.com (74.125.132.105) 56(84) bytes of data. 64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=1 ttl=50 time=17.0 ms 64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=2 ttl=50 time=18.2 ms 64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=3 ttl=50 time=16.6 ms --- www.l.google.com ping statistics --3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 16.660/17.320/18.254/0.678 ms



1.2



Create new partition table



This instruction are for UEFI based booting system. If you have legacy bios boot system use different method. # lsblk # parted /dev/sda print # parted /dev/sda (parted) mklabel gpt (parted) mkpart ESP fat32 1M 513M (parted) set 1 boot on (parted) mkpart primary ext4 513M 20.5G (parted) mkpart primary ext4 20.5G 100% (parted) quit # lsblk /dev/sda # mkfs.vfat -F32 /dev/sda1 # mkfs.ext4 /dev/sda2 # mkfs.ext4 /dev/sda3 # parted /dev/sda print



1



1.3 # # # # #



Mount the partitions



mount mkdir mount mkdir mount



1.4



/dev/sda2 /mnt -p /mnt/boot /dev/sda1 /mnt/boot -p /mnt/home /dev/sda3 /mnt/home



Install the base system



The base system is installed using the pacstrap script. The −i switch can be omitted if you wish to install every package from the base group without prompting. To build packages from the AUR or with ABS, you will also need the base-devel group. Other packages can be installed later using pacman. # pacstrap -i /mnt base base-devel



1.5



Generate an fstab



Generate an fstab file with the following command. UUIDs will be used because they have certain advantages (see fstab#Identifying filesystems). If you would prefer to use labels instead, replace the -U option with -L: # genfstab -U -p /mnt >> /mnt/etc/fstab Warning: The fstab file should always be checked after generating it. If you encounter errors running genfstab or later in the install process, do not run genfstab again; just edit the fstab file.



1.6



Chroot and configure the base system



Next, chroot into your newly installed system: At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system. These can either be created if they do not exist, or edited if you wish to change the defaults. Closely following and understanding these steps is of key importance to ensure a properly configured system. # arch-chroot /mnt /bin/bash # nano /etc/locale.gen # en_US.UTF-8 UTF-8 # locale-gen # echo LANG=en_US.UTF-8 > /etc/locale.conf # export LANG=en_US.UTF-8 # ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime # hwclock --systohc --utc # pacman -S intel-ucode # mkinitcpio -p linux # bootctl install # nano /boot/loader/entries/arch.conf title Arch Linux linux /vmlinuz-linux initrd /intel-ucode.img initrd /initramfs-linux.img options root=/dev/sdaX rw quiet splash # sdax should be root (sda2) # nano /boot/loader/loader.conf default arch timeout 5 # echo myhostname > /etc/hostname 2



# # # # # #



passwd systemctl enable dhcpcd pacman -S iw wpa_supplicant dialog exit umount -R /mnt reboot



2



Graphical user interface



# # # # # # # # #



pacman -S pacman -S pacman -S pacman -S pacman -S startx pacman -S systemctl reboot



3



xf86-input-synaptics xorg-server xorg-server-utils xorg-utils xorg-xinit xorg-twm xorg-xclock xterm mesa xf86-video-intel gnome gnome-extra enable gdm



Setting up an Arch Linux VM in VirtualBox



3.1



Create a VM



• Download and install VirtualBox • Download archlinux-YYYY.MM.DD-dual.iso from Arch Linux Downloads page • Create a new VM in VirtualBox – Select Arch Linux (32 bit) – RAM: 1 GB minimum, 2 GB recommend – Hard disk: 20 GB minimum, 50 GB or more recommended. Choose “Dynamically allocated” – Boot the VM using the live CD image you downloaded.



3.2



Establish an internet connection



# ping -c 3 www.google.com



3.3



Create new partition table



# lsbl # parted /dev/sda (parted) mklabel msdos (parted) mkpart primary (parted) set 1 boot on (parted) print (parted) quit # lsblk /dev/sda # mkfs.ext4 /dev/sda1



3.4



ext4



0%



100%



Mount the partitions



# mount



/dev/sda1



/mnt 3



3.5



Install the base system



# pacstrap -i /mnt base base-devel



3.6



Generate an fstab



# genfstab -U -p /mnt >> /mnt/etc/fstab



3.7 # # # # # # # # # # # # # # # # # # # #



arch-chroot /mnt /bin/bash nano /etc/locale.gen en_US.UTF-8 UTF-8 locale-gen echo LANG=en_US.UTF-8 > /etc/locale.conf export LANG=en_US.UTF-8 ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime hwclock --systohc --utc pacman -S intel-ucode mkinitcpio -p linux pacman -S grub os-prober grub-install /dev/sda grub-mkconfig -o /boot/grub/grub.cfg echo myhostname > /etc/hostname passwd systemctl enable dhcpcd pacman -S iw wpa_supplicant dialog exit umount -R /mnt reboot



4 # # # # # # #



Window manager pacman pacman pacman pacman pacman startx reboot



4.1 # # # #



Chroot and configure the base system



-S -S -S -S -S



xf86-input-synaptics xorg-server xorg-server-utils xorg-utils xorg-xinit xorg-twm xorg-xclock xterm mesa xf86-video-vesa



Awesome



sudo pacman -S awesome vicious ranger echo "exec awesome" >> ~/.xinitrc mkdir -p ~/.config/awesome/ cp /etc/xdg/awesome/rc.lua ~/.config/awesome/



4.2



OpenBox



# pacman -S openbox menumaker # mmaker -v OpenBox3



4



4.3 # # # #



5



LightDM



pacman -S lightdm pacman -S lightdm-gtk-greater systemctl enable lightdm reboot



List of useful applications



# systemctl enable NetworkManager # pacman -S gnome-tweak-tool # nano /etc/pacman.conf [archlinuxfr] SigLevel = Never Server = http://repo.archlinux.fr/$arch # pacman -S yaourt # pacman -S net-tools # ifconfig # pacman -S pavucontrol flashplugin vlc unrar gimp # useradd -m -g users -G wheel,storage,power -s /bin/bash rasheduzzaman # passwd rasheduzzaman # EDITOR=nano visudo # %wheel ALL=(ALL) ALL # pacman -S bash-completion # easy_install pip # pacman -S terminus-font # pacman -S gcc-fortran # pacman -S texlive-most # pacman -S blas lapack # pacman -S eigen glew glm freeglut valgrind openmpi nodejs # pip install numpy # pip install scipy # pip install pandas # pip install matplotlib # pip install tornado # pip install pyzmq # pip install pyflakes # pip install pylint # pip install jupyter # pip install scikit-image # pip install scikit-learn # pip install virtualenv



6 $ $ $ $



Some useful Arch commands pacman pacman pacman yaourt



-Sy -Syu -R -Syua



# # # #



To To To To



update update remove update



the repositories system any package packages from AUR



5