Skip to content

Instantly share code, notes, and snippets.

@cmaureir
Last active June 27, 2016 14:09
Show Gist options
  • Save cmaureir/4223365 to your computer and use it in GitHub Desktop.
Save cmaureir/4223365 to your computer and use it in GitHub Desktop.
Arch Installation
* Partitioning
$ cfdisk
Considering:
* Primary partition 100M boot
* Primary partition 20000M /
* Primary partition -everything else- /home
* Logical partition 1024 swap (1G, Depending of the amount of RAM)
* Creating filesystem
* boot
$ mkfs.ext2 /dev/sda1
* root
$ mkfs.ext4 /dev/sda2
* home
$ mkfs.ext4 /dev/sda4
* swap
$ mkswap /dev/sda5
* Mounting
$ mount /dev/sda2 /mnt
$ mkdir -p /mnt/home /mnt/boot
$ mount /dev/sda1 boot
& mount /dev/sda4 home
$ swapon /dev/sda5
* Internet
$ wifi-menu
or
$ dhcpcd eth0
* Installing base system
$ pacstrap /mnt base base-devel
* GRUB for BIOS
$ arch-chroot /mnt pacman -S grub-bios
* Configure the system
$ genfstab -p /mnt >> /mnt/etc/fstab
$ arch-chroot /mnt
$ echo "<hostname>" > /etc/hostname
$ ln -s /usr/share/zoneinfo/America/Santiago /etc/localtime
$ echo "LANG=\"en_US.UTF-8\"" > /etc/locale.conf
$ echo "LC_COLLATE=\"C\"" >> /etc/locale.conf
$ echo "LC_TIME=\"en_US.UTF-8\"" >> /etc/locale.conf
$ sed 's/#en_US/en_US/g' -i /etc/locale.gen
$ locale-gen
$ mkinitcpio -p linux
* Configuring GRUB
# modprobe dm-mod (NOT anymore!)
# grub-install --target=i386-pc --recheck --debug /dev/sda
# mkdir -p /boot/grub/locale
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
* If you have windows installed, you need to add an entry to the grub.
* First mount your windows partition
# mount /dev/sdXY /mnt
* Then, get the uuid
# grub-probe --target=fs_uuid /mnt/bootmgr
* Copy the previous number to the following line (replace THE_UUID)
# echo "menuentry "Microsoft Windows Vista/7/8 BIOS-MBR" {
insmod part_msdos
insmod ntfs
insmod search_fs_uuid
insmod ntldr
search --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 THE_UUID
ntldr /bootmgr
}" >> /etc/grub.d/40_custom
* Final step
# grub-mkconfig -o /boot/grub/grub.cfg
* Final steps
# passwd
# exit
# umount /mnt/boot
# umount /mnt/home
# umount /mnt
# reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment