zsh.li Pinkhat Memories Me About ?

Dear My
Linux

ARCHIVES_CATS Gentoo

Live Gentoo installation


Recently created my social network instance https://gentoo.live, so I remembered that this post was pending.

Long time ago I did a live Debian SID installation on Twitter, on November 2019 was Gentoo turn, on the Fediverse Network (Mastodon, Gnusocial, Pleroma) I posted my Gentoo installation commands:

Warning! This is not a Gentoo install guide, also my errors were posted!

1. screen
#This command allows me to resume my shell session if I close the terminal

2. mkfs.ext4 /dev/sda7
# I'm formatting an existing partition of my hard disk.

3. mount /dev/sda7 /mnt/tmp/

4. cd /tmp && wget http://distfiles.gentoo.org/releases/amd64/autobuilds/20191110T214504Z/stage3-amd64-20191110T214504Z.tar.xz
#Downloading Gentoo, my network is slow, one hour remaining.

5. cd /mnt/tmp/ && tar xpvf /tmp/stage3-*.tar.xz --xattrs-include='*.*' --numeric-owner
# Extracts the Gentoo tarball into the partition.

6. mount --bind /run/ /mnt/tmp/run/ && mount --bind /proc /mnt/tmp/proc && mount --bind /dev /mnt/tmp/dev/ && mount --bind /sys/ /mnt/tmp/sys/ && chroot /mnt/tmp/
# Chroot into gentoo.

7. source /etc/profile

8. nano /etc/portage/make.conf

# There I added this line:
MAKEOPTS="-j3"
The number is the double of the cpu cores plus one.
And modified the COMMON FLAGS variable to this value:
-march=native -O2 -pipe

9. mkdir --parents /etc/portage/repos.conf && cp /usr/share/portage/config/repos.conf /etc/portage/repos.conf/gentoo.conf && emerge --sync
#note: out of the chroot cp the /etc/resolv.conf to the chroot

# 10.  I had an unexpected error I had never had in life. I solved in this way:

rm -rf /usr/portage/app-crypt/openpgp-keys-gentoo-release && emerge --sync
# Thanks forums!

11. emerge -1 mirrorselect
# This is taking a while, meanwhile I can practice the Lotus pose and listen at sacred music.

#11.5  I remembered that is a good idea to mount a tmpfs into /var/tmp, I will do so when the mirrorselect compilation ends. 

12. mirrorselect -i -o >> /mnt/gentoo/etc/portage/make.conf
# I selected some mirrors here

13. mount -t tmpfs tmpfs /var/tmp/
# Mounted a tmpfs into /var/tmp

14. eselect profile list

15. eselect profile set 5
# Chose the desktop profile

16. emerge --ask app-portage/cpuid2cpuflags

Calculating dependencies... done!
[ebuild N ] app-portage/cpuid2cpuflags-6
Would you like to merge these packages? [Yes/No] Yes

17. echo "*/* $(cpuid2cpuflags)" >> /etc/portage/package.use/00cpuflags

18. emerge -NaDu @world
# Updating the system

18.5 emerge etc-update
# I cancel the system update, portage is not happy with the USEs, I'm going to install etc-update for helping me editing uses files:

18.9 # I made a mistake, etc-update is part of the base system.

19. etc-update
# Ask for user input, I merge the uses file (/etc/portage/package.use/00cpuflags) with -3:

20. emerge -NaDu @world

# I retry the world update, this will recompile the system # I said yes and the compilation started

20.5 # Killed the system update by accident, I resumed using:
emerge --resume

20.6 Still compiling...

20.7 I will take a nap

20.8 . # Your sleepy beauty is back, but a package failed to compile

20.9 # I realized that I selected the wrong profile, in my day, only the 13.0 profiles were available, from the 2017 seems that Gentoo uses 17s profiles. Probably the first apps I will  install will be Wine and steam to check the multi lib support. 
So, in the end I will have to perform an extra step to migrate from 17.0 to 17.1, ah, also it can be a good idea to remove some global uses.

20.99 The base system and the basic X libraries have been being compiled for 8 hours, I will sleep, nini !! This step (number 20) will be completed during my sleep time

SECOND DAY
21. emerge --ask app-portage/gentoolkit
# I need this tool to check the uses descriptions

22. emerge --info | grep ^USE
# I will disable global uses

23. # I added this line to /etc/portake/make.conf
USE="-kde -bluetooth -ipv6 -nls -gmp -qt5"

24. emerge -NDu @world
# I will rebuild the affected packages to maintain USEs coherency in the future, also added the consolekit, networkmanager and dbus global use

25. # I canceled the rebuild, disabling nls affects gcc (it will be recompiled)

emerge genlop
# genlop is need for measure the compiling time
# I enabled the timezone for reporting the correct time:
echo "America/Mexico_City" > /etc/timezone

genlop -t gcc
pinkstar / # genlop -t sys-devel/gcc-9.2.0-r2
!!! Error: no merge found for 'sys-devel/gcc-9.2.0-r2'


# It seems that I haven't recompiled the toolchain. Welp, I will resume the world rebuilding

emerge -aNDu --with-bdeps=y @world

25.5 # Also added dbus as global use

26. emerge -1v app-portage/unsymlink-lib
# Time to migrate from 17.0 profile to 17.1 (this is an extra step because I chose a wrong profile)

27. unsymlink-lib --migrate

28. eselect profile set default/linux/amd64/17.1/desktop
# Since this is a new Gentoo installation, the past two steps was not needed, instead it only was need to change the profile to the new one.

29. # I'm moving the Slackware kernel sources to /usr/src in Gentoo. I'm not sure, but this will save me 6 hours of compilation and the kernel configuration part which is the most exciting thing in Gentoo. 

30. cd /usr/linux/src && make install
# Since the grub is managed by slackware, I will modify the grub in Slackware

30.5 # Added to /etc/fstab:
/dev/sda7 / ext4 noatime 0 1

31. emerge -a xorg-server

31.5 I had modified the VIDEO_CARDS variable in /etc/portage/make.conf

31.6 Added libinput keyboard mouse to INPUT_DEVICES in make.conf

32. # I almost forgot in /usr/src/linux:
make modules_install

33. emerge awesome
# This will install the windows manager.

34. emerge -a networkmanager-openvpn openvpn dhcpcd lynx links dhcpcd networkmanager nm-applet screenfetch zsh sakura spacefm cryptsetup btrfs-progs squashfs-tools lvm2 gnuchess bsd-games xautolock slock

# I will install some apps, however I created an uses file in /etc/portage/package.use/apps with this content:
sys-fs/squashfs lz4 lzma lzo
net-wireless/wpa_supplicant ap eap-sim eapol_test fasteap macsec p2p privsep smartcard tdls uncommon-eap-types -wimax wps
media-video/ffmpeg x265 vpx wavpack webp theora twolame opus libass libcaca gmp fontconfig openh264 wavpack
net-misc/networkmanager connection-sharing
And modified some others with etc-update

35. Bad news and good news.
The bad news is that my computer had a kernel panic. Which made me to reboot my computer interrupting the Gentoo installation.
The good news is that I was able to boot into Gentoo with the awesome WM and my custom wallpaper.
However I had to reboot the computer using REISUB since I am not in the sudoers file nor root has a pass!!
And my keyboard is not working in xorg, but I think that is because is one of these old ps/2 keyboards. It's easy to solve.

35.5 However I just installed Gentoo, but we want perfection, don't we?

36. emerge -a sudo

37. visudo
# Uncomment the wheel group
38. gpasswd -a $myuser wheel

39. emerge --resume
# This will take a while

40 ln -s /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/
# I will try to solve the keyboard issue with this command, I'm still compiling software.

41. Everything works perfect, I'm sending this post from Gentoo, I will use Gentoo forever! and remember, you never end to install Gentoo. It took me two days using a Celeron processor. 


Chromium in Gentoo


Today I removed Google Chrome in order to install Chromium in Gentoo, however I decided to compile it which takes so long time , indeed it took me 7 hours in my i7 processor

Thanks to the USEs I didn’t allow Chromium to use anything bundled. I decided to be very strict this time because of what I learned and discovered, i.e, Chrome is not a good choice for privacy. Hence I decided to not trust anymore Google Chrome binaries and instead only use a compiled Chromium.

I promise I will make a post about of what I have learned and what is it very important to not dismiss the privacy issues and do yourself a favour and please watch the Snowden movie 😉

As a Gentoo user it is ridiculous not be concerned about privacy because everything in the system is grainy defined, and in fact privacy is an inherent part of Web Browsing -which is my main activity in Internet and maybe the yours- Privacy is all about Liberty and choice, I think that if you are a Gentoo user and don’t care about privacy then you should be using Ubuntu instead. However it is just a generalization and don’t take so serious, we all have to learn how to be flexible and tolerant.

Privacy is a major pillar of Liberty because the real meaning of privacy is to choice what to share and how. I think Gentoo should increase the awareness in our community about privacy because Gentoo is all above Liberty.

And Liberty is the most valuable value that exist.

And I used this nice theme for my web browser Link <3

I discovered a feature called ACL, I thought it was only related to SELinux, however I found that it is a feature that exist in all distros, specially the ACL in TMPS , CONFIG_TMPS_POSIX_ACL; it must be enabled by default because is used by ALSA and the CD-ROM device; besides I found that some logs in /var uses it.

I think learning about ACL is a must for Gentoo users since it is one of the basic default options while mounting a traditional filesystem and is important to know that at least there is a security layer beyond the daily usage. And it is an additional tool for security on our daily basics because our home directory always can be read by others; and we can restrict the others access and adding exceptions using the ACL tools.

Despite disabling the ACL support may not be worth as a Gentoo developer said:

Link

The menuconfig suggest you to disable it from ext4 filesytem if you don’t even know what ACL is. And of course I chose to disable this feature because my var partition is formatted in XFS and it seems that I don’t really need ACL. I aim to perfectly follow the Unix philosophy as far as I can; so instead of having all the possibilities available I will only strictly preserve what I actually use.


Problems burning double layer DVD.


Today my news DVDs of 8 GB arrived, so that, I tried to record my music into one of them; Brasero didn’t worked and asked me for a valid disc. Then I tried to install k3b and I disabled all its USEs, all media features were removed. To tell you the truth I love k3b but it usually includes a lot of stuff, however, since I use Gentoo I can get through this. After that I tried to burn the DVD+R and it failed in the middle of the process twice (16GB of storage space lost ), next I recompile k3b with DVD support and I changed the path of the iso image to my documents instead of my /tmp folder (I think it could have made it fail) , and finally I selected no multi-session and chose the Rock Ridge/Joliet (custom) for it. In the end I achieved to burn it, even though, it didn’t read it. So, I plugged in my external DVD player and finally it was able to read the contents of my just recently burned disc. Here part of the error log: K3b Version: 2.0.3 KDE Version: 4.14.24 QT Version: 4.8.6 Kernel: 4.8.12amu-kernel Used versions ———————– mkisofs: 3.2a06 cdrecord: 3.2a06 cdrecord ———————– cdrecord: Insufficient ‘file read’ privileges. You will not be able to open all needed devices. cdrecord: Insufficient ‘file write’ privileges. You will not be able to open all needed devices. cdrecord: Insufficient ‘device’ privileges. You may not be able to send all needed SCSI commands, this my cause various unexplainable problems. cdrecord: Insufficient ‘memlock’ privileges. You may get buffer underruns. cdrecord: Insufficient ‘priocntl’ privileges. You may get buffer underruns. cdrecord: Insufficient ‘network’ privileges. You will not be able to do remote SCSI. scsidev: ‘/dev/sr0’ devname: ‘/dev/sr0’ scsibus: -2 target: -2 lun: -2 Warning: Open by ‘devname’ is unintentional and not supported. Linux sg driver version: 3.5.27 SCSI buffer size: 64512 cdrecord: Warning: Cannot read drive buffer. cdrecord: Warning: The DMA speed test has been skipped. Cdrecord-ProDVD-ProBD-Clone 3.02a06 (x86_64-pc-linux-gnu) Copyright (C) 1995-2016 Joerg Schilling TOC Type: 1 = CD-ROM Using libscg version ‘schily-0.9’. Driveropts: ‘burnfree’ atapi: 1 Device type : Removable CD-ROM Version : 5 Response Format: 2 Capabilities : Vendor_info : ‘HL-DT-ST’ Identifikation : ‘DVDRAM GH24NSB0 ‘ Revision : ‘LM00’ Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM. Current: DVD+R/DL Profile: DVD-R/DL sequential recording Profile: DVD-R/DL layer jump recording Profile: DVD+R/DL (current) Profile: DVD+R Profile: DVD+RW Profile: DVD-RW sequential recording Profile: DVD-RW restricted overwrite Profile: DVD-RAM Profile: DVD-R sequential recording Profile: DVD-ROM Profile: CD-RW Profile: CD-R Profile: CD-ROM Profile: Removable Disk Using generic SCSI-3/mmc-3 DVD+R driver (mmc_dvdplusr). Driver flags : NO-CD DVD MMC-3 SWABAUDIO BURNFREE Supported modes: PACKET SAO LAYER_JUMP Drive buf size : 360448 = 352 KB FIFO size : 4194304 = 4096 KB Track 01: data 7869 MB Total size: 7869 MB = 4029292 sectors Current Secsize: 2048 Blocks total: 4173824 Blocks current: 4173824 Blocks remaining: 144532 Reducing transfer size from 64512 to 32768 bytes. Starting to write CD/DVD/BD at speed 4 in real SAO mode for single session. Last chance to quit, starting real write in 3 seconds. 2 seconds. 1 seconds. 0 seconds. Operation starts. Happy New Year!!!

Gentoo december issues


Dear diary, today I booted up my computer with Gentoo as I wanted to update the kernel and others packages; however when I wanted to update the kernel source code there was a lot of dependencies for only the Linux kernel —It is kinda surprisingly—:

As usual, ICU was blocking my updates and tries of packages installations, also it seemed that ncurses was blocking the update too (I hadn’t seen this before)

However, because I updated my mesa drivers, Gentoo was luckily unlocked as it upgraded 108 packages.

Finally I had another problem with Ruby and Python because Gentoo was using the old versions, so I removed them as this topic suggested:

Link

Also I learned a very useful trick about the console, how to avoid that the shell logs an specific command, just add this to your ~/.bashrc file and that’s all.

HISTCONTROL="ignorespace"

So when you do not want Linux to log a command just type an space before the command and after the prompt, and ready!


No multimedia keys in Gentoo


I always had this problem with Gentoo: I was not able to use the multimedia keys and also the mice only worked in front USB bus of my computer while in the rear not.

The fix was in the Linux Kernel, I incidentally discovered an important parameter in the USB settings ^-^

You usually use de EHCI driver for your 2.0 USB buses, however what about the 1.0 buses? it is said to use some specific drivers while the most important thing indeed is to enable a subparameter of the EHCI driver!!!

This parameters are:

translate root device

Rss feed of the category