Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
genkernel 4.1.0, /etc/initramfs.mounts considered too late
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
ahlx
n00b
n00b


Joined: 02 Feb 2016
Posts: 11
Location: Austria

PostPosted: Tue Aug 18, 2020 5:52 pm    Post subject: genkernel 4.1.0, /etc/initramfs.mounts considered too late Reply with quote

Hi,

as genkernel-next will be removed soon I recently switched to genkernel 4.1.0.

I'm using systemd as init system which is located in /usr/lib64/systemd.
I have /usr/lib64 in a separate filesystem, but well maintained in /etc/initramfs.mounts.

So now I wanted to build the most recent kernel 5.4.48 with

Code:
genkernel --loglevel=5 --no-menuconfig --no-mrproper --busybox --lvm --clean --install --color --compress-initramfs-type=gzip --kernel-config="/usr/src/linux/.config" all


The build works fine but when trying to boot the new kernel I end up in the fallback shell "/bin/sh" because during boot the ramdisk can't find "systemd".

I had a look at the "linuxrc" script of genkernel-4.1.0 in /usr/share/genkernel/defaults/linuxrc.

As far as I understand the script switches to the fallback shell before mounting the filesystems in /newroot/etc/initramfs.mounts.

The fallback to /bin/sh in "/usr/share/genkernel/defaults/linuxrc" is around line 953 whereas the mounts of fs in /etc/initramfs.mounts starts later with line 1265.

With the soon to be removed "genkernel-next" everything worked fine.

Any suggestions how I can can get around this issue?

Thanks a lot
ahlx
Back to top
View user's profile Send private message
Whissi
Retired Dev
Retired Dev


Joined: 12 Jan 2011
Posts: 222

PostPosted: Wed Aug 19, 2020 1:38 am    Post subject: Reply with quote

A general hint, don't use
Code:
--kernel-config=/usr/src/linux/.config
Why? Because /usr/src/linux is usually your working directory where genkernel applies changes to config. Think about "--kernel-config" like an option, "My kernel config should be based on specified file" ... but this will should be read-only to kept safe.

Please show lsblk output so we get a better understanding of how your volumes are mounted.
_________________
Regards,
Whissi
Back to top
View user's profile Send private message
ahlx
n00b
n00b


Joined: 02 Feb 2016
Posts: 11
Location: Austria

PostPosted: Wed Aug 19, 2020 4:12 pm    Post subject: Reply with quote

Thanks for the --kernel-config hint, I'll consider it the next time I run genkernel.

lsblk looks like this:

Code:
pcgrz-gentoo ~ # lsblk
NAME                      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                         8:0    0   1.8T  0 disk
├─sda1                      8:1    0     2G  0 part
├─sda2                      8:2    0   100G  0 part
│ └─vg_root-lv_root       253:7    0   100G  0 lvm  /
├─sda3                      8:3    0   500G  0 part
│ ├─vg_usr-lv_usr         253:3    0   200G  0 lvm  /usr
│ ├─vg_usr-lv_usr_src     253:4    0   100G  0 lvm  /usr/src
│ ├─vg_usr-lv_usr_doc     253:5    0   100G  0 lvm  /usr/share/doc
│ └─vg_usr-lv_usr_lib64   253:6    0   100G  0 lvm  /usr/lib64
├─sda4                      8:4    0   100G  0 part
│ └─vg_home-lv_home       253:2    0   100G  0 lvm  /home
├─sda5                      8:5    0   200G  0 part
│ └─vg_opt-lv_opt         253:1    0   200G  0 lvm  /opt
└─sda6                      8:6    0   100G  0 part
  └─vg_portage-lv_portage 253:0    0   100G  0 lvm  /usr/portage
sdb                         8:16   0   1.8T  0 disk
├─sdb1                      8:17   0   100M  0 part
├─sdb2                      8:18   0   128M  0 part
├─sdb3                      8:19   0 243.4G  0 part
├─sdb4                      8:20   0   535M  0 part
├─sdb5                      8:21   0 244.1G  0 part
├─sdb6                      8:22   0  97.7G  0 part
├─sdb7                      8:23   0  97.7G  0 part
├─sdb8                      8:24   0  97.7G  0 part
├─sdb9                      8:25   0  97.7G  0 part
├─sdb10                     8:26   0  97.7G  0 part /mnt/windows/O
└─sdb11                     8:27   0    32G  0 part [SWAP]
sr0                        11:0    1  1024M  0 rom 
pcgrz-gentoo ~ #


kr
ahlx
Back to top
View user's profile Send private message
Whissi
Retired Dev
Retired Dev


Joined: 12 Jan 2011
Posts: 222

PostPosted: Wed Aug 19, 2020 9:33 pm    Post subject: Reply with quote

Thank you.

Please test https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=848f9d5eb48f6fe7cf1d11a2ccb2df9198f474f1 (put patch in /etc/portage/patches/sys-kernel/genkernel and re-emerge genkernel or try genkernel live ebuild instead).
_________________
Regards,
Whissi
Back to top
View user's profile Send private message
ahlx
n00b
n00b


Joined: 02 Feb 2016
Posts: 11
Location: Austria

PostPosted: Thu Aug 20, 2020 6:34 am    Post subject: Reply with quote

Hi Whissi,

I won't have access to my gentoo system until next Monday or Tuesday.
I'll then let you know about the outcome.

In any case thanks a lot for your efforts.
ahlx
Back to top
View user's profile Send private message
ahlx
n00b
n00b


Joined: 02 Feb 2016
Posts: 11
Location: Austria

PostPosted: Mon Aug 24, 2020 5:53 pm    Post subject: Reply with quote

Hello Whissi,

I've now applied the patch and generated a fresh ram disk.
I could then successfully boot the system with the new initrd.

I assume the fix will be included in the "official" genkernel ebuild in the near future?

Thank you very much
ahlx
Back to top
View user's profile Send private message
Whissi
Retired Dev
Retired Dev


Joined: 12 Jan 2011
Posts: 222

PostPosted: Mon Aug 31, 2020 11:37 am    Post subject: Reply with quote

Thank you for the feedback -- yes, the patch is included in genkernel-4.1.2 which will go stable soon.
_________________
Regards,
Whissi
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