Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
genkernel command not found
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
rmemory
n00b
n00b


Joined: 02 Jan 2016
Posts: 4

PostPosted: Sat Jan 02, 2016 8:39 pm    Post subject: genkernel command not found Reply with quote

Hi all,

I am attempting to install gentoo into an AMD64 VM, using the this ISO: install-amd64-minimal-20150924.iso

I am following the installation instructions found here: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/*

I believe I am generally following the defaults mentioned in the instructions. I can't think of any place I have intentionally deviated. That said, I strongly suspect I have missed something some where and I'm doing something wrong.

When I reach the command to build the kernel "genkernel all", it informs me the genkernel command is not found. I have tried the instructions from scratch a few times and I always get the same result. I can successfully ping the network from the time the original ISO boots.

I suspect there is something goes wrong when I execute "env-update && source /etc/profile" at the bottom of the "Base" page of instructions. It seems to cause the chroot to become undone if that makes sense.

Any guidance is appreciated.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Sat Jan 02, 2016 9:48 pm    Post subject: Reply with quote

rmemory,

Welcome to Gentoo.

You are finding out the hard way that gentoo gives you to things.
The packages you explicitly ask for, with emerge.
The packages required by the packages you ask for.

You don't have genkernel because you have not emerged it yet.
Its at the top of this page in the handbook.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
rmemory
n00b
n00b


Joined: 02 Jan 2016
Posts: 4

PostPosted: Sun Jan 03, 2016 5:43 pm    Post subject: Reply with quote

Hi NeddySeagoon,

Thank you for the reply.

Actually, I am running the command "emerge --ask sys-kernel/genkernel", which I presume is responsible for installing (emerging) genkernel. That said, I am still seeing the "command not found". Or more specifically,

Code:

livecd / # which genkernel
which: no genkernel in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin/:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3)


I haven't yet completely followed the output generated by emerge --ask sys-kernel/genkernel
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Sun Jan 03, 2016 6:23 pm    Post subject: Reply with quote

rmemory,

Correct. I get
Code:
# emerge --ask sys-kernel/genkernel

 * IMPORTANT: 25 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


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

Calculating dependencies... done!
[ebuild  N     ] sys-kernel/genkernel-3.4.52.2  USE="-cryptsetup (-ibm) (-selinux)"

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

You respond with y and emerge does its thing, which takes a few seconds.
It ends up with
Code:
 * Messages for package sys-kernel/genkernel-3.4.52.2:

 * Package:    sys-kernel/genkernel-3.4.52.2
 * Repository: gentoo
 * Maintainer: genkernel@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
 * Documentation is available in the genkernel manual page
 * as well as the following URL:
 * https://www.gentoo.org/doc/en/genkernel.xml
>>> Auto-cleaning packages...
<snip>


After that
Code:
# genkernel --help
Gentoo Linux Genkernel 3.4.52.2

Usage:
  genkernel [options] action
<snip>


Ahhh. Your prompt says
Code:
livecd / #
That means you are not in your chroot.
Neither emerge, nor genkernel are available there.

For completeness
Code:
# which genkernel
/usr/bin/genkernel


To resume an interrupted install, mount your filesystems at /mnt/gentoo.
Mount /dev, /proc and friends, then perform the chroot steps.
Now you can carry on as if you had never left the chroot.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
rmemory
n00b
n00b


Joined: 02 Jan 2016
Posts: 4

PostPosted: Mon Jan 04, 2016 1:25 am    Post subject: Reply with quote

Hi,

I am quite certain you are correct that I am not in my chroot when I try to run genkernel. With that said, I'm not entirely sure where I step out of the chroot.

I run the following according to the instructions in the installation guide. Note that i am using the following stage3 tarball:

http://mirror.usu.edu/mirrors/gentoo/releases/amd64/autobuilds/20151225/stage3-amd64-nomultilib-20151225.tar.bz2

Code:

mount -t proc proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --make-rslave /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
mount --make-rslave /mnt/gentoo/dev

chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1="(chroot) $PS1"


The prompt now contains the "(chroot)".

Code:

emerge-webrsync
emerge --sync
eselect profile set 6
echo "America/Denver" > /etc/timezone
emerge --config sys-libs/timezone-data


<edit /etc/locale-gen>

Code:

locale-gen
eselect locale set 5
env-update && source /etc/profile


At this point I no longer see the "(chroot)" at the command line. I presume this is because by sourcing /etc/profile, it overwrites the PS1 value.

Code:

emerge --ask sys-kernel/gentoo-sources


The above seems to succeed as I see a valid link at "ls -l /usr/src/linux"

Code:

emerge --ask sys-kernel/genkernel


edit /etc/fstab, but I am unable to run genkernel and I am unable to remoud the /mnt/gentoo mount points
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 434
Location: Australia

PostPosted: Mon Jan 04, 2016 3:49 am    Post subject: Reply with quote

rmemory,

You are getting support from Neddy Seagoon, so I won't interfere with that, but can I ask in relation to:
Quote:
I run the following according to the instructions in the installation guide. Note that i am using the following stage3 tarball:

http://mirror.usu.edu/mirrors/gentoo/releases/amd64/autobuilds/20151225/stage3-amd64-nomultilib-20151225.tar.bz2


Are you are absolutely certain you want a no-multilib profile? If you intend setting up a desktop, it will cause you problems down the track.
You may like to read: https://wiki.gentoo.org/wiki/AMD64/FAQ#What_is_multilib_and_how_can_I_use_it.3F

If you're happy with your choice, fine and ignore this post. Be aware that about the only way back from no-multilib to multilib is a reinstall. That would be a pity after you get everything up and running.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Mon Jan 04, 2016 11:21 am    Post subject: Reply with quote

rmemory,

First, some background but you may understand this anyway.

You boot the liveCD and it provides its own filesystems and directories.
Code:
/
/proc
/dev
/mnt
/mnt/gentoo
/mnt/cdrom
and so on.
Now you attach your install to what will be the chroot root.

Code:
/mnt/gentoo/
/mnt/gentoo/proc
/mnt/gentoo/dev
there is even a /mnt/gentoo/mnt/
and /mnt/gentoo/mnt/cdrom

The directories inside /mnt/gentoo are created when you untar the stage3. Most of the mount commands will fail if you do things in the wrong order.
Everything below /mnt/gentoo/ is on your HDD and will be a part of your growing install. When you come back to a chroot you only need mount the HDD partitions and pseudo filesytems inside the chroot before you continue.

When you do
Code:
chroot /mnt/gentoo /bin/bash
you tell the system that you want the new root to be what was /mnt/gentoo and to run the program /bin/bash found with respect to the new root. What was /mnt/gentoo/bin/bash.
At this point, you are running your Gentoo install using the services provided by the liveCD. Everything above /mnt/gentoo is not accessable any more.

You show that emerge works with
Code:
emerge --ask sys-kernel/gentoo-sources
so you are still in the chroot.
When you edit /etc/fstab, is it the chroot one or the liveCD one?
The liveCD one contains a warning to the effect that its the wrong one.

What happens when you do
Code:
emerge --ask sys-kernel/genkernel
I've posted what happens here.
That you cannot remount the /mnt/gentoo mount points indicates you are still in the chroot, since the mount point /mnt/gentoo will not exist in the chroot. That would be /mnt/gentoo/mnt/gentoo after your own root filesystem is mounted following a liveCD boot.

Post the file /var/tmp/portage/sys-kernel/genkernel-<version>/temp/build.log (in the chroot).
This contains all the on screen messages generated during the build, including any errors.
Make use of wgetpaste (you will need to emerge it) to put the file on a pastebin site, then tell us the link.
Tab completion is your friend for getting long file names right first time too.

ian.au raises a relevant aside too. No multilib installs do not support 32 bit only programs. Think wine, skype, google-earth. Virtual Box ... but VirtualBox-bin works. There are probably others. Here, I've been no-multilib since 2009, it works for me.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
rmemory
n00b
n00b


Joined: 02 Jan 2016
Posts: 4

PostPosted: Tue Jan 05, 2016 3:18 am    Post subject: Reply with quote

Unfortunately I don't have copy and paste capabilities between my gentoo vm and my host and I also don't yet have a shared drive set up, thus I am unable to paste the contents of the file you asked for. With that said, it seems there is a problem with mirror I am attempting to use. Its my fault for not checking the output, sorry about that.

More specifically, emerge is trying to download genkernel-3.4.52.3.tar.xz, but the mirror only contains genkernel-3.4.52.2.tar.xz and thus the download fails. In other words, the following file does not exist:

Code:

$ wget http://mirror.usu.edu/mirrors/gentoo/distfiles/genkernel-3.4.52.3.tar.xz
--2016-01-04 20:16:23--  http://mirror.usu.edu/mirrors/gentoo/distfiles/genkernel-3.4.52.3.tar.xz
Resolving mirror.usu.edu (mirror.usu.edu)... 129.123.104.64
Connecting to mirror.usu.edu (mirror.usu.edu)|129.123.104.64|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-01-04 20:16:24 ERROR 404: Not Found.


I also noticed the same mirror might be missing some of the latest stage3 tarballs. I will try a different mirror. Do you have a favorite mirror in North America? Also, do you have a recommended stage3 tarball and profile I should use if I want both 32 and 64 bit support with a kde desktop?

Thanks
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Tue Jan 05, 2016 6:54 pm    Post subject: Reply with quote

rmemory,

Use the default mirror. Comment out the GENTOO_MIRRORS in make.conf.
That will get you a Gentoo maintained mirror at the Open Source Lab of Oregon State University.

You don't need copy/paste. Just a network connection. For example.
Code:
~ $ wgetpaste /etc/portage/make.conf
Your paste can be seen here: https://bpaste.net/show/5c64134831e9

We just need the link in a post.
You will need to emerge wgetpaste. That example will include my mirror list but I'm in Scotland.

wgetpaste can do other things too. Read man wgetpaste.

You need the current amd64 stage3 tarball - not the one with no-multilib in its name. SInce you will update any package in the stage3 tarball, as long as its less than 6 months old, you should be good.

eselect profile list tells me
Code:
$ eselect profile list
Available profile symlink targets:
  [1]   default/linux/amd64/13.0
  [2]   default/linux/amd64/13.0/selinux
  [3]   default/linux/amd64/13.0/desktop
  [4]   default/linux/amd64/13.0/desktop/gnome
  [5]   default/linux/amd64/13.0/desktop/gnome/systemd
  [6]   default/linux/amd64/13.0/desktop/kde
  [7]   default/linux/amd64/13.0/desktop/kde/systemd
  [8]   default/linux/amd64/13.0/desktop/plasma
  [9]   default/linux/amd64/13.0/desktop/plasma/systemd
  [10]  default/linux/amd64/13.0/developer
  [11]  default/linux/amd64/13.0/no-multilib *
  [12]  default/linux/amd64/13.0/systemd
  [13]  default/linux/amd64/13.0/x32
  [14]  hardened/linux/amd64
  [15]  hardened/linux/amd64/selinux
  [16]  hardened/linux/amd64/no-multilib
  [17]  hardened/linux/amd64/no-multilib/selinux
  [18]  hardened/linux/amd64/x32
  [19]  hardened/linux/musl/amd64
  [20]  hardened/linux/musl/amd64/x32
  [21]  default/linux/uclibc/amd64
  [22]  hardened/linux/uclibc/amd64
, so for KDE you want [6] default/linux/amd64/13.0/desktop/kde.
To use systemd you need to switch to systemd first, then use the [7] default/linux/amd64/13.0/desktop/kde/systemd profile.
systemd is not required for KDE, nor is the default in the stage3.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum