On Tue, Mar 05, 2002 at 05:06:51PM +0300, Borsenkow Andrej wrote: > > I remember asking you (about a year ago) to send or make available this > patch to look at it. I never got any reply.
If you asked for it, I am sure I would have sent it. In any case, find below two patches. One is to "gi" the graphical installer and the other is to the mkinitrd SRPM. I have uncompressed the lvm patch to mkinitrd so that it comes through e-mail well enough. I have not tested the "gi" in quite some time, so it is possible that some other code added to it is interacting with small change I have made. If you figure out what is causing the /dev/dev/... in the installer (drakx) please let me know. b. -- Brian J. Murrell
Index: perl-install/devices.pm
===================================================================
RCS file: /cooker/gi/perl-install/devices.pm,v
retrieving revision 1.53
diff -u -r1.53 devices.pm
--- perl-install/devices.pm 2002/02/23 17:14:48 1.53
+++ perl-install/devices.pm 2002/03/05 19:41:04
@@ -70,7 +70,15 @@
my ($type, $major, $minor);
local ($_) = @_;
- if (/^0x([\da-f]{3,4})$/i) {
+ # some checks might want stat info
+ ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime,
+ $ctime,$blksize,$blocks) = stat ("/dev/$_");
+ if ($rdev >> 8 == 58) {
+ # see if it's an LVM device first
+ $type = c::S_IFBLK();
+ $major = $rdev >> 8;
+ $minor = $rdev & 0xff;
+ } elsif (/^0x([\da-f]{3,4})$/i) {
$type = c::S_IFBLK();
($major, $minor) = unmakedev(hex $1);
} elsif (/^sd(.)(\d{0,2})/) {
Index: perl-install/fsedit.pm
===================================================================
RCS file: /cooker/gi/perl-install/fsedit.pm,v
retrieving revision 1.141
diff -u -r1.141 fsedit.pm
--- perl-install/fsedit.pm 2002/02/20 13:10:53 1.141
+++ perl-install/fsedit.pm 2002/03/05 19:41:05
@@ -480,7 +480,7 @@
die "raid / with no /boot"
if $mntpoint eq "/" && isRAID($part) && !has_mntpoint("/boot", $all_hds);
die _("You can't use a LVM Logical Volume for mount point %s", $mntpoint)
- if ($mntpoint eq '/' || $mntpoint eq '/boot') && isLVM($hd);
+ if ($mntpoint eq '/boot') && isLVM($hd);
die _("This directory should remain within the root filesystem")
if member($mntpoint, qw(/bin /dev /etc /lib /sbin));
die _("You need a true filesystem (ext2, reiserfs) for this mount point\n")
diff -uNr mkinitrd/SOURCES/mkinitrd-lvm.patch
mkinitrd-ilinx-3.1.6-26mdk/SOURCES/mkinitrd-lvm.patch
--- mkinitrd/SOURCES/mkinitrd-lvm.patch Wed Dec 31 19:00:00 1969
+++ mkinitrd-ilinx-3.1.6-26mdk/SOURCES/mkinitrd-lvm.patch Sat Feb 16 22:37:51
+2002
@@ -0,0 +1,45 @@
+--- mkinitrd.old Tue Sep 11 23:10:45 2001
++++ mkinitrd Tue Sep 11 23:13:33 2001
+@@ -395,6 +395,15 @@
+ rootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $3; }}' $fstab)
+ rootfsopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/" && $6) { print $4; }}' $fstab
+| sed "s|defaults||;s|auto||;s|loop||;s|,,|,|;s|,$||;s|^,||")
+
++rootdev=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $1; }}' $fstab)
++root_major=$(ls -l $rootdev | awk '{ print $5}')
++
++if [ $root_major = 58, ]; then
++# root is on an LVM LV
++ lvmroot=1
++ findmodule lvm-mod
++fi
++
+ # in case the root filesystem is modular
+ findmodule -${rootfs}
+
+@@ -483,6 +490,13 @@
+ inst /sbin/insmod.static "$MNTIMAGE/bin/insmod"
+ fi
+ ln -s ../bin/nash $MNTIMAGE/sbin/modprobe
++if [ -n "$lvmroot" ]; then
++ INITRDFILES="/sbin/vgchange /sbin/vgscan"
++ cp -aL /sbin/vgchange $MNTIMAGE/sbin
++ cp -aL /sbin/vgscan $MNTIMAGE/sbin
++ cp -aL /lib/libc.so.6 $MNTIMAGE/lib
++ cp -aL /lib/ld-linux.so.2 $MNTIMAGE/lib
++fi
+
+ for MODULE in $MODULES; do
+ f="/lib/modules/$kernel/$MODULE"
+@@ -451,6 +466,12 @@
+ else
+ # Linux-2.4
+ echo "echo 0x0100 > /proc/sys/kernel/real-root-dev" >> $RCFILE
++if [ -n "$lvmroot" ]; then
++ echo "echo Configuring LVM" >> $RCFILE
++ echo "/sbin/vgscan" >> $RCFILE
++ echo "/sbin/vgchange -a y" >> $RCFILE
++ IMAGESIZE=$[IMAGESIZE + 5000]
++fi
+ echo "umount /proc" >> $RCFILE
+
+ echo "echo Mounting root filesystem" >> $RCFILE
Binary files mkinitrd/SOURCES/mkinitrd-lvm.patch.bz2~ and
mkinitrd-ilinx-3.1.6-26mdk/SOURCES/mkinitrd-lvm.patch.bz2~ differ
diff -uNr mkinitrd/SPECS/mkinitrd.spec mkinitrd-ilinx-3.1.6-26mdk/SPECS/mkinitrd.spec
--- mkinitrd/SPECS/mkinitrd.spec Fri Feb 8 12:11:40 2002
+++ mkinitrd-ilinx-3.1.6-26mdk/SPECS/mkinitrd.spec Sat Feb 16 19:53:15 2002
@@ -17,6 +17,7 @@
Patch2: mkinitrd-3.1.6-mdkize-nash.patch.bz2
Patch3: mkinitrd-3.1.6-shutup-insmod-busybox.patch.bz2
Patch4: mkinitrd-3.1.6-splash-3.patch.bz2
+Patch5: mkinitrd-lvm.patch.bz2
Requires: mktemp >= 1.5-9mdk e2fsprogs /bin/sh fileutils grep mount gzip tar
findutils >= 4.1.7-3mdk gawk
%ifnarch %{ix86}
@@ -46,6 +47,7 @@
%patch2 -p0
%patch3 -p0
%patch4 -p1 -b .splash
+%patch5 -p0
%build
make
@@ -72,6 +74,9 @@
%{_mandir}/*/*
%changelog
+* Sat Feb 16 2002 Brian J. Murrell <[EMAIL PROTECTED]> 3.1.6-26mdk
+- add patch to mount lvm root
+
* Fri Feb 8 2002 Chmouel Boudjnah <[EMAIL PROTECTED]> 3.1.6-26mdk
- Add themes support to splash.
msg58587/pgp00000.pgp
Description: PGP signature
