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

Re: [rtl] Flash disk probs



At 11:52 AM 8/7/98 -0500, Ken Teh wrote:
>Hi James,
>
>
>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.
>

Thanks for the reply Ken. I tried the above technique previously.  I 
double checked it again when you suggested it.  When the system boots,
the display just repeats '8000' over and over again.  What is the 
suggested technique for floppies didn't seem to work for me for the
flash(hard) disk.

>
>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.
>
>

Good point.  The real IDE was just for setting things up on the flash.  I
planned to set things up, the move the flash to the PC/104 PC when all
was ready (it only has one IDE controller, so I had to use a machine that
had two).

When I switched the two drives (hda=flash, hdc=real), and booted from a
floppy 
with 'mount root=/dev/hdc1' things settled down quite well.  (I had to change
the mtab and fstab on the real drive to reflect the change as well) LILO
installed
correctly.  I guess LILO won't work properly when trying to install the MBR 
on a non-first hard drive.  

The reasons that I'm putting a little ext2 file system on the start of the 
partition are:

- I couldn't get the raw technique to boot properly, kept getting 8000 msgs
- I get more control with LILO (well, maybe eventually... :-)
- I want to have some non-volatile storage for the application.  By having
  this little ext2 file system, I can write out a little parameter file which
  would contain values that I want to persist across boots.  I.e. run time,
  user configurable parameters, etc.

So, by implementing your suggestion about switching the IDE and flash drives
(hda=flash, hdc=real), I could get LILO to actually write the MBR and set
itself up properly.  When the flash is moved onto the controller and the
system is powered up:

- LILO starts!
- The kernel boots!

Then it stops right about the point init starts and tries to get things off
the root fs.  I get the message: 'Unable to open an initial console'.
It doesn't look like it's doing it's compressed root filesystem into
ramdisk trick.  I don't see any message about it uncompressing the root
file sys into a ramdisk.  I've even set the prompt_ramdisk flag and I don't
get any prompt about inserting anything.

Here's the lilo.conf:

boot = /dev/hda
compact

vga = normal    # force sane state
image = /vmlinuz
  label = Linux
  append="ramdisk_start=900 prompt_ramdisk=1 load_ramdisk=1 ramdisk_size=8196"
#  root = /dev/hda1
  read-write # Non-UMSDOS filesystems should be mounted read-only for checking

I've got the ramdisk params set in both the kernel and the lilo.conf file just
to make sure.  But it doesn't look like it's loading the rootfs into ramdisk.
I.e. it seems like it's ignoring the ramdisk params. ??

Regards,
Jim.

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