Anda di halaman 1dari 4

Prepare SSD

Fill new drive with Random data:


# 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"

# set cfq scheduler for rotating disks


ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1",
ATTR{queue/scheduler}="cfq"
Add additional repositories
/etc/pacman.conf
[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch
$arch = x86_64
Refresh software list with:
# pacman -Syy
# pacman -S yaourt pacman-color colordif
# yaourt mc
# yaourt -Syu --aur
Add default user
useradd -m -G users,audio,lp,optical,storage,video,wheel,power,network -s /bin/bash
fbsobreira
# passwd XXXX
Configure sound
# pacman -S alsa-utils
# pacman -S alsa-oss
test
# su - yourusername
# alsamixer
# speaker-test -c 2
# exit
# alsactl store
Install Xorg
# pacman -S xorg-server xorg-xinit xorg-server-utils
# pacman -S mesa
# lspci | grep VGA
# pacman -Ss xf86-video | less
# pacman -S xf86-video-intel lib32-intel-dri
Keyboard & mouse
# pacman -S xf86-input-synaptics
edit /etc/X11/xorg.conf.d/10-evdev.conf Add
Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Option "XkbLayout" "br-abnt2"
Option "XkbVariant" "latin9"
Driver "evdev"
EndSection
Test X
# pacman -S xorg-twm xorg-xclock xterm
# startx
Install fonts

# pacman -S ttf-dejavu ttf-bitstream-vera


# yaourt ttf-ms-fonts
Install Gnome
# pacman -S gnome gnome-extra
# systemctl enable gdm
Enable Gnome NetworkManager
# systemctl enable NetworkManager
GNOME tweak tool
# pacman -S gnome-tweak-tool
Sudo
# pacman -S sudo
# visudo
fbsobreira ALL=(ALL) ALL
Guake
# pacman -S guake
Zsh
# pacman -S zsh grml-zsh-config
# yaourt oh-my-zsh-git
# chsh -s $(which zsh)
VirtualBox
# sudo pacman -S virtualbox virtualbox-guest-iso virtualbox-host-source linuxheaders
# yaourt virtualbox-ext-oracle
Add the desired username to the vboxusers group.
# gpasswd -a username vboxusers
Load module on boot
Edit /etc/modules-load.d/virtualbox.conf and add:
Vboxdrv
Python
pacman -Sy python curl