Skip to content

Instantly share code, notes, and snippets.

@mazgi
Last active January 1, 2019 07:10
Show Gist options
  • Save mazgi/536d46b66af331f708d5050458db1642 to your computer and use it in GitHub Desktop.
Save mazgi/536d46b66af331f708d5050458db1642 to your computer and use it in GitHub Desktop.
GentooInstallBattle on 2019.01.01

Refs

HW Specs

Case: SilverStone GD04

root@sysresccd /mnt/gentoo % lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)
00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
00:17.0 RAID bus controller: Intel Corporation SATA Controller [RAID mode] (rev 31)
00:1b.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Root Port #19 (rev f1)
00:1b.3 PCI bridge: Intel Corporation Sunrise Point-H PCI Root Port #20 (rev f1)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #3 (rev f1)
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #5 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #9 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)
00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)
00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-V (rev 31)
01:00.0 Multimedia controller: Altera Corporation Device 4c15 (rev 01)
02:00.0 Multimedia controller: Altera Corporation Device 4c15 (rev 01)
03:00.0 Multimedia controller: Altera Corporation Device 4c15 (rev 01)
05:00.0 Multimedia controller: Altera Corporation Device 4c15 (rev 01)
06:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 (rev 01)
root@sysresccd /mnt/gentoo % cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 94
model name      : Intel(R) Pentium(R) CPU G4500T @ 3.00GHz
stepping        : 3
microcode       : 0x76
cpu MHz         : 2999.999
cache size      : 3072 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 22
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est
tm2 ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust erms invpcid rdseed smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips        : 6000.00
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 94
model name      : Intel(R) Pentium(R) CPU G4500T @ 3.00GHz
stepping        : 3
microcode       : 0x76
cpu MHz         : 3000.001
cache size      : 3072 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 2
initial apicid  : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 22
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est
tm2 ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust erms invpcid rdseed smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips        : 6000.00
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

Packages & Flags

  • app-editors/vim
  • sys-kernel/gentoo-sources
  • sys-apps/pciutils
  • sys-kernel/genkernel
  • sys-fs/btrfs-progs
  • app-misc/tmux
  • sys-process/htop
  • dev-vcs/git -perl -python -webdav
  • sys-boot/efibootmgr
  • sys-fs/dosfstools
  • app-misc/screenfetch

Locales

root@sysresccd /mnt/gentoo % grep -Ev '^\s*(#|$)' etc/locale.gen
en_US.UTF-8 UTF-8
ja_JP.UTF-8 UTF-8
(chroot)sysresccd ~ # locale-gen
 * Generating 2 locales (this might take a while) with 2 jobs
 *  (1/2) Generating en_US.UTF-8 ...                                                                                                                    [ ok ]
 *  (2/2) Generating ja_JP.UTF-8 ...                                                                                                                    [ ok ]
 * Generation complete
 * Adding locales to archive ...                                                                                                                        [ ok ]
(chroot)sysresccd ~ # eselect locale set 2
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
Setting LANG to en_US.utf8 ...
Run ". /etc/profile" to update the variable in your shell.
(chroot)sysresccd ~ # eselect locale list
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
Available targets for the LANG variable:
  [1]   C
  [2]   en_US.utf8 *
  [3]   ja_JP.utf8
  [4]   POSIX
  [ ]   (free form)
gentoo-on-sst-gd04s ~ # locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.utf8
LC_CTYPE=UTF-8
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=
gentoo-on-sst-gd04s ~ # cat /etc/env.d/02locale
# Configuration file for eselect
# This file has been automatically generated.
LANG="en_US.utf8"
gentoo-on-sst-gd04s ~ # vi /etc/env.d/02locale
gentoo-on-sst-gd04s ~ # cat /etc/env.d/02locale 
LANG="en_US.utf8"
LC_ALL="en_US.utf8"

Volumes

root@sysresccd /mnt/gentoo % grep -Ev '^\s*(#|$)' etc/fstab     
/dev/nvme0n1p2          none            swap            sw                      0 0
/dev/nvme0n1p3          /               btrfs           subvol=gentoo           0 0
/dev/nvme0n1p3          /usr/portage    btrfs           subvol=usr-portage      0 0
/dev/nvme0n1p3          /var/log        btrfs           subvol=var-log          0 0

Setup UEFI

root@sysresccd /boot/EFI/Gentoo % sha1sum *
996fd4d98c57337bb0f6e10bdbfee016e8e56555  initramfs-genkernel-x86_64-gentoo.blue
996fd4d98c57337bb0f6e10bdbfee016e8e56555  initramfs-genkernel-x86_64-gentoo.green
69f7e14f928751cd04d9d1d984f87495e6431b37  kernel-genkernel-x86_64-gentoo.blue
69f7e14f928751cd04d9d1d984f87495e6431b37  kernel-genkernel-x86_64-gentoo.green
root@sysresccd /root % mount | grep nvme0n1p1
/dev/nvme0n1p1 on /boot/EFI type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
root@sysresccd /root % tree /boot/EFI 
/boot/EFI
`-- Gentoo
    |-- initramfs-genkernel-x86_64-4.14.83-gentoo
    `-- kernel-genkernel-x86_64-4.14.83-gentoo
root@sysresccd /root % mount -o remount /sys/firmware/efi/efivars -o rw 
root@sysresccd /root % mount | grep efivarfs
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,relatime)
root@sysresccd /boot/EFI/Gentoo % efibootmgr --unicode --verbose --create --disk /dev/nvme0n1 --part 1 --label "Gentoo Linux (Blue)" --loader "\Gentoo\kernel-genkernel-x86_64-gentoo.blue" 'initrd=\Gentoo\initramfs-genkernel-x86_64-gentoo.blue root=/dev/nvme0n1p3 rootfstype=btrfs rootflags=subvol=gentoo rw'
root@sysresccd /boot/EFI/Gentoo % efibootmgr --unicode --verbose --create --disk /dev/nvme0n1 --part 1 --label "Gentoo Linux (Green)" --loader "\Gentoo\kernel-genkernel-x86_64-gentoo.green" 'initrd=\Gentoo\initramfs-genkernel-x86_64-gentoo.green root=/dev/nvme0n1p3 rootfstype=btrfs rootflags=subvol=gentoo rw'
BootCurrent: 0008
Timeout: 1 seconds
BootOrder: 0001,0000,0009,000A,0008,000B
Boot0000* Gentoo Linux (Blue)	HD(1,GPT,3329bccc-5a0e-4fe5-a4c5-067fb8fde0e6,0x800,0x200000)/File(\Gentoo\kernel-genkernel-x86_64-gentoo.blue)initrd=\Gentoo\initramfs-genkernel-x86_64-gentoo.blue root=/dev/nvme0n1p3 rootfstype=btrfs rootflags=subvol=gentoo rw
Boot0008* UEFI: ELEGANT ISOSTICK CDROM 1.30, Partition 1	PciRoot(0x0)/Pci(0x14,0x0)/USB(10,0)/CDROM(1,0x4b,0xb40)/HD(1,MBR,0x0,0x0,0xb40)
Boot0009* Hard Drive	BBS(HD,,0x0)
Boot000A* USB	BBS(USB,,0x0)
Boot000B* UEFI: ELEGANT ISOSTICK FLASH 1.30, Partition 1	PciRoot(0x0)/Pci(0x14,0x0)/USB(10,0)/Unit(1)/HD(1,MBR,0xecd91c5a,0x800,0x76f4800)
Boot0001* Gentoo Linux (Green)	HD(1,GPT,3329bccc-5a0e-4fe5-a4c5-067fb8fde0e6,0x800,0x200000)/File(\Gentoo\kernel-genkernel-x86_64-gentoo.green)initrd=\Gentoo\initramfs-genkernel-x86_64-gentoo.green root=/dev/nvme0n1p3 rootfstype=btrfs rootflags=subvol=gentoo rw
root@sysresccd /boot/EFI/Gentoo % efibootmgr --bootorder 0,1
BootCurrent: 0008
Timeout: 1 seconds
BootOrder: 0000,0001
Boot0000* Gentoo Linux (Blue)
Boot0001* Gentoo Linux (Green)
Boot0008* UEFI: ELEGANT ISOSTICK CDROM 1.30, Partition 1
Boot0009* Hard Drive
Boot000A* USB
Boot000B* UEFI: ELEGANT ISOSTICK FLASH 1.30, Partition 1

(on VirtualBox) startup.nsh

gentoo-x64-uefi-base ~ # cat /boot/EFI/startup.nsh 
\Gentoo\kernel-genkernel-x86_64-gentoo.blue initrd=\Gentoo\initramfs-genkernel-x86_64-gentoo.blue root=/dev/sda3 rootfstype=btrfs rootflags=subvol=gentoo rw

Packages & Flags

  • app-portage/eix
  • dev-lang/go
@mazgi
Copy link
Author

mazgi commented Dec 31, 2018

root@sysresccd /root % efibootmgr --unicode --verbose --create --disk /dev/nvme0n1 --part 1 --label "Gentoo 0" --loader "\Gentoo\kernel-genkernel-x86_64-4.14.83-gentoo" 'root=/dev/nvme0n1p3 rw initrd=\Gentoo\initramfs-genkernel-x86_64-4.14.83-gentoo'
root@sysresccd /root % efibootmgr --unicode --verbose --create --disk /dev/nvme0n1 --part 1 --label "Gentoo 1" --loader "\Gentoo\kernel-genkernel-x86_64-4.14.83-gentoo" 'root=/dev/nvme0n1p3 rw initrd=\Gentoo\initramfs-genkernel-x86_64-4.14.83-gentoo rootflags=subvol=gentoo'
root@sysresccd /root % efibootmgr --unicode --verbose --create --disk /dev/nvme0n1 --part 1 --label "Gentoo 2" --loader "\Gentoo\kernel-genkernel-x86_64-4.14.83-gentoo" 'root=/dev/nvme0n1p3 rw initrd=\Gentoo\initramfs-genkernel-x86_64-4.14.83-gentoo rootflags=subvol=gentoo rootfstype=btrfs'
BootCurrent: 0008
Timeout: 1 seconds
BootOrder: 0003,0002,0001,0000,0009,000A,0008,000B
Boot0000* Gentoo	HD(1,GPT,3329bccc-5a0e-4fe5-a4c5-067fb8fde0e6,0x800,0x200000)/File(\Gentoo\kernel-genkernel-x86_64-4.14.83-gentoo)root=PARTUUID=96f68c0f-f9a6-438c-95f1-647916aebcec rw initrd=\Gentoo\initramfs-genkernel-x86_64-4.14.83-gentoo
Boot0001* Gentoo 0	HD(1,GPT,3329bccc-5a0e-4fe5-a4c5-067fb8fde0e6,0x800,0x200000)/File(\Gentoo\kernel-genkernel-x86_64-4.14.83-gentoo)root=/dev/nvme0n1p3 rw initrd=\Gentoo\initramfs-genkernel-x86_64-4.14.83-gentoo
Boot0002* Gentoo 1	HD(1,GPT,3329bccc-5a0e-4fe5-a4c5-067fb8fde0e6,0x800,0x200000)/File(\Gentoo\kernel-genkernel-x86_64-4.14.83-gentoo)root=/dev/nvme0n1p3 rw initrd=\Gentoo\initramfs-genkernel-x86_64-4.14.83-gentoo rootflags=subvol=gentoo
Boot0008* UEFI: ELEGANT ISOSTICK CDROM 1.30, Partition 1	PciRoot(0x0)/Pci(0x14,0x0)/USB(10,0)/CDROM(1,0x4b,0xb40)/HD(1,MBR,0x0,0x0,0xb40)
Boot0009* Hard Drive	BBS(HD,,0x0)
Boot000A* USB	BBS(USB,,0x0)
Boot000B* UEFI: ELEGANT ISOSTICK FLASH 1.30, Partition 1	PciRoot(0x0)/Pci(0x14,0x0)/USB(10,0)/Unit(1)/HD(1,MBR,0xecd91c5a,0x800,0x76f4800)
Boot0003* Gentoo 2	HD(1,GPT,3329bccc-5a0e-4fe5-a4c5-067fb8fde0e6,0x800,0x200000)/File(\Gentoo\kernel-genkernel-x86_64-4.14.83-gentoo)root=/dev/nvme0n1p3 rw initrd=\Gentoo\initramfs-genkernel-x86_64-4.14.83-gentoo rootflags=subvol=gentoo rootfstype=btrfs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment