All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] No Subject
@ 2004-01-14 18:23 trylinux
  2004-01-15  8:49 ` Ken Fuchs
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: trylinux @ 2004-01-14 18:23 UTC (permalink / raw)
  To: linux-lvm; +Cc: trylinux

First things first. Is there a FAQ for this group?

Now then, I'm running Fedore Core/1 (Red Hat 9) with LVM 1.0.3-13 (or at
least RPM says it's 1.0.3). I have a single volume group containing a single
disk. While /boot is NOT in the volume group (for obvious reasons),
everything else, include / is. / is a ext3 filesystem.

I recently used vgrename to rename the volume group (from rootvol to rootvg
-- just a test to learn some more), and it seemed to succeed. I was able to
run afterwards with no problems. On the first reboot after this, though, my
system can no longer boot. Here's a rough transscription of what's going on:

...kernel booting/initializing...
Loading lvm-mod.o module
LVM version 1.0.5+(22/07/2002) module loaded
Loading jbd.o module
Journalled Block Device driver loaded
Loading ext3.o module
Mounting /proc filesystem
Creating block devices
Scanning logical volumes
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- found inactive volume group "rootvg"
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
vgscan -- WARNING: This program does not do a BGDA backup of your volume
group

Activating logical volumes
vgchange -- volume group "rootvg" successfully activated

Mounting root filesystem
mount: error 2 mounting ext3
pivotroot: pivot_root(/sysroot,/sysroot/initrt) failed: 2
umount /initrd/proc failed: 2
Freeing unused kernel memory: 136k freed
Kernel panic: No init found. Try passing init= option to kernel.


I'd be happy to provide more info if it would help anyone. (grub.conf,
fstab,
etc.)

Cheers,
Rob

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

* Re: [linux-lvm] No Subject
  2004-01-14 18:23 [linux-lvm] No Subject trylinux
@ 2004-01-15  8:49 ` Ken Fuchs
  2004-01-15  8:49 ` Brant Katkansky
  2004-01-15  8:54 ` Luca Berra
  2 siblings, 0 replies; 6+ messages in thread
From: Ken Fuchs @ 2004-01-15  8:49 UTC (permalink / raw)
  To: linux-lvm; +Cc: trylinux

trylinux wrote:

>First things first. Is there a FAQ for this group?

http://www.tldp.org/HOWTO/LVM-HOWTO/index.html

It covers LVM 1 and has been recently updated for verion 1.0.8. 

>Now then, I'm running Fedore Core/1 (Red Hat 9) with LVM 1.0.3-13 (or at
>least RPM says it's 1.0.3). I have a single volume group containing a single
>disk. While /boot is NOT in the volume group (for obvious reasons),
>everything else, include / is. / is a ext3 filesystem.

This is a Red Hat patched version of LVM 1.0.3, but the problem is not
version related.

>I recently used vgrename to rename the volume group (from rootvol to rootvg
>-- just a test to learn some more), and it seemed to succeed. I was able to
>run afterwards with no problems. On the first reboot after this, though, my
>system can no longer boot. Here's a rough transcription of what's going on:

>Mounting root filesystem
>mount: error 2 mounting ext3
>pivotroot: pivot_root(/sysroot,/sysroot/initrt) failed: 2
>umount /initrd/proc failed: 2
>Freeing unused kernel memory: 136k freed
>Kernel panic: No init found. Try passing init= option to kernel.

Was "root=/dev/rootvol/root" changed to "root=/dev/rootvg/root" in the
/boot/grub/grub.conf file?

>I'd be happy to provide more info if it would help anyone. (grub.conf,
>fstab, etc.)

Of course the volume group name change must be done in /etc/fstab also.

Sincerely,

Ken Fuchs <kfuchs@winternet.com>

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

* Re: [linux-lvm] No Subject
  2004-01-14 18:23 [linux-lvm] No Subject trylinux
  2004-01-15  8:49 ` Ken Fuchs
@ 2004-01-15  8:49 ` Brant Katkansky
  2004-01-15 17:05   ` Ken Fuchs
  2004-01-15  8:54 ` Luca Berra
  2 siblings, 1 reply; 6+ messages in thread
From: Brant Katkansky @ 2004-01-15  8:49 UTC (permalink / raw)
  To: linux-lvm; +Cc: trylinux

On Wed, Jan 14, 2004 at 08:27:18AM -0800, trylinux wrote:

[...]

> I recently used vgrename to rename the volume group (from rootvol to rootvg
> -- just a test to learn some more), and it seemed to succeed. I was able to
> run afterwards with no problems. On the first reboot after this, though, my
> system can no longer boot. Here's a rough transscription of what's going on:

[...]

> Activating logical volumes
> vgchange -- volume group "rootvg" successfully activated
> 
> Mounting root filesystem
> mount: error 2 mounting ext3
> pivotroot: pivot_root(/sysroot,/sysroot/initrt) failed: 2
> umount /initrd/proc failed: 2
> Freeing unused kernel memory: 136k freed
> Kernel panic: No init found. Try passing init= option to kernel.

You need to rebuild the kernel initrd if you change your root device,
as the linuxrc script in the initrd has the root device hard-coded.

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

* Re: [linux-lvm] No Subject
  2004-01-14 18:23 [linux-lvm] No Subject trylinux
  2004-01-15  8:49 ` Ken Fuchs
  2004-01-15  8:49 ` Brant Katkansky
@ 2004-01-15  8:54 ` Luca Berra
  2 siblings, 0 replies; 6+ messages in thread
From: Luca Berra @ 2004-01-15  8:54 UTC (permalink / raw)
  To: linux-lvm

On Wed, Jan 14, 2004 at 08:27:18AM -0800, trylinux wrote:
>Activating logical volumes
>vgchange -- volume group "rootvg" successfully activated
>
>Mounting root filesystem
>mount: error 2 mounting ext3
>pivotroot: pivot_root(/sysroot,/sysroot/initrt) failed: 2
>umount /initrd/proc failed: 2
>Freeing unused kernel memory: 136k freed
>Kernel panic: No init found. Try passing init= option to kernel.
>
it is possible that initrd has hardcoded the device name for the root
fs? i do not know what exactly is the code in fedora's initrd.
try remaking the initrd (and be sure the fstab is correct before that)

L.

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

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

* Re: [linux-lvm] No Subject
  2004-01-15  8:49 ` Brant Katkansky
@ 2004-01-15 17:05   ` Ken Fuchs
  2004-01-16  8:57     ` Rob Cash
  0 siblings, 1 reply; 6+ messages in thread
From: Ken Fuchs @ 2004-01-15 17:05 UTC (permalink / raw)
  To: linux-lvm; +Cc: trylinux

>On Wed, Jan 14, 2004 at 08:27:18AM -0800, trylinux wrote:

>> I recently used vgrename to rename the volume group (from rootvol to rootvg
>> -- just a test to learn some more), and it seemed to succeed. I was able to
>> run afterwards with no problems. On the first reboot after this, though, my
>> system can no longer boot. Here's a rough transcription of what's going on:

>> Activating logical volumes
>> vgchange -- volume group "rootvg" successfully activated
>> 
>> Mounting root filesystem
>> mount: error 2 mounting ext3
>> pivotroot: pivot_root(/sysroot,/sysroot/initrt) failed: 2
>> umount /initrd/proc failed: 2
>> Freeing unused kernel memory: 136k freed
>> Kernel panic: No init found. Try passing init= option to kernel.

Brant Katkansky <lists@katkansky.org> wrote:

>You need to rebuild the kernel initrd if you change your root device,
>as the linuxrc script in the initrd has the root device hard-coded.

lvmcreate_initrd(8) can be used to do this, but one might learn more by
using the following manual approach.

To better understand how LVM 1 is used in mounting the root device, one
can loop mount the initrd and at least look at the current linuxrc
script and change it as needed.  Assuming the kernel has built-in ext2
support (almost always; lvmcreate_initrd creates an ext2 initrd), here
are the steps to do this (only for anyone reading who isn't sure how):

# cd /boot
# mkdir /initrd-tmp
# cp -p initrd<remainder of filename> initrd-tmp
# file initrd-tmp

If the file is gzip compressed data do the following two steps
(filesystem is probably ext2), otherwise skip them:

    # mv initrd-tmp initrd-tmp.gz
    # gunzip initrd-tmp.gz

# mount -o loop initrd-tmp /initrd-tmp
# mount | grep initrd-tmp

If the filesystem is cramfs, the following addition steps are needed to
convert the cramfs initrd to an ext2 initrd (this step shouldn't be
required since lvmcreate_initrd creates ext2 and not cramfs):

    # dd if=/dev/zero of=initrd-ext2 bs=1024 count=4096
    # mke2fs initrd-ext2
    ...
    Proceed anyway? (y,n) y
    # mkdir /initrd-ext2
    # mount -o loop initrd-ext2 /initrd-ext2
    # (cd /initrd-tmp; tar cf - .) | (cd /initrd-ext2; tar xvf -)
    # rmdir /initrd-ext2/lost+found     <initrd doesn't need it.>
    # umount /initrd-tmp
    # umount /initrd-ext2
    # mv initrd-ext2 initrd-tmp         <replace cramfs with ext2.>
    # mount -o loop initrd-tmp /initrd-tmp

Edit the /initrd-tmp/linuxrc or other parts of the initrd such as copying
filesystem modules from / to /initrd-tmp (do insmod in linuxrc):

    # emacs /initrd-tmp/linuxrc
    # cp -p /lib/modules/<version>/kernel/fs/<potential new root fs>.o \
      /initrd-tmp/lib/modules/<version>/kernel/drivers/fs/

Red Hat may use a shorter directory structure for modules in its
initrds.

Duplicate the grub/lilo boot entry that uses the original /boot/initrd*
and replace the original initrd reference in the new boot entry with
/initrd-tmp (or /boot/initrd-tmp if there is no /boot filesystem and
thus no lvm / logical volume).  Boot via the new boot entry.

Sincerely,

Ken Fuchs <kfuchs@winternet.com>

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

* Re: [linux-lvm] No Subject
  2004-01-15 17:05   ` Ken Fuchs
@ 2004-01-16  8:57     ` Rob Cash
  0 siblings, 0 replies; 6+ messages in thread
From: Rob Cash @ 2004-01-16  8:57 UTC (permalink / raw)
  To: linux-lvm

On Thu, 2004-01-15 at 18:04, Ken Fuchs wrote:
> >On Wed, Jan 14, 2004 at 08:27:18AM -0800, trylinux wrote:
> 
[...]
> Brant Katkansky <lists@katkansky.org> wrote:
> 
> >You need to rebuild the kernel initrd if you change your root device,
> >as the linuxrc script in the initrd has the root device hard-coded.
> 
> lvmcreate_initrd(8) can be used to do this, but one might learn more by
> using the following manual approach.
> 
[...]

Thanks!

Cheers,
Rob

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

end of thread, other threads:[~2004-01-16  8:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-14 18:23 [linux-lvm] No Subject trylinux
2004-01-15  8:49 ` Ken Fuchs
2004-01-15  8:49 ` Brant Katkansky
2004-01-15 17:05   ` Ken Fuchs
2004-01-16  8:57     ` Rob Cash
2004-01-15  8:54 ` Luca Berra

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.