Trouble creating root filesystem on 1.44MB diskette

From: B. Madhusudan (madhu_lists_at_yahoo.com)
Date: 10/30/04


Date: Sat, 30 Oct 2004 03:09:33 GMT

Hi all,

I'm trying to create a root disk with a compressed file system.
I've already created a small linux kernel (2.6.8.521) on my Fedora 2 system
with a minimal configuration. I included support for ext2, floppy disk,
CD-ROM and ramdisk support.

I did a 'make bzdisk' to create this which does a syslinux on the boot disk.
I then added a kernel append option to the syslinux.cfg file:
append root=/dev/fd0

Then I followed the steps to create a separate root disk from the HOWTO.

I keep getting the error:
KERNEL PANIC : Unable to mount root fs on unknown block (2,0) which
corresponds to the floppy drive which is correct.

So the script I'm running to create the root disk has been pruned to the
following:
****
umount /mnt/ram
rm -rf /mnt/ram
dd if=/dev/zero of=/dev/ram0 bs=1k count=4096
/sbin/mke2fs -m 0 -N 2000 /dev/ram0
mkdir /mnt/ram
mount -t ext2 /dev/ram0 /mnt/ram
...
... <here is where i make directories in /mnt/ram and copy various files
into them>
...
cd /mnt
umount /mnt/ram
dd if=/dev/ram0 bs=1k | gzip -v9 > rootfs.gz
dd if=rootfs.gz of=/dev/fd0 bs=1k
***
Well, turns out that there's no space on the floppy for the compressed file
system. The last dd command complains that it ran out of space on /dev/fd0.
When I do:
ls -l on rootfs.gz, I get:
-rw-r--r-- 1 root root 2913799 Oct 29 19:41 /mnt/rootfs.gz

This is too big. It's not going to fit on my floppy disk. I've even resorted
to commenting out all the lines in my script that copies the files for the
filesystem and it's still too big!

How do I get around this? Even with no files in the directory structure,
just doing the mke2fs gives me too big a rootfs.gz file. Does anyone see
anything I'm doing wrong? Is there something else I can do?
or with newer linux systems, can you not do this kind of thing anymore?

***********
Another approach: Since this looks like a space issue, can I just burn the
root filesystem onto a CD? and then do:
append root=/dev/hdb (where /dev/hdb is my CDROM)
[although this also gave me a kernel panic: couldn't find fs on (0,0) ]

If this does work, how will the kernel know where on the CD to find the
filesystem?

any help would be appreciated!

thanks,

Madhu
madhu_lists@yahoo.com



Relevant Pages

  • Failed to boot after patch installation on E3500 Solaris 2.6
    ... Root disk is under control of veritas volume manager. ... After I installed Recommended patch cluster, ... I suppose the patches are installed incompletely (istallation of kernel update ... Booting from cdrom in single mode is gone fine, ...
    (SunManagers)
  • more kernel booting woes
    ... kernel works fine). ... just mount the root filesystem by hand and the boot would continue ... probably had something to do with a race condition involving the scsi ... [My root disk is a scsi disk hanging off an Adaptec AHA-2940U controller; ...
    (Debian-User)
  • Re: Moving sysdisk from 1200 to DS20
    ... I tried to move a root disk from a 1200 to a DS20, ... platform not supported by this kernel configuration ... If you try to boot your kernel on another platform is always doomed to fail. ...
    (comp.unix.tru64)
  • Re: [DSA-403-1] Kernel update?
    ... the drivers for your root disk and filesystem (probably "IDE disk" and ... kernel, not built as modules. ... around to boot your old kernel if you get stuck. ... "Theoretical politics is interesting. ...
    (Debian-User)