I thought, I try it with new mkinitrd and new way how it handles devfs 
(Chmouel, what is this magic handledevfs in nash? What it does - or, 
better, how?) I had LVM volume so I formatted it (as Reiser), installed 
minimal number of packages, setup lilo to boot off main cooker but with 
root on LVM volume, modified initrd - and what'd'you think? It booted 
without any error messages.

In case it helps, here are some files.

linuxrc (I obviously had to make initrd larger to put vgscan, vgchange 
and libc on it). :

#!/bin/nash

echo "Loading scsi_mod module"
insmod /lib/scsi_mod.o
echo "Loading sd_mod module"
insmod /lib/sd_mod.o
echo "Loading reiserfs module"
insmod /lib/reiserfs.o
echo "Loading lvm-mod module"
insmod /lib/lvm-mod.o
echo Mounting /proc filesystem
mount -t proc /proc /proc
echo Creating root device
#mkrootdev /dev/root
echo 0x0100 > /proc/sys/kernel/real-root-dev
/sbin/vgscan
/sbin/vgchange -a y
umount /proc
echo Mounting root filesystem
mount --ro -t reiserfs /dev/VG/1 /sysroot
pivot_root /sysroot /sysroot/initrd
echo Remounting devfs at correct place if necessary
handledevfs

lilo.conf (lilo was happy with this root):

image=/boot/vmlinuz
         label=lvm
         root=/dev/VG/1
         initrd=/boot/initrd-lvm.img
         append=" hdd=ide-scsi devfs=mount nologo"
         read-only

 From dmesg:

RAMDISK: Compressed image found at block 0
Uncompressing.................................................................................................................................done.
Freeing initrd memory: 1206k freed
VFS: Mounted root (ext2 filesystem).
Mounted devfs on /dev
SCSI subsystem driver Revision: 1.00
LVM version LVM 0.9.1_beta7(ish)  by Heinz Mauelshagen  (20 June 2001)
lvm -- Module successfully initialized
devfs: devfs_register(): device already registered: "group"
devfs: devfs_register(): device already registered: "1"
reiserfs: checking transaction log (device 3a:00) ...
Using r5 hash to sort names
ReiserFS version 3.6.25
Freeing unused kernel memory: 712k freed
Real Time Clock Driver v1.10d
scsi0 : SCSI host adapter emulation for IDE ATAPI devices
   Vendor: PHILIPS   Model: CDD3610 CD-R/RW   Rev: 3.09
   Type:   CD-ROM                             ANSI SCSI revision: 02

and from boot.log:

Sep  8 19:39:58 localhost devfsd: Started device management daemon for /dev
Sep  8 19:39:58 localhost devfsd: error calling: symlink in GLOBAL
Sep  8 19:39:58 localhost rc.sysinit: Running DevFs deamon succeeded
Sep  8 19:39:58 localhost rc.sysinit: Setting default font:  succeeded
Sep  8 19:39:58 localhost rc.sysinit: Unmounting initrd:  succeeded
Sep  8 19:39:58 localhost rc.sysinit: Configuring kernel parameters: 
succeeded
Sep  8 23:39:59 localhost date: Sat Sep  8 23:39:59 EDT 2001
Sep  8 23:39:59 localhost rc.sysinit: Setting clock : Sat Sep  8 
23:39:59 EDT 2001 succeeded
Sep  8 23:39:59 localhost rc.sysinit: Activating swap partitions:  succeeded
Sep  8 23:39:59 localhost rc.sysinit: Setting hostname localhost:  succeeded
Sep  8 23:39:59 localhost rc.sysinit: Remounting root filesystem in 
read-write mode:  succeeded
Sep  8 23:39:59 localhost vgscan: vgscan -- reading all physical volumes 
(this may take a while...)
Sep  8 23:39:59 localhost vgscan: vgscan -- found active volume group VG
Sep  8 23:39:59 localhost vgscan: vgscan -- /etc/lvmtab and 
/etc/lvmtab.d successfully created
Sep  8 23:39:59 localhost vgscan: vgscan -- WARNING: you may not have an 
actual
VGDA backup of your volume group
Sep  8 23:39:59 localhost rc.sysinit: Setting up Logical Volume 
Management: succeeded


I can run vgscan as many times as I like without any errors.

So in principle it is possible. Just how exactly is totally different 
:-) Some points:

1. Does mkrootdev handle LVM? What exactly it does?
2. If you have really many volumes - is it possible that there will be 
no space in ramdisk to create cofig files? Is it possible to limit scan 
to specific group only (i.e. tell vgscan to *not* create configuration 
for other groups). Or better yet do something like

vgscan | vgchange :-)
3. You cannot shutdown root volume but that's probably just cosmetic 
(warning on shutdown). May be sensible to filter root VG from shutdown.
4. We need static versions of vgchange and vgscan of course.

Well, I do not see any other real problems. mkrootdev is not really an 
issue; the only real is 2.

-andrej

Reply via email to