# dd if=/dev/urandom of=/dev/sda Change keyboard layout # loadkeys br-abnt2 Get IP address # dhcpcd Partition hard drives # gdisk /dev/sda Command (? for help): o Proceed? (Y/N): Y Command (? for help): n 1, 2048, +2M 2MB, type EF02 (BIOS partition). This is used by GRUB2/BIOS-GPT. (/dev/sda1) Command (? for help): n 2, , +100M, 100MB, type 8300 (Linux). This will store /boot (/dev/sda2) Command (? for help): n 3, , , REST, type 8300 (Linux). This will store /boot (/dev/sda3) Command (? for help): w Format /boot, /root and /home # mkfs.ext2 /dev/sda2 # mkfs.ext4 -m 0 /dev/sda3 Mount the partitions # mkdir /mnt/boot # mount /dev/sda3 /mnt # mount /dev/sda2 /mnt/boot Install the base system # pacstrap /mnt base base-devel Install a bootloader # pacstrap /mnt grub-bios Generate fstab # genfstab -U -p /mnt >> /mnt/etc/fstab Mount Flags Edit /mnt/etc/fstab to add TRIM support tmpfs /tmp tmpfs nodev,nosuid 0 0 UUID=XXXX / ext4 defaults,noatime,discard 0 1 /dev/sda2 /boot ext2 defaults,noatime 0 2 Chroot into our newly installed system # arch-chroot /mnt Configure system Root password # passwd Hostname Add your hostname in /etc/hostname. Add also your hostname in /etc/hosts, coinciding with the one specified in /etc/hostname as an alias, so that it looks like this: 127.0.0.1 localhost.localdomain localhost myhostname ::1 localhost.localdomain localhost myhostname
Console fonts and keymap
Set keymap and font name in /etc/vconsole.conf. KEYMAP=br-abnt2 FONT=Lat2-Terminus16 FONT_MAP= Timezone Edit the file /etc/timezone America/New_York Create TimeZone Link # ln -s /usr/share/zoneinfo/America/New_York /etc/localtime Locale Edit /etc/locale.gen and uncomment: en_US.UTF-8 UTF-8 pt_BR.UTF-8 UTF-8 Pt_BR ISO-8859-1 Generate locales # locale-gen Setting up system-wide locale Add your language to /etc/locale.conf. LANG=en_US.UTF-8 Export current language for initramfs creation # export LANG=en_US.UTF-8 Hardware clock time # hwclock --systohc --utc Prepare initramfs build Edit /etc/mkinitcpio.conf and insert keymap before filesystem Create an initial ramdisk environment # mkinitcpio -p linux Configure the bootloader # grub-install /dev/sda # cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo Generate GRUB2 configuration ##### # grub-mkconfig -o /boot/grub/grub.cfg Unmount the partitions # exit # umount /mnt/boot # umount /mnt Reboot Change I/O scheduler for SSD To do this, create and edit a file in /etc/udev/rules.d named something like 60schedulers.rules. In the file include the following: # set deadline scheduler for non-rotating disks ACTION=="add|change", KERNEL=="sd[a-z]", TEST!="queue/rotational", ATTR{queue/scheduler}="deadline" ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline"