LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-15-2016, 04:21 PM   #1
ppencho
Member
 
Registered: Jan 2004
Location: Bulgaria
Distribution: Slackware64-current
Posts: 94

Rep: Reputation: Disabled
LILO + initrd leads to kernel freeze immediately after the LILO menu


Slackware64-current with generic kernel 4.4 on Skylake 6700K (AsRock Z170 Gaming ITX/ac)

/dev/sda (GPT)
root=/dev/sda1

Code:
NAME   FSTYPE   SIZE MOUNTPOINT LABEL
sda           238.5G            
├─sda1 ext4      40G /          SSDROOT
├─sda2 swap       4G [SWAP]     SSDSWAP
├─sda3 ext4    93.1G /install   SSDATA
├─sda4 ntfs     450M            Възстановяване
├─sda5 vfat     100M            
├─sda6           16M            
├─sda7 ntfs    53.2G            
└─sda8 ntfs    47.7G            
sdb            14.5G            
└─sdb1 vfat    14.5G            KINGSTON
I created initrd.gz with the command:
Code:
mkinitrd -c -k 4.4.0 -f ext4 -r /dev/sda1 -m usb-storage:xhci-hcd:usbhid:hid_generic:jbd2:mbcache:ext4 -u -o /boot/initrd.gz
/etc/lilo.conf:
Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/disk/by-id/ata-ADATA_SP920SS_14130C0CA980
lba32
compact        # faster, but won't work on all systems.
# Append any additional kernel parameters:
append=" vt.default_utf8=1"
prompt
timeout = 20
default=Slackware
# VESA framebuffer console @ 1024x768x64k
vga = 791
# End LILO global section
# Linux bootable partition config begins
  image = /boot/vmlinuz-generic
  root = /dev/disk/by-label/SSDROOT
  label = Slackware
  initrd = /boot/initrd.gz
  read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
  image = /boot/vmlinuz-4.4.0_test
  root = /dev/disk/by-label/SSDROOT
  label = Slackware_test
  read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
  image = /boot/vmlinuz
  root = /dev/disk/by-label/SSDROOT
  label = Slackware-Huge
  read-only  # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
Selecting Slackware from the LILO boot menu leads to immediate kernel freeze, just showing Starting Slackware (even before starting the kernel boot messages).

If I remove initrd = /boot/initrd.gz from lilo.conf then the kernel starts loading until it panics because of the missing ext4 module.

I can boot with grub from USB flash using the same kernel and initrd (/boot/vmlinuz-generic and /boot/initrd.gz)

Also I can boot with the other two entries from lilo.conf (the huge kernel and Slackware_test). Slackware_test uses kernel compiled with the stock generic config with added ext4, jdb2 and mbcache.

initrd.gz has size 7414271 bytes.

Note: I could switch to grub or use a custom kernel (as I do now). But I am curious what is the root cause of the issue.

Last edited by ppencho; 01-16-2016 at 04:00 AM. Reason: It is Slackware64-current.
 
Old 01-15-2016, 04:42 PM   #2
BigTig
Member
 
Registered: Aug 2015
Posts: 61

Rep: Reputation: Disabled
When I build an initrd for a custom kernel, I need to give it a different name than initrd.gz(I usuall just go with some thing like initrd4.4.gz) and add a line to lilo.conf specifying that initrd:

image = /boot/vmlinuz-4.4
root = /dev/sda1
label = Linux4.4
initrd = /boot/initrd4.4.gz
read-only

Have you tried something like this?
 
Old 01-15-2016, 04:57 PM   #3
ppencho
Member
 
Registered: Jan 2004
Location: Bulgaria
Distribution: Slackware64-current
Posts: 94

Original Poster
Rep: Reputation: Disabled
I have always used initrd.gz in lilo.conf with no problems. My current issue is with the stock generic kernel. The initrd name should not matter as long as only one lilo entry uses it.
 
Old 01-15-2016, 05:21 PM   #4
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
Have you verified your mkinitrd command is the recommended command with mkinitrd_command_generator.sh?

Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh
# Depending on your current kernel, you may need to specify the -k option
/usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.0
 
Old 01-15-2016, 05:32 PM   #5
ppencho
Member
 
Registered: Jan 2004
Location: Bulgaria
Distribution: Slackware64-current
Posts: 94

Original Poster
Rep: Reputation: Disabled
Yes, I generated it using the generator. I also tested with grub command line, it boots fine:
Code:
set root=(hd1,gpt1)
linux /boot/vmlinuz-generic
initrd /boot/initrd.gz
boot
 
Old 01-15-2016, 05:49 PM   #6
pzognar
Member
 
Registered: Jun 2015
Distribution: Debian Jessie 64
Posts: 163
Blog Entries: 9

Rep: Reputation: Disabled
GPT or MBR?
 
Old 01-15-2016, 06:51 PM   #7
stoa
Member
 
Registered: Dec 2013
Posts: 54

Rep: Reputation: Disabled
Two things you can try:

1. The "README.initrd" states:
Quote:
The initrd is loaded by the "initrd = /boot/initrd.gz" line. Just add the line right below the line for the kernel image you use.
Yours appears after the "Label" section. I don't know how particular LILO is on this issue, but Pat thought it important enough to add to the README. (Emphasis added.)

2. Use the "-l" flag to the initrd command generator, like so:
Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-4.4.0
This will actually generate the exact entire new section to be added to your lilo.conf.
 
Old 01-16-2016, 01:51 AM   #8
ppencho
Member
 
Registered: Jan 2004
Location: Bulgaria
Distribution: Slackware64-current
Posts: 94

Original Poster
Rep: Reputation: Disabled
@pzognar: it is GPT.

@stoa: tested with -l parameter, still freezes at 'Loading 4.4.0'
Code:
# Linux bootable partition config begins
# initrd created with 'mkinitrd -c -k 4.4.0 -f ext4 -r /dev/sda1 -m usbhid:hid_generic:jbd2:mbcache:ext4 -u -o /boot/initrd.gz'
image = /boot/vmlinuz-generic-4.4
  initrd = /boot/initrd.gz
  root = /dev/sda1
  label = 4.4.0
  read-only
# Linux bootable partition config ends
 
Old 01-16-2016, 05:44 AM   #9
pzognar
Member
 
Registered: Jun 2015
Distribution: Debian Jessie 64
Posts: 163
Blog Entries: 9

Rep: Reputation: Disabled
If it is GPT, should not elilo be used instead?

edit: I've never used GPT. So maybe I'm wrong?

Last edited by pzognar; 01-16-2016 at 05:45 AM.
 
Old 01-16-2016, 06:49 AM   #10
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 915

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
Quote:
Originally Posted by pzognar View Post
If it is GPT, should not elilo be used instead?

edit: I've never used GPT. So maybe I'm wrong?
GPT doesn't need elilo - plain lilo is fine. GPT is a partitioning scheme whereas elilo is software to boot EFI (extended firmware interface) based systems. I use GPT with plain lilo on all my VM's (GPT with grub on bare metal).

chris
 
Old 01-16-2016, 08:00 AM   #11
stoa
Member
 
Registered: Dec 2013
Posts: 54

Rep: Reputation: Disabled
There are a few things I would consider, if for nothing else to eliminate them from question:

1. You've used the "compact" option; you could try removing this option.

2. If you are booting using BIOS, there are known issues with using the automatic lilo config during installation. See [1] and the link at the bottom of that page.

3. Since you have a Skylake processor, you are probably not using BIOS but pure UEFI. This is what elilo was developed for (but I think is currently unmaintained.) See [2].


[1] http://docs.slackware.com/howtos:sla...r_installation

[2] http://slackware.osuosl.org/slackwar...EADME_UEFI.TXT
 
Old 01-16-2016, 08:57 AM   #12
ppencho
Member
 
Registered: Jan 2004
Location: Bulgaria
Distribution: Slackware64-current
Posts: 94

Original Poster
Rep: Reputation: Disabled
1. Commented 'compact', it didn't help

2. I modify lilo.conf manually and I run lilo after that.

3. I use BIOS, not UEFI. It is set to Compatibility Support Mode = Enabled.

The lilo entries with no initrd boot normally. If all entries cannot boot I could agree that it is BIOS related. I don't know how and where LILO writes initrd.gz. That's why I mentioned the file size. Could it be that LILO overwrites something if the file is too big?
 
  


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
[SOLVED] Lilo boot freeze on booting kernel Firefox54 Linux - Kernel 22 07-27-2011 07:53 AM
Upgraded kernel, lilo.conf, didn't run /sbin/lilo dtashima Linux - Newbie 4 10-18-2004 11:21 AM
No new kernel-option in LILO after editing lilo.conf corwax Debian 3 08-26-2003 08:55 PM
new kernel causes lilo crash; /sbin/lilo = Warning: device 0x0305 exceeds 1024 cylind dandysf Linux - Software 0 08-26-2003 04:50 PM
lilo and openmosix was just installed and was added to lilo boot menu but.. kublador Linux - Software 0 06-18-2003 01:59 AM

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

All times are GMT -5. The time now is 02:18 PM.

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