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 02-27-2014, 05:27 AM   #1
PrinceCruise
Member
 
Registered: Aug 2009
Location: /Universe/Earth/India/Pune
Distribution: Slackware64 -Current
Posts: 890

Rep: Reputation: 186Reputation: 186
Slackware 14.1 : xfs root on LVM : boot error!


Hello,

I was installing Slackware 14.1 64-bit in Vmware workstation with a different partition scheme than I'm used to of. I wanted LVM with xfs root and btrfs home. So my partition scheme was :-

Normal partitions :-
/boot ext2 - 100mb
swap - 2GB

LVM partitions layout :-
/dev/myvg/root - xfs - 20GB
/dev/myvg/home - btrfs - 10GB

I followed exactly the same steps as mentioned in official README_LVM.txt, except that the root FS I used was xfs and for home btrfs. And there was no 3.10.17-smp kernel, just 3.10.17 and thus created the initrd accordingly.

ftp://ftp.slackware.com/pub/slackwar...README_LVM.TXT

The LILO install was successful too without any error. However after final rebooting I got slapped with this error :-

Attachment 14835

Is it related to xfs being root on LVM or something else I totally missed and screwed up?

Regards.

Last edited by PrinceCruise; 08-02-2014 at 02:25 PM.
 
Old 02-27-2014, 05:37 AM   #2
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
It seems /dev/myvg/root is trying to mount in /mnt (which doesn't exist, since it shouldn't)... It should be mounted in '/' ...

Check that '/etc/lilo.conf' (from that partition) is correct and possibly redo your initrd image

P.S. it is ok to use the Slackware installation disk if you need a clean simple console... Basicaly, instead of running 'setup' you should mount the root partition and chroot to it ( mkdir -p /mnt && mount -t xfs /dev/myvg/root /mnt && chroot /mnt ) .. From there on, recheck lilo configuration (and maybe reinstall it) and redo the init image... Insure that the -r parameter for the mkinitrd command is '-r /dev/myvg/root'

Last edited by Smokey_justme; 02-27-2014 at 05:49 AM.
 
Old 02-27-2014, 06:14 AM   #3
PrinceCruise
Member
 
Registered: Aug 2009
Location: /Universe/Earth/India/Pune
Distribution: Slackware64 -Current
Posts: 890

Original Poster
Rep: Reputation: 186Reputation: 186
Quote:
Originally Posted by Smokey_justme View Post
It seems /dev/myvg/root is trying to mount in /mnt (which doesn't exist, since it shouldn't)... It should be mounted in '/' ...

Check that '/etc/lilo.conf' (from that partition) is correct and possibly redo your initrd image

P.S. it is ok to use the Slackware installation disk if you need a clean simple console... Basicaly, instead of running 'setup' you should mount the root partition and chroot to it ( mkdir -p /mnt && mount -t xfs /dev/myvg/root /mnt && chroot /mnt ) .. From there on, recheck lilo configuration (and maybe reinstall it) and redo the init image... Insure that the -r parameter for the mkinitrd command is '-r /dev/myvg/root'
That's the strangest thing.
I did the steps you mentioned above. The LVs were inactive so I activated the VG using vgchange -a y first.
The /etc/fstab looks totally fine:-

Attachment 14836

Previously I created initrd using :-
# $( /usr/share/mkinitrd/mkinitrd_command_generator.sh -r )

This time I did it the manual way :-
# mkinitrd -c -k 3.10.17 -m xfs -f xfs -r /dev/myvg/root -L

The lilo also looked pretty normal, however when I ran #lilo, it threw an error of /proc/partitions not found and after reboot I'm still at square 1. The same error, mounting on /mnt, why oh why?

Attachment 14837


Regards.

Last edited by PrinceCruise; 08-25-2014 at 01:52 PM.
 
Old 02-27-2014, 06:40 AM   #4
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by PrinceCruise View Post
That's the strangest thing.
I did the steps you mentioned above. The LVs were inactive so I activated the VG using vgchange -a y first.
The /etc/fstab looks totally fine:-

Attachment 14836

Previously I created initrd using :-
# $( /usr/share/mkinitrd/mkinitrd_command_generator.sh -r )

This time I did it the manual way :-
# mkinitrd -c -k 3.10.17 -m xfs -f xfs -r /dev/myvg/root -L

The lilo also looked pretty normal, however when I ran #lilo, it threw an error of /proc/partitions not found and after reboot I'm still at square 1. The same error, mounting on /mnt, why oh why?

Attachment 14837


Regards.
Did you install lilo to MBR or root? Lilo can't boot if it has been installed to a root partition formatted with XFS. make sure it is installed to MBR.
 
Old 02-27-2014, 06:51 AM   #5
PrinceCruise
Member
 
Registered: Aug 2009
Location: /Universe/Earth/India/Pune
Distribution: Slackware64 -Current
Posts: 890

Original Poster
Rep: Reputation: 186Reputation: 186
Quote:
Originally Posted by gezley View Post
Did you install lilo to MBR or root? Lilo can't boot if it has been installed to a root partition formatted with XFS. make sure it is installed to MBR.
Hi gezley, I'm aware of that and thus I installed it in MBR.
why is it trying to mount root to /mnt?

Regards.
 
Old 02-27-2014, 07:22 AM   #6
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
Ok, I've created an initrd and browse over the init.. It is normal to mount in /mnt and 'switch_root' after...

So now, can you please (at the console after the error) do an 'ls /', 'ls /sbin' and 'ls /dev/myvg'. Check that /mnt folder does exist and that /sbin/vgchange executable file does exist? And, ofcourse... see that /dev/myvg/root device file exists...

I think you're missing one of these for some reason...
 
Old 02-27-2014, 07:36 AM   #7
PrinceCruise
Member
 
Registered: Aug 2009
Location: /Universe/Earth/India/Pune
Distribution: Slackware64 -Current
Posts: 890

Original Poster
Rep: Reputation: 186Reputation: 186
Thanks Smokey_justme. A quick check showed out of the files/folders you mentioned , I'm missing on /dev/myvg/root device file. Rest are there.

Regards.
 
Old 02-27-2014, 07:58 AM   #8
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
Ok, so for some reason you logical volume isn't recognized... hmm... at this point, since I don't really use LVM I'm kind of out of ideeas... Maybe I'll give it a shot later on a Virtual box.. Or maybe someone else knows more about this..

For now, sorry..
 
Old 02-27-2014, 08:43 AM   #9
PrinceCruise
Member
 
Registered: Aug 2009
Location: /Universe/Earth/India/Pune
Distribution: Slackware64 -Current
Posts: 890

Original Poster
Rep: Reputation: 186Reputation: 186
Quote:
Originally Posted by Smokey_justme View Post
Ok, so for some reason you logical volume isn't recognized... hmm... at this point, since I don't really use LVM I'm kind of out of ideeas... Maybe I'll give it a shot later on a Virtual box.. Or maybe someone else knows more about this..

For now, sorry..
Not a problem mate, thanks for the help so far. I've been using all my CentOS VMs with LVM and never faced such problem. Lets see what I'm missing here.
Anybody else with any suggestion please?

Regards.
 
Old 02-27-2014, 12:16 PM   #10
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,157

Rep: Reputation: 237Reputation: 237Reputation: 237
This will probably fail but still, it might be worth trying:

The mkinitrd in 14.1 has a bug which requires you to use the -L flag even if you only need to unlock a LUKS partition wit the -C flag. Just -C should suffice, but not all files are copied to initrd.gz unless you pass -L too. So maybe you could try adding -C to see if the same weird thing happens.
 
Old 02-27-2014, 12:28 PM   #11
PrinceCruise
Member
 
Registered: Aug 2009
Location: /Universe/Earth/India/Pune
Distribution: Slackware64 -Current
Posts: 890

Original Poster
Rep: Reputation: 186Reputation: 186
Quote:
Originally Posted by Ilgar View Post
This will probably fail but still, it might be worth trying:

The mkinitrd in 14.1 has a bug which requires you to use the -L flag even if you only need to unlock a LUKS partition wit the -C flag. Just -C should suffice, but not all files are copied to initrd.gz unless you pass -L too. So maybe you could try adding -C to see if the same weird thing happens.
Hi, I'm not using LUKS. However thanks for noticing. I'll read more about the bug.

Regards.
 
Old 02-28-2014, 12:34 PM   #12
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,157

Rep: Reputation: 237Reputation: 237Reputation: 237
Quote:
Originally Posted by PrinceCruise View Post
Hi, I'm not using LUKS.
Yes I noticed that, but as I explained above, at least in certain scenarios you need to use irrelevant flags to make it work .
 
Old 02-28-2014, 01:58 PM   #13
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
I was attempting to reproduce this using libvirt and virt-manager, but lilo doesn't recognize the virtualio disk type that is used during the installation. I will give it another try this evening, but what I had attempted to do was:
  1. I don't try to run lilo during the initial setup. There's no initrd created, so whatever lilo does at that point won't be correct.
  2. After setup is finished and you are back at the command prompt, I did these additional steps:
    Code:
    bind -R /proc /mnt/proc
    bind -R /sys /mnt/sys
    bind -R /dev /mnt/dev
    chroot /mnt
    Once inside the chroot, I ran the mkinitrd_command_generator.sh script, then ran liloconfig and then ran lilo itself. Things worked as expected up to executing lilo, which failed when it didn't recognize the virtual disk's characteristics.
 
Old 02-28-2014, 05:52 PM   #14
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
Quick follow-up: http://www.linux-kvm.org/page/Boot_f...o_block_device appears to tell me how to make lilo work with a virtual block device. I'll be giving that a spin shortly.
 
Old 02-28-2014, 08:00 PM   #15
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
OK, I was able to install lilo on my virtual image and the system booted correctly.

liloconfig was pretty useless, however. I ran it, selected "simple", and chose reasonable answers to the questions. When it failed, it at least left /etc/lilo.conf behind that I could edit.

So, after "setup" completed, I exited setup and then ran the following commands...
Code:
mount -R /proc /mnt/proc
mount -R /sys /mnt/sys
mount -R /dev /mnt/dev
chroot /mnt
$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)
liloconfig
selected "simple", answered questions with reasonable values, watched lilo installation fail.
/usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-3.10.17 >>/etc/lilo.conf
edited /etc/lilo.conf to remove the section liloconfig added
lilo -v
exit
...and then shut down the VM and restarted it since the lilo output told me that lilo worked.

FWIW, mkinitrd_command_generator.sh in my case provided the following command line:
Code:
mkinitrd -c -k 3.10.17 -f xfs -r /dev/myvg/root -m virtio:virtio_ring:virtio_blk:virtio_pci:virtio_balloon:virtio_net:xfs -L -u -o /boot/initrd.gz
I also changed the boot device in /etc/lilo.conf to /dev/vda and added the line "device = /dev/vda bios=0x80 max-partitions=7" so that lilo would work. You probably won't have to do that.
 
  


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] Slackware 14.0x32 - xfs error = Bad Magic Number mobjr Linux - Hardware 5 01-30-2014 10:44 AM
[SOLVED] Installing Slackware 13.37 with a LVM as root nigel_galloway Slackware - Installation 2 06-24-2011 06:23 PM
[SOLVED] GRUB won't boot from XFS partition, gives error 21. cantab Linux - Software 8 04-19-2010 05:55 PM
Slackware 9.1 with XFS fails to boot IamDaniel Slackware 2 02-29-2004 12:31 PM
green screen at slackware 2.4.20-xfs boot qub³d Linux - Newbie 0 09-03-2003 06:17 PM

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

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