install grub on LVM

Bob McClure Jr bob at bobcatos.com
Tue Sep 18 23:48:29 UTC 2007


On Tue, Sep 18, 2007 at 06:28:47PM -0500, Fred Grant wrote:
> On Tue, 2007-09-18 at 16:23 -0500, Bob McClure Jr wrote: 
> > On Tue, Sep 18, 2007 at 04:10:37PM -0500, Fred Grant wrote:
> > > On Tue, 2007-09-18 at 10:02 -0500, Bob McClure Jr wrote:
> > > > On Tue, Sep 18, 2007 at 06:39:20AM -0500, Fred Grant wrote:
> > > > > I want to install grub on hd1 boot partition which is LVM.
> > > OK it's not LVM, it's ext3.  I must have been looking at swap.
> > > > 
> > > > hd1?  Do you mean hda?  Or hda1?
> > > > hda1
> > > > I didn't think you could boot LVM partitions.  Let's be clear on this.
> > > > An LVM partition is somewhat like an extended partition in that it
> > > > does not contain any kind of filesystem.  It does, however, contain
> > > > one or more logical volumes each of which which may contain a
> > > > filesystem.
> > > > 
> > > > Customarily, there is (at least) one plain linux partition with an
> > > > ext[23] filesystem on it, which is designated as the /boot partition.
> > > > You will likely have another partition, type LVM, which contains one
> > > > or more logical volumes containing filesystems for /, /home, etc.
> > > > Still, you would normally install grub on the MBR of that disk, e.g.,
> > > > for /dev/hda
> > > > 
> > > >   grub-install /dev/hda
> Maybe I should do:  grub-install /dev/hdb?
> > > I did this and result is indicated below.
> > 
> > While booted to FC5?  If so, show us the grub.conf for that system.
> This is from /etc/grub.conf.  It looks the same in /boot.
> --------------
> # From hda1
> # New Fedora5 on hda
> # grub.conf generated by anaconda
> #
> # Note that you do not have to rerun grub after making changes to this
> file
> # NOTICE:  You have a /boot partition.  This means that
> #          all kernel and initrd paths are relative to /boot/, eg.
> #          root (hd0,0)
> #          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
> #          initrd /initrd-version.img
> #boot=/dev/hda
> default=0
> timeout=10
> splashimage=(hd0,0)/grub/splash.xpm.gz
> 
> title Fedora Core (2.6.18-1.2239.fc5)
> root (hd0,0)
> kernel /vmlinuz-2.6.18-1.2239.fc5 ro root=/dev/VolGroup00/LogVol00 rhgb
> quiet
> initrd /initrd-2.6.18-1.2239.fc5.img
> 
> title Fedora Core (2.6.20-1.2320.fc5)
> root (hd0,0)
> kernel /vmlinuz-2.6.20-1.2320.fc5 ro root=/dev/VolGroup00/LogVol00 rhgb
> quiet
> initrd /initrd-2.6.20-1.2320.fc5.img
> ---------
> 
> > 
> > > > Care to share a bit more information about your desired setup?
> > > ------------
> > > fdisk:
> > > Disk /dev/hda: 30.7 GB, 30750031872 bytes
> > > 255 heads, 63 sectors/track, 3738 cylinders
> > > Units = cylinders of 16065 * 512 = 8225280 bytes
> > > 
> > >    Device Boot      Start         End      Blocks   Id  System
> > > /dev/hda1   *           1          13      104391   83  Linux
> > > /dev/hda2              14        3738    29921062+  8e  Linux LVM
> > > 
> > > Disk /dev/hdb: 61.4 GB, 61492838400 bytes
> > > 255 heads, 63 sectors/track, 7476 cylinders
> > > Units = cylinders of 16065 * 512 = 8225280 bytes
> > > 
> > >    Device Boot      Start         End      Blocks   Id  System
> > > /dev/hdb1   *           1        7288    58540828+  83  Linux
> > > /dev/hdb2            7289        7476     1510110    5  Extended
> > > /dev/hdb5            7289        7476     1510078+  82  Linux swap /
> > > Solaris
> > > 
> > > Disk /dev/dm-0: 29.5 GB, 29527900160 bytes
> > > 255 heads, 63 sectors/track, 3589 cylinders
> > > Units = cylinders of 16065 * 512 = 8225280 bytes
> > > 
> > > Disk /dev/dm-0 doesn't contain a valid partition table
> > > 
> > > Disk /dev/dm-1: 1073 MB, 1073741824 bytes
> > > 255 heads, 63 sectors/track, 130 cylinders
> > > Units = cylinders of 16065 * 512 = 8225280 bytes
> > > 
> > > Disk /dev/dm-1 doesn't contain a valid partition table
> > 
> > The above two errors can be ignored.
> > 
> > > -------------------
> > > Per the above, I have F5 installed on hda and Ubuntu live cd on
> > > hdb.

Well, duh.  It just occurred to me.  Most systems are set up to boot
the CD first, if it's in the drive.  Eject it and see if it doesn't
boot your FC5 installation.

> > >  In
> > > BIOS I select "boot from HDD1" and boot fails.  If I select "boot from
> > > HDD2", boot succeeds.  Is it possible that BIOS considers hda to be
> > > HDD2?
> > 
> > Could be.  The BIOS will tell you.
> > 
> > > Can it be toggled?
> > 
> > In most recent machines, yes.  Look in the BIOS under something like
> > Boot Order or drive swapping.  Rick has a lot more experience with
> > that and can probably tell you exactly.
> > 
> > > I don't play around with BIOS much because it
> > > scares me.
> > > > 
> > > > >
> > > -- 
> > > Fred
> > 
> > Cheers,

Cheers,
-- 
Bob McClure, Jr.             Bobcat Open Systems, Inc.
bob at bobcatos.com             http://www.bobcatos.com
When words are many, sin is not absent, but he who holds his tongue is
wise.  Proverbs 10:19 (NIV)




More information about the Redhat-install-list mailing list