[PATCH] Load the ext2 module so mkinitrd works on RHEL 3
--- appliance/init | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/appliance/init b/appliance/init index fe135b4..053ef36 100755 --- a/appliance/init +++ b/appliance/init @@ -39,6 +39,9 @@ fi modprobe dm_mod ||: +# For mkinitrd on RHEL 3 +modprobe ext2 + ifconfig lo 127.0.0.1 ifconfig eth0 10.0.2.10 route add default gw 10.0.2.2 -- 1.6.2.5
On Tue, Aug 18, 2009 at 12:12:31PM +0100, Matthew Booth wrote:
--- appliance/init | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/appliance/init b/appliance/init index fe135b4..053ef36 100755 --- a/appliance/init +++ b/appliance/init @@ -39,6 +39,9 @@ fi
modprobe dm_mod ||:
+# For mkinitrd on RHEL 3 +modprobe ext2 + ifconfig lo 127.0.0.1 ifconfig eth0 10.0.2.10 route add default gw 10.0.2.2
Hmm .. why doesn't udev load this? I've used RHEL 3 guests fine from libguestfs before, so I don't understand why they don't work now. It's best to find out what the regression is, rather than hack it. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
For the record, Matthew Booth tracked this down: The problem was running mkinitrd in the RHEL 3 guest. This uses the RHEL 3 /bin/mount command to mount an ext2 filesystem. This old command was unable to modprobe missing modules, so if the ext2 module wasn't loaded it would simply give up. Now, if you mount any ext2 filesystem first, then the module gets loaded. The reason is that this uses the appliance /bin/mount which modprobes the required modules. RHEL 3 used ext3 filesystems, so ext2.ko was never loaded. The mkinitrd only uses ext2 for some temporary loopback mount, but that was sufficient to cause the failure. The solution will be to expose a guestfs_modprobe command so that callers can ensure the correct kernel modules are loaded so that an external command can complete. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
participants (2)
-
Matthew Booth -
Richard W.M. Jones