Skip to contentSkip to conversation

lvmcreate_initrd and then?

linux-lvm Richard Heider jr 2 participants 2 messages Oct 18, 1971 – Jan 30, 2000

lore
Share & tools
lore
#0 lore raw

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.

cu
Richard
--
Richard Heider http://richard.heider.de/
"The software said it requires Win95 or better, so I installed Linux."

#1 lore raw

Hi Richard,

below you find a snapshot of the current developement lvmcreate_initrd(8). Tell me if it helps...

Heinz

Quoted 15 lines

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.

Quoted 6 lines

cu
Richard
--
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 -*- .SH NAME
lvmcreate_initrd \- create an initial ramdisk to boot with root on a logical volume .SH SYNOPSIS
.B lvcmreate_initrd [KernelVersion]
.SH DESCRIPTION
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" one are:
.nf

.fi
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.
.nf

.fi
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. .nf

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"

.fi
Replace YourVG and YourRootLV by your actual volume group and root logical volume names.
In addition to that your /etc/fstab in your root logical volume has to contain:
.nf

/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

etc.

.fi
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...
.nf

.fi
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.

.SH DIAGNOSTICS
lvcmcreate_initrd return 0 for success.
1 is returned in all other cases.
.SH See also
lvm(8), pvcreate(8), vgcreate(8), lvcreate(8) .SH AUTHOR
Heinz Mauelshagen <[email protected]>

Signature · 11 lines
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement CS-TS                           T-Nova
                                                 Entwicklungszentrum Darmstadt
Heinz Mauelshagen                                Otto-Roehm-Strasse 71c
Senior Systems Engineer                          Postfach 10 05 41
                                                 64205 Darmstadt
[email protected]                      Germany
                                                 +49 6151 886-425
                                                          FAX-386
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-