Wols Lists wrote:
That's exactly what I was doing !!!
I roll my own kernel, make install quite happily shoves it in whatever
/boot it finds.
If I tell genkernel to create an initramfs, provided I let it stomp
all over the LIVE /boot, it works fine. As soon as I try and stop it,
by saying "don't automount /boot", or "don't actually install the
initramfs", all hell breaks loose.
In the past, genkernel's always worked fine for me. That's why I use
it - dracut looks a lot more complicated ... but when genkernel throws
a hissy fit and craps all over my system because I won't let it do
what IT thinks is best, then it makes you want to dump the lot.
What else in gentoo has the same craptastic logic? --keep-going is the
same - it doesn't do what it says ...
Oh well, if SourceMage works for me, then I'll probably dual-boot for
a while and we'll see what happens ...
Cheers,
Wol
Wol, I think you been around long enough to know if it is broken, I'll
find it. I use dracut and figuring it out the first time is interesting
when you have more than one kernel installed but once you get it right,
and make a note of how to use it, it works really easy. I do all my
kernel stuff the manual way. I run make oldconfig, then compile with
make all && make modules_install and then manually copy the image to
/boot with my own name that the tools allow. I then use dracut to build
the init thingy. After that, I rename the init thingy to match the
kernel and update grub. If the names don't match, grub won't find the
init thingy.
This is the note I have in my cheat sheet.
dracut --kver 4.14.19-gentoo #like in /usr/src. In /boot, init & kernel
must match.
The key to knowing you did it right, when you update grub, it will find
both the kernel and init thingy and list them. The naming is what is critical.
If I can do this, you should be able to. I might add two things. I did
once long ago have a init thingy to fail. Only once and it was fairly
early on. It could have been dracut, it could have been me. The most critical things is the kernel version when running dracut and names
matching for the kernel and init thingy in /boot.
Example commands and output.
dracut --kver 5.10.46-gentoo # The kernel version comes from /usr/src
but leave off "kernel-" if you have it. I use gentoo-sources here.
Example output:
root@fireball / # dracut --kver 5.10.46-gentoo
dracut: Executing: /usr/bin/dracut --kver 5.10.46-gentoo
dracut: dracut module 'dash' will not be installed, because command
'/bin/dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command
'/bin/mksh' could not be found!
dracut: dracut module 'systemd' will not be installed, because command '/lib/systemd/systemd' could not be found!
dracut: dracut module 'systemd-ask-password' will not be installed,
because command 'systemd-ask-password' could not be found!
dracut: dracut module 'systemd-coredump' will not be installed, because
command 'coredumpctl' could not be found!
dracut: dracut module 'systemd' will not be installed, because command '/lib/systemd/systemd' could not be found!
dracut: dracut module 'systemd-initrd' depends on 'systemd', which can't
be installed
dracut: dracut module 'systemd-modules-load' will not be installed,
because command '/lib/systemd/systemd-modules-load' could not be found!
dracut: dracut module 'systemd-repart' will not be installed, because
command 'systemd-repart' could not be found!
dracut: dracut module 'systemd-sysctl' will not be installed, because
command '/lib/systemd/systemd-sysctl' could not be found!
dracut: dracut module 'systemd-sysusers' will not be installed, because
command 'systemd-sysusers' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because
command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command
'rngd' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because
command 'wicked' could not be found!
dracut: dracut module 'btrfs' will not be installed, because command
'btrfs' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command
'dmraid' could not be found!
dracut: dracut module 'mdraid' will not be installed, because command
'mdadm' could not be found!
dracut: dracut module 'cifs' will not be installed, because command 'mount.cifs' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command
'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command
'iscsid' could not be found!
dracut: 95nfs: Could not find any command of 'rpcbind portmap'!
dracut: dracut module 'nvmf' will not be installed, because command
'nvme' could not be found!
cat: /sys/power/resume: No such file or directory
dracut: dracut module 'biosdevname' will not be installed, because
command 'biosdevname' could not be found!
dracut: dracut module 'systemd-initrd' depends on 'systemd', which can't
be installed
dracut: dracut module 'dracut-systemd' depends on 'systemd-initrd',
which can't be installed
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: dracut module 'dash' will not be installed, because command
'/bin/dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command
'/bin/mksh' could not be found!
dracut: dracut module 'systemd-ask-password' will not be installed,
because command 'systemd-ask-password' could not be found!
dracut: dracut module 'systemd-coredump' will not be installed, because
command 'coredumpctl' could not be found!
dracut: dracut module 'systemd-modules-load' will not be installed,
because command '/lib/systemd/systemd-modules-load' could not be found!
dracut: dracut module 'systemd-repart' will not be installed, because
command 'systemd-repart' could not be found!
dracut: dracut module 'systemd-sysctl' will not be installed, because
command '/lib/systemd/systemd-sysctl' could not be found!
dracut: dracut module 'systemd-sysusers' will not be installed, because
command 'systemd-sysusers' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because
command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command
'rngd' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because
command 'wicked' could not be found!
dracut: dracut module 'btrfs' will not be installed, because command
'btrfs' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command
'dmraid' could not be found!
dracut: dracut module 'mdraid' will not be installed, because command
'mdadm' could not be found!
dracut: dracut module 'cifs' will not be installed, because command 'mount.cifs' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command
'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command
'iscsid' could not be found!
dracut: 95nfs: Could not find any command of 'rpcbind portmap'!
dracut: dracut module 'nvmf' will not be installed, because command
'nvme' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: *** Including module: bash ***
dracut: *** Including module: i18n ***
dracut: i18n_vars not set! Please set up i18n_vars in configuration file. dracut: No KEYMAP configured.
dracut: *** Including module: dm ***
dracut: Skipping udev rule: 64-device-mapper.rules
dracut: Skipping udev rule: 60-persistent-storage-dm.rules
dracut: Skipping udev rule: 55-dm.rules
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: kernel-modules-extra ***
dracut: *** Including module: lvm ***
dracut: Skipping program /bin/systemd-run using in udev rule 69-dm-lvm-metad.rules as it cannot be found
dracut: Skipping udev rule: 64-device-mapper.rules
dracut: Skipping udev rule: 56-lvm.rules
dracut: Skipping udev rule: 60-persistent-storage-lvm.rules
dracut: *** Including module: resume ***
dracut: *** Including module: rootfs-block ***
dracut: *** Including module: terminfo ***
dracut: *** Including module: udev-rules ***
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Hardlinking files ***
Mode: real
Files: 805
Linked: 5 files
Compared: 0 xattrs
Compared: 383 files
Saved: 6.25 KiB
Duration: 0.007063 seconds
dracut: *** Hardlinking files done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Constructing AuthenticAMD.bin ***
dracut: *** Store current command line parameters ***
dracut: Stored kernel commandline:
dracut: rd.lvm.lv=OS/swap rd.lvm.lv=OS/usr
dracut: resume=/dev/mapper/OS-swap
dracut: root=UUID=888352dd-9c91-4a9f-9595-cd0e74b74ee7 rootfstype=ext4 rootflags=rw,relatime,data=ordered
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Creating image file '/boot/initramfs-5.10.46-gentoo.img' *** dracut: *** Creating initramfs image file
'/boot/initramfs-5.10.46-gentoo.img' done ***
root@fireball / #
Grub update command and output example, from my system of course.
root@fireball / # grub-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/kernel-5.14.15-2
Found initrd image: /boot/initramfs-5.14.15-2.img
Found linux image: /boot/kernel-5.10.46-2
Found initrd image: /boot/initramfs-5.10.46-2.img
Found linux image: /boot/kernel-5.6.7-1
Found initrd image: /boot/initramfs-5.6.7-1.img
Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Found memtest image: /boot/memtest86plus/memtest.bin
Found memtest image: /boot/memtest86plus/memtest
done
root@fireball / #
This is the end result, edited since you don't need to see the unrelated parts.
root@fireball / # ls -al /boot/
total 109803
-rw-r--r-- 1 root root 113420 Jul 1 01:32 config-5.10.46-1
-rw-r--r-- 1 root root 116179 Nov 13 16:26 config-5.14.15-2
-rw-r--r-- 1 root root 110750 May 9 2020 config-5.6.7-2
-rw------- 1 root root 9310818 Nov 30 10:28 initramfs-5.10.46-2.img -rw------- 1 root root 9312082 Dec 6 16:35 initramfs-5.10.46-gentoo.img -rw------- 1 root root 9093386 Nov 13 16:53 initramfs-5.14.15-2.img -rw------- 1 root root 9310789 Nov 30 10:54 initramfs-5.6.7-1.img -rw-r--r-- 1 root root 11638944 Nov 30 10:26 kernel-5.10.46-2
-rw-r--r-- 1 root root 11859536 Nov 13 16:52 kernel-5.14.15-2
-rw-r--r-- 1 root root 11167744 Nov 30 10:40 kernel-5.6.7-1
-rw-r--r-- 1 root root 1193984 May 5 2013 memtest86-iso
drwxr-xr-x 2 root root 1024 Nov 21 16:32 memtest86plus
-rw-r--r-- 1 root root 154120 Jun 15 2013 mt500rc1.bin
root@fireball / #
Note how the kernel and init thingys have the same basic name. I add
-1, -2 etc to kernels if I have to rebuild to add or fix something.
Example, when I had to add the driver for my new network card, it became
-2. The tools seem to not mind that.
Hope that helps if you want to try some part or all of this method.
Dale
:-) :-)
P. S. Time to go season my cast iron skillets.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)