LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-19-2016, 07:46 PM   #16
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by gda View Post
That line seems strange also to me...

I suppose you should put there the device on which the slackware partition is installed (not the partition but the whole device!). In that way you will install lilo on the MBR of the disk (potentially dangerous if you have other OS running on your system)...

So try to change that line in:

Code:
boot=/dev/disk/by-id/ID_SLACK_DEVICE
where ID_SLACK_DEVICE is the symbolic link (in the directory /dev/disk/by-id) pointing to /dev/sdb (assuming your Slackware root partition is installed in /dev/sdbX).

Probably also the line

Code:
root = UUID="20ea75bd-2a4a-4632-acad-52e5257856c3"
should be changed in:

Code:
append= "root=UUID=20ea75bd-2a4a-4632-acad-52e5257856c3"
Finally as far as I know when using UUID's, initrd needs to be used.
All right then. But should change my fstab entries too?
 
Old 07-20-2016, 02:56 AM   #17
gda
Member
 
Registered: Oct 2015
Posts: 130

Rep: Reputation: 27
Yes! I suggest to do so.
 
Old 07-20-2016, 07:38 AM   #18
MarcT
Member
 
Registered: Jan 2009
Location: UK
Distribution: Slackware 14.2
Posts: 125

Rep: Reputation: 51
I don't think you are using an initrd, as it has to be declared in lilo.conf - normally below the "image=" entry.

Eg, from my system (no UUIDs here):
Code:
# Linux bootable partition config begins
image = /boot/vmlinuz
  initrd = /boot/initrd.gz
  root = /dev/root_vg/root_lv
  append = " vt.default_utf8=0 resume=/dev/sdb2 rootflags=barrier=1"
  label = Linux64
  read-only  # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
You can also do "ls -l /boot/vmlinuz" to see which kernel is in use. I suspect it's linked to the "huge" kernel (needs no initrd), rather than "generic" (which does need an initrd).


NB: You might be able to get around this issue entirely by making sure your BIOS has the first boot device set to your normal boot drive when the spare disks are hooked up.
Then UUIDs and an initrd may not be required.

Edit: Have a read of the docs in /boot/README.initrd for some more details about initrd.

Last edited by MarcT; 07-20-2016 at 07:41 AM.
 
Old 07-20-2016, 09:00 AM   #19
gda
Member
 
Registered: Oct 2015
Posts: 130

Rep: Reputation: 27
Quote:
Originally Posted by MarcT
NB: You might be able to get around this issue entirely by making sure your BIOS has the first boot device set to your normal boot drive when the spare disks are hooked up.
Then UUIDs and an initrd may not be required.
I'm not sure this will fix the problem. I have never made specific tests I have to say but according to my general understanding the names assigned by linux to the scsi devices have nothing to do with the boot priority defined in the bios...
 
Old 07-20-2016, 06:25 PM   #20
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by gda View Post
I'm
not sure this will fix the problem. I have never made specific tests I
have to say but according to my general understanding the names assigned
by linux to the scsi devices have nothing to do with the boot priority
defined in the bios...
Yep I had the drive that has Slackware installed on it set as first in my bios this whole time.
 
Old 07-20-2016, 06:28 PM   #21
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Original Poster
Rep: Reputation: Disabled
I honestly have no idea what I'm doing, but it doesn't seem right.

append= "swap=79a98cab-01d1-45af-823e-53bc49bab151" swap swap defaults 0 0
append= "root=UUID=20ea75bd-2a4a-4632-acad-52e5257856c3" / ext4 defaults 1 1
append= "boot=UID="9878-F2F4" /boot/efi vfat defaults 1 0
 
Old 07-20-2016, 06:43 PM   #22
MarcT
Member
 
Registered: Jan 2009
Location: UK
Distribution: Slackware 14.2
Posts: 125

Rep: Reputation: 51
Quote:
Originally Posted by gda View Post
I'm not sure this will fix the problem. I have never made specific tests I have to say but according to my general understanding the names assigned by linux to the scsi devices have nothing to do with the boot priority defined in the bios...
I should have been more specific:
In the BIOS of my ageing workstation you can set the storage controller detection order. Therefore my internal drives are always detected before anything external plugged into the eSATA ports.

Last edited by MarcT; 07-20-2016 at 06:45 PM.
 
Old 07-21-2016, 01:22 AM   #23
gda
Member
 
Registered: Oct 2015
Posts: 130

Rep: Reputation: 27
Quote:
Originally Posted by bulletfreak
I honestly have no idea what I'm doing, but it doesn't seem right.

append= "swap=79a98cab-01d1-45af-823e-53bc49bab151" swap swap defaults 0 0
append= "root=UUID=20ea75bd-2a4a-4632-acad-52e5257856c3" / ext4 defaults 1 1
append= "boot=UID="9878-F2F4" /boot/efi vfat defaults 1 0
Indeed this is wrong! The syntax of the fstab file is different from the one of lilo.conf file!

In the fstab file you should use:

Code:
UUID="xxx..." mountpoint filesystem_type options
Anyway did you run lilo without error? Did you configure lilo to use initrd?

Last edited by gda; 07-21-2016 at 01:23 AM.
 
Old 07-21-2016, 02:00 AM   #24
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by gda View Post
Indeed this is wrong! The syntax of the fstab file is different from the one of lilo.conf file!

In the fstab file you should use:

Code:
UUID="xxx..." mountpoint filesystem_type options
Anyway did you run lilo without error? Did you configure lilo to use initrd?
So my fstab file would've been fine like it was? Nope, Lilo still gives me that error at line 7. Maybe it's because I left the "by-id" in and didn't change it

boot = boot=/dev/disk/by-id/sdb
 
Old 07-21-2016, 03:23 AM   #25
gda
Member
 
Registered: Oct 2015
Posts: 130

Rep: Reputation: 27
Quote:
Originally Posted by bulletfreak
boot = boot=/dev/disk/by-id/sdb
This is also wrong and different from what I suggested to do!

Let's try to go on in a little bit more systematic way proceeding step by step.

Let's try to fix lilo issue first.

You need to configure lilo to use initrd. So as first step you need to generate an initrd image.
This can be done very easily using the following script:
Code:
~# /usr/share/mkinitrd/mkinitrd_command_generator.sh
Actually this command does not generated any initrd image but just suggests you the command to issue to generate it.
On my system this is the output of that command:
Code:
#
# 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.14 -f ext4 -r /dev/sda3 -m usb-storage:xhci-hcd:xhci-pci:ohci-pci:ehci-pci:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -u -o /boot/initrd.gz
As you can see the last line (actually the only not commented line) is the command you should run to generate the initrd image.
So just run that command as it is written there. If everything goes smooth you should have your image at /boot/initrd.gz.

Now you need to modify the lilo.conf file. Your file should be like this:

Code:
# Start LILO global section
# Append any additional kernel parameters:
append=""
boot = /dev/disk/by-id/XXXXXXX

#compact # faster, but won't work on all systems.

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used. We don't specify it here, as there's just one column.
bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
bmp-timer = 65,27,0,255

# Standard menu.
# Or, you can comment out the bitmap menu above and 
# use a boot message with the standard menu:
#message = /boot/boot_message.txt

# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# Normal VGA console
vga = normal
# Ask for video mode at boot (time out to normal in 30s)
#vga = ask
# VESA framebuffer console @ 1024x768x64k
#vga=791
# VESA framebuffer console @ 1024x768x32k
#vga=790
# VESA framebuffer console @ 1024x768x256
#vga=773
# VESA framebuffer console @ 800x600x64k
#vga=788
# VESA framebuffer console @ 800x600x32k
#vga=787
# VESA framebuffer console @ 800x600x256
#vga=771
# VESA framebuffer console @ 640x480x64k
#vga=785
# VESA framebuffer console @ 640x480x32k
#vga=784
# VESA framebuffer console @ 640x480x256
#vga=769
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz-generic
initrd = /boot/initrd.gz
append= "root=UUID=20ea75bd-2a4a-4632-acad-52e5257856c3"
label = Linux
read-only
# Linux bootable partition config ends
As you can see now lilo is configured to use the generic kernel and the initrd image generated in the previous step.

There should be only two lines that STILL need your attention:

The first is:

Code:
boot = /dev/disk/by-id/XXXXXXX
To get what put instead of XXXXXX just type the following command:

Code:
~# ls -l /dev/disk/by-id
The output of this command on my system is:

Code:
lrwxrwxrwx 1 root root  9 Jul 19 10:29 ata-ST2000DM001-1ER164_Z4Z4Y023 -> ../../sda
lrwxrwxrwx 1 root root 10 Jul 19 10:29 ata-ST2000DM001-1ER164_Z4Z4Y023-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jul 19 10:29 ata-ST2000DM001-1ER164_Z4Z4Y023-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jul 19 10:29 ata-ST2000DM001-1ER164_Z4Z4Y023-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jul 19 10:29 ata-ST2000DM001-1ER164_Z4Z4Y023-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 Jul 19 10:29 ata-ST2000DM001-1ER164_Z4Z4Y023-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Jul 19 10:29 ata-ST2000DM001-1ER164_Z4Z4Y023-part6 -> ../../sda6
lrwxrwxrwx 1 root root 10 Jul 19 10:29 ata-ST2000DM001-1ER164_Z4Z4Y023-part7 -> ../../sda7
....
So the ID of the device named sda is ata-ST2000DM001-1ER164_Z4Z4Y023. That's the ID you have to put in boot directive of lilo.conf file. Of course in your case you have more then one device: just be sure to select the ID corresponding to the device containing your slackware root directory. Selecting the ID you are sure to refer always to the right device even if its name change.

The second line that may need your attention is:

Code:
append= "root=UUID=20ea75bd-2a4a-4632-acad-52e5257856c3"
Just be sure that this UUID is the one corresponding to the partition containing your root slackware directory using the command blkid.

Finally run lilo. If you got error in doing that please report here the error messages, the used lilo.conf file and the output of the following commands blkid, ls -l /dev/disk/by-id, ls -l /boot.

Last edited by gda; 07-21-2016 at 03:42 AM.
 
Old 07-21-2016, 03:40 AM   #26
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Original Poster
Rep: Reputation: Disabled
I got
Code:
bash-4.3$ sudo lilo
Warning: LBA32 addressing assumed
Warning: Partition 2 on /dev/sda is not marked Active.
Warning: partition type 0x00 on device 0x0802 is a dangerous place for
    a boot sector.
I will assume that you know what you're doing and I will proceed.
Warning: Device 0x0800: Inconsistent partition table, 2nd entry
  CHS address in PT:  0:0:0  -->  LBA (-1)
  LBA address in PT:  0  -->  CHS (0:0:1)
Fatal: Either FIX-TABLE or IGNORE-TABLE must be specified
If not sure, first try IGNORE-TABLE (-P ignore)
Lilo.conf:
Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" "
boot = /dev/disk/by-id/wwn-0x8744595459414315009x-part2

#compact        # faster, but won't work on all systems.

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
  bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
  bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used.  We don't specify it here, as there's just one column.
  bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
  bmp-timer = 65,27,0,255

# Standard menu.
# Or, you can comment out the bitmap menu above and 
# use a boot message with the standard menu:
#message = /boot/boot_message.txt

# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# Normal VGA console
vga = normal
# Ask for video mode at boot (time out to normal in 30s)
#vga = ask
# VESA framebuffer console @ 1024x768x64k
#vga=791
# VESA framebuffer console @ 1024x768x32k
#vga=790
# VESA framebuffer console @ 1024x768x256
#vga=773
# VESA framebuffer console @ 800x600x64k
#vga=788
# VESA framebuffer console @ 800x600x32k
#vga=787
# VESA framebuffer console @ 800x600x256
#vga=771
# VESA framebuffer console @ 640x480x64k
#vga=785
# VESA framebuffer console @ 640x480x32k
#vga=784
# VESA framebuffer console @ 640x480x256
#vga=769
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
  append= "root=UUID="20ea75bd-2a4a-4632-acad-52e5257856c3"
  label = Linux
  read-only
# Linux bootable partition config ends
 
Old 07-21-2016, 03:51 AM   #27
gda
Member
 
Registered: Oct 2015
Posts: 130

Rep: Reputation: 27
Please read carefully what I wrote!

Quote:
Originally Posted by bulletfreak
Code:
boot = /dev/disk/by-id/wwn-0x8744595459414315009x-part2
This is wrong! It should be
Code:
boot = /dev/disk/by-id/wwn-0x8744595459414315009x
I told you to put there the ID referring to the whole device. What you inserted refers to a partition on that device!

Quote:
Originally Posted by bulletfreak
Code:
# Linux bootable partition config begins
image = /boot/vmlinuz
  append= "root=UUID="20ea75bd-2a4a-4632-acad-52e5257856c3"
  label = Linux
  read-only
# Linux bootable partition config ends
You are still using the huge kernel and not the generic. Moroever you are not using any initrd image!!!

Last edited by gda; 07-21-2016 at 03:53 AM.
 
Old 07-21-2016, 06:21 PM   #28
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Original Poster
Rep: Reputation: Disabled
I ran that command to generate a intrd image so IDK. I should be using the generic kernel too. Alright I messed up the boot part and just fixed it, but I can't find the whole UUID for the disk. It just gives me one for every partition instead.

Edit: I fixed the root line. Sorry for the misunderstanding. But I still don't know why it says I'm still using the huge kernel. I'm guessing I don't have to manually update that myself since you didn't mention it.

Last edited by bulletfreak; 07-21-2016 at 06:27 PM.
 
Old 07-21-2016, 09:11 PM   #29
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
This post might help you get this figured out.

As I covered in that post, UUIDs are only available for partitions, not for disks. For your fstab, you'll reference your UUIDs as showed in that post.

For your lilo.conf, you'll need to use your disk-id for the boot portion, and your UUID for the root, but you don't need to use an append line for the root, just simply root = "UUID=23bce2c2-996d-449e-89cc-0e5029cc6d8d" (replacing that with your UUID).

Unfortunately, I didn't cover the initrd in that post, but if you run /usr/share/mkinitrd/mkinitrd_command_generator.sh, it should output something similar to:

Code:
mkinitrd -c -k 4.4.14 -f ext4 -r /dev/sda2 -m usb-storage:xhci-hcd:usbhid:hid_generic:jbd2:mbcache:ext4 -u -o /boot/initrd.gz
What you need to do is change the section after the -r (mine is /dev/sda2) to your UUID value, so, for me, that command would then become:

Code:
mkinitrd -c -k 4.4.14 -f ext4 -r "UUID=23bce2c2-996d-449e-89cc-0e5029cc6d8d" -m usb-storage:xhci-hcd:usbhid:hid_generic:jbd2:mbcache:ext4 -u -o /boot/initrd.gz
At this point, your fstab and lilo.conf should be fully converted to UUID, and the only thing left is to ensure you're using the generic kernel and loading the initrd. To do this, add a new section above your default section (it's better to make a new section to keep your old one intact in case things don't boot, and you add it above the other to make it the default choice when booting), and make sure it includes an image line that points to a generic kernel with an initrd entry below it, followed by your root device as a UUID, a label (make sure it's different than your original entry), and finally a read-only line. Then run lilo (although, lilo -t might be helpful to ensure you don't have typos) to save your setup and then reboot.

Code:
image = /boot/vmlinuz-generic-4.4.14
  initrd = /boot/initrd.gz
  root = "UUID=23bce2c2-996d-449e-89cc-0e5029cc6d8d"
  label = Slack-UUID
  read-only
Hopefully this helps clear things up, but I'll be back in the morning (EDT) to see if there are any additional questions. If you run into issues, please post any errors along with your complete /etc/lilo.conf, /etc/fstab, and the output of ls -la /dev/disk/by-id/ and ls -la /dev/disk/by-uuid.

Good luck!
 
Old 07-22-2016, 12:57 AM   #30
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Original Poster
Rep: Reputation: Disabled
It seems like it might've worked, however I get this error:
Code:
bash-4.3$ sudo lilo -t
Warning: LBA32 addressing assumed
Added Slack-UUID  +  *
The boot sector and the map file have *NOT* been altered.
One warning was issued.
Not too sure that's exactly a bad thing
 
  


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
Slackware kernel panics after trying to use harddrives bulletfreak Slackware 1 07-18-2016 10:03 AM
raid 5 question about spare drives 8000 Linux - Server 1 10-19-2013 11:12 PM
Debian RAID 10 spare drives vs active drives Nemus Linux - Server 2 06-13-2011 10:14 AM
Hard drive failure + Kernel reinstall = panics and odd behavior Storm16 Linux - Kernel 4 07-16-2006 06:51 AM
How could this have happened to me?! Hard locks and kernel panics for no good reason! jamespetts Linux - General 8 08-05-2004 07:45 AM

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

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