How to install Arch linux

Here is a quick guide on how to install archlinux on a virtual machine so that you can play with the software before pushing it to a production environment.

 
1) Where to get it?
 
  Download Core Image-> Dual Architecture  
 
2) Validate that the downloaded iso  is not corrupt:
   Dowanload SHA1 checksum utility to validate that the image is not corrupt after download
   Go to terminal and change directory to where both files have been downloaded
    Validate download integrity by running the following in terminal:
sha1sum --check sha1sums.txt
   This should return that archlinux-CCYY.MM-core-dual.iso is OK. 
   Ignore the checksum for the other files that we have not downloaded since it is not needed
   If the checksum does not return OK for the downloaded file then re-download the file and do a checksum again
 
3) (optional) If not installing in a VM you may want to burn the iso to a USB thumb drive or a CD by issuing the following command
dd if=archlinux-CCYY.MM-core-dual.iso of=/dev/sdX 
         Where X is the drive letter. Make sure to use /dev/sdX and not /dev/sdX1.
 
This command will irrevocably delete all files on your USB stick, so make sure you don't have any important files on it before doing this.
 
You can find the drive letter for your CD drive or USB thumb drive by running the following
fdisk -l
4) Change in the BIOS to enable Secure Virtual Mode. This will enable AMD-v so that a x64 bit OS can run in a Virtual Machine
 
5) Create a virtual machine by running VirtualBox. VirtualBox can be found on System->Emulator->Oracle VM Virtual Box
  Click on New in the toolbar
  Give a name of Arch-Proxy Server
  Select Operating Syster Linux and Distribution Arch-64bit then click next
  Select 512MB for memory allocation
  Click Next to create a new hard disk image to install Arch.  Create a new image with 12GB
  The new disk will be located at /home/<user>/.VirtualBox/HardDisks/Arch-Proxy Server.vdi
  Right Click on the new server created and select Settings
    go to network and change it from NAT to Bridge Adapter on wlan0
    go to USB add a USB (Add filter from Device hint) Sandisk U3 Cruzer Micro
    go to storage assign the arch linux iso image to cd/dvd device
    click OK
  Right Click on Virtual Machine and select start
  Select it to boot as Arch x64bit
  Login as root  There is no password for root
  
6) Instalation
   Type /arch/setup
   Select Source install to be CD-ROM image
   Prepare disk select auto prepare and select the whole hard disk, use recommended sizes for
         Swap 512MB,
         Kernel 200MB
        / (root) 8GB
        The rest for /home
   Select base and base-devel (gcc...) packages to install.  If wireless network is needed then also select the following packages wireless_tools, netcfg, netcfg debug, dhcpcd are selected
   Uncomment some US mirrors from  /etc/pacman.d/mirrorlist
   Change root password
   Select done in packages  
   Select install packages
   Select install bootloader (GRUB) it should install in MBR (/dev/sda) without any number after device name
   Exit install
   Type reboot
 
7) Upgrade machine and setup network
   Log in as root
   
   7.a) Test and setup wireless network if needed
         Test that network is working by typing 
ping www.yahoo.com
        It should return statistics on packages. If you are using wireless network like WAP-PSK (WAP2 PErsonal) +TKIP encryption algorithm then do the following.
 
        Setting up wireless network on ACER Aspire Revo R3610
        Check that wlan0 is up by running iwconfig
 
        Create a WPA2 Personal(WPA-PSK) with TKIP algorithm (http://wiki.archlinux.org/index.php/WPA_supplicant)
 make a copy of your wpa_supplicant.conf file  
cp /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.original
        Create a new wpa_supplicant.conf file
wpa_passphrase mywireless "secretpassphrase" > /etc/wpa_supplicant.conf
        Make your config file wpa_supplicant.conf look like this:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
network={
      ssid="mywireless"
      proto=RSN
      key_mgmt=WPA-PSK
      pairwise=CCMP TKIP
     group=CCMP TKIP  
     #psk gets created by the wpa_passphrase command
     psk=7b271c9a7c8a6ac07d12403a1f0792d7d92b5957ff8dfd56481ced43ec6a6515 
}
 
        Try to load wlan0 with ifconfig wlan0 up.  If you get an error SIOCSIFFLAGS: No such file or directory then it means that either the firmware is not installed or there are conflicts when loading modules
ifconfig wlan0 up
 
       Run dmesg and check if it gives an error that it can not load request firmware rt28x00bin.  If it does give an error then  go to rc.conf and blacklist the following modules from being loaded (http://wiki.archlinux.org/index.php/Wireless_Setup#If_you_have_only_wire...)
      Old way (deprecated):
vim /etc/rc.conf

MODULES = ( ... !rt2800pci !rt61pci !rt2x00pci !rt2800usb !rt2800lib !rt2x00usb !rt2x00lib  ...)
     New way, go to /etc/modprobe.d and create a file called blacklist.conf with the following contents:
blacklist rt61pci
blacklist rt2x00pci
blacklist rt2800usb
blacklist rt2800lib
blacklist rt2x00usb
blacklist rt2x00lib
 
      Reboot the machine
 reboot
       Try loading wlan0 again
ifconfig wlan0 up    
      Issue the following as root to associate wlan0 interface with the wireless connection
wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf 
      Assign an IP to wlan0 by running the following
dhcpcd wlan0
     Check that an ip was associated succesfully by running
ifconfig wlan0
 
    7.b) Connect to the wireless network on boot - netcfg 
    The easiest way to have wpa_supplicant start at boot is to use netcfg. It is not necessary to specify which network SSID you want to connect to   (typically you can't do that anyways since the desired network will vary depending on location), wpa_supplicant will automatically connect to an available network from those specified in /etc/wpa_supplicant.conf. 
 
    So, install netcfg if it is not already installed and then create a network profile configuration by copying the example file: 
cp /etc/network.d/examples/wireless-wpa-config /etc/network.d/SAPOWIRELESS1
     Edit the new file to make sure it specifies the right interface, e.g. 
INTERFACE="wlan0"
 
    The rest of the file should be left as it is. Next, edit /etc/rc.conf. Add the network profile to the NETWORKS array: 
NETWORKS=(SAPOWIRELESS1)
 
     And, add the net-profiles daemon to the list of daemons started at boot: 
 DAEMONS=(... @net-profiles)
    
   7.b)Update Arch
       sync package repository database by typing the following:
pacman --sync --refresh
       Update all packages in the system with the latest software. This will syncronize database and upgrade all packages
pacman --sync --refresh --sysupgrade
           or
       Sync and upgrade at the same time
pacman -Syu
       Install vim an advanced vi editor
pacman -S vim
 
8) Install VirtualBox Guest Additions
  Enable cdrom and dvd mount in fstab by uncommenting /dev/cdrom and /dev/dvd 
vim /etc/fstab
  Click on Devices menu on the Virtual Machine window and then click on Install guest box additions this will put the image into the cd-rom drive to be later mounted
 
  Go back to arch linux and mount the image by typing the following:
 mount /media/cd
  if you get errors about unknow ISO9660 file system type then reboot the VM and try mounting again
 
  Install the guest addition from cd rom sh /media/cd/VBoxLinuxAdditions-amd64.run
 
  Add Virtual box guest additions rc.vboxadd to DAEMONS  vi /etc/rc.conf
 
  Maintenance vboxadditio
  Rebuild the vboxdrv Module
 
  Note that any time your kernel version changes (due to an upgrade, recompile, etc.) you must also rebuild the VirtualBox kernel modules.
 
  Ensure that kernel headers is installed, and run the following command:
/etc/rc.d/vboxdrv setup
  This will build the VirtualBox kernel modules for the currently running kernel; if you have just upgraded your kernel package, reboot before trying to rebuild your kernel modules.
 
  After rebuilding the module, do not forget to load it with
modprobe vboxdrv
  vboxdrv and vboxnetflt should be in the MODULES=() section of your /etc/rc.conf
 
  If you are using an old virtualbox_bin package built from AUR, run:
vbox_build_module
  If you need to rebuild the Virtual Box Additions in a guest installation of Arch Linux, use this command:
/etc/rc.d/rc.vboxadd setup
Additional documentation:
 

 

Rate: 

0
No votes yet