Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: 10.04 2 LVM Server Install Grub Issue

  1. #1
    Join Date
    Jun 2011
    Beans
    5

    10.04 2 LVM Server Install Grub Issue

    So I installed Ubuntu Server 10.04 2 on an LVM. I've seen things go wrong if the /boot mount point is on the LVM so I left a partition out of the lvm formatted with EXT3.
    My setup is this
    sda (500Gb) - (5gb /boot ext3 partition) (LVM)
    sdb (1Tb) - (LVM)
    sdb (1Tb) - (LVM)

    VG:
    swap (3gb)
    root (2.5Tb) mounted on / formatted EXT3

    I keep getting an error when booting that grub can't find pv2 then the screen just goes black. After doing some searches on google and here for how to get GRUB working on an LVM none of the results have been good. I made sure to keep the /boot mount out of the LVM as to not need to have LVM support in grub, i think is what people had said.

    Any help would be greatly appreciated.
    Thank you!

  2. #2
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: 10.04 2 LVM Server Install Grub Issue

    Hi there. I'm not sure what you are trying to do. Grub2 can boot an LVM no problem. You can have a separate /boot partition if you want.
    What version of Grub are you using?

    Let's also take a look at /etc/fstab and sudo fdisk -l and sudo blkid (boot a live CD and install LVM first).
    Last edited by YesWeCan; June 9th, 2011 at 11:52 PM.
    ASRock P67 Extreme6, Intel i5 2500K, 8GB RAM, nVidia 6600GT, 4x1TB RAID1+0

  3. #3
    Join Date
    Jun 2011
    Beans
    5

    Re: 10.04 2 LVM Server Install Grub Issue

    Quote Originally Posted by YesWeCan View Post
    Hi there. I'm not sure what you are trying to do. Grub2 can boot an LVM no problem. You can have a separate /boot partition if you want.
    What version of Grub are you using?

    Let's also take a look at /etc/fstab and sudo fdisk -l and sudo blkid (boot a live CD and install LVM first).
    Grub Version 0.97

    Fstab:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' to print the universally unique identifier
    # for a device; this may be used with UUID= as a more robust way to name
    # devices that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc nodev,noexec,nosuid 0 0
    /dev/mapper/met--cs-root / ext3 errors=remount-ro 0 1
    # /boot was on /dev/sda1 during installation
    UUID=8b32d81b-e1dd-4394-9d02-657f4b0f6b26 /boot ext3 defaults 0 2
    /dev/mapper/met--cs-swap none swap sw 0 0

    blkid:
    /dev/loop0: TYPE="squashfs"
    /dev/sda1: UUID="8b32d81b-e1dd-4394-9d02-657f4b0f6b26" TYPE="ext3"
    /dev/sda5: UUID="rNYF30-0xyU-WEkv-R1J5-2I7X-PbZh-UlwAz1" TYPE="LVM2_member"
    /dev/sdb1: UUID="fcF48j-E7O4-xB0H-F1CJ-NQaI-Ahp8-eptmRy" TYPE="LVM2_member"
    /dev/sdc1: UUID="HTnbzz-6YiM-s4B2-62Dn-EFvd-2hxW-Xh2Poq" TYPE="LVM2_member"
    /dev/mapper/met--cs-swap: UUID="fd0f0752-ccc0-49da-9342-be8eba25ba17" TYPE="swap"
    /dev/mapper/met--cs-root: UUID="0abe045f-8c26-4ece-a288-94a203dc90ff" TYPE="ext3"


    my issue is that grub just does not boot, not sure what is going on.

  4. #4
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: 10.04 2 LVM Server Install Grub Issue

    You are using "Grub legacy" which I am not very au fait with. Someone else may be able to assist. Otherwise you could upgrade the system to Grub2 and try again. https://help.ubuntu.com/community/Grub2
    ASRock P67 Extreme6, Intel i5 2500K, 8GB RAM, nVidia 6600GT, 4x1TB RAID1+0

  5. #5
    Join Date
    Jun 2011
    Beans
    5

    Re: 10.04 2 LVM Server Install Grub Issue

    Quote Originally Posted by YesWeCan View Post
    You are using "Grub legacy" which I am not very au fait with. Someone else may be able to assist. Otherwise you could upgrade the system to Grub2 and try again. https://help.ubuntu.com/community/Grub2
    Ok so here's what I did, got the new version 1.98, then
    apt-get install lvm2
    modprobe dm-mod
    vgchange -a y
    mount /dev/met-cs/root /mnt
    mount /dev/sda1 /mnt/boot/ (sda1 is my /boot partition)
    mount /usr /mnt/usr (for grub2)
    chmod /mnt
    grub-install /dev/sda
    grub-install --recheck /dev/sda

    then rebooted and still nothing.

  6. #6
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: 10.04 2 LVM Server Install Grub Issue

    Ok, it may be that because your /boot is in a different partition to / you need to inform grub-install about this.
    Something like: grub-install --boot-directory=/dev/sda1 /dev/sda.

    And, of course, your /boot partition needs to be symbolically linked to /boot in root.

    You may also want to do an update-grub for good measure.
    Last edited by YesWeCan; June 10th, 2011 at 12:34 AM.
    ASRock P67 Extreme6, Intel i5 2500K, 8GB RAM, nVidia 6600GT, 4x1TB RAID1+0

  7. #7
    Join Date
    Jun 2011
    Beans
    5

    Re: 10.04 2 LVM Server Install Grub Issue

    Quote Originally Posted by YesWeCan View Post
    Ok, it may be that because your /boot is in a different partition to / you need to inform grub-install about this.
    Something like: grub-install --boot-directory=/dev/sda1 /dev/sda.

    And, of course, your /boot partition needs to be symbolically linked to /boot in root.
    Ok so:
    (do my mounts)
    ln /boot /<place I mount dev/sda1>/
    chroot /mnt
    grub-install --boot-directory=/dev/sda1 /dev/sda

    I think i'm getting this more and more, but just want to make sure

  8. #8
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: 10.04 2 LVM Server Install Grub Issue

    Sorry I am getting confused. I don't do chroots often. I suspect you just need to mount the boot partition at /boot. So that the OS uses /dev/sda1 instead of its local /boot. Otherwise update-grub won't work. This mount may not be strictly necessary. The important thing is to repeat the grub-install specifying the boot partition. Hopefully, what you already have in it is fine.

    There are detailed instructions in that Community Grub2 page.

    [edit]
    Ok, it's getting late here. You don't need to use the /boot partition at all.
    What I would do is chroot into the OS. Remove the boot partition mount from fstab. Make sure you /boot is the one in root. Run update-grub to set all the files up in /boot. Then do the grub-install /dev/sda then reboot.

    Make sure you follow the web instructions correctly for doing a chroot.

    If this boots you can delete the boot partition.

    [edit2] I think I'll have to come back to you in the morning!
    All your boot files are probably in your sda1 partition. So you need to copy them into the /boot in the root partition first. Then you can do update-grub and then grub-install.
    Last edited by YesWeCan; June 10th, 2011 at 12:55 AM.
    ASRock P67 Extreme6, Intel i5 2500K, 8GB RAM, nVidia 6600GT, 4x1TB RAID1+0

  9. #9
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: 10.04 2 LVM Server Install Grub Issue

    Quote Originally Posted by zelgaddiss View Post
    Ok so here's what I did, got the new version 1.98, then
    apt-get install lvm2
    modprobe dm-mod
    vgchange -a y
    mount /dev/met-cs/root /mnt
    mount /dev/sda1 /mnt/boot/ (sda1 is my /boot partition)
    mount /usr /mnt/usr (for grub2)
    for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
    chroot /mnt
    update-grub
    grub-install --root-directory=/dev/sda1 /dev/sda
    grub-install --recheck /dev/sda

    then rebooted and still nothing.
    Ok. I've added things in red, all from https://help.ubuntu.com/community/Gr...ing%20GRUB%202. I need to know what exactly happens when it doesn't work.

    -------------------

    When in doubt, simplify!
    With Grub2 there is no need for a separate partition for boot, so why complicate things? To stop using it:
    copy cp -ar all your sda1 files to /boot.
    remove the fstab entry that mounts sda1
    Then either
    do the chroot procedure again without mounting sda1 and run update-grub and grub-install /dev/sda.
    or
    From a live CD running the same version of Grub2 and running LVM, mount the root partition at /mnt and then do 'sudo grub-install --root-directory=/mnt /dev/sda'
    Last edited by YesWeCan; June 10th, 2011 at 01:05 PM.
    ASRock P67 Extreme6, Intel i5 2500K, 8GB RAM, nVidia 6600GT, 4x1TB RAID1+0

  10. #10
    Join Date
    Jun 2011
    Beans
    5

    Re: 10.04 2 LVM Server Install Grub Issue

    Humm, this is weird.
    Because this is a new install I went though and re-installed 10.04 from the alt CD and just made the / and swap mount points on the LVM now when it boots from default (grub 1.98 ) it just comes up to 'Error: Physical Volume pv2 not found' when I ls I could see (metcs-root) but when I type 'ls (metcs-root)/' it says the same thing.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •