The Gentoo Novice

Quite comfortable in my ignorance, thanks. When Gentoo provides a live .iso (one file), let me know.


Download the LiveGUI USB Image place and run the ISO from Ventoy our build your own USB.

But I am content with Mint. So I see no reason to change to another Distro. :grinning:

2 Likes

It does have a live isoā€¦ Try it in Boxes.

There are advantages in having 2 distrosā€¦ something stable + something experimental
Multiboot is not difficult. Try it.

1 Like

I installed sudo using emerge successfully.

I created two new users, the one I mostly use ā€œxā€ (i.e. ā€œMr Xā€) and ā€œgentooā€. Theyā€™re both in wheel, and Iā€™ve set sudoers (using nano) for :

%wheel ALL=(ALL:ALL) NOPASSWD: ALL

I rebootedā€¦

Iā€™ve tested sudo and it worksā€¦

@nevj suggested removing the mask(s) from make.conf, but I donā€™t have any, thereā€™s only one make.conf on my system, and it hasnā€™t changed since I posted it above, further up in the this conversation - but posting it again for clarity :

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
# from Daniel Phillips
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="-j4"
# end
GENTOO_MIRRORS="https://mirror.aarnet.edu.au/pub/gentoo/ \
    http://mirror.aarnet.edu.au/pub/gentoo/ \
    rsync://mirror.aarnet.edu.au/pub/gentoo/"
# from DanP
VIDEO_CARDS="virtualbox"
INPUT_DEVICES="evdev keyboard mouse synaptics libinput"
CPU_FLAGS_X86="aes avx mmx mmxext pclmul popcnt rdrand sse sse2 sse4 sse4_1 sse4_2 ssse3"
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="-* @FREE @BINARY-REDISTRIBUTABLE"
GRUB_PLATFORMS="efi-64 pc"
USE="bindist mount xorg X"
# end 
# NOTE: This stage was built with the bindist Use flag enabled

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C.utf8

Whatta I gotta do to get vim? :smiley:

It has nothing to do with being content, it is about using and learning Linux. A VM will do no harm to your system.

1 Like

What happens now when you try to emerge vim?
Try with ā€“ pretend

@daniel.m.tripp
Be patient, vim is no problem, we do need to discuss your make.conf
CPU_FLAGS_X86= ? Do you know what CPU you are running in your machine?
USE= You do not need the ā€œmountā€ flag if you are not running os-prober

The next step is to ā€œemerge --ask x11-base/xorg-driversā€ This has drivers for your INPUT_DEVICES plus the xorg-server, not sure how this works if you plan on using wayland?
From here on you need to login to one of user accounts and use sudo and either su to root or sudo su too root

exactly the same as before (lotsa dependancy issues and/or package masking)


Excerpt from /proc/cpuinfo :
model name : AMD Ryzen 7 3700X 8-Core Processor
(thatā€™s being passed through into the VM from the host)


Iā€™ll may try that - but - Iā€™d really rather get my vim issues sorted firstā€¦ I wasnā€™t planning on installing X on this anyway - Iā€™d like to get to a stage where I can get a headless server style VM running, with vim as my editor - before attempting to load / run / install X11.

On further thought - I will stop right here - I donā€™t want to install X - what I want is a shell with vimā€¦ :smiley:

I donā€™t use Wayland anyway - as it doesnā€™t work with Synergy.

I am kinda / sorta planning on installing X11 when I do this on a laptop (dual booting with Windows 10 - not too fussed if I accidentally trash Windows 10 either - I never use it [only installed it so I could run a program to hack the firmware on my e-scooter, but decided to revert it, and keep it at factory settings]) - I know Iā€™m going to have to do this several times before I achieve successā€¦ But if I canā€™t have vim now, Iā€™m not interested in going any furtherā€¦

@nevj - I assume you were able to get vim installed without issues? Seriously - the lack of vim is a showstopper for meā€¦

Also - when I use VMā€™s I HARDLY ever install a GUI, sometimes I might just for shits n giggles, but even on those, I maybe spend 10 minutes looking around, and never use it again - like my tiny Windows11 install, installed it, looked around for 15 minutes, shut it down, that was 3-4 weeks ago nowā€¦ Iā€™ve got 11 other virtualbox VMs, theyā€™re all ā€œheadlessā€, mostly CentOS and REL7 and REL8ā€¦

OK - I tried this :

USE="-sound" emerge --ask app-editors/vim

and got a bit more meaningful output, but still no vimā€¦

And yeah - itā€™s that eselect issue that @nevj noticed / pointed out earlier :

gentoo-mungrel00 /etc/portage # USE="-sound" emerge --ask app-editors/vim

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 0.95 s.

[ebuild  N     ] app-eselect/eselect-vi-1.2 
[ebuild  N     ] dev-libs/libsodium-1.0.18_p20220618  USE="asm urandom -minimal -static-libs -verify-sig" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="aes sse4_1" 
[ebuild  N     ] app-editors/vim-core-9.0.1503  USE="acl nls -minimal" 
[ebuild  N     ] app-editors/vim-9.0.1503  USE="X acl crypt gpm nls -cscope -debug -lua -minimal -perl -python -racket -ruby (-selinux) -sound -tcl -terminal -vim-pager" LUA_SINGLE_TARGET="lua5-1 -lua5-3 -lua5-4 -luajit" PYTHON_SINGLE_TARGET="python3_11 -python3_10" 
[ebuild  N     ] app-vim/gentoo-syntax-10  USE="-ignore-glep31" 

Would you like to merge these packages? [Yes/No] yes

>>> Verifying ebuild manifests

>>> Emerging (1 of 5) app-eselect/eselect-vi-1.2::gentoo
 * Fetching files in the background.
 * To view fetch progress, run in another terminal:
 * tail -f /var/log/emerge-fetch.log
>>> Downloading 'https://mirror.aarnet.edu.au/pub/gentoo/distfiles/14/eselect-vi-1.2.tar.gz'
--2023-06-18 11:16:37--  https://mirror.aarnet.edu.au/pub/gentoo/distfiles/14/eselect-vi-1.2.tar.gz
Resolving mirror.aarnet.edu.au... failed: Name or service not known.
wget: unable to resolve host address 'mirror.aarnet.edu.au'
>>> Downloading 'http://mirror.aarnet.edu.au/pub/gentoo/distfiles/layout.conf'
--2023-06-18 11:16:37--  http://mirror.aarnet.edu.au/pub/gentoo/distfiles/layout.conf
Resolving mirror.aarnet.edu.au... failed: Name or service not known.
wget: unable to resolve host address 'mirror.aarnet.edu.au'
!!! Couldn't download '.layout.conf.mirror.aarnet.edu.au'. Aborting.
>>> Downloading 'http://mirror.aarnet.edu.au/pub/gentoo/distfiles/eselect-vi-1.2.tar.gz'
--2023-06-18 11:16:38--  http://mirror.aarnet.edu.au/pub/gentoo/distfiles/eselect-vi-1.2.tar.gz
Resolving mirror.aarnet.edu.au... failed: Name or service not known.
wget: unable to resolve host address 'mirror.aarnet.edu.au'
>>> Downloading 'rsync://mirror.aarnet.edu.au/pub/gentoo/distfiles/layout.conf'
rsync: getaddrinfo: mirror.aarnet.edu.au 873: Name or service not known
rsync error: error in socket IO (code 10) at clientserver.c(139) [Receiver=3.2.7]
No digest file available and download failed.

!!! Couldn't download '.layout.conf.mirror.aarnet.edu.au'. Aborting.
>>> Downloading 'rsync://mirror.aarnet.edu.au/pub/gentoo/distfiles/eselect-vi-1.2.tar.gz'
rsync: getaddrinfo: mirror.aarnet.edu.au 873: Name or service not known
rsync error: error in socket IO (code 10) at clientserver.c(139) [Receiver=3.2.7]
>>> Downloading 'https://gitweb.gentoo.org/proj/eselect-vi.git/snapshot/eselect-vi-1.2.tar.gz'
--2023-06-18 11:16:39--  https://gitweb.gentoo.org/proj/eselect-vi.git/snapshot/eselect-vi-1.2.tar.gz
Resolving gitweb.gentoo.org... failed: Name or service not known.
wget: unable to resolve host address 'gitweb.gentoo.org'
!!! Couldn't download 'eselect-vi-1.2.tar.gz'. Aborting.
 * Fetch failed for 'app-eselect/eselect-vi-1.2', Log file:
 *  '/var/tmp/portage/app-eselect/eselect-vi-1.2/temp/build.log'

>>> Failed to emerge app-eselect/eselect-vi-1.2, Log file:

>>>  '/var/tmp/portage/app-eselect/eselect-vi-1.2/temp/build.log'

 * Messages for package app-eselect/eselect-vi-1.2:

 * Fetch failed for 'app-eselect/eselect-vi-1.2', Log file:
 *  '/var/tmp/portage/app-eselect/eselect-vi-1.2/temp/build.log'
Task was destroyed but it is pending!
task: <Task pending name='Task-29' coro=<ForkProcess._proc_join() done, defined at /usr/lib/python3.11/site-packages/portage/util/_async/ForkProcess.py:74> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[_EbuildFetcherProcess._proc_join_done(<Process name...code=-SIGTERM>)()]>
Task was destroyed but it is pending!
task: <Task pending name='Task-30' coro=<PipeLogger._io_loop() done, defined at /usr/lib/python3.11/site-packages/portage/util/_async/PipeLogger.py:84> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[PipeLogger._io_loop_done()]>
Task was destroyed but it is pending!
task: <Task pending name='Task-31' coro=<BuildLogger._main() done, defined at /usr/lib/python3.11/site-packages/portage/util/_async/BuildLogger.py:98> wait_for=<Future pending cb=[AsynchronousTask.async_wait.<locals>.<lambda>() at /usr/lib/python3.11/site-packages/_emerge/AsynchronousTask.py:49, Task.task_wakeup()]> cb=[BuildLogger._main_exit()]>
Task was destroyed but it is pending!
task: <Task pending name='Task-32' coro=<PipeLogger._io_loop() done, defined at /usr/lib/python3.11/site-packages/portage/util/_async/PipeLogger.py:84> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[PipeLogger._io_loop_done()]>
Task was destroyed but it is pending!
task: <Task pending name='Task-33' coro=<SpawnProcess._main() done, defined at /usr/lib/python3.11/site-packages/_emerge/SpawnProcess.py:177> wait_for=<Future pending cb=[AsynchronousTask.async_wait.<locals>.<lambda>() at /usr/lib/python3.11/site-packages/_emerge/AsynchronousTask.py:49, Task.task_wakeup()]> cb=[SpawnProcess._main_exit()]>

Hmmm - those seem to be DNS issuesā€¦ Doh! Bizarreā€¦

I canā€™t resolve names, but my resolv.conf looks correct :

x@gentoo-mungrel00 ~ $ cat /etc/resolv.conf 
# Generated by dhcpcd from enp0s3.dhcp
# /etc/resolv.conf.head can replace this line
nameserver 8.8.8.8
nameserver 8.8.4.4
# /etc/resolv.conf.tail can replace this line

Note : I can ping those google DNS server IP addressesā€¦ My problem is DNSā€¦


Rebooted - and still an issue. I canā€™t even install nslookup or dig to troubleshootā€¦ I might set it to a fixed IP address with static DNS settings - because the existing /etc/resolv.conf will get overwritten when DHCP lease is renewedā€¦
I changed /etc/resolv.conf to point directly at my routerā€™s LAN IP address and still unable to resolve names (but can ping 8.8.8.8) :

gentoo-mungrel00 ~ # nano /etc/resolv.conf 
gentoo-mungrel00 ~ # ping google.com
ping: google.com: Name or service not known
gentoo-mungrel00 ~ # cat /etc/resolv.conf
# Generated by dhcpcd from enp0s3.dhcp
# /etc/resolv.conf.head can replace this line
# nameserver 8.8.8.8
#nameserver 8.8.4.4
10.1.1.254
# /etc/resolv.conf.tail can replace this line
gentoo-mungrel00 ~ # ping 10.1.1.254
PING 10.1.1.254 (10.1.1.254) 56(84) bytes of data.
64 bytes from 10.1.1.254: icmp_seq=1 ttl=64 time=3.52 ms

64 bytes from 10.1.1.254: icmp_seq=2 ttl=64 time=3.53 ms
64 bytes from 10.1.1.254: icmp_seq=3 ttl=64 time=3.62 ms
64 bytes from 10.1.1.254: icmp_seq=4 ttl=64 time=3.53 ms
^C
--- 10.1.1.254 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 8434ms
rtt min/avg/max/mdev = 3.523/3.550/3.622/0.041 ms
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=115 time=67.0 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=115 time=96.0 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=115 time=276 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=115 time=239 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=115 time=72.4 ms
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 5611ms
rtt min/avg/max/mdev = 67.040/150.205/276.260/89.135 ms

Iā€™m going to try ā€œfaffingā€ by putting mirror.aarnet.edu.au in /etc/hostsā€¦


SUCCESS!
I did :
USE="-sound" emerge --ask app-editors/vim
After putting my mirror IP address in /etc/hosts and :

gentoo-mungrel00 ~ # which vim
/usr/bin/vim

Now I just have to resolve my resolv.conf issues! I call this progress anyway - thanks for all your help @4dandl4 and @nevj !

Your make.conf is set for an Intel I5 with 4 cores, in other words your make.conf is totally useless
How do you wish to proceed.

So I should probably change my portage make.conf file entry from :
COMMON_FLAGS="-O2 -pipe"

To something more like :
COMMON_FLAGS="-O2 -march=znver1"

Note also : Iā€™ve already allocated 4 cores to the VM so my :
MAKEOPTS="-j4"
should still be relevant - correct?

My make.conf file canā€™t be completely useless, because it let me compile a bunch of stuff in the first place, and most recently vimā€¦


Blonde moment (yes I am a natural blond - but mostly grey silver these days) - no idea why the DNS entries from DHCP werenā€™t working, so I tried :
10.1.1.254
in my resolv.conf, neglecting to prefix that with ā€œnameserverā€ā€¦ However, with my mirror in /etc/hosts, I was able to install nslookup (emerge net-dns/bind-tools) :

gentoo-mungrel00 /etc # cat /etc/resolv.conf
# Generated by dhcpcd from enp0s3.dhcp
# /etc/resolv.conf.head can replace this line
# nameserver 8.8.8.8
#nameserver 8.8.4.4
nameserver 10.1.1.254
# /etc/resolv.conf.tail can replace this line
gentoo-mungrel00 /etc # nslookup google.com
Server:		10.1.1.254
Address:	10.1.1.254#53

Non-authoritative answer:
Name:	google.com
Address: 142.250.70.206
Name:	google.com
Address: 2404:6800:4015:802::200e

this is definitely an adventure, Iā€™m quite enjoying myself, was quite elated (one might even say ā€œchuffedā€) when I finally got vim to install!!!

The -02 -pipe should be fine for a VM
MAKEOPTS=ā€œ-j4ā€ could go to a -j8 depending on amount of ram
My main concern are the CPU_FLAGS_X86
you could emerge --ask app-portage/cpuid2cpuglags and run cpuid2cpuflags to see what the Ryzen 7 use flags are
If you are not going to use xorg then I would set USE=ā€œā€ and leave it until needed.

1 Like

glags had me stumped for a minute (you were testing my vigilance werenā€™t you? :smiley: ) till I changed it from glags to flags :smiley:

gentoo-mungrel00 /etc # cpuid2cpuflags
CPU_FLAGS_X86: aes avx avx2 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3

Iā€™m pretty sure that AMD Ryzen is sill relevant to ā€œX86ā€ā€¦

OOPS Sorry!!! So you are booting Gentoo? What do you intend to use the Gentoo shell for? You have also showed me a few things, Thanks!!!

Mostly a ā€œlearning exerciseā€, or a drill, for when I do it for real on a laptop!

And yes, Iā€™m booting Gentoo, have been since yesterday arvo, my struggle was getting vim installed to the booted environment (i.e. installed and booted from EFI / grub [virtual EFI in VirtualBox]).

I reckon I should do it all over again from scratch so itā€™s mostly there in my noggin for next time :smiley:

Iā€™m going to plonk a GParted boot ISO onto my Ventoy stick and repartition before I install on the laptopā€¦ I reckon GRUB and EFI will be a bit trickier on real hardwareā€¦

The only real difference will be in the make.conf, just research and know your machine, that laptop may be slow to compile. The only real problem i have had, putting Gentoo on a laptop, is with wifi, their is not a lot, if any, wifi drivers with the Gentoo install ISO, but I do not have the knowledge of networking, that you have.

I still reckon it will be faster than in virtualbox - itā€™s a fairly ā€œdecentā€ laptop, i7 (not sure which version) with DDR4 RAM and SSDā€¦ And I wonā€™t be using WiFi during the install, just gigabit ethernetā€¦ So I can worry about WiFi laterā€¦

And even more so, on a dual bootā€¦ As mentioned before, I wonā€™t be too fussed if I accidentally screw up Windows 10ā€¦

I never had a problem, but I did install it after installing X and a few other things. I was temporarily happy with nano.
emerge should just drag in any dependencies, just like apt does. There is only an issue if they are circular.
dont be confused by all those use flags emerge showsā€¦ it is just telling you what is available for each packet to be compiled against.

So I think in principle you should be able to emerge vim without Xā€¦ in practice portage may object. @4dandl4 is rarely wrong on Gentoo.