LinuxQuestions.org
Review your favorite Linux distribution.
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 08-12-2020, 06:27 PM   #1
thethinker
Member
 
Registered: Jul 2006
Location: Peabody, MA, USA
Distribution: Xubuntu, Slackware, Pop!_OS
Posts: 297
Blog Entries: 2

Rep: Reputation: 37
14.2 hangs on startup, some kind of kernel mismatch.


I update my Slackware system using

Code:
# slackpkg update 
# slackpkg install-new
# slackpkg upgrade-all
Nearly every time I do this on my vanilla installation (not multilib) I get kernel mismatches when I finally restart the machine (which I do very rarely). For example, this last time, hung on restart. So I grabbed my USB boot stick, booted into it, mounted the partition, and investigated. In /boot, I have things like

Code:
vmlinuz-huge-4.4.227
vmlinuz-generic-4.4.227
....
(i.e. all numbers referenced kernel 4.4.227). Checking out lilo.conf, the mkinitrd_generate_command.sh entry there indicated that the initrd was created with 4.4.217, and I've got the lines

Code:
image = /boot/vmlinuz-generic-4.4.217
in lilo.conf. So lilo like didn't get run after the kernel update? I've tried:

* chroot-ing to the mounted partition, editing the lilo.conf file by hand (to change .217 to .227), and re-running lilo. That seems to work, but upon restarting I get errors like
Code:
No kernel modules found for Linux 4.4.227
mount: mounting /dev/sda3 on /mnt failed: No such device
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
* Following advice here, which is this:

Code:
mount -t proc /proc /mnt/proc
mount --rbind /sys /mnt/sys
mount --rbind /dev /mnt/dev
mount --rbind /run /mnt/run
chroot /mnt env -i HOME=/root TERM=$TERM PS1='\u@\h:\w# ' PATH=/usr/bin:/usr/sbin:/bin:/sbin bash --login +h
That looks familiar, but now when I run mkinitrd I get

Code:
Modules for kernel 4.4.14 aren't installed.
Any advice? It would appear I don't have the kernel models installed for x.227 on the drive, but don't have the kernel 4.4.14 installed on the USB stick...
 
Old 08-12-2020, 06:57 PM   #2
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
Once the packages are upgraded, slackpkg doesn't do anything to prep your system to use them. You'll need to manually update your initrd (if used) and your bootloader (lilo on a stock system using legacy booting).

To generate a new initrd, you need to specify the kernel that you want to generate the initrd for, otherwise, it will use the currently running kernel. You can do this with the -k option for both mkinitrd and /usr/share/mkinitrd/mkinitrd_command_generator.sh

After that, it's a matter of making sure your lilo.conf is updated to show the new kernel and then run lilo to store that. Finally reboot.
 
1 members found this post helpful.
Old 08-12-2020, 07:49 PM   #3
thethinker
Member
 
Registered: Jul 2006
Location: Peabody, MA, USA
Distribution: Xubuntu, Slackware, Pop!_OS
Posts: 297

Original Poster
Blog Entries: 2

Rep: Reputation: 37
Quote:
Originally Posted by bassmadrigal View Post
Once the packages are upgraded, slackpkg doesn't do anything to prep your system to use them. You'll need to manually update your initrd (if used) and your bootloader (lilo on a stock system using legacy booting).

To generate a new initrd, you need to specify the kernel that you want to generate the initrd for, otherwise, it will use the currently running kernel. You can do this with the -k option for both mkinitrd and /usr/share/mkinitrd/mkinitrd_command_generator.sh

After that, it's a matter of making sure your lilo.conf is updated to show the new kernel and then run lilo to store that. Finally reboot.
This 100% worked, I really appreciate it.

I know I have to redo initrd and lilo after the kernel gets updated, but I'm just not that good at noticing when it happens I guess. Some leftover *-buntu bad habits I suppose.
 
Old 08-12-2020, 08:24 PM   #4
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435
Hello thethinker, and congratulations on your success in embracing a distro that exprects a bit more from you and in return hands you The POWA!
 
Old 08-12-2020, 09:24 PM   #5
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,374

Rep: Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754
Quote:
I know I have to redo initrd and lilo after the kernel gets updated, but I'm just not that good at noticing when it happens I guess.
It was this issue that led me to write my own custom function for slackpkg to prompt to update the initrd and run lilo.
 
  


Reply

Tags
boot failure, slackware 14.2, update



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
Hangs at udev...kind of linuxdork Linux - Laptop and Netbook 1 11-24-2008 07:37 PM
Startup Script of Some Kind? scammeh^ Linux - General 1 02-03-2004 04:36 PM
kind of a programming quesion...kind of not tho jhorvath Programming 2 06-30-2003 10:05 PM
I need some kind of alarm carrja99 Linux - Software 3 02-16-2003 01:05 AM
Problem with this forum-need to load some kind of Java-thing?????? rdaves@earthlink.net Linux - General 2 08-07-2001 10:57 AM

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

All times are GMT -5. The time now is 06:01 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