I'm _not_ keeping up with Cooker and the latest betas, due to a small pipe.

However, I've had someone send me the mkinitrd from a recent beta (pre RC1) 
and it seems this still hasn't been addressed.

if [ "$rootfs" != "ext3" -a -z "$rootfsopts" -a -n "$ifneeded" -a -z 
"$MODULES" -a -z "$splash" ]; then
    if [ -n "$verbose" ]; then
        echo "Rootfs is not ext3, there is no rootfs special options, and"
        echo "no modules are needed -- not building initrd image."
    fi
    exit 0
fi

This assumes that if the rootfs is ext3 then an initrd is needed.  Presumably 
because Mandrake patched ext3 into kernels long before it got incorporated at 
or around 2.4.15, and you assume that if ext3 exists it's because the user is 
using one of your kernels, and that it was compiled with ext3 as a module.  
Looks to me like this hard coding for ext3 was a quick kludge which has 
outlived its usefulness.

The problem is that if someone compiles a recent kernel, has an ext3 rootfs, 
and said filesystem is compiled into the kernel; when the user employs"make 
install" to install it, your installkernel script calls mkinitrd (with the 
correct --ifneeded switch) and the above logic dictates that mkinitrd will 
create an initrd to load ext3, even though it's totally useless in this case. 
 (Not harmful; just useless.)

This was a source of concern to me in trying to compile a kernel for which no 
initrd was necessary.  I kept getting one, no matter what.  I finally mounted 
one to see what was in there, and puzzled this out.

I'm not sure what the best all things to all people solution is.  Maybe 
you'll feel some need to support older, patched kernels or whatever.  My own 
fix was:

if [ -z "$rootfsopts" -a -n "$ifneeded" -a -z "$MODULES" -a -z "$splash" ]; 
then
    if [ -n "$verbose" ]; then
        echo "There are no rootfs special options, and no modules are needed."
        echo "-- not building initrd image."
    fi
    exit 0
fi

Just tested.  Worked as designed.  No initrd was created, no reference to 
such in /etc/lilo.conf, and all is well.  For me anyway.  Guess I should try 
with ext3 compiled as module, but it looks like it would catch that and deal 
with it appropriately.

-- 
Michael McIntyre  zone 6b in SW VA
Silvan Pagan
umount /mnt/windows;mke2fs /dev/hde1;tune2fs -j /dev/hde1
www.geocities.com/Paris/Rue/5407/index.html

Reply via email to