[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: [rtl] Flash disk probs



Hi James,

I am confused by your blow-by-blow.  I suspect what you are trying to do is
what I plan to do, that is, to have your device boot from the flash drive
and mount the root fs in ramdisk.

Here's what I would do:

First of all, don't put an ext2 fs on the flash drive.  Use it as a raw
device.  Get a hold of the RAMdisk-HOWTO which explains how to put both a
boot kernel and a root fs on the same floppy.

I would:

(1) make zImage to create the kernel, created under arch/i386/boot.
(2) cat zImage > /dev/hdc
(3) dd if=rootfs.gz of=/dev/hdc bs=1k seek=1000
(4) rdev -r /dev/hdc 50152 (=2^15 + 2^14 + 1000)

Presumably, when the BIOS starts to read the device, it will load the kernel
directly by reading the first sector of the hdc.  Since the kernel is
patched with the offset to the root fs, the kernel should be able to find
the root fs image.

I should repeat that I haven't done this to verify if it works, but the idea
is essentially the same as that described in the RAMdisk-HOWTO.  Let me know
how it turns out.  Since I eventually will attempt this, I'm very interested
in your results.

Good luck!  Ken

PS. I've never tried the LILO option and it may be necessary for hard drives
that have MBRs.  The MBR always occupies the first 512 bytes of the raw
device and is the first thing the BIOS reads.  I would verify that after
step 2, the first 512 bytes on hdc are identical to the first 512 bytes of
zImage.

One final point:  Will the flash drive be eventually mounted on the first
controller?  That is, in its final config, it really is hda.  Are you using
the real IDE drive (hda) currently only for setting up the flash drive and
will not use it in the final config?  If yes, I would swap the drives during
the setup.  You can always use a floppy to boot the machine and mount the
real IDE (now on hdc) as the root system.  This way, you'll be close to the
final config.  Good luck again, and let me know how it turns out.



--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu