[Rule-list] Two minor "bugs" in Slinky 0.2.3, and a kernel issue

Michael Fratoni mfratoni at tuxfan.homeip.net
Fri May 17 07:05:55 EEST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 16 May 2002 08:56 pm, Martin Stricker wrote:

Hi Martin,

> When I have to select the harddrive to partition, the message that
> /dev/hda is selected is printed twice: once without and once with
> /dev/hda mentioned.

Is this a machine with a single drive? Just checking so I can try to 
reproduce this.

> When I try to mount /dev/hda1 on /boot the output is
> Mounting /dev/hda1 on '/newroot//boot'.
> I didn't check if the mount succeded

That is correct. The install mounts everything on /newroot/
The additional / isn't a problem, so slinky prepends /newroot/ to the 
mount point, allowing the user to say 'boot' or '/boot' without causing 
mount to fail.

> Now for the kernel issue I promised:
> A fried gave me a server (the one I eventually will be able to host a
> RULE mirror on) to install enigma on it. Hardware: PIII 700 Celeron,
> Intel board, for more info I'll have to open the rack. The original
> anaconda segfaulted while trying to mount the CD-ROM. So I checked
> cables etc., nozhing. Windows 98 and S.u.S.E. Linux 7.1 (the only other
> OSes I could get a grip on short time) both installed nicely. Miniconda
> segfaulted as expected. Slinky, too, segfaulted when it came to mount
> the CD. So I investigated further: Any attempt to access the CD-ROM
> drive (regardless of what CD is in there) will segfault the first time
> (tested with both fdisk and mount), any further tries will just hang
> unkillable. I think it's an issue with the Enigma kernel since S.u.S.E
> Linux 7.1 has no problems whatsoever.

Do you have an idea as to what the problem might be? Have to tried any 
boot parameters, to see if it helps?

> Now I'm waiting desperately for
> the first Slinky version based on the valhalls boot kernel to verify
> this issue on the new version before bugzilla'ing. And it would be even
> more instesting trying a Slinky with a vanilla kernel... Michael, is
> there any chance you can make such a boot image until Tuesday? 

I can create a new slinky boot image tomorrow evening, is that soon 
enough?

> Or, even
> better, tell me how to do it myself (would be a *great* addition to the
> RULE documentation!)?

Sure, I can try. 
If this isn't clear, or you have questions, let me know. ;)

First, you need to recreate the build environment (only if you actually 
have to completely rebuild the disk, read on.). So, in a clean directory, 
make a temporary mount point, and have the boot disk image available. 
Mount the boot image on a loop device.
# mount -o loop slinky-v0.2.3.img tmpmnt/

If the new kernel isn't a lot bigger, you can just replace the vmlinuz 
file with the new version. If that's the case, you don't need to do much 
at all. Just replace the kernel on the mounted image, and unmount the 
image. Done.

Otherwise:
Copy everything off the disk. You don't need ldlinux.sys, it is created by 
syslinux when the boot image is created.
It should look like:
# ls tmpmnt/
boot.msg  ldlinux.sys  rootfs.gz  syslinux.cfg  vmlinuz

unzip the rootfs.gz file, then mount and copy the unzipped file. That will 
recreate most of the build filesystem. If you need to make space, remove 
a few things from the filesystem directory. (/usr/lib/modules, perhaps? 
Or maybe cfdisk or nano)

So (You'll need to be root, to create the device files in rootfs.gz):
# mkdir tmpmnt ; mount -o loop slinky-v0.2.3.img tmpmnt/
# cp tmpmnt/* . ; umount tmpmnt/ ; rm ldlinux.sys ; gunzip rootfs.gz ; 
mount -o loop rootfs tmpmnt/ ; mkdir filesystem ;
cp -a tmpmnt/* filesystem

cd filesystem, have a look around, and make room if you need it.

You'll need to create a directory or two to use this script, but this is 
exactly how I build the boot.img

#more makedisk.sh

#!/bin/sh
version=slinky-v0.2.3
image=${version}.img

echo "Creating boot disk."
dd if=/dev/zero of=rootfs bs=1k count=2048
if [ $? -ne 0 ]; then
    exit
fi
mkfs.ext2 -F -m 0 rootfs
if [ $? -ne 0 ]; then
    exit
fi
echo "Mounting rootfs on the loop device."
mount -o loop rootfs loop/
if [ $? -ne 0 ]; then
    exit
fi
rm -Rf loop/lost+found
echo "Copying filesystem."
cp -a filesystem/* loop
if [ $? -ne 0 ]; then
    exit
fi
echo "Running ldconfig."
ldconfig -r loop/
echo "Unmounting loop filesystem."
umount loop
if [ $? -ne 0 ]; then
    exit
fi
echo "Gzipping root file system."
gzip -9 rootfs
echo "Formatting the floppy disk."
mformat a:
if [ $? -ne 0 ]; then
    exit
fi
echo "Running syslinux."
syslinux -s /dev/fd0
if [ $? -ne 0 ]; then
    exit
fi
echo "Copying files."
mcopy base_files/syslinux.cfg a:
mcopy base_files/boot.msg a:
echo "Copying rootfs.gz."
mcopy rootfs.gz a:
echo "Copying the kernel."
mcopy base_files/vmlinuz-rule a:vmlinuz

mkdir -p slinky-images/$version
echo "Copying image to hard drive."
dd if=/dev/fd0 of=slinky-images/$version/$image bs=1440k
echo "Done."
rm -f rootfs.gz
exit
- -------------------------------------------------
You shouldn't need this, but just so it is all complete...
I have a directory DISK2/ containing:
# ls DISK2/
init_network.sh  modules  rpm.gz  second_stage_scripts

Disk2 is created like:

more makedisk2.sh

#!/bin/sh
echo "Creating boot disk."
dd if=/dev/zero of=disk2.img bs=1k count=1440
if [ $? -ne 0 ]; then
    exit
fi
mkfs.ext2 -F -m 0 disk2.img
if [ $? -ne 0 ]; then
    exit
fi
echo "Mounting disk2 on the loop device."
mount -o loop disk2.img loop/
if [ $? -ne 0 ]; then
    exit
fi
echo "Copying filesystem."
cp -a DISK2/* loop
if [ $? -ne 0 ]; then
    exit
fi
rm -Rf loop/lost+found
echo "Unmounting loop filesystem."
umount loop
if [ $? -ne 0 ]; then
    exit
fi
dd if=disk2.img of=/dev/fd0 bs=1440k
echo "Done."
exit

> Sorry if I was dull, unprecise or not gentle, it's 03:00 AM and time to
> take a nap (have to rise at 6 for work, ugh). I hope I'll catch on with
> email in the weekend, so please bear with me if I don't respond to
> questions. I will be away from the server from Saturday to Monday.
> Yawn. Time to nap, sorry.

I promised myself an early night, so this is a bit rushed. If you have 
trouble, or it isn't clear, let me know.

Have fun!

- -- 
- -Michael

pgp key:  http://www.tuxfan.homeip.net:8080/gpgkey.txt
Red Hat Linux 7.2 in 8M of RAM: http://www.rule-project.org/
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjzkgaMACgkQn/07WoAb/SvzGQCeKUFDMx9VQA/Lun5CWNh7HK/e
4UwAoK43mvXHjR8S65xV2Fz7yOYna140
=o46w
-----END PGP SIGNATURE-----


_______________________________________________
Rule Project HOME PAGE:  http://www.rule-project.org/rule/
Original Rule Development Site http://savannah.gnu.org/projects/rule/Rule-list at mail.freesoftware.fsf.org
http://mail.freesoftware.fsf.org/mailman/listinfo/rule-list



This full static mirror of the Run Up to Date Linux Everywhere Project mailing list, originally hosted at http://lists.hellug.gr/mailman/listinfo/rule-list, is kept online by Free Software popularizer, researcher and trainer Marco Fioretti. To know how you can support this archive, and Marco's work in general, please click here