Created
April 24, 2016 20:24
-
-
Save nartes/b9bf4087c4dabe191bbd7fad8b649d6c to your computer and use it in GitHub Desktop.
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
Installing ArchLinux from zero | |
1. Download archlinux iso: | |
transmission-remote -a 'magnet:?xt=urn:btih:99016b8d8b5a44c64955dbd337259b3b18430fc4&dn=archlinux-2016.04.01-dual.iso&tr=udp://tracker.archlinux.org:6969&tr=http://tracker.archlinux.org:6969/announce' | |
transmission-remote -l -tall | |
2. Configure Virtualbox machine: | |
... | |
3. Booting virtual machine: | |
... | |
4. Installing archlinux: | |
systemctl status sshd | |
yaourt -Ql sshd | less | |
less /etc/ssh/sshd_config | |
note: PermitRootLogin yes | |
passwd root | |
note: print new password for a root user, e.g. root | |
note: CTRL+P – previous command in history, CTRL+N – next one. | |
systemctl start sshd | |
nmap localhost | |
note: sshd service listens to port 22 on each network interface | |
ip addr | |
note: not lo interface has inet property, i.e. ip address, let's remember it | |
note: let's connect to machine from our host one | |
note: configure portforwarding 127.0.0.1:2222 → *:22 | |
note: look here for more info, https://www.virtualbox.org/manual/ch06.html#natforward | |
note: later command/s on a host machine via PuTTY, terminal, etc. | |
ssh root@localhost -p 2222 | |
note: provide the password you have set for the root | |
note: vm means virtualmachine and pc means host system | |
vm: ssh-keygen -lf /etc/ssh/ssh_host_ecdsa_key | |
note: compare two keys the one proposed by ssh and one generated by ssh-keygen | |
note: for more information read man ssh-keyscan, ssh-keygen | |
ping -c 3 google.com | |
note: checkout internet connection | |
lsblk | |
parted /dev/sda | |
help | |
mklabel msdos | |
help mkpart | |
mkpart primary ext4 0% 100% | |
set 1 boot on | |
quit | |
note: /etc/fstab will be updated later via arch-install scripts | |
mkfs.ext4 /dev/sda1 | |
mount /dev/sda1 /mnt | |
mkdir -p /mnt/boot | |
note: -p for creating all folders in path in case of absence | |
pacstrap -i /mnt base base-devel | |
note: for base group choose 1,2,3,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,22,24,25,26,27,28,30,32,40,41,42,43,44,46,47,48,49 | |
note: for base-devel group choose | |
1,2,3,5,6,7,8,9,10,11,12,14,15,16,17,18,19,20,21,22,24,25 | |
genfstab -U /mnt >> /mnt/etc/fstab | |
arch-chroot /mnt /bin/bash | |
note: uncomment ru_RU.UTF-8 UTF-8 in /etc/locale.gen for russian localization support | |
note: uncomment en_US.UTF-8 UTF-8 in /etc/locale.gen for english localization support | |
locale-gen | |
echo "LANG=en_US.UTF-8" > /etc/locale.conf | |
cat /etc/locale.conf | |
pacman -Ss terminus | |
note: nice fonts for a console | |
pacman -S terminus-font | |
tzselect | |
ln -s /usr/share/zoneinfo/Europe/Minsk /etc/localtime | |
hwclock –systohc –utc | |
note: adjust something related to time format in bios flash memory | |
mkinitcpio -p linux | |
pacman -S grub | |
grub-install –target=i386-pc /dev/sda | |
grub-mkconfig -o /boot/grub/grub.cfg | |
echo -e "archlinux_lic" > /etc/hostname | |
cat /etc/hostname | |
pacman -S networkmanager | |
systemctl enable NetworkManager | |
pacman -S procps-ng | |
pacman -S openssh | |
systemctl start sshd | |
passwd root | |
note: set the root password, this time it's persistent one, e.g. 1234 | |
useradd -m -G wheel -s /bin/bash archuser | |
passwd archuser | |
note: set the archuser password, this time it's persistent one, e.g. 1234 | |
visudo | |
note: copy line root ALL=(ALL) ALL onto the next one, and replace root with archuser, to make sudo working | |
umount -R /mnt | |
exit | |
reboot | |
note: unmount iso livecd and reboot system | |
note: login to your system | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment