LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Blogs > fritz_p
User Name
Password

Notices

Rate this Entry

grub cannot access LVM partition anymore

Posted 06-06-2009 at 09:34 PM by fritz_p

hi,

on an older computer I installed openSUSE 11.0 in a LVM partiton, just to try it, with GRUB on a different ext2 partition.
It worked fine until I installed fedora 10 in another partition which I resized with qtparted.
I also changed slightly the LVM partition with qtparted, using the little empty space between the tree chunks (swap, home, root).
Now I cannot boot opensuse anymore!

I have learned how to access the LVM partition, thanks to
http://www.brandonhutchinson.com/Mou...VM_volume.html

However, when I change my MBR to use the original /boot partition on /dev3 and try to boot I get the grub> prompt, since it cannot access the LVM in /sda4, that is (hd0,3).

I am typing this on another computer since the wireless doesn't work in fedora. Therefore I will only keep the parts of text I think may be relevant.

Here is some information:
(on sda1 theres windows, on sda3 /boot, on sda4 opensuse, on sda5 (within sda2) fedora.

>fdisk -l:

....

Device Boot Start End Blocks Id System
/dev/sda1 1 2088 16771828+ 7 HPFS/NTFS
/dev/sda2 3590 4864 10241437+ 5 Extended
/dev/sda3 * 2089 2098 72261+ 83 Linux
/dev/sda4 2098 3589 11984489+ 8e Linux
/dev/sda5 3717 4864 9221310+ 83 Linux

....

>pvs
PV VG Fmt Attr PSize PFree
/dev/sda4 system lvm2 a- 11.43G 0

>lvdisplay /dev/system
-- Logical volume --
LV Name /dev/system/home
VG Name system
LV UUID ......[ommited]
...
# open 0
...
Segments 1
...
- currently set to 256
Block device 253:0

-- Logical volume --
LV Name /dev/system/root
...
#open 0
...
Segments 2
...
- currently set to 256
Block device 253:1

...
LV Name /dev/system/swap
...
#open 1
...
Segments 1
...
- currently set to 256
Block device 253


I can thus mount
mount /dev/system/home /mnt/root
etc.,

but how do I tell grub to find it?
there, I had
root (hd0,3)
kernel /boot/vmlinuz root=/dev/system/root
resume=/dev/sustem/swap ...
....

which should be ok.

when I mount my home and root I find:

>df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda5 9075260 ....... /
tmpfs 51666772 ...... /dev/shm
/dev/sda3 69902 ...... /media/d3
/dev/mapper/system-home 5108128 .....
/dev/mapper/system-root 5653648 .....

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

I am quite lost.
I actually resent using this LVM, but thats the way it is now.
Maybe the little space between home, root, and swap was necessary, maybe it looks at the wrong address?

Thanks in advance for replays.
fp
Posted in Uncategorized
Views 2453 Comments 3
« Prev     Main     Next »
Total Comments 3

Comments

  1. Old Comment
    I need to correct a typo above:

    In my menu.lst file I actually have

    root (hd0,2)
    kernel /boot/vmlinuz root=/dev/system/root
    resume=/dev/sustem/swap ...

    [instead of root (hd0,3), since the kernel is actually on the /boot partition, as I understand it should be]
    Posted 06-06-2009 at 09:52 PM by fritz_p fritz_p is offline
  2. Old Comment
    I found a temporary solution!
    I can boot into my opensuse.

    I put the MBR in /sda5 and I am able to boot opensuse on the LVM in /sda4 from there.
    However, originally I was booting from a /boot partition inside my LVM, inside /dev/system/root, and the MBR is not found there anymore.
    (I was confused, my /boot partition was useless, the kernel there was not anymore valid.)

    typing from /sda3 or /sda5,
    grub>find /boot/grub/stage1
    did not show me an entry in the LVM, so I assumed it was not used.

    the same thing now in my opensuse only shows me the opensuse file.
    It seams to be isolated.

    I expect some trouble in the future, but so far its fine.
    Too bad for the lost afternoon.

    fp
    Posted 06-06-2009 at 11:11 PM by fritz_p fritz_p is offline
  3. Old Comment
    Quote:
    Originally Posted by Larry Webb View Comment
    This is the system I have used for grub and love it because you can change distros in the partition without worrying about grub menu.lst. This is a good tutorial and explains the how to's.

    http://www.justlinux.com/forum/showt...hreadid=147959
    Thanks, it looks impressive and I will have in mind when I install a new system.
    As for my existing problem, somehow my /boot partition, which was there just to boot, doesnt seam to find the LVM partition, even though I use the same menu.lst which I now use to multiboot, but which is in the the root directory of the latest linux OS.
    Posted 06-08-2009 at 09:29 PM by fritz_p fritz_p is offline
 

  



All times are GMT -5. The time now is 11:36 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration