-
Notifications
You must be signed in to change notification settings - Fork 2
gentoo install
BHN edited this page May 31, 2017
·
50 revisions
installation notes for gentoo OS
systemd, lvm, uefi
-
official gentoo handbook
- read thoroughly!
- reference for everything gentoo!
- this setup is for my personal desktop & laptop
-
/etc/**
,/usr/**
,/boot/**
- if you decide to copy everything
- you'll want to step through all config files and make any necessary adjustments
- if you decide to copy everything
- there are install steps not explicitly stated
- your system configuration may require other steps
- again, always reference the official gentoo handbook
-
- boot system rescue cd in efi mode
- connect to network
$ nmtui
- (optional) install git
$ emerge --sync
$ emerge -a dev-vcs/git
- manually set date time
$ date MMDDHHMMYYYY
- I use tlsdate to auto update time, the package is installed in a later step
- download stage-3 tarball (current-stage3-amd64-systemd)
-
gentoo mirrors
- US -> OSSU -> releases -> amd64 -> autobuilds
-
gentoo mirrors
- verify stage-3 tarball integrity
$ openssl dgst -r -sha512 stage-3.tar.bz2
$ openssl dgst -r -whirlpool stage-3.tar.bz2
-
$ gpg --verify stage3.bz2.DIGESTS.asc
- may need to import gpg key
- prepare drives
- setup lvm vg for gentoo, and then root & home lv's (SSD's)
- setup var, tmp partitions (spindles eat r/w costs for builds)
- mount root to /mnt/gentoo
- create & mount any secondary drives
- i.e. var, tmp, home, ...
- create & mount any secondary drives
- unpack stage3 tarball
$ tar xjf ... --xattrs --numeric-owner -C /mnt/gentoo
- copy system config
os/gentoo/desktop/etc/**
- can remove portage postsync eix script file for now
- ignore any overlay errors for now
- unmount all drives using unmount script
$ ./mountgentoodrivesu
- remount all drives using mount script
$ ./mountgentoodrives
- chroot into gentoo install
$ chroot /mnt/gentoo /bin/bash
- check date/time is correct
- set hardware clock to utc
$ hwclock --systohc --utc
- config locale
-
$ nano -w /etc/locale.gen
- uncomment
en_US.UTF-8 UTF-8
- uncomment
- generate locale
$ locale-gen
-
$ eselect locale list
- select en_US.utf8
-
- config timezone
- `$ echo "America/Chicago" > /etc/timezone
$ emerge --config sys-libs/timezone-data
- building the kernel
- install gentoo sources & pciutils
$ emerge gentoo-sources pciutils
- copy kernel config
- build kernel
- first save moved config
$ make menuconfig
- load .config file
- save & exit
$ make -j9 -l8 && make modules_install && make install
- first save moved config
- install gentoo sources & pciutils
- update portage
- sync
$ emerge-webrsync && emerge --sync --quiet
- create
/usr/portage/distfiles
dir- copy jdk/jre tars (if necessary)
- used for oracle-(jdk/jre)-bin install
- copy jdk/jre tars (if necessary)
- sync
- initial world update for systemd
$ emerge -a --update --deep --with-bdeps=y --newuse @world
- install some packages to aide in installation process
$ emerge neovim bash-completion
- if receiving an error saying
/usr/bin: file not recognized: Is a directory
$ unset path && source /etc/profile
- install required system applications/libraries
- sysapplist
-
$ emerge -a $(< sysapplist)
-
nvidia notes
$ eselect opengl set nvidia
$ eselect opencl set nvidia
-
nvidia notes
-
eprl
- use if packages break and you want to remove items from
$ emerge --resume
list
- use if packages break and you want to remove items from
- enable any required services
$ systemctl enable ...<tab list>...
- generate initramfs
- install genkernel-next
$ genkernel --install initramfs
- bootloader
- first unmerge systemd & emerge systemd-boot
$ bootctl install
- unmerge systemd-boot & emerge systemd
- set root password
$ passwd
- add user
- create group dev
$ groupadd dev
-
$ useradd -M -d /home/USERNAME -U -G dev,wheel,video,audio,docker,input,plugdev,systemd-journal,portage,docker -s /bin/zsh USERNAME
- the above command implies you already have your home dir stored somewhere
- set passwd
$ passwd USERNAME
- create group dev
- wrap up
- exit chroot
- unmount all drive using unmount script
- reboot
- fonts
- add overlays
$ emerge layman
-
$ layman -a ...
- 0x4d4c betagarden dotnet fkmclane hossie petkovich steam-overlay vifino-overlay
- check
/etc/portage/repos.conf/*.conf
files, and enable auto sync
- install required user applications/libraries
-
userapplist
$ emerge -a $(< userapplist)
-
eprl
- use if packages break and you want to remove items from
$ emerge --resume
list
- use if packages break and you want to remove items from
-
userapplist
- move portage postsync eix script back
$ cp os/gentoo/desktop/etc/portage/postsync.d/eix /etc/portage/postsync.d/
things will break, use tools/docs/forums/google/irc to fix them!
-
dmesg is great for investigating kernel/hardware issues
$ dmesg | grep -i error
$ dmesg | grep -i fail
-
journalctl is great for investigating systemd services
$ journalctl -xe
-
/var/log and cat
-
$ cd /var/log && cat ./* | less
- all the logs!
-
-
Linux debugging tools you'll love!
- great article by Julia Evans
probably want to head on over to the official gentoo handbook