Quote:
Originally Posted by bassmadrigal
If you ran it with the -k option and had a valid kernel, it should've automatically used that kernel in the output. If you look at my output below, you'd see I'm running 3.18.24, but if I run it for 3.18.0, it outputs a correct mkinitrd command for the 3.18.0 kernel. If the modules are different between the two kernels, the mkinitrd commands would need to match the required kernel (this is why the mkinitrd_command_generator.sh command accepts the -k option).
Code:
root@craven-moorhead:~# uname -r
3.18.24
root@craven-moorhead:~# ls /lib/modules/
3.10.17 3.18.0 3.18.0-rc5 3.18.24 3.18.8
root@craven-moorhead:~# /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 3.18.0
ls: cannot access /sys/module/*_hcd/drivers/*: No such file or directory
#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:
mkinitrd -c -k 3.18.0 -f ext4 -r /dev/sda2 -m usb-storage:ehci-hcd:ehci-pci:usbhid:hid_generic:mbcache:jbd2:ext4 -u -o /boot/initrd.gz
That leads me to wonder how you installed your kernel... What other kernels do you have installed? How did you compile the kernel and what is it saved as in your /boot folder (which is why I asked for the output of your /boot drive previously)?
|
-----------------------------------------------------------------------------------------------------------------------------------
Commands used to install my kernel
-----------------------------------------------------------------------------------------------------------------------------------
cd /usr/src
rm linux
ln -s linux-4.4.6 linux
wget
http://mirrors1.kernel.org/slackware...mp-4.4.6-smpcp
cp config-generic-smp-4.4.6-smp /usr/src/linux/.config
zcat /proc/config.gz > /usr/src/linux/.config
cd /usr/src/linux
make oldconfig
make bzImage modules
make modules_install
cp arch/x86/boot/bzImage /boot/vmlinuz-4.4.6
cp System.map /boot/System.map-4.4.6
cp .config /boot/config-4.4.6
cd /boot
rm System.map
ln -s System.map-4.4.6 System.map
------------------------------------------------------------------------------------------------------------------------------
I then modified my lilo.conf to reflect my new kenel
ran lilo
/usr/share/mkinitrd/mkinitrd_command_generator.sh /boot/vmlinuz-4.4.6
#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:
mkinitrd -c -k 4.4.6 -f ext4 -r /dev/cryptvg/root -m jbd2.ko.gz:mbcache.ko.gz:ext4.ko.gz -C /dev/sda2 -L -u -o /boot/initrd.gz
# An entry in 'etc/lilo.conf' for kernel '/boot/vmlinuz-4.4.6' would look like this:
# Linux bootable partition config begins
# initrd created with 'mkinitrd -c -k 4.4.6 -f ext4 -r /dev/cryptvg/root -m jbd2.ko.gz:mbcache.ko.gz:ext4.ko.gz -C /dev/sda2 -L -u -o /boot/initrd.gz'
image = /boot/vmlinuz-4.4.6
initrd = /boot/initrd.gz
root = /dev/cryptvg/root
label = 4.4.6
read-only
# Linux bootable partition config ends
---------------------------------------------------------------------------------------------------------------------------------
cd /boot
ran
mkinitrd -c -k 4.4.6 -f ext4 -r /dev/cryptvg/root -m jbd2.ko.gz:mbcache.ko.gz:ext4.ko.gz -C /dev/sda2 -L -u -o /boot/initrd-4.4.6.gz
ran lilo