[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LVM enabled boot disks ?



Hi Erik,

I'm still preparing some documentation, but here's the rough procedure.
I'm sending a copy to debian-boot in case this is useful to anyone else.

Check the boot-floppies software out of the Debian CVS archive. See
http://cvs.debian.org/boot-floppies/README-CVS?rev=1.9&content-type=text/vnd.viewcvs-markup&cvsroot=debian-boot
for details on how to do this.

The version I checked out was the same as, or close to, what ended up being
release 3.0.16 of the boot-floppies package.

http://lists.debian.org/debian-boot/2001/debian-boot-200110/msg00987.html
details some modifications to the boot-floppies source so that dbootstrap
will wait until installing the kernel before copying the network settings
onto the target root filesystem and creating the dbootstrap_settings
file.  This is important if the root filesystem is to be mounted outside
dbootstrap.

Make an LVM-patched 2.4.10-ac11 (a later kernel might be better by now)
kernel-image Debian package with the 'kernel-package' package.

In boot-floppies/config, set the variable 'kver' to "2.4.10-ac11", or
whatever you named your kernel.

Copy the kernel-image package (that you just built) and the lvm10 package
(from the Debian unstable archive) into sub-directory 'local' of the
directory used for 'ftp_archive' in the file boot-floppies/config.

Add "lvm10" to boot-floppies/scripts/rootdisk/EXTRACT_LIST_i386.
Add "lib/lvm-10/vgscan", "lib/lvm-10/vgchange" and "lib/lvm-10/lvscan"
to boot-floppies/scripts/rootdisk/SMALL_BASE_LIST_i386.

The boot-floppies were otherwise built as normal - see the README files
in the source for details on how to do this.  I think I skipped the
1.2MB floppy images, since the root floppy got too big with the LVM tools.

Boot and go through the installer until you have created your partitions,
then choose "Execute a Shell".  The LVM tools will be in /lib/lvm-10; run
vgscan then pvcreate, lvcreate, etc.

Make filesystems on your LVs as required, then mount them in your desired
structure below /target.  For example:

	mount /dev/vg0/lv0 /target
	mkdir /target/tmp /target/usr /target/var /target/home
	chmod 1777 /target/tmp
	mount /dev/vg0/lv1 /target/tmp
	mount /dev/vg0/lv2 /target/usr
	mount /dev/vg0/lv3 /target/var
	mkdir /target/var/log /target/var/lib
	mount /dev/vg0/lv5 /target/var/log
	mount /dev/vg0/lv6 /target/var/lib
	mount /dev/vg0/lv7 /target/home

Exit the shell to return to the installer and continue from "Install
Kernel and Driver Modules".  The rest of the install should proceed
normally, but if /boot is on a LVM logical volume, you won't be able
to use "Make System Bootable" without a patched LILO, an initrd and
some adjustment to /target/etc/lilo.conf.  (In you do this, I recommend
making a boot floppy, as initrd's are easy to get wrong and it's much
easier to fix an initrd on a floppy and transfer it to the hard disk
once it's working.)

Hope this is what you wanted.  There may be errors, as I haven't yet
done a clean run though to test the procedure.  If you find any errors
or omissions, please let me know.

Regards,

Mark.



Reply to: