Advertisement
tetra-sync

Gentoo_plasma64

Sep 21st, 2017
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.84 KB | None | 0 0
  1. Gentoo fresh installation through Virtualbox and livecd.
  2.  
  3. Introduction:
  4. Gentoo are very customizable distro compared to others such as ubuntu. You can go easymode and use ubuntu cause ubuntu is for people that dont know how to use or install gentoo. Gentoo is totally free from 3rd party application or commercial.
  5.  
  6. Note:
  7. You better stick with Gentoo handbook until you know what you doing.
  8. Learn from mistakes. Do it again until you familiar with your basic setting.
  9.  
  10. Part 1: Partitioning the HDD (This Virtual HDD is 40gb as example and we will be using gparted)
  11.  
  12. fdisk -l View HDD details
  13. parted -a optimal /dev/sda Configuring HDD
  14. mklabel gpt Make label for HDD
  15. unit Mib This will set metric unit
  16. mkpart primary 1 3 Creating grub partition (1 to 3 is HDD block unit count or 'size')
  17. name 1 grub Name it to 'grub'
  18. set 1 bios_grub on Enable the grub
  19. mkpart primary 3 131 Creating boot partition (3 to 131 is HDD block unit count or 'size')
  20. name 2 boot Name it to 'boot'
  21. mkpart primary 131 2179 Creating swap partition (131 to 2179 is HDD block unit count or 'size')
  22. name 3 swap Swap should be more than 1gb. We use 2gb (2048) as example
  23. mkpart primary 2179 40000 Creating root partition (2179 to 20000 is HDD block unit count or 'size')
  24. name 4 rootfs Name it to 'rootfs'
  25. set 2 boot on Enable the boot
  26. quit Quit gparted
  27.  
  28.  
  29. Part 2: File System and mount (You can use any filesystem, we just do it simple)
  30.  
  31. mkfs.vfat /dev/sda1
  32. mkfs.ext2 -L "boot" /dev/sda2
  33. mkswap -L "swap" /dev/sda3
  34. swapon /dev/sda3
  35. free -m
  36. mkfs.ext4 -L "rootfs" /dev/sda4
  37.  
  38. mount /dev/sda4 /mnt/gentoo Root is on /dev/sda4
  39. mkdir /mnt/gentoo/boot Create boot directory
  40. mount /dev/sda2 /mnt/gentoo/boot Mounting boot partition
  41.  
  42.  
  43. Part 3: Set the clock and downloading the stage tarball
  44.  
  45. date MMDDhhmmYYYY Format is month - day - hour - minutes - year
  46.  
  47. cd /mnt/gentoo Go into root directory
  48. ping -c 3 gentoo.org Ping the address. I assume you got ur internet running or you will
  49. need to figure it out by using 'ifconfig' or 'net-setup'.
  50. links www.gentoo.org/main/en/mirror.xml Go to website and choose current stage 3 and download
  51. tar xvjpf 'stage3' --xattrs Untar the compressed tarball
  52.  
  53.  
  54. Part 4: Configuring the make.conf
  55.  
  56. nano -w /mnt/gentoo/etc/portage/make.conf Open the make.conf and edit few things below
  57. CFLAGS="-march=native -02 -pipe" March native will utilize CPU architecture
  58. MAKEOPTS="-j4" Set the number of ur CPU cores plus 1 or any value
  59. USE="python icu bindist mmx sse sse2" Set the basic USE flags.
  60. ALSA_CARDS="" Sound Cards. (ex, hda-intel) This are not necessary because new kernel version already know your alsa cards
  61. VIDEO_CARDS=" " Video Cards. (ex, nvidia) Dont put anything yet
  62. INPUT_DEVICES=" " Input Devices. (ex, keyboard) Dont put anything yet
  63.  
  64. Both VIDEO_CARDS and INPUT_DEVICES are better to be add after successful boot and @world merge to avoid conflict.
  65.  
  66. When done, press 'Ctrl + X' to save and press 'Y'. And proceed to next step.
  67.  
  68.  
  69. Part 5: CHROOTING (Change root) Selecting mirrors is not necessary because it already set by default. Just do the change root (chroot).
  70.  
  71. cp -L /etc/resolv.conf /mnt/gentoo/etc/
  72. mount -t proc proc /mnt/gentoo/proc
  73. mount --rbind /sys /mnt/gentoo/sys
  74. mount --make-rslave /mnt/gentoo/sys
  75. mount --rbind /dev /mnt/gentoo/dev
  76. mount --make-rslave /mnt/gentoo/dev
  77.  
  78. chroot /mnt/gentoo /bin/bash
  79. source /etc/profile
  80. export PS1="(chroot) $PS1"
  81. emerge-webrsync Or you can also 'emerge --sync' to sync all file
  82.  
  83. Selecting the right profile. This are important because it will pull all lib and package dependencies depend on what you want to use. KDE, Gnome, Xfce, Plasma, Hardened all have different USE Flags and libs dependencies.
  84. eselect profile list Select profile to use. We will be using desktop for example
  85. eselect profile set X Set the Plasma desktop profile
  86.  
  87.  
  88. Part 6: Timezone and Localization
  89.  
  90. ls /usr/share/zoneinfo View all zone list
  91. ls /usr/share/zoneinfo/'ur country' Choose country and state from list
  92. echo "ur country/ur state" > /etc/timezone Save timezone info into /etc/timezone
  93. emerge --config sys-libs/timezone-data Install timezone configuration
  94.  
  95. nano -w /etc/locale.gen Edit locale.gen and set to 'local'
  96. locale-gen Generate locale
  97. eselect locale list Select appropriate locale
  98. eselect locale set # Set locale
  99.  
  100. env-update && source /etc/profile && export PS1="(chroot) $PS1" Update the environment
  101.  
  102.  
  103. Part 7: KERNEL and File system table (fstab)
  104.  
  105. emerge --ask --verbose sys-kernel/gentoo-sources This will install gentoo sources kernel
  106. emerge -av pciutils usbutils Install required tool to detect pci and usb
  107. emerge genkernel Install kernel
  108.  
  109. nano -w /etc/fstab There are few things need to be configure here to map your partitions
  110.  
  111. /dev/sda2 /boot ext2 noauto,noatime 1 2
  112. /dev/sda4 / ext4 noatime 0 1
  113. /dev/sda3 none swap sw 0 0
  114. /dev/sr0 /mnt/cdrom iso9660 noauto,user,ro 0 0
  115.  
  116. This file and drive order/names are very important so the kernel and modules can load properly and Dbus can start its process.
  117. sr0 are cd/dvd drive and iso9660 is its default kernel module. Adding 'user' will allow user to mount cd/dvd
  118. When all done, save the configuration press 'Ctrl + X' to save press 'Y'. And proceed to next step.
  119.  
  120. genkernel --menuconfig all This will open a GUI (Generated User Interface) kernel for customization
  121. Add your hostname in General Setup. When you done, save it to .config
  122. (by default name). Then exit. This will take a while to process.
  123.  
  124. emerge -av sys-kernel/linux-firmware Apply linux firmware
  125.  
  126.  
  127. Part 8: Hostname and DHCP
  128.  
  129. nano -w /etc/conf.d/hostname Set hostname for "localhost"
  130. ifconfig View networking adapter and adapter name
  131. emerge --ask --noreplace net-misc/netifrc
  132. nano /etc/conf.d/net Configure network adapter to use dhcp on boot. Make
  133. sure adapter name is same from ifconfig
  134. config_enp0s3="dhcp"
  135.  
  136. cd /etc/init.d
  137. ln -s net.lo net.enp0s3 Prepares the adapter on boot
  138. ls -lsa View (list) net.lo is redirected to net.enp0s3
  139.  
  140. nano -w /etc/hosts 127.0.0.1 replace localhost
  141.  
  142.  
  143. Part 9: Set root access and hardware clock
  144.  
  145. passwd password Any password
  146. nano -w /etc/conf.d/hwclock Set UTC to local
  147.  
  148.  
  149. Part 10: System tools
  150.  
  151. emerge -av app-admin/syslog-ng sys-process/cronie sys-apps/mlocate Basic app for admin
  152.  
  153. rc-update add syslog-ng default
  154. rc-update add cronie default
  155. rc-update add sshd default
  156. emerge -av net-misc/dhcpcd
  157.  
  158. emerge -av sys-apps/iproute2 sys-apps/net-tools gentoolkit Basic network app (skip this, do it after Plasma desktop load if you need it)
  159.  
  160.  
  161. Part 11: System Boot (Grub 2)
  162.  
  163. emerge -av sys-boot/grub
  164. grub2-install /dev/sda
  165. grub2-mkconfig -o /boot/grub/grub.cfg
  166. exit
  167.  
  168. ls /mnt/gentoo
  169. umount /mnt/gentoo
  170. shutdown -P now
  171.  
  172.  
  173. By now it should be boot and make sure to remove the livecd.
  174.  
  175. Part 12: Test Booting
  176.  
  177. login root
  178. cd /
  179. rm /stage3-*.tar.bz2
  180.  
  181. emerge -uvDNa world This will pull all libs and dependencies needed for the selected profile and also update all the package. This will takes hours depends on your CPU and internet.
  182. It took more than 5 hours for me.
  183.  
  184.  
  185. EXTRAS
  186.  
  187.  
  188. Part 13: Installing Xorg.
  189.  
  190. Both VIDEO_CARDS and INPUT_DEVICES will need to be configured again with the appropriate cards and devices.
  191. Depends on your cards, you might need to configure your kernel too because some nvidia provided driver conflicts with nouveu in kernel driver
  192. I will use VIDEO_CARDS="vesa intel fbdev" and INPUT_DEVICES="evdev mouse keyboard" as test, because im building this Gentoo in virtual environment.
  193. Add this In /etc/portage/make.conf
  194.  
  195. VIDEO_CARDS="vesa intel fbdev"
  196. INPUT_DEVICES="evdev mouse keyboard"
  197.  
  198. When done, press 'Ctrl + X' to save and press 'Y'.
  199.  
  200. emerge -av xorg-drivers Install the video cards
  201. emerge -av xorg-server
  202.  
  203. After its done, you might need to do emerge twm and xterm, just to test if everything are working correctly.
  204.  
  205. emerge twm xterm
  206.  
  207. Then do, startx
  208.  
  209. If everything working as intended, you will get 3 white console. Now you can uninstall the twm and xterm.
  210.  
  211. emerge --unmerge twm xterm
  212.  
  213.  
  214. Part 14: Adding Users
  215.  
  216. useradd -m -G users,wheel,audio,portage,usb,video -s /bin/bash <user>
  217. passwd <user>
  218.  
  219. Part 15.00: Plasma Dependencies
  220. emerge cpuid2cpuflags
  221. cpuid2cpuflags-x86
  222. cpuid2cpuflags-x86 >> /etc/portage/make.conf
  223.  
  224. Part 15: Installing Desktop Environment (Plasma)
  225.  
  226. There are 2 main package for Plasma desktop,
  227. 1) kde-plasma/plasma-meta Everything in Plasma will be installed
  228. 2) kde-plasma/plasma-desktop Only few basic things for loading a plasma desktop
  229. Just choose either 1 that you need. Then do, emerge.
  230.  
  231. emerge -av kde-plasma/plasma-meta
  232.  
  233. You might as well want to install internet browser, file manager, and terminal emulator.
  234.  
  235. emerge -av kde-apps/konsole kde-apps/konqueror kde-apps/dolphin
  236.  
  237.  
  238. Part 16: Configuring boot up and finalizing
  239.  
  240. nano /etc/env.d/90xsession
  241. add a new line,
  242. XSESSION="KDE-4"
  243.  
  244. When done, press 'Ctrl + X' to save and press 'Y'.
  245.  
  246. nano ~/.xinitrc
  247. add a new line,
  248. exec ck-launch-session dbus-launch --sh-syntax --exit-with-session startkde
  249.  
  250. When done, press 'Ctrl + X' to save and press 'Y'.
  251.  
  252. nano /etc/conf.d/xdm
  253. edit the line and add with sddm,
  254. DISPLAYMANAGER="sddm"
  255.  
  256. When done, press 'Ctrl + X' to save and press 'Y'.
  257.  
  258. Add sddm to video group,
  259. usermod -a -G video sddm
  260.  
  261.  
  262. /etc/init.d/dbus status Check the dbus status
  263. /etc/init.d/dbus start
  264. rc-update add dbus default
  265.  
  266. /etc/init.d/consolekit status Check consolekit status
  267. /etc/init.d/consolekit start
  268. rc-update add consolekit default
  269.  
  270. rc-update add xdm default
  271. /etc/init.d/xdm status
  272.  
  273. env-update && source /etc/profile
  274. /etc/init.d/xdm start
  275.  
  276.  
  277. IF everything working and you follow this guide, it will load the Plasma login screen after you start the xdm. If it doesn't something is wrong with your step.
  278. Check everything back if it does. Your desktop will be flickering because it still have twm and xterm in the background, under the plasma. You can fix it by doing a reboot after login the plasma.
  279.  
  280. If it working, all good. You will get the same desktop as im currently using now.
  281.  
  282.  
  283. Part 17: Installing ALSA (Advance Linux Sound Architecture), and Pulseaudio
  284. By default, libs and packages needed for sound to working are already pulled in when merging the Plasma desktop. We just need to enable it.
  285.  
  286. /etc/init.d/alsasound status Check for sound card status
  287. /etc/init.d/alsasound start
  288. rc-update add alsasound boot Set alsasound to run at boot level
  289. alsamixer Adjust the sound level
  290. speaker-test -t wav -c 2 Sound check
  291.  
  292. Add USE flags "alsa" and "pulseaudio" into /etc/portage/make.conf
  293. emerge -av pavucontrol Pulseaudio volume control. This are very useful application to manage your sound cards
  294. speaker test -t wav -c 2
  295.  
  296. You should get to hear sound from speaker test. If you dont, open Pulseaudio volume control and select your sound cards and appropriate sound codec.
  297. Don't use "speaker-test -t wav -c 2" as a root access. Do speaker test as a normal user in another terminal. You will hear sound from the test.
  298.  
  299. env-update && source /etc/profile
  300.  
  301.  
  302. Part 18: Last check and booting.
  303. Check everything again and tinkering around with desktop settings.
  304.  
  305. To fully optimize for browsing internet (Youtube), i recommend to install Firefox and also adobe flash
  306.  
  307. emerge -av kde-apps/kmix kde-apps/spectacle
  308. emerge -av firefox
  309. emerge -av adobe
  310.  
  311. You need to mount cd/dvd rom (sr0) by yourself if you want to use the drive. Just like mounting a usb memory stick.
  312.  
  313. mkdir /mnt/cdrom
  314. mount -t iso9660 /dev/sr0 /mnt/cdrom
  315.  
  316. mkdir /mnt/usb
  317. mount /dev/sdb1 /mnt/usb
  318.  
  319.  
  320. Any question, post in my channel. I'll reply later.
  321. I will upload the "Configuring WIFI" and "Installing Wine, Winetricks, 32bit Wineprefix, including Steam" in another video.
  322.  
  323. # local
  324. http://s000.tinyupload.com/?file_id=04262199579409666947
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement