Advertisement
cirrus

Archlinux install pt3

Apr 28th, 2013
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.88 KB | None | 0 0
  1. #Installing and configuring X
  2. pacman -S xorg-server xorg-xinit xorg-utils xorg-server-utils xterm
  3.  
  4. #Install ALSA
  5. Install Sound/Video Drivers (Alsa, Xorg)
  6. $ sudo pacman -S alsa-firmware alsa-utils alsa-oss
  7. #Install Xorg, pre-requisite for GUI apps:
  8. $ sudo pacman -S xorg-server xorg-xinit xorg-utils xorg-server-utils
  9. #Sound Setup
  10. alsamixer
  11.  
  12. #Install audio + video codec's
  13. pacman -S gstreamer0.10-plugins
  14.  
  15. #Install your Graficcard driver
  16. #For Nvidia Cards
  17. pacman -S nvidia lib32-nvidia-utils lib32-nvidia-libgl
  18. #For Intel Cards
  19. Intel Graphics
  20. pacman -S xf86-video-intel lib32-intel-dri
  21. #For AMD Catalyst Cards
  22. pacman -S catalyst-dkms lib32-catalyst-utils
  23. #For other Cards
  24. pacman -S xf86-video-vesa
  25.  
  26. #First Xserver test
  27. xinit
  28.  
  29. --------------------------------------------------------------------------------------------
  30.  
  31. #Install Xfce
  32. pacman -S xfce4 xfce4-goodies gamin tumbler
  33.  
  34. #Copy the File .xinitrc to your Home Directory
  35. cp /etc/skel/.xinitrc ~/.xinitrc
  36. #and add the following line:
  37. exec startxfce4
  38.  
  39. #Now start xfce with
  40. startx
  41. ---------------------------------------------------OR----------------------------------------
  42.  
  43. Install the window manager Openbox and terminal Xterm
  44.  
  45. Install Openbox & config utilities
  46. $ sudo pacman -S openbox obconf obmenu lxappearance obapps tint2
  47. Make initial configuration files for your Openbox user:
  48. $ mkdir -p ~/.config/openbox/
  49. $ cp /etc/xdg/openbox/menu.xml ~/.config/openbox
  50. $ cp /etc/xdg/openbox/rc.xml ~/.config/openbox
  51.  
  52. Create/Modify user's /home/username/.xinitrc file
  53. $ nano ~/.xinitrc
  54. Add the following line to this file:
  55. exec ck-launch-session dbus-launch openbox-session
  56.  
  57. Before starting Openbox for the first time, let's install a terminal Xterm:
  58. $ sudo pacman -S xterm
  59.  
  60. Check to see if Openbox works now:
  61. $ startx
  62.  
  63.  
  64. -------------------------install.sh-------------------------------
  65.  
  66. # confirm you can access the internet
  67. if [[ ! $(curl -Is http://www.google.com/ | head -n 1) =~ "200 OK" ]]; then
  68.   echo "Your Internet seems broken. Press Ctrl-C to abort or enter to continue."
  69.   read
  70. fi
  71.  
  72. # make 2 partitions on the disk.
  73. parted -s /dev/sda mktable msdos
  74. parted -s /dev/sda mkpart primary 0% 100m
  75. parted -s /dev/sda mkpart primary 100m 100%
  76.  
  77. # make filesystems
  78. # /boot
  79. mkfs.ext2 /dev/sda1
  80. # /
  81. mkfs.btrfs /dev/sda2
  82.  
  83. # set up /mnt
  84. mount /dev/sda2 /mnt
  85. mkdir /mnt/boot
  86. mount /dev/sda1 /mnt/boot
  87.  
  88. # rankmirrors to make this faster (though it takes a while)
  89. mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig
  90. rankmirrors -n 6 /etc/pacman.d/mirrorlist.orig >/etc/pacman.d/mirrorlist
  91. pacman -Syy
  92.  
  93. # install base packages (take a coffee break if you have slow internet)
  94. pacstrap /mnt base base-devel
  95.  
  96. # install syslinux
  97. arch-chroot /mnt pacman -S syslinux --noconfirm
  98.  
  99. # copy ranked mirrorlist over
  100. cp /etc/pacman.d/mirrorlist* /mnt/etc/pacman.d
  101.  
  102. # generate fstab
  103. genfstab -U -p /mnt >>/mnt/etc/fstab
  104.  
  105. # chroot
  106. arch-chroot /mnt /bin/bash <<EOF
  107. # set initial hostname
  108. echo "vb-ghost" >/etc/hostname
  109. # set initial timezone to America/Los_Angeles
  110. ln -s /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
  111. # set initial locale
  112. locale >/etc/locale.conf
  113. echo "en_US.UTF-8 UTF-8" >>/etc/locale.gen
  114. echo "en_US ISO-8859-1" >>/etc/locale.gen
  115. locale-gen
  116. # Set LANG
  117. echo 'LANG=en_US.UTF-8' >>/etc/locale.conf
  118. # no modifications to mkinitcpio.conf should be needed
  119. mkinitcpio -p linux
  120. # install syslinux bootloader
  121. syslinux-install_update -i -a -m
  122. # update syslinux config with correct root disk
  123. sed 's/root=.*/root=\/dev\/sda2 ro/' < /boot/syslinux/syslinux.cfg > /boot/syslinux/syslinux.cfg.new
  124. mv /boot/syslinux/syslinux.cfg.new /boot/syslinux/syslinux.cfg
  125. # set root password to "root"
  126. echo root:root | chpasswd
  127. # end section sent to chroot
  128. EOF
  129.  
  130. # unmount
  131. umount /mnt/{boot,}
  132.  
  133. echo "Done! Unmount the CD image from the VM, then type 'reboot'."
  134.  
  135. ------------------------end--------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement