* (still ?) root on LVM problems
@ 2008-01-12 14:01 Jean-Christophe Haessig
2008-01-12 15:04 ` Robert Millan
0 siblings, 1 reply; 11+ messages in thread
From: Jean-Christophe Haessig @ 2008-01-12 14:01 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 919 bytes --]
Hi,
I had a peek at the ML lately and saw a few messages reporting some
success in using GRUB2 as a bootloader in a root-on-lvm setup.
I decided to give it a try, so I grabbed it from CVS, but unfortunately
it didn't work, just as in my previous tries :(
I can't get why but grub-setup insists on overwriting some important
blocks at the beginning of the disk, thus destroying the lvm metadata.
Hopefully, there was no harm, I'm used to it so I had backups.
Still, I'd like to understand why it doesn't work on my setup… Does
(as I understand) root-on-lvm mean everything-on-lvm including /boot ?
Could someone help me find what I do wrong ?
Thanks,
JC
--
AVIS : Falsifier le contenu et usurper l'identité des auteurs des courriers
électroniques étant simplissime, j'exhorte mes correspondants à utiliser un
logiciel de signature électronique. Lire : http://openpgp.vie-privee.org/
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: (still ?) root on LVM problems
2008-01-12 14:01 (still ?) root on LVM problems Jean-Christophe Haessig
@ 2008-01-12 15:04 ` Robert Millan
2008-01-12 15:12 ` Robert Millan
0 siblings, 1 reply; 11+ messages in thread
From: Robert Millan @ 2008-01-12 15:04 UTC (permalink / raw)
To: The development of GRUB 2
On Sat, Jan 12, 2008 at 03:01:38PM +0100, Jean-Christophe Haessig wrote:
> Hi,
>
> I had a peek at the ML lately and saw a few messages reporting some
> success in using GRUB2 as a bootloader in a root-on-lvm setup.
>
> I decided to give it a try, so I grabbed it from CVS, but unfortunately
> it didn't work, just as in my previous tries :(
I fixed some bugs affecting root-on-lvm, but not all. They aren't in CVS yet,
though.
Which reminds me this would be a good time to commit, since nobody objected to
my last patch.
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: (still ?) root on LVM problems
2008-01-12 15:04 ` Robert Millan
@ 2008-01-12 15:12 ` Robert Millan
2008-01-12 21:29 ` Jean-Christophe Haessig
0 siblings, 1 reply; 11+ messages in thread
From: Robert Millan @ 2008-01-12 15:12 UTC (permalink / raw)
To: The development of GRUB 2
On Sat, Jan 12, 2008 at 04:04:47PM +0100, Robert Millan wrote:
> On Sat, Jan 12, 2008 at 03:01:38PM +0100, Jean-Christophe Haessig wrote:
> > Hi,
> >
> > I had a peek at the ML lately and saw a few messages reporting some
> > success in using GRUB2 as a bootloader in a root-on-lvm setup.
> >
> > I decided to give it a try, so I grabbed it from CVS, but unfortunately
> > it didn't work, just as in my previous tries :(
>
> I fixed some bugs affecting root-on-lvm, but not all. They aren't in CVS yet,
> though.
>
> Which reminds me this would be a good time to commit, since nobody objected to
> my last patch.
Try latest CVS.
You'll still have to add "pc" (or "gpt") module manually (--modules parameter).
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: (still ?) root on LVM problems
2008-01-12 15:12 ` Robert Millan
@ 2008-01-12 21:29 ` Jean-Christophe Haessig
2008-01-12 23:26 ` Robert Millan
0 siblings, 1 reply; 11+ messages in thread
From: Jean-Christophe Haessig @ 2008-01-12 21:29 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 916 bytes --]
Le samedi 12 janvier 2008 à 16:12 +0100, Robert Millan a écrit :
> Try latest CVS.
Done, but no success.
> You'll still have to add "pc" (or "gpt") module manually (--modules parameter).
These modules are for grub itself, right ? My problems seem to be
caused by the installer. I can boot my system from a GRUB floppy
by issuing the correct commands.
When I try to install GRUB on the hard disk, the installer writes in the
MBR (first block), the second block, and a number of subsequent blocks
(this seems to be the grub image). The LVM metadata is overwritten by
this. Isn't the installer supposed to detect where it can safely write ?
Thanks,
JC
--
AVIS : Falsifier le contenu et usurper l'identité des auteurs des courriers
électroniques étant simplissime, j'exhorte mes correspondants à utiliser un
logiciel de signature électronique. Lire : http://openpgp.vie-privee.org/
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: (still ?) root on LVM problems
2008-01-12 21:29 ` Jean-Christophe Haessig
@ 2008-01-12 23:26 ` Robert Millan
2008-01-13 0:12 ` Jean-Christophe Haessig
0 siblings, 1 reply; 11+ messages in thread
From: Robert Millan @ 2008-01-12 23:26 UTC (permalink / raw)
To: The development of GRUB 2
On Sat, Jan 12, 2008 at 10:29:43PM +0100, Jean-Christophe Haessig wrote:
> Le samedi 12 janvier 2008 à 16:12 +0100, Robert Millan a écrit :
>
> > Try latest CVS.
>
> Done, but no success.
>
> > You'll still have to add "pc" (or "gpt") module manually (--modules parameter).
>
> These modules are for grub itself, right ? My problems seem to be
> caused by the installer. I can boot my system from a GRUB floppy
> by issuing the correct commands.
> When I try to install GRUB on the hard disk, the installer writes in the
> MBR (first block), the second block, and a number of subsequent blocks
> (this seems to be the grub image). The LVM metadata is overwritten by
> this. Isn't the installer supposed to detect where it can safely write ?
Try re-running grub-setup with verbose flag on, and see what it prints.
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: (still ?) root on LVM problems
2008-01-12 23:26 ` Robert Millan
@ 2008-01-13 0:12 ` Jean-Christophe Haessig
2008-01-13 10:57 ` Robert Millan
0 siblings, 1 reply; 11+ messages in thread
From: Jean-Christophe Haessig @ 2008-01-13 0:12 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]
Le dimanche 13 janvier 2008 à 00:26 +0100, Robert Millan a écrit :
> Try re-running grub-setup with verbose flag on, and see what it prints.
orion:/test/grub2# /usr/local/sbin/grub-setup --verbose '(hd1)'
grub-setup: info: prefix = /grub
grub-setup: info: changing current directory to /dev/mapper
grub-setup: info: getting the size of /boot/grub/boot.img
grub-setup: info: reading /boot/grub/boot.img
grub-setup: info: getting the size of /boot/grub/boot.img
grub-setup: info: getting the size of /boot/grub/core.img
grub-setup: info: reading /boot/grub/core.img
grub-setup: info: getting the size of /boot/grub/core.img
grub-setup: info: the size of hd1 is 40088160
grub-setup: info: setting the root device to `vg0-boot'
grub-setup: info: opening the device `/dev/hdc'
grub-setup: info: will embed the core image into after the MBR
grub-setup: info: dos partition is -2, bsd partition is -2, prefix is
(vg0-boot)/grub
grub-setup: info: opening the device `/dev/hdc'
grub-setup: info: opening the device `/dev/hdc'
grub-setup: info: opening the device `/dev/hdc'
grub-setup: info: opening the device `/dev/hdc'
What is this stuff about dos and bsd partitions ? There are no dos nor
bsd partitions on that disk.
Grub-setup states that it "will embed the core image into after the
MBR", which I believe is bad, since the lvm data is here.
Thanks,
JC
--
AVIS : Falsifier le contenu et usurper l'identité des auteurs des courriers
électroniques étant simplissime, j'exhorte mes correspondants à utiliser un
logiciel de signature électronique. Lire : http://openpgp.vie-privee.org/
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: (still ?) root on LVM problems
2008-01-13 0:12 ` Jean-Christophe Haessig
@ 2008-01-13 10:57 ` Robert Millan
2008-01-13 12:12 ` Jean-Christophe Haessig
0 siblings, 1 reply; 11+ messages in thread
From: Robert Millan @ 2008-01-13 10:57 UTC (permalink / raw)
To: The development of GRUB 2
On Sun, Jan 13, 2008 at 01:12:42AM +0100, Jean-Christophe Haessig wrote:
> Le dimanche 13 janvier 2008 à 00:26 +0100, Robert Millan a écrit :
>
> > Try re-running grub-setup with verbose flag on, and see what it prints.
>
> orion:/test/grub2# /usr/local/sbin/grub-setup --verbose '(hd1)'
> grub-setup: info: prefix = /grub
> grub-setup: info: changing current directory to /dev/mapper
> grub-setup: info: getting the size of /boot/grub/boot.img
> grub-setup: info: reading /boot/grub/boot.img
> grub-setup: info: getting the size of /boot/grub/boot.img
> grub-setup: info: getting the size of /boot/grub/core.img
> grub-setup: info: reading /boot/grub/core.img
> grub-setup: info: getting the size of /boot/grub/core.img
> grub-setup: info: the size of hd1 is 40088160
> grub-setup: info: setting the root device to `vg0-boot'
> grub-setup: info: opening the device `/dev/hdc'
> grub-setup: info: will embed the core image into after the MBR
> grub-setup: info: dos partition is -2, bsd partition is -2, prefix is
> (vg0-boot)/grub
> grub-setup: info: opening the device `/dev/hdc'
> grub-setup: info: opening the device `/dev/hdc'
> grub-setup: info: opening the device `/dev/hdc'
> grub-setup: info: opening the device `/dev/hdc'
>
> What is this stuff about dos and bsd partitions ? There are no dos nor
> bsd partitions on that disk.
Don't worry about that, it's just unfortunate naming.
> Grub-setup states that it "will embed the core image into after the
> MBR", which I believe is bad, since the lvm data is here.
LVM doesn't reserve any space at the beginning of its partitions? Most
filesystems do.
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: (still ?) root on LVM problems
2008-01-13 10:57 ` Robert Millan
@ 2008-01-13 12:12 ` Jean-Christophe Haessig
2008-01-13 13:52 ` Robert Millan
0 siblings, 1 reply; 11+ messages in thread
From: Jean-Christophe Haessig @ 2008-01-13 12:12 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 895 bytes --]
Le dimanche 13 janvier 2008 à 11:57 +0100, Robert Millan a écrit :
> LVM doesn't reserve any space at the beginning of its partitions? Most
> filesystems do.
I created a new empty volume group with an empty disk to do some
testing. The lvm label identifying physical disks can be put in
sector 0, 1, 2 or 3 (default 1). Grub needs the MBR and one sector
for its "boot image", so that's okay.
However, LVM metadata starts at block 5 and apparently spans all
the way down to the first logical volume, so there's no room
for the core image. Would it be possible to create a small LV at
the beginning of the disk and put the image there ?
--
AVIS : Falsifier le contenu et usurper l'identité des auteurs des courriers
électroniques étant simplissime, j'exhorte mes correspondants à utiliser un
logiciel de signature électronique. Lire : http://openpgp.vie-privee.org/
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: (still ?) root on LVM problems
2008-01-13 12:12 ` Jean-Christophe Haessig
@ 2008-01-13 13:52 ` Robert Millan
2008-01-13 20:09 ` Jean-Christophe Haessig
0 siblings, 1 reply; 11+ messages in thread
From: Robert Millan @ 2008-01-13 13:52 UTC (permalink / raw)
To: The development of GRUB 2
On Sun, Jan 13, 2008 at 01:12:44PM +0100, Jean-Christophe Haessig wrote:
> Le dimanche 13 janvier 2008 à 11:57 +0100, Robert Millan a écrit :
>
> > LVM doesn't reserve any space at the beginning of its partitions? Most
> > filesystems do.
>
> I created a new empty volume group with an empty disk to do some
> testing. The lvm label identifying physical disks can be put in
> sector 0, 1, 2 or 3 (default 1). Grub needs the MBR and one sector
> for its "boot image", so that's okay.
> However, LVM metadata starts at block 5 and apparently spans all
> the way down to the first logical volume, so there's no room
> for the core image. Would it be possible to create a small LV at
> the beginning of the disk and put the image there ?
What happens if you comment out the "must_embed = 1" line?
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: (still ?) root on LVM problems
2008-01-13 13:52 ` Robert Millan
@ 2008-01-13 20:09 ` Jean-Christophe Haessig
2008-01-13 21:29 ` Jean-Christophe Haessig
0 siblings, 1 reply; 11+ messages in thread
From: Jean-Christophe Haessig @ 2008-01-13 20:09 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 902 bytes --]
Le dimanche 13 janvier 2008 à 14:52 +0100, Robert Millan a écrit :
> What happens if you comment out the "must_embed = 1" line?
orion:/test/grub2# /usr/local/sbin/grub-setup --verbose '(hd1)'
grub-setup: info: prefix = /grub
grub-setup: info: changing current directory to /dev/mapper
grub-setup: info: getting the size of /boot/grub/boot.img
grub-setup: info: reading /boot/grub/boot.img
grub-setup: info: getting the size of /boot/grub/boot.img
grub-setup: info: getting the size of /boot/grub/core.img
grub-setup: info: reading /boot/grub/core.img
grub-setup: info: getting the size of /boot/grub/core.img
grub-setup: error: unknown device
--
AVIS : Falsifier le contenu et usurper l'identité des auteurs des courriers
électroniques étant simplissime, j'exhorte mes correspondants à utiliser un
logiciel de signature électronique. Lire : http://openpgp.vie-privee.org/
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: (still ?) root on LVM problems
2008-01-13 20:09 ` Jean-Christophe Haessig
@ 2008-01-13 21:29 ` Jean-Christophe Haessig
0 siblings, 0 replies; 11+ messages in thread
From: Jean-Christophe Haessig @ 2008-01-13 21:29 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 819 bytes --]
Le dimanche 13 janvier 2008 à 21:09 +0100, Jean-Christophe Haessig a
écrit :
> Le dimanche 13 janvier 2008 à 14:52 +0100, Robert Millan a écrit :
>
> > What happens if you comment out the "must_embed = 1" line?
>
> orion:/test/grub2# /usr/local/sbin/grub-setup --verbose '(hd1)'
[…]
> grub-setup: error: unknown device
I looked for where the error came from (kern/device.c) and
printf'ed the device name : vgT-boot, which is the name
of the logical volume containing /boot for my tests.
Of course, this is no physical device Grub can make use of…
JC
--
AVIS : Falsifier le contenu et usurper l'identité des auteurs des courriers
électroniques étant simplissime, j'exhorte mes correspondants à utiliser un
logiciel de signature électronique. Lire : http://openpgp.vie-privee.org/
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-01-13 21:46 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-12 14:01 (still ?) root on LVM problems Jean-Christophe Haessig
2008-01-12 15:04 ` Robert Millan
2008-01-12 15:12 ` Robert Millan
2008-01-12 21:29 ` Jean-Christophe Haessig
2008-01-12 23:26 ` Robert Millan
2008-01-13 0:12 ` Jean-Christophe Haessig
2008-01-13 10:57 ` Robert Millan
2008-01-13 12:12 ` Jean-Christophe Haessig
2008-01-13 13:52 ` Robert Millan
2008-01-13 20:09 ` Jean-Christophe Haessig
2008-01-13 21:29 ` Jean-Christophe Haessig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.