DOC2000 + GRUB/LILO booting problems
Ilguiz Latypov
ilatypov at superbt.com
Mon Mar 18 10:34:23 EST 2002
Veselin,
On Mon, 18 Mar 2002, Veselin Mijuskovic wrote:
> I'm pretty new to MTD and all these stuff, but if this is the
> case, how the kernel mounts the /dev/nftla1 with no problems at all when I
> boot from the hard disk?
I agree it might be impossible for the kernel to mount a partition
formatted within NFTL layer if NFTL data structures in the beginning of
the flash chip are overwritten. But I don't know the exact details of the
NFTL layer myself.
> Isn't it dangerous? It's a 16MB DOC2000 - are these the right
> parameters? Can I overwrite bad block table with the above command? How
> can I recover bad block table (I can make 'dd if=/dev/mtd0 of=some_file'
> to create a backup copy, can I)?
The GRUB bootloader needs around 96K at minimum. NFTL layer can be set up
after the bootloader only. It seems the start of the NFTL layer will be
detected automatically by the kernel. In my understanding, the kernel
will simply search for a signature in every erase unit of the chip to find
the beginning of NFTL layer.
As for the backup, the dd command should work when reading from the chip.
As you might know, the flash sectors need to be erased to accept new data.
I think the implementation of the system call corresponding to the write()
C library function against the /dev/mtdX MTD DoC 2000 driver will perform
the necessary "flash program" command automatically. Perhaps, the "flash
erase" command has to be carried out explicitly through utilities like
util/erase_all.
Of course, write()s against /dev/nftlaX driver will do the "flash erase"
command transparently.
Ilguiz
More information about the linux-mtd
mailing list