public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Unable to mount compressed root f/s because init_mtd() does not r egister block device!
@ 2001-02-22  4:19 Vipin Malik
       [not found] ` <3A956884.2050504@brocade.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Vipin Malik @ 2001-02-22  4:19 UTC (permalink / raw)
  To: 'mtd@infradead.org'

In 2.2.18 patched with the 2.2.18 patch, I'm trying to boot
a kernel from raw (CFI) flash and decompress an ext2 root
f/s image (from /dev/mtdblock0) into ramdisk and mount it as root.

Everything goes fine, (kernel boots etc.) but when the load ramdisk
code runs, it fails with a -ENODEV when it tries to open
the root device (to load the compressed root file system, present
on /dev/mtdblock0- right after the kernel).

It fails because, even though init_mtd() has been already
called before the rd_load() call in init/main.c, init_mtd()
does NOT call init_mtdblock() which actually registers the
mtdblock device.
This is done much later when the file system is actually installed.

Why? Any particular reason or no one tried this before.

Thanks

Vipin


To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Unable to mount compressed root f/s because init_mtd() does n ot r  egister block device!
@ 2001-02-22 21:55 David Woodhouse
  2001-02-22 22:41 ` Unable to mount compressed root f/s because init_mtd() does not " Vipin Malik
  0 siblings, 1 reply; 7+ messages in thread
From: David Woodhouse @ 2001-02-22 21:55 UTC (permalink / raw)
  To: Vipin Malik; +Cc: mtd

On Thu, 22 Feb 2001, Vipin Malik wrote:

> Success!! Well sort of ;)
> 
> After a terrible hack of explicitly calling rd_load() again at the end
> of init_mtdblock(), forces the ramdisk stuff to look for the
> compressed root file system again. This time it finds it (now that
> mtdblock has registered the block device) enabling the root file
> system to be loaded and be mounted!

Heh. Well done.

> This proves for sure that that is the only issue left to boot
> compressed root file systems off raw flash. Once we figure out how to
> force init_mtdblock() to be linked in before the ram disk stuff, we
> would be set.

Cool. You'll have to hurry, though - We'll have JFFS2 (with compression) 
ready to roll out quite soon :)

-- 
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-02-23 17:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-22  4:19 Unable to mount compressed root f/s because init_mtd() does not r egister block device! Vipin Malik
     [not found] ` <3A956884.2050504@brocade.com>
2001-02-22 20:01   ` Vipin Malik
2001-02-23  8:22     ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2001-02-22 21:55 Unable to mount compressed root f/s because init_mtd() does n ot " David Woodhouse
2001-02-22 22:41 ` Unable to mount compressed root f/s because init_mtd() does not " Vipin Malik
2001-02-23  8:24   ` David Woodhouse
2001-02-23 18:02     ` Vipin Malik
2001-02-23 17:37       ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox