Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot install an initramfs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
h10082
n00b
n00b


Joined: 24 Jun 2021
Posts: 11
Location: UK

PostPosted: Mon Jul 19, 2021 11:26 pm    Post subject: Cannot install an initramfs Reply with quote

[Moderator note: this post, and only this post, was originally attached to the solved topic [solved] Cannot install an initramfs. Contrary to the content of this post, that thread does not seem to be a similar issue, so I split this post to its own thread. -Hu]

I want to upgrade my kernel from 5.10.27 to 5.10.49-gentoo-r1.
I'm having a similar issue when running genkernel:

Code:

genkernel --lvm --install --kernel-config=./.config initramfs


Code:

Copying file m4/wchar_t.m4
Copying file m4/wint_t.m4
Copying file m4/xsize.m4
Copying file po/Makevars.template
sh: line 1: tools/git-version-gen: Permission denied
configure.ac:14: error: AC_INIT should be called with package and version arguments
/usr/share/aclocal-1.16/init.m4:29: AM_INIT_AUTOMAKE is expanded from...
configure.ac:14: the top level
autom4te-2.69: /usr/bin/m4 failed with exit status: 1
aclocal-1.16: error: /usr/bin/autom4te-2.69 failed with exit status: 1
autoreconf-2.69: aclocal failed with exit status: 1
* ERROR: Command 'autoreconf --force --install ' failed!

* ERROR: create_initramfs(): append_data(): append_util-linux(): populate_binpkg(): gkbuild(): Failed to create binpkg of util-linux-2.37!
* Please consult '/var/log/genkernel.log' for more information and any
* errors that were reported above.
*


tools/git-version-gen dosen't exist on my system. How can I install it?
Back to top
View user's profile Send private message
h10082
n00b
n00b


Joined: 24 Jun 2021
Posts: 11
Location: UK

PostPosted: Tue Jul 20, 2021 11:26 pm    Post subject: Reply with quote

I've tried reinstalling sys-apps/util-linux as git-version-gen seems to beling to this package (https://github.com/karelzak/util-linux/blob/master/tools/git-version-gen)

However tools/git-version-gen wasn't copied. :(
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Wed Jul 21, 2021 1:30 am    Post subject: Reply with quote

genkernel is trying, and failing, to build its own private copy of util-linux. The system util-linux package does not install that file. It is probably only used in part of the build process.
Back to top
View user's profile Send private message
h10082
n00b
n00b


Joined: 24 Jun 2021
Posts: 11
Location: UK

PostPosted: Thu Jul 22, 2021 3:03 pm    Post subject: Reply with quote

The mentioned error was happening with genkernel 4.2.3. I downgraded genkernel to versions 4.0.10 and 3.5.3.3 but still saw errors about premissions. This time complaining about diffrent files that actual exist.

To install the new sources I ran:
Code:

emerge --ask --update --deep --with-bdeps=y --newuse @world

I proceeded to run:
Code:

emerge --depclean

This removes the superseded kernel sources from portage but dosen't actually remove the kernel sources folder
Code:

tux ~ # ls -la /usr/src/
total 20
drwxr-xr-x  5 root root 4096 Jul 22 15:04 .
drwxr-xr-x 13 root root 4096 Jun 21 02:43 ..
-rw-r--r--  1 root root    0 Jun 21 02:37 .keep
lrwxrwxrwx  1 root root   20 Jul 22 13:55 linux -> linux-5.10.52-gentoo
drwxr-xr-x 21 root root 4096 Jul 17 08:10 linux-5.10.27-gentoo
drwxr-xr-x 21 root root 4096 Jul 22 13:54 linux-5.10.49-gentoo-r1
drwxr-xr-x 25 root root 4096 Jul 22 15:41 linux-5.10.52-gentoo

Is it fine to follow this approch? This is my first attempt to upgrade my kernel since installing Gentoo recently.


Last edited by h10082 on Thu Jul 22, 2021 8:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Thu Jul 22, 2021 4:51 pm    Post subject: Reply with quote

That is an acceptable way of managing kernel sources. I don't use genkernel, so I can't help with errors specific to it. Perhaps someone more familiar with it will see your thread and comment.
Back to top
View user's profile Send private message
h10082
n00b
n00b


Joined: 24 Jun 2021
Posts: 11
Location: UK

PostPosted: Thu Jul 22, 2021 5:16 pm    Post subject: Reply with quote

Hu wrote:
That is an acceptable way of managing kernel sources. I don't use genkernel, so I can't help with errors specific to it. Perhaps someone more familiar with it will see your thread and comment.

Ok thanks for the confirmation.
I may concede and try dracut as I haven't found any mention about issue on the web or related bugs on the genkernel project.
Also with the downgrades, I would of thought it would work. I seem to have broken something and don't know how.
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2008

PostPosted: Thu Jul 22, 2021 7:24 pm    Post subject: Reply with quote

<edit> Sorry, I misunderstood the original post - it's genkernel you've downgraded. I wrote a long answer about downgrading kernels. Totally irrelevant, so I've removed that post and replaced it with this comment.</edit>
_________________
Greybeard
Back to top
View user's profile Send private message
h10082
n00b
n00b


Joined: 24 Jun 2021
Posts: 11
Location: UK

PostPosted: Fri Jul 23, 2021 10:36 pm    Post subject: Reply with quote

I've opted for dracut which is working fine :D
Back to top
View user's profile Send private message
Bogdan107
n00b
n00b


Joined: 03 Aug 2021
Posts: 3
Location: Ukraine

PostPosted: Sat Nov 06, 2021 4:25 pm    Post subject: Reply with quote

My conf:
Code:
$ cat /etc/genkernel.conf | grep -e TMPDIR -e CACHE_DIR
TMPDIR="/tmp/genkernel"
CACHE_DIR="/var/cache/genkernel"

$ mount | grep " /tmp "
/dev/zram0 on /tmp type btrfs (rw,nosuid,nodev,noexec,relatime,ssd,space_cache,subvolid=5,subvol=/)


In my case, this error message generated, if "noexec" option activated on the filesystem:
Quote:
sh: line 1: tools/git-version-gen: Permission denied


P.S. Command "genkernel initramfs" make binary packages under CACHE_DIR (/var/cache/genkernel/<version>) directory. This genkernel script started in TMPDIR directory. Without "exec" rights, this script can not produce binaries.
Message
Quote:
Failed to create binpkg of util-linux-2.37!
produced, because first compiled package is sys-apps/util-linux.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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