[linux-lvm] lvmcreate_initrd and then?
mauelsha at ez-darmstadt.telekom.de
Sun Jan 30 18:07:40 UTC 2000
below you find a snapshot of the current developement lvmcreate_initrd(8).
Tell me if it helps...
> Hi all,
> I want to install my root filesystem on a LVM volume, but I am quite
> clueless about what to do with the imagefile generated by
> "lvmcreate_initrd", like how to configure LILO to use it.
> (I am using Suse 6.3 with LVM 0.8)
> Also I am not sure how to get the system installed in /dev/vg00/root in
> the first place?
> Do I have to first install a running system on a normal partition?
> I'd appreciate a short roadmap that would outline the way to get a Linux
> system boot from a LVM root volume for "semi-skilled admins :)". Keyword
> and references to existing docs are fine, of course.
> Richard Heider http://richard.heider.de/
> "The software said it requires Win95 or better, so I installed Linux."
.TH LVMCREATE_INITRD 8 "LVM TOOLS" "Heinz Mauelshagen" \" -*- nroff -*-
lvmcreate_initrd \- create an initial ramdisk to boot with root on a logical volume
.B lvcmreate_initrd [KernelVersion]
lvmcreate_initrd creates a new compressed initial ramdisk in /boot/initrd.gz.
The initial ramdisk contains all necessary binaries, shared libraries and
a linuxrc file to switch to a logical volume based root filesystem.
To build an initial ramdisk for a not running but generated kernel add
the KernelVersion parameter (for eg. 2.3.25) on the command line.
The necessary actions to change your system into a "root on logical volume"
Create a small (~20MB) partition which is bios reachable to hold the
/boot filesystem (if you already have a small partition based root filesystem
this can as well be used).
If you like to standalone boot from
this partition in case of an emergency, copy all necessary binaries and
libraries to that filesystem as well and create a corresponding /etc/lilo.conf
entry. In order to be able to edit lilo.conf in case you booted standalone,
you should move /etc/lilo.conf to /boot/lilo.conf and create a symbolic
link to it in /etc instead.
This is not needed if you have a boot/root floppy which contains the LVM
binaries and the library in addition.
Create all logical volumes you need (for root, usr, opt etc.),
create filesystems in them, mount them and transfer all files from
the partition based filesystems into the logical volumes based ones.
You have to setup your /etc/lilo.conf with a boot configuration like:
image = /boot/vmlinuz
initrd = /boot/initrd.gz
root = /dev/YourVG/YourRootLV
label = rootonlv
append = "ramdisk_size=8192"
Replace YourVG and YourRootLV by your actual volume group and root logical
In addition to that your /etc/fstab in your root logical volume has to contain:
/dev/YourVG/YourRootLV / ext2 defaults 0 1
/dev/YourBootPartition /boot ext2 defaults 0 2
/dev/YourVG/YourUsrLV /usr ext2 defaults 0 3
/dev/YourVG/YourOptLV /opt ext2 defaults 0 4
You can use other supported filesystem types as well (reiserfs for eg.) in
case you generated support for those into your kernel.
Run lilo, reboot and try...
The partitions containing the former /usr, /opt etc. filesystems can now be
used as physical volumes. pvcreate(8) them and add them for eg. to YourVG.
lvcmcreate_initrd return 0 for success.
1 is returned in all other cases.
.SH See also
lvm(8), pvcreate(8), vgcreate(8), lvcreate(8)
Heinz Mauelshagen <linux-lvm at ez-darmstadt.telekom.de>
Systemmanagement CS-TS T-Nova
Heinz Mauelshagen Otto-Roehm-Strasse 71c
Senior Systems Engineer Postfach 10 05 41
mge at EZ-Darmstadt.Telekom.de Germany
+49 6151 886-425
More information about the linux-lvm