View previous topic :: View next topic |
Author |
Message |
ahlx n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Loony Toons/Looney_Toons_-_Sylvester.gif)
Joined: 02 Feb 2016 Posts: 11 Location: Austria
|
Posted: Tue Aug 18, 2020 5:52 pm Post subject: genkernel 4.1.0, /etc/initramfs.mounts considered too late |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Whissi Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/19879541755bce0a550da6c.jpg)
Joined: 12 Jan 2011 Posts: 222
|
Posted: Wed Aug 19, 2020 1:38 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
ahlx n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Loony Toons/Looney_Toons_-_Sylvester.gif)
Joined: 02 Feb 2016 Posts: 11 Location: Austria
|
Posted: Wed Aug 19, 2020 4:12 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Whissi Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/19879541755bce0a550da6c.jpg)
Joined: 12 Jan 2011 Posts: 222
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ahlx n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Loony Toons/Looney_Toons_-_Sylvester.gif)
Joined: 02 Feb 2016 Posts: 11 Location: Austria
|
Posted: Thu Aug 20, 2020 6:34 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
ahlx n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Loony Toons/Looney_Toons_-_Sylvester.gif)
Joined: 02 Feb 2016 Posts: 11 Location: Austria
|
Posted: Mon Aug 24, 2020 5:53 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Whissi Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/19879541755bce0a550da6c.jpg)
Joined: 12 Jan 2011 Posts: 222
|
Posted: Mon Aug 31, 2020 11:37 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|