* [linux-lvm] LVM rootfs and cramfs as ramdisk
@ 2003-01-29 15:21 Jan H. van Gils
2003-01-30 18:01 ` Francis SOUYRI
0 siblings, 1 reply; 4+ messages in thread
From: Jan H. van Gils @ 2003-01-29 15:21 UTC (permalink / raw)
To: linux-lvm
Hi,
First some thinks I found out.
When you create with lvmcreate_initrd the /boot/initrd-lvm-<kernel> file
the file is an ext2 filesystem. On a debian distro that wil give you problems
because the kernel expects a cramfs as ramdisk file.
Here is a work around I found :
mount the /boot/initrd-lvm-<kernel> file
mount -t ext2 -o loop /boot/initrd-lvm-<kernel> /mnt
copy the file to temporary working directory
cd /mnt; find . -print | cpio -udmp /var/tmp/lvm
dismount the /mnt file system and mount the kernel original
mount -t cramfs -o loop /boot/initrd.img-<kernel>
cd /mnt; find . -print | cpio -udmp /var/tmp/lvm
now create the new cramfs initrd file
cd /var/tmp; mkcramfs lvm/ initrd.cramfs
make sure the owner and group member are root <chown -R root:root initrd.cramfs)
To be sure you can check the initrd.cramfs with cramfsck -v initrd.cramfs.
Now I am wondering about one thing ? cramfs is a readonly filesystem
when the system boot it executes a vgscan and that creates a
"/etc/lvmtab" and "/etc/lvmtab.d" successfully created".
But because the cramfs is readonly, wil this not be an impossibility,
and is the cramfs ramdisk file not possible@all !!
Please responce on this subject.
Greetz, Jan
--
With regards Jan H. van Gils
Internet web-page http://www.VGNet.NL/
Internet e-mail address JanVG@VGNet.NL
RIPE Whois JHG5-RIPE, 6BONE Whois JHG1-6BONE
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] LVM rootfs and cramfs as ramdisk
2003-01-29 15:21 [linux-lvm] LVM rootfs and cramfs as ramdisk Jan H. van Gils
@ 2003-01-30 18:01 ` Francis SOUYRI
2003-02-01 15:37 ` Jan H. van Gils
0 siblings, 1 reply; 4+ messages in thread
From: Francis SOUYRI @ 2003-01-30 18:01 UTC (permalink / raw)
To: linux-lvm
Hi Jan,
You need "/etc" in rw for this you can mount "/etc" in the "linuxrc"
script using a tmpfs filesystem like this:
/#!/bin/sh
...
mount -t tmpfs none /etc
mount -t proc none /proc
echo "Scanning for Volume Groups..."
/sbin/vgscan
echo "Activating Volume Groups"
/sbin/vgchange -a y
...
umount /proc
umount /etc
/
I used "romfs" for the "initrd" ramdisk.
Best regards.
Francis
Jan H. van Gils wrote:
> Hi,
>
>First some thinks I found out.
>
>When you create with lvmcreate_initrd the /boot/initrd-lvm-<kernel> file
>the file is an ext2 filesystem. On a debian distro that wil give you problems
>because the kernel expects a cramfs as ramdisk file.
>
>Here is a work around I found :
>
>mount the /boot/initrd-lvm-<kernel> file
>mount -t ext2 -o loop /boot/initrd-lvm-<kernel> /mnt
>
>copy the file to temporary working directory
>cd /mnt; find . -print | cpio -udmp /var/tmp/lvm
>
>dismount the /mnt file system and mount the kernel original
>mount -t cramfs -o loop /boot/initrd.img-<kernel>
>cd /mnt; find . -print | cpio -udmp /var/tmp/lvm
>
>now create the new cramfs initrd file
>cd /var/tmp; mkcramfs lvm/ initrd.cramfs
>make sure the owner and group member are root <chown -R root:root initrd.cramfs)
>
>To be sure you can check the initrd.cramfs with cramfsck -v initrd.cramfs.
>
>Now I am wondering about one thing ? cramfs is a readonly filesystem
>when the system boot it executes a vgscan and that creates a
>"/etc/lvmtab" and "/etc/lvmtab.d" successfully created".
>
>But because the cramfs is readonly, wil this not be an impossibility,
>and is the cramfs ramdisk file not possible at all !!
>
>Please responce on this subject.
>
>Greetz, Jan
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [linux-lvm] LVM rootfs and cramfs as ramdisk
2003-01-30 18:01 ` Francis SOUYRI
@ 2003-02-01 15:37 ` Jan H. van Gils
2003-02-04 0:02 ` Francis SOUYRI
0 siblings, 1 reply; 4+ messages in thread
From: Jan H. van Gils @ 2003-02-01 15:37 UTC (permalink / raw)
To: francis.souyri; +Cc: linux-lvm
>
>Hi Jan,
Hi Francis,
>
>You need "/etc" in rw for this you can mount "/etc" in the "linuxrc"
>script using a tmpfs filesystem like this:
>
Thanks for the information.
I was already wondering if I was the only one with this problem.
But what about the init files that are normaly in "/etc" ?
I can imagion that a tmpfs is an empty filesystem.
Or do I not fully understand what you mount option does ?
>/#!/bin/sh
>...
>mount -t tmpfs none /etc
>mount -t proc none /proc
>echo "Scanning for Volume Groups..."
>/sbin/vgscan
>echo "Activating Volume Groups"
>/sbin/vgchange -a y
>...
>umount /proc
>umount /etc
>/
>I used "romfs" for the "initrd" ramdisk.
>
>Best regards.
>
>Francis
>
With regards Jan
----
With regards Jan H. van Gils
Internet web-page http://www.Knoware.NL/users/janvg/
Internet e-mail address JanVG@Knoware.NL
RIPE Whois JHG5-RIPE, 6BONE Whois JHG1-6BONE
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] LVM rootfs and cramfs as ramdisk
2003-02-01 15:37 ` Jan H. van Gils
@ 2003-02-04 0:02 ` Francis SOUYRI
0 siblings, 0 replies; 4+ messages in thread
From: Francis SOUYRI @ 2003-02-04 0:02 UTC (permalink / raw)
To: linux-lvm
Hi Jan,
On my system lvm driver is in the kernel (no module).
/#!/bin/sh
I mount /etc with a tmpfs to have /etc in rw (I do not need the
"/etc/fstab").
mount -t tmpfs none /etc
Now I mount /proc because "vgscan" need to access "/proc/partitions" (I
do not need the "/etc/fstab").
mount -t proc none /proc
Finaly I can scan for the volume groups and activate these volume groups.
echo "Scanning for Volume Groups..."
/sbin/vgscan
echo "Activating Volume Groups"
/sbin/vgchange -a y
I umount /proc and /etc because, I do not need now the "/etc" (you need
to do a vgscan in the startup script of your system to update the
"/etc/lvm*" files in the real "/etc"), and the kernel after the mount of
the real / mount the /proc.
umount /proc
umount /etc
I do not need any files in the "/etc" I only need to create temporaries
files with vgscan.
Best regards.
Francis
Jan H. van Gils wrote:
>>Hi Jan,
>>
>>
>
>Hi Francis,
>
>
>
>>You need "/etc" in rw for this you can mount "/etc" in the "linuxrc"
>>script using a tmpfs filesystem like this:
>>
>>
>>
>
>Thanks for the information.
>I was already wondering if I was the only one with this problem.
>
>But what about the init files that are normaly in "/etc" ?
>I can imagion that a tmpfs is an empty filesystem.
>Or do I not fully understand what you mount option does ?
>
>
>
>>/#!/bin/sh
>>...
>>mount -t tmpfs none /etc
>>mount -t proc none /proc
>>echo "Scanning for Volume Groups..."
>>/sbin/vgscan
>>echo "Activating Volume Groups"
>>/sbin/vgchange -a y
>>...
>>umount /proc
>>umount /etc
>>/
>>I used "romfs" for the "initrd" ramdisk.
>>
>>Best regards.
>>
>>Francis
>>
>>
>>
>
>With regards Jan
>
>
>----
>With regards Jan H. van Gils
>Internet web-page http://www.Knoware.NL/users/janvg/
>Internet e-mail address JanVG@Knoware.NL
>RIPE Whois JHG5-RIPE, 6BONE Whois JHG1-6BONE
>
>
>_______________________________________________
>linux-lvm mailing list
>linux-lvm@sistina.com
>http://lists.sistina.com/mailman/listinfo/linux-lvm
>read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-02-04 0:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-29 15:21 [linux-lvm] LVM rootfs and cramfs as ramdisk Jan H. van Gils
2003-01-30 18:01 ` Francis SOUYRI
2003-02-01 15:37 ` Jan H. van Gils
2003-02-04 0:02 ` Francis SOUYRI
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox