LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 10-23-2018, 10:26 AM   #1
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 339

Rep: Reputation: Disabled
mkinitrd problem with kernel 4.19.0


I have two machines running -current (64 bit) with Eric's KDE5. The old machine in my workshop, I use as a test hack before upgrading my main machine in case of any "gotchas". The old machine uses Lilo to boot, and the new machine, being UEFI, uses elilo.

I upgraded the old machine to the new 4.19.0 kernel without problems. However, on the EFI machine, when I run mkinitrd, I get the following:

Code:
root@MyMachine:/boot/efi/EFI/Slackware# mkinitrd -c -k 4.19.0 -m ext4
OK: /lib/modules/4.19.0/kernel/fs/jbd2/jbd2.ko added.
OK: /lib/modules/4.19.0/kernel/fs/mbcache.ko added.
OK: /lib/modules/4.19.0/kernel/fs/ext4/ext4.ko added.
cp: cannot stat '/lib/udev/rules.d/root@MyMachine.1275': No such file or directory
48433 blocks
/boot/initrd.gz created.
The machine fails to boot, with what seems like a failure to mount the root (ext4) partition.

What is that "root@MyMachine.1275" file? there is nothing like that in the rules.d folder on either machine!

I normally roll my own kernels with ext4 built in, and therefore don't need an initrd, but I can't see why one machine works fine, but not the other!

All suggestions gratefully received!

--
Pete
 
Old 10-23-2018, 10:45 AM   #2
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 532

Rep: Reputation: 143Reputation: 143
Hi, I normally run mkinitrd in /boot and then copy the initrd.gz to the efi partition. It looks like you ran it in the efi partition where there is no initrd-tree that is normally used to make the image. Maybe it's using your old initrd on the efi partition as a source and then finds something that's normally not there...

hth

rob
 
Old 10-23-2018, 10:52 AM   #3
chrisVV
Member
 
Registered: Aug 2010
Posts: 322

Rep: Reputation: 139Reputation: 139
What kernel do you have in /boot/efi/EFI/Slackware, and in particular is it the same as the vmlinuz image in /boot (it should be)? If it isn't, you may have got an old kernel image installed in /boot/efi/EFI/Slackware - see https://www.linuxquestions.org/quest...nt-4175640970/. (Equally, it may be nothing to do with that.)
 
Old 10-23-2018, 11:14 AM   #4
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 339

Original Poster
Rep: Reputation: Disabled
I've definitely got the same kernel in both /boot/ and /boot/efi/EFI/Slackware. When the system boots, when elilo runs, the second line appears to say that it can't find /boot/initrd.gz. The message is so subliminal that I've had to reboot a few times to make it out!

I thought maybe it needed the vfat module loading as well as ext4 (the efi partition needs to be vfat), so I made a new initrd with both modules, but that hasn't worked either. I've put the initrd.gz in both /boot (which is where mkinitrd places it) and /boot/efi/EFI/Slackware, to no avail.

The file is definitely there - not a symlink - but for some reason, the system can't read it when booting!

Luckily, I've got my old kernel, so I can still run that. I'm sure its something to do with that strange "cannot stat" message I get when running mkinitrd, but I have no idea what is causing it!

--
Pete
 
Old 10-23-2018, 11:51 AM   #5
phenixia2003
Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 832

Rep: Reputation: 704Reputation: 704Reputation: 704Reputation: 704Reputation: 704Reputation: 704Reputation: 704
Hello,

can you post the output of :
Code:
$ bash -x mkinitrd -c -k 4.19.0 -m ext4
--
SeB
 
Old 10-23-2018, 01:33 PM   #6
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 339

Original Poster
Rep: Reputation: Disabled
Hi SeB,

That command produces a LOT of output. It falls outside the scroll-back of the window! I tried redirecting it to a file, which only produces the following lines:

Code:
OK: /lib/modules/4.19.0/kernel/fs/jbd2/jbd2.ko added.
OK: /lib/modules/4.19.0/kernel/fs/mbcache.ko added.
OK: /lib/modules/4.19.0/kernel/fs/ext4/ext4.ko added.
/boot/initrd.gz created.
Be sure to run lilo again if you use it.
I've attached the long version as a txt file. It doesn't go right back to the command, I'm afraid. Too long, and redirecting it to a text file only produces the short version for some reason (I'm not a programmer!).

Using your command seems to stop it producing the error for some reason, but it still doesn't work!

If you have any suggestions how to capture the entire output, I'll try again. I just appended > mkinitrd_long.txt to your command.

Cheers,

--
Pete
Attached Files
File Type: txt mkinitrd_long.txt (33.1 KB, 6 views)
 
Old 10-23-2018, 02:20 PM   #7
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 339

Original Poster
Rep: Reputation: Disabled
Cracked it! I had set
Code:
initrd=/boot/initrd.gz
in elilo.conf as per the mkinitrd instructions. As soon as I set it to
Code:
initrd=initrd.gz
(I had initrd.gz in both locations) it all started to work!

It appears ELILO doesn't like the initrd.gz file being anywhere other than in the same folder as the kernel!

A lesson learned, and thanks for the suggestions!

Still don't know what that "cannot stat" statement was about, but it looks like it was a red herring!

Cheers,

--
Pete
 
Old 10-23-2018, 02:20 PM   #8
phenixia2003
Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 832

Rep: Reputation: 704Reputation: 704Reputation: 704Reputation: 704Reputation: 704Reputation: 704Reputation: 704
Hello,

Quote:
Originally Posted by pchristy View Post
Hi SeB,

That command produces a LOT of output. It falls outside the scroll-back of the window! I tried redirecting it to a file, which only produces the following lines:

Code:
OK: /lib/modules/4.19.0/kernel/fs/jbd2/jbd2.ko added.
OK: /lib/modules/4.19.0/kernel/fs/mbcache.ko added.
OK: /lib/modules/4.19.0/kernel/fs/ext4/ext4.ko added.
/boot/initrd.gz created.
Be sure to run lilo again if you use it.
the message(s) printed on stderr are missing. Run the command below, then attach the produced file (ie. /tmp/mkinitrd.log) :

Code:
$ bash -x mkinitrd -c -k 4.19.0 -m ext4 &>/tmp/mkinitrd.log
With that, the message "cp: cannot stat '...'" should be present in /tmp/mkinitrd.log which could help to figure out why mkinitrd try to copy a file that does not exist.


--
SeB
 
Old 10-23-2018, 02:42 PM   #9
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 339

Original Poster
Rep: Reputation: Disabled
Here you go (see attached file). The error show up around line 1108. But I seem to have solved the problem now, anyway.

Thanks for your help!

--
Pete
Attached Files
File Type: log mkinitrd.log (49.5 KB, 9 views)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
using mkinitrd for new kernel, but /lib/modules/[kernel] doesn't exist any more slacker_ Slackware 2 09-20-2013 04:08 PM
mkinitrd Problem when trying to boot new kernel BobNutfield Slackware 31 09-21-2008 04:04 PM
problem with running mkinitrd for kernel 2.6.20.7 nkd Linux - General 6 05-01-2007 08:42 AM
kernel 2.6.6 mkinitrd problem ziox Linux - Software 0 07-13-2004 08:48 PM
mkinitrd problem - kernel upgrade newbie irvken Linux - Newbie 31 12-23-2003 01:03 PM

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

All times are GMT -5. The time now is 08:52 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration