LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-12-2009, 10:56 PM   #1
kevinbenko
Member
 
Registered: Jun 2005
Location: Fargo, North Dakota
Distribution: Debian Stable {Probably forever}
Posts: 637

Rep: Reputation: 174Reputation: 174
grub2 (grub-pc) intermittent problems mounting LVM partitions on bootup


Background:

I am in the process of migrating from grub-legacy to grub2, and have been customizing to the appropriate config files (in the /etc directory). I seem to have an intermittent problem with grub-pc on system boot.

Symptoms:

*: *sometimes* I get errors when the boot process attempts to mount my LVM partitions:

fsck.ext3: ... no such file or directory while trying to open /dev/mapper/blahblahblah ... the superblock could not be read or does not describe a correct ext2 filesystem

*: These errors only show for *all* LVM partitions on my external USB drives, and nothing in the /etc/fstab file is mounted other than the "/" directory.

*: Hence, I am left with the root of my system directory tree, and not much else.

*: This set of errors occurs intermittently when chainloading through grub2 (grub-pc), and never when booting via grub-legacy.

*: When this does occur, I can reboot immediately via grub2 or grub-legacy and not have any errors on reboot.

*: The filesystems in question are not, as the error suggests, corrupted, hosed, or otherwise borked.

WTF???

Further Info:

In grub, root is set at (hd0,1)

The error messages, as I've said, only refer to the logical volumes on the external drives, not on any of the internal drives.

Problem:

Since my /var filesystem is on an LVM logical volume that doesn't get mounted when this error occurs, I don't have anything in /var/log concerning this error.
 
Old 10-13-2009, 06:50 PM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
hi

set root=(hd0,1)...defines where grub2 is to find boot partition not root. Its the same idea I expressed in my signature link for grub legacy.

2) post your grub.cfg pls

3) I do not use LVM but I assume you have a structure like this?

Code:
menuentry "some distro" {
        insmod lvm
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set (someuuidstring)
	linux	/pathway2/somekernel root=UUID=string (somecheatcodes) 
	initrd	/pathway2/someinitrd
}
hint somewhere you need to load the module lvm.mod by that command above

4) It is not entirely clear to me...is the only reason for the externals to mount /var?

5) it is not entirely clear to me which grub is in mbr and why you need to chainload?

Last edited by aus9; 10-13-2009 at 06:54 PM.
 
Old 10-13-2009, 08:53 PM   #3
kevinbenko
Member
 
Registered: Jun 2005
Location: Fargo, North Dakota
Distribution: Debian Stable {Probably forever}
Posts: 637

Original Poster
Rep: Reputation: 174Reputation: 174
Concerning item #5:

I recently upgraded to grub2, but haven't completed the transition from grub-legacy to grub2. So, until I execute "upgrade-from-grub-legacy", grub2 chainloads from grub-legacy. And I am not going to complete the upgrade until I know why this intermittent error occurs.

Concerning item #4:

I've got 23 logical volumes in two logical groups spanning 6 physical disk drives (2 of which are the external USB drives that seem to be connected to the error). /var just happens to be one of these volumes/partitions.

Concerning item #3:

I've noticed that I do not have a insmod lvm line in there.

However, since I don't get this error all the time, I would imagine that the error is not inherent in my grub2 config files, else I would get the error all the time.

I would guess that it has something to do with the lag due to the spin-up of the external drives.

Concerning item #2:

==========================================================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
insmod lvm
insmod ext2
set root=(LVM-group-usr)
search --no-floppy --fs-uuid --set 7103ee36-0157-4192-be6d-70e23f96ece5
if loadfont /share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1ec43e3d-1338-4176-a901-2ca438e11c53
insmod png
if background_image /grub/moreblue-orbit-grub.png ; then
set color_normal=black/black
set color_highlight=magenta/black
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, Linux 2.6.30-k8-20091009" {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1ec43e3d-1338-4176-a901-2ca438e11c53
linux /vmlinuz-2.6.30-k8-20091009 root=UUID=44b15f72-38f5-4f2b-9890-57709b0c7a87 ro vga=773
initrd /initrd.img-2.6.30-k8-20091009
}
menuentry "Debian GNU/Linux, Linux 2.6.30-k8-20091009 (recovery mode)" {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1ec43e3d-1338-4176-a901-2ca438e11c53
linux /vmlinuz-2.6.30-k8-20091009 root=UUID=44b15f72-38f5-4f2b-9890-57709b0c7a87 ro single vga=773
initrd /initrd.img-2.6.30-k8-20091009
}
menuentry "Debian GNU/Linux, Linux 2.6.30-2-686" {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1ec43e3d-1338-4176-a901-2ca438e11c53
linux /vmlinuz-2.6.30-2-686 root=UUID=44b15f72-38f5-4f2b-9890-57709b0c7a87 ro vga=773
initrd /initrd.img-2.6.30-2-686
}
menuentry "Debian GNU/Linux, Linux 2.6.30-2-686 (recovery mode)" {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1ec43e3d-1338-4176-a901-2ca438e11c53
linux /vmlinuz-2.6.30-2-686 root=UUID=44b15f72-38f5-4f2b-9890-57709b0c7a87 ro single vga=773
initrd /initrd.img-2.6.30-2-686
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

==========================================================

I'll give a see-looks at the insmod lvm line and see if I need to insert that into /etc/grub.d/* or /etc/default/grub
 
Old 10-13-2009, 09:13 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
Almost seems that usb has to settle down. Not sure how to put a wait in that to test.
 
Old 10-13-2009, 11:30 PM   #5
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
hi

Quite wise not to go fully grub2 if there are issues. So legacy is in mbr and you chainload to grub2 in boot partition to test it. OK

if jefro is correct on pause command..it does not exist in grub2

http://grub.enbug.org/CommandList

2) I do not use LVM...echo ?

but your header already has insmod lvm.

I deduce your boot is on separate partition as you use linux /vmlinuz and not /boot/vmlinuz

Question I gather you do not use raid? thank goodness.


3) But your set root=(LVM-group-usr)
interests me.

a google shows variants
set root=(vg01-root)
set root=(vg-vmh)


there is a claim that volumes with a DASH are bad for grub2 yet above configs seem ok
http://www.archivum.info/linux.debia...29_in_the_name

and a possible explanation in the last thread of that post.

altho it links to a 2005 entry on intramfs which I am not sure is relevant?

good luck

Last edited by aus9; 10-13-2009 at 11:42 PM.
 
Old 10-14-2009, 03:31 PM   #6
kevinbenko
Member
 
Registered: Jun 2005
Location: Fargo, North Dakota
Distribution: Debian Stable {Probably forever}
Posts: 637

Original Poster
Rep: Reputation: 174Reputation: 174
I've been rebooting frequently in order to tweak the grub2 configuration, and the error appears about 5% of the time.

It's the intermittent nature of the error that bothers me.
Rebooting and having it "just work" is soooo.... MiCrOsOfT....

If the error were present all the time, I'd be... well... less concerned.

I'll keep an eye out for someone else with this error, and maybe I'll bite the bullet and finish the transition to grub2 and deal with it. I *do* run some packages from the unstable branch, so this sort of thing is, of course, something I'm willing to deal with.
 
Old 10-14-2009, 06:25 PM   #7
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
hi

well as I consider this post in now not solved...and in limbo

can you explain why you needed 23 volumes?

I am wondering if "we" can resolve the need for LVM...which may be the crux of the issue?
 
Old 10-24-2009, 04:42 PM   #8
kevinbenko
Member
 
Registered: Jun 2005
Location: Fargo, North Dakota
Distribution: Debian Stable {Probably forever}
Posts: 637

Original Poster
Rep: Reputation: 174Reputation: 174
A Dreadful Kludge of a Fix

Until I get the time to figure this out, I've set up a kludge to work around this problem.

I've commented out the appropriate lines in /etc/fstab and added some lines to /etc/rc.local to (re)start LVM2 and mount the appropriate filesystems.

While this does work, it is dreadful and sloppy, and I also display a banner on bootup to remind me that I have a sloppy nonsense of a kludge running.
 
Old 11-03-2009, 11:05 PM   #9
kevinbenko
Member
 
Registered: Jun 2005
Location: Fargo, North Dakota
Distribution: Debian Stable {Probably forever}
Posts: 637

Original Poster
Rep: Reputation: 174Reputation: 174
Updated Kludge to sort-of-fix this problem

My updated kludge has the /etc/fstab set up as normal (no commented lines) and I have entered a script in /etc/rcS.d/ that runs first (named 00kludge) the script starts the udev and lvm2 services before anything else happens. I've tested it successfully with 5 reboots and it seems to be working as it should.

Given this, I would think that it's an init script problem.
I have to consider which of the following options I'm going to try:

*: Keep the kludge, as it seems to be working fine.

*: Rename the appropriate init scripts to make certain that udev and lvm2 are started earlier in the boot sequence.

*: Use an init system other than sysV.

Last edited by kevinbenko; 11-03-2009 at 11:06 PM. Reason: fixed a typo
 
  


Reply

Tags
grub2



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
LXer: Back Up (And Restore) LVM Partitions With LVM Snapshots LXer Syndicated Linux News 0 04-17-2007 11:16 AM
Problems mounting LVM-partition RacerDude Fedora 1 11-22-2005 11:04 AM
mounting red hat partitions with that LVM nonsense? silex_88 Linux - Software 4 09-12-2005 08:06 PM
Problems mounting partitions desbyleo Linux - General 2 02-24-2002 09:28 PM
Problems with mounting partitions concoran Linux - General 3 10-23-2001 12:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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