linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: kernel/initrd and rootfs over LVM
  2003-10-23 16:44 kernel/initrd and rootfs over LVM Flavio Bruno Leitner
@ 2003-10-23 15:56 ` Valdis.Kletnieks
  2003-10-23 17:52   ` Flavio Bruno Leitner
  0 siblings, 1 reply; 3+ messages in thread
From: Valdis.Kletnieks @ 2003-10-23 15:56 UTC (permalink / raw)
  To: Flavio Bruno Leitner; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1142 bytes --]

On Thu, 23 Oct 2003 13:44:25 -0300, Flavio Bruno Leitner <fbl@conectiva.com.br>  said:
> 
> I'm using kernel 2.6.0-test7 and as far I understand 
> prepare_namespace() checks if saved_root_name[0] is
> not null (I'm passing root=/dev/vg0/lvroot), then
> name_to_dev_t() try to guess what MINOR and MAJOR 
> are used by the root device. 

What I ended up doing to get that working back in the 2.5.4x days was to have
my initrd's linuxrc do a 'lvm vgscan' to get the volume group online, and then
an 'lvdisplay' - this of course wedged up after it since there wasn't a proper
root=, but it revealed the numbers I needed.

As far as I can tell, if you're using the device-mapper in 2.6, you'll want
MAJOR=, and then the MINOR= seems to be stable across 2.4/2.6/lvm1/lvm2 (So if
you're building the system under 2.4 and have LVM running there, you can get
the minor number from lvdisplay there, and use it with major=254 to get your
2.6 up and running.  For lilo, I ended up using this:

        root=65029
# magic number is major=254 * 256 + minor=5

Grub you're on your own.  Yes, I should upgrade, but lilo *does* work for this machine, sooo.

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* kernel/initrd and rootfs over LVM
@ 2003-10-23 16:44 Flavio Bruno Leitner
  2003-10-23 15:56 ` Valdis.Kletnieks
  0 siblings, 1 reply; 3+ messages in thread
From: Flavio Bruno Leitner @ 2003-10-23 16:44 UTC (permalink / raw)
  To: linux-kernel


I'm using kernel 2.6.0-test7 and as far I understand 
prepare_namespace() checks if saved_root_name[0] is
not null (I'm passing root=/dev/vg0/lvroot), then
name_to_dev_t() try to guess what MINOR and MAJOR 
are used by the root device. 

Well, I can be missing something but name_to_dev_t()
does not handle lvm devices, right? 

Regards,

-- 
Flávio Bruno Leitner <fbl@conectiva.com.br>
[ E74B 0BD0 5E05 C385 239E  531C BC17 D670 7FF0 A9E0 ]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: kernel/initrd and rootfs over LVM
  2003-10-23 15:56 ` Valdis.Kletnieks
@ 2003-10-23 17:52   ` Flavio Bruno Leitner
  0 siblings, 0 replies; 3+ messages in thread
From: Flavio Bruno Leitner @ 2003-10-23 17:52 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: linux-kernel

On Thu, Oct 23, 2003 at 11:56:16AM -0400, Valdis.Kletnieks@vt.edu wrote:
> What I ended up doing to get that working back in the 2.5.4x days was to have
> my initrd's linuxrc do a 'lvm vgscan' to get the volume group online, and then
> an 'lvdisplay' - this of course wedged up after it since there wasn't a proper
> root=, but it revealed the numbers I needed.

It's an option, but I was thinking if there is no way to
name_to_dev_t() handle this case, so all rootfs devices 
will uses the same syntax.

> As far as I can tell, if you're using the device-mapper in 2.6, you'll want
> MAJOR=, and then the MINOR= seems to be stable across 2.4/2.6/lvm1/lvm2 (So if
> you're building the system under 2.4 and have LVM running there, you can get
> the minor number from lvdisplay there, and use it with major=254 to get your
> 2.6 up and running.  For lilo, I ended up using this:
> 
>         root=65029
> # magic number is major=254 * 256 + minor=5

It works too. It's just hard to upgrade many machines when you
already have root=/dev/vg../lv.. at grub config.

-- 
Flávio Bruno Leitner <fbl@conectiva.com.br>
[ E74B 0BD0 5E05 C385 239E  531C BC17 D670 7FF0 A9E0 ]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-23 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-23 16:44 kernel/initrd and rootfs over LVM Flavio Bruno Leitner
2003-10-23 15:56 ` Valdis.Kletnieks
2003-10-23 17:52   ` Flavio Bruno Leitner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).