install grub on LVM
Rick Stevens
rstevens at internap.com
Wed Sep 26 16:01:58 UTC 2007
On Wed, 2007-09-26 at 16:09 +0800, toufique shakh wrote:
> according to me,
>
> /boot partition cannot be on LVM because bootloaders doesn't understand Lvm logical volumes including lilo grub.
> this is as per Linux LVM-Howto documentation. www.linuxdocs.org.
> please correct me if i am wrong.
That is correct. Grub also doesn't understand software RAID. 'Tis
always best to put boot on a regular, standard partition.
> > ----- Original Message -----
> > From: "Rick Stevens" <rstevens at internap.com>
> > To: "Getting started with Red Hat Linux" <redhat-install-list at redhat.com>
> > Subject: Re: install grub on LVM
> > Date: Tue, 18 Sep 2007 15:15:15 -0700
> >
> >
> > 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
> > > > I did this and result is indicated below.
> > >
> > > While booted to FC5? If so, show us the grub.conf for that system.
> > >
> > > > > 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. 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.
> >
> > Hoo boy! It depends on the BIOS. First, keep in mind that grub doesn't
> > know about hda, hdb, etc. as those are what the Linux kernel calls them.
> > In fact, there is no "hd" stuff in the F7 and later kernels. All hard
> > drives are treated as SCSI drives and are given the names "sda", "sdb",
> > etc. regardless of their interface type (for example, ATA is really just
> > SCSI over IDE cables).
> >
> > Now this depends on the specific BIOS involved, but the vast majority
> > give the first bootable hard drive the low-level identifier of 0x80, the
> > second drive 0x81 and so on (this traces back to the old BDOS "int15"
> > calls to the BIOS) and THOSE are what grub relies on (in fact, the old
> > LILO boot loader used the "0x80"-type nomenclature). While they're
> > called "hd(drive,partition)" in grub's config file, that's just to
> > differentiate hard drives from floppy drives. You can think of grub's
> > "hd(0,..." as meaning "BDOS device 0x80", and "fd(0,..." means "BDOS
> > device 0x00".
> >
> > So by changing the boot order in your BIOS, you've forced it to assign
> > your SECOND drive the 0x80 identifier and the FIRST drive the 0x81
> > identifier. Since Linux inherits the primary drive from the boot loader
> > (and BIOS), it will think your SECOND drive is hda (or sda), and the
> > FIRST drive as hdb (or sdb).
> >
> > I'm guessing that's probably more than you want to know, but there it
> > is. ;-)
> >
> > ----------------------------------------------------------------------
> > - Rick Stevens, Principal Engineer rstevens at internap.com -
> > - CDN Systems, Internap, Inc. http://www.internap.com -
> > - -
> > - The Theory of Rapitivity: E=MC Hammer -
> > - -- Glenn Marcus (via TopFive.com) -
> > ----------------------------------------------------------------------
> >
> > _______________________________________________
> > Redhat-install-list mailing list
> > Redhat-install-list at redhat.com
> > https://www.redhat.com/mailman/listinfo/redhat-install-list
> > To Unsubscribe Go To ABOVE URL or send a message to:
> > redhat-install-list-request at redhat.com
> > Subject: unsubscribe
>
> >
>
>
>
> file:/root/Desktop/449732.png
>
>
>
>
> =
> Used Japanese, European Trucks and Cars
> Cars and trucks for sale and export from Japan.
> http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=6c72384fa68c9d2dba8d7867fb88c467
>
>
----------------------------------------------------------------------
- Rick Stevens, Principal Engineer rstevens at internap.com -
- CDN Systems, Internap, Inc. http://www.internap.com -
- -
- LOOK OUT!!! BEHIND YOU!!! -
----------------------------------------------------------------------
More information about the Redhat-install-list
mailing list