LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 02-20-2007, 04:57 PM   #1
jkoshi
LQ Newbie
 
Registered: Sep 2006
Posts: 13

Rep: Reputation: 0
Grub/LVM boot problem


Hi,

I have a problem with the grub bootloader, as follows. I have a
laptop, with an 80G disk, with Windows XP on the first half of
the disk (NTFS), and Fedora core 4 (LVM) on the rest. Dual boot
is managed by grub, installed with the Fedora install.

I wish to clone this disk, so I don't lose hours of setup/installs
on both OS's, and my work, in case of a crash. I did the following:

1) Installed Acronis 10 under Windows, and cloned the entire disk
to a 120G USB disk.
2) Restored from that clone onto a new 80G disk of the same geometry,
and replaced the existing disk with the newly cloned one.
3) On start-up, got a grub hang, so did the following:
a) Boot from Fedora core 4 rescue CD
b) chroot /mnt/sysimage
c) grub-install /dev/hda
d) Enter grub
e) grub> find /grub/stage1 -> gave me (hd0,3)
f) grub> root (hd0,3)
g) grub> kernel /vmlinuz-2.6.17-1.2142_FC4 ro root=/dev/hda4
h) grub> initrd /initrd-2.6.17-1.2142_FC4.img -> gave me
"Error 16: Inconsistent filesystem structure"
i) Exit grub, repeat to step b) above, and rebuild initrd:
"mkinitrd -v -f initrd-2.6.17-1.2142_FC4.img 2.6.17-1.2142_FC4
j) Repeat from d) again, and get the same Error 16 as above.
4) Note that after step 3-c) above, I got past the grub hang, and was able
to boot Windows. But selecting the Linux installation gave me "Error 17:
Cannot mount selected partition". That's when I did the remaining steps
above.

Sorry about the long-winded explanation, but this is frustrating, and I
wanted to provide all the details, in the hope that some-one could throw
some light on the dark innards of grub vis-a-vis LVM, to resolve this.

Thanks in advance.

regards,
John
 
Old 02-21-2007, 04:20 PM   #2
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
Boot from Fedora core 4 rescue CD
chroot /mnt/sysimage
grub
grub> find /grub/stage1
grub> root (hd0,3)
grub> setup (hd0)
grub> quit
 
Old 02-22-2007, 12:44 AM   #3
sai_kiran
LQ Newbie
 
Registered: Jan 2006
Posts: 11

Rep: Reputation: 0
Thumbs up hi

{QUOTE=jkoshi]Hi,

a) Boot from Fedora core 4 rescue CD
b) chroot /mnt/sysimage
c) grub-install /dev/hda
d) Enter grub
e) grub> find /grub/stage1 -> gave me (hd0,3)
f) grub> root (hd0,3)
g) grub> kernel /vmlinuz-2.6.17-1.2142_FC4 ro root=/dev/hda4
h) grub> initrd /initrd-2.6.17-1.2142_FC4.img -> gave me
"Error 16: Inconsistent filesystem structure"

[/QUOTE]

As You have already mentioned your ROOT fs is LVM, the root=/dev/hda4 is the problem. Generally it is going to be something like this

root=/dev/VolGroup001/LogVol001

Where VolGroup001 is the Volume Group name & LogVol001 is the Logical Volume name. To get the correct values for your system get into rescue mode and choose automatically mount FS option. Then use the mount command to find out what you named your LVM as. The root fs would be mount on /mnt/sysimage.

The inconsistent FS error comes because you are trying to access the partition rather than the LVM.
 
Old 02-27-2007, 01:55 PM   #4
jkoshi
LQ Newbie
 
Registered: Sep 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Duck2006
Boot from Fedora core 4 rescue CD
chroot /mnt/sysimage
grub
grub> find /grub/stage1
grub> root (hd0,3)
grub> setup (hd0)
grub> quit
Hi Duck2006,


Thanks for your feedback.

Tried this, too, with the same result.


John
 
Old 02-27-2007, 02:05 PM   #5
jkoshi
LQ Newbie
 
Registered: Sep 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sai_kiran
As You have already mentioned your ROOT fs is LVM, the root=/dev/hda4 is the problem. Generally it is going to be something like this

root=/dev/VolGroup001/LogVol001

Where VolGroup001 is the Volume Group name & LogVol001 is the Logical Volume name. To get the correct values for your .....

sai_kiran,


Thanks for your reply.

I did try "root=/dev/VolGroup00/LogVol00", and "root=/LABEL=/",
in place of "root=/dev/hda4" on the "kernel" line, but got the
same result.

However, you mentione Group and Volume 001, rather than 00.
What is the reason for this?


John
 
Old 02-28-2007, 12:37 AM   #6
sai_kiran
LQ Newbie
 
Registered: Jan 2006
Posts: 11

Rep: Reputation: 0
Quote:
Originally Posted by jkoshi

However, you mentione Group and Volume 001, rather than 00.
What is the reason for this?

John

John,

What i gave is an approximate value. Generally in RHEL swap is also created as a the first Logical Volume, So the root vol comes to be the second. You have to find the correct values by going into the Rescue environment. During Installation the VG & LV names can be changed from default values. So check and use the correct values.
 
Old 02-28-2007, 11:48 AM   #7
jkoshi
LQ Newbie
 
Registered: Sep 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Follow-up on grub dual-boot problem

Hi everyone, any ideas on a solution to the problem below?

Quote:
Originally Posted by jkoshi
Hi,

I have a problem with the grub bootloader, as follows. I have a
laptop, with an 80G disk, with Windows XP on the first half of
the disk (NTFS), and Fedora core 4 (LVM) on the rest. Dual boot
is managed by grub, installed with the Fedora install.

I wish to clone this disk, so I don't lose hours of setup/installs
on both OS's, and my work, in case of a crash. I did the following:

1) Installed Acronis 10 under Windows, and cloned the entire disk
to a 120G USB disk.
2) Restored from that clone onto a new 80G disk of the same geometry,
and replaced the existing disk with the newly cloned one.
3) On start-up, got a grub hang, so did the following:
a) Boot from Fedora core 4 rescue CD
b) chroot /mnt/sysimage
c) grub-install /dev/hda
d) Enter grub
e) grub> find /grub/stage1 -> gave me (hd0,3)
f) grub> root (hd0,3)
g) grub> kernel /vmlinuz-2.6.17-1.2142_FC4 ro root=/dev/hda4
h) grub> initrd /initrd-2.6.17-1.2142_FC4.img -> gave me
"Error 16: Inconsistent filesystem structure"
i) Exit grub, repeat to step b) above, and rebuild initrd:
"mkinitrd -v -f initrd-2.6.17-1.2142_FC4.img 2.6.17-1.2142_FC4
j) Repeat from d) again, and get the same Error 16 as above.
4) Note that after step 3-c) above, I got past the grub hang, and was able
to boot Windows. But selecting the Linux installation gave me "Error 17:
Cannot mount selected partition". That's when I did the remaining steps
above.

Sorry about the long-winded explanation, but this is frustrating, and I
wanted to provide all the details, in the hope that some-one could throw
some light on the dark innards of grub vis-a-vis LVM, to resolve this.

Thanks in advance.

regards,
John
 
  


Reply

Tags
boot, install, linux


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
new 2.6.17.4 boot problem ramdisk LVM debian xjih78 Linux - General 0 07-19-2006 11:26 AM
Boot problem with LVM using Ubuntu 6.03 as secondary linux distro with FC5 and Win XP grandpa-geek Ubuntu 4 06-25-2006 01:18 PM
Can't boot, LVM and inode problem Raoul68 Linux - General 2 11-01-2005 02:34 PM
Can't boot, LVM and inode problem Raoul68 Linux - Hardware 0 10-30-2005 04:14 AM
Grub setup problem (/boot/grub/stage1 not found) davidas Debian 2 04-28-2004 09:13 PM


All times are GMT -5. The time now is 12:39 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration