Project

General

Profile

Support #207

Updated by Daniel Curtis over 9 years ago

{{>toc}} 
 I decided to finally try Arch Linux out, and found it to be fast and highly configurable. As such I will document what I did to get a Base installation for Arch. I booted Arch up from its live ISO and was dumped to a root shell. 

 This guide will use GRUB with a Master Boot Record; this is an older setup, but still useful. 

 h2. Partition Hard Drive 

 * Use fdisk to setup the initial partition map: 
 <pre> 
 fdisk /dev/sda 
 n 
 p 
 +1G +7G 
 n 
 p 
 [Enter] +1G 
 w 
 </pre> 

 * Make file system File System and swap 
 Swap 

 <pre> 
 mkswap mkfs.ext4 /dev/sda1 
 mkfs.ext4 mkswap /dev/sda2 
 </pre> 

 * Mount the new file system 
 The New File System 

 <pre> 
 mount /dev/sda1 /mnt 
 </pre> 

 * Bootstrap the base system installation 
 The Base System Installation 

 <pre> 
 pacstrap /mnt base base-devel openssh grub 
 </pre> 

 h2. Configure Base System 

 * h3. Generate A File System Configuration 
 

 <pre> 
 genfstab -p /mnt >> /mnt/etc/fstab 
 </pre> 

 * h3. Chroot Into The Base System 
 <pre> 
 

 arch-chroot /mnt 
 </pre> 

 * Create a static ethernet connection 
 h3. Start DHCP Client 

 <pre> 
 cp /etc/netctl/examples/ethernet-static /etc/netctl/wired dhcpcd enp0s3 
 netctl enable wired 
 </pre> 
 #* *NOTE*: Edit @/etc/netctl/wired@ to the correct network settings 

 * h3. Set host name 
 Host Name 

 <pre> 
 vi /etc/hostname 
 </pre> 

 * h3. Set the local time 
 Local Time 

 <pre> 
 ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime 
 </pre> 

 * Create initial ram disk 
 Initial Ram Disk 

 <pre> 
 mkinitcpio -p linux 
 </pre> 

 * Change root password 
 Root Password 

 <pre> 
 passwd 
 </pre> 

 * h2. Install Grub Bootloader 

 Make sure to exit out of the chroot environment before installing via pacstrap 
 <pre> 
 exit 
 pacstrap /mnt grub boot files 
 </pre> 

 Then chroot back into the Base system: 
 <pre> 
 arch-chroot /mnt 
 </pre> 

 h3. Install Grub Boot Files 

 <pre> 
 grub-install --target=i386-pc --recheck --debug /dev/sda 
 </pre> 

 * h3. Generate grub config file 
 Grub Config File 

 <pre> 
 grub-mkconfig -o /boot/grub/grub.cfg 
 </pre> 

 * Exit The Chroot Environment 
 <pre> 
 exit 
 </pre> 

 h2. Finalize The Install 

 At this point Arch is ready for use, however you can install packages for the new Base system before restarting the machine: 
 <pre> 
 pacman -S gnome 
 </pre> 
 #* NOTE: Setting up Xorg or a Desktop Environment is outside the scope of this guide. 

 When all packages are finished installing unmount the Base system partition and reboot 
 <pre> 
 umount /dev/sda1 
 reboot 
 </pre>

Back