LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-09-2016, 10:02 PM   #16
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656

Quote:
Originally Posted by gezley View Post
Generate what? Is an initrd.gz file output by this command?

If an output file isn't specified, it will default to /boot/initrd.gz. From man mkinitrd:

Code:
       -o output image
              The file to write the initrd to.  (default: /boot/initrd.gz)
@OP, can you post your /etc/lilo.conf and the output of ls -la /boot
 
Old 04-09-2016, 11:22 PM   #17
BioKinetic
LQ Newbie
 
Registered: Apr 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
Exclamation

Quote:
Originally Posted by Richard Cranium View Post
Code:
$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.6 -r)
BUT I suggest that you run just
Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.6 -r
first so that you can check what will be executed.
Ran the script and got

Code:
mkinitrd -c -k 3.10.17 -f ext4 -r /dev/cryptvg/root -m mbcache:jbd2:ext4 -C /dev/sda2 -L -u -o /boot/initrd.gz
I updated it for the new kernel

Code:
mkinitrd -c -k 4.4.6 -f ext4 -r /dev/cryptvg/root -m mbcache:jbd2:ext4 -C /dev/sda2 -L -u -o /boot/initrd-4.4.6.gz
I am still running into the same problem. Should I of left the original command?

lilo.conf

Code:
image = /boot/vmlinuz-4.4.6
  root = /dev/cryptvg/root
  initrd = /boot/initrd-4.4.6.gz
  label = Slack-4.4.6
  read-only
 
Old 04-10-2016, 12:02 AM   #18
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
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)?
 
Old 04-10-2016, 12:14 AM   #19
BioKinetic
LQ Newbie
 
Registered: Apr 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
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
 
Old 04-10-2016, 04:11 AM   #20
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,062

Rep: Reputation: Disabled
Quote:
Originally Posted by BioKinetic View Post
cp config-generic-smp-4.4.6-smp /usr/src/linux/.config
zcat /proc/config.gz > /usr/src/linux/.config
This is inconsistent. You copy config-generic-smp-4.4.6-smp to /usr/rsc/linux as .config (which is good), then replace it with the old .config from your running 3.10.17 kernel (which is bad). Do not run the second command, that ruins the configuration carefully hand-crafted for you by Patrick Volkerding. After the first line, just run the following commands, beginning with cd /usr/src/linux.

PS A use case of the second command is upgrading within the same major kernel version, e.g. if (at time of writing) you would like to upgrade from 3.10.17 to 3.10.101 (which wouldn't be a bad idea if you do not need newer drivers). In that case you would not run the first command but only the second one as the base configuration didn't change. You could still be asked some questions when running "make oldconfig", but usually very few.

Last edited by Didier Spaier; 04-10-2016 at 04:51 AM. Reason: PS added.
 
Old 04-10-2016, 07:39 AM   #21
BioKinetic
LQ Newbie
 
Registered: Apr 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
Exclamation

Quote:
Originally Posted by bassmadrigal View Post
Did you update your lilo.conf and rerun lilo?

What are the error messages you're seeing on boot? That could help us narrow down what is causing your problem.
I was finally able to get the error message I have been getting

Code:
### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
Not sure if it still helps or not.
 
Old 04-10-2016, 01:12 PM   #22
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,181

Rep: Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763
Quote:
Originally Posted by BioKinetic View Post
Correct this generates a new initrd file. Is there another command I should use?
Sorry. I am so used to using the -o switch I took it for granted it's required.
 
Old 04-10-2016, 02:47 PM   #23
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by BioKinetic View Post
I was finally able to get the error message I have been getting

Code:
### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
Not sure if it still helps or not.
As Didier mentioned, you are replacing the 4.4.6 config with the config of your current kernel when you replace it with /proc/config.gz. If you leave out that step and use the config provided by Pat, you will likely end up with a properly configured kernel that will work once you regenerate your initrd.

It might also be beneficial to use the -o option with mkinitrd. Then you can have an initrd-4.4.6.gz in your /boot and the original one for 3.10.17 in case your new kernel doesn't boot. I tend to rename all my newer kernels and initrds to match the kernel version. Then I just add additional entries in my lilo.conf so previous kernels are still bootable.

Code:
jbhansen@craven-moorhead:~$ ls -l /boot | egrep 'vmlinuz|initrd'
lrwxrwxrwx  1 root root      37 Jul 11  2014 README.initrd -> /usr/doc/mkinitrd-1.4.8/README.initrd
-rw-r--r--  1 root root 5652239 Dec 10  2014 initrd-3.18-rc5.gz
-rw-r--r--  1 root root 8786665 Jan 22 00:57 initrd-3.18.24-2.gz
-rw-r--r--  1 root root 5642966 Jan 15 18:29 initrd-3.18.24.gz
-rw-r--r--  1 root root 5632094 Mar  4  2015 initrd-3.18.8.gz
-rw-r--r--  1 root root 5644193 Dec 13  2014 initrd-3.18.gz
drwxr-xr-x 14 root root    4096 Jan 22 00:57 initrd-tree/
-rw-r--r--  1 root root 5469702 Sep 14  2014 initrd.gz
lrwxrwxrwx  1 root root      20 Oct  7  2014 vmlinuz -> vmlinuz-huge-3.10.17
-rw-r--r--  1 root root 3450176 Feb 14  2014 vmlinuz-generic-3.10.17
-rw-r--r--  1 root root 3770944 Dec 13  2014 vmlinuz-generic-3.18
-rw-r--r--  1 root root 3790352 Dec 10  2014 vmlinuz-generic-3.18-rc5
-rw-r--r--  1 root root 3935616 Dec  2 18:37 vmlinuz-generic-3.18.24
-rw-r--r--  1 root root 3907280 Mar  4  2015 vmlinuz-generic-3.18.8
-rw-r--r--  1 root root 6436992 Feb 14  2014 vmlinuz-huge-3.10.17
 
Old 04-10-2016, 03:58 PM   #24
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by gezley View Post
Sorry. I am so used to using the -o switch I took it for granted it's required.
You ain't the only one. :-/
 
Old 04-10-2016, 06:31 PM   #25
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by Richard Cranium View Post
You ain't the only one. :-/
I thought the same thing, but I checked the man page to see if there was a default if an output file isn't specified.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulseaudio/Pavucontrol/Sound die after Upgrade/Kernel Upgrade mzsade Linux - Software 0 09-03-2015 02:44 PM
LXer: Linux Kernel 3.19 Has Reached To End With Last Release Kernel 3.19.8, Install/Upgrade Kernel 3 LXer Syndicated Linux News 0 05-15-2015 12:03 AM
[SOLVED] Upgrade to Kernel 3.2.45 - upgrade initrd and reinstall LILO? qlands Slackware 1 07-03-2013 02:15 AM
How to upgrade kernel in rhel6/centos6 with internet. manually download and upgrade. Gil@LQ Linux - Kernel 3 03-12-2012 05:07 PM
What first upgrade kernel or upgrade slack 10.0 to current Kelean Slackware 7 01-16-2005 06:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration