All of lore.kernel.org
 help / color / mirror / Atom feed
* Strange! Cannot use JFFS2 as root
@ 2004-10-20 14:02 ` colin
  0 siblings, 0 replies; 11+ messages in thread
From: colin @ 2004-10-20 14:02 UTC (permalink / raw)
  To: linux-mips


Hi all,
I had booted up Linux with nfs root, and write a JFFS2 image to /dev/mtd1.
Here is my cmdline for Kernel:
     go 0x80305018 root=/dev/nfs rw nfsroot=172.19.26.145:/nfs/rootfs
ip=172.19.27.193::172.19.27.254:255.255.254.0:::
mtdparts=maltaflash:1536k(ldr),2048k(root)

After writing the JFFS2 image to /dev/mtd1, I can mount /dev/mtdblcok1 to
some directory.
    mount -t jffs2 /dev/mtdblock1 /mnt

Next, I hope to boot up Linux with JFFS2 root, and try to give this cmdline
to Kernel:
    go 0x80305018 rootfstype=jffs2
mtdparts=maltaflash:1536k(ldr),2048k(root) root=/dev/mtdblock1

and the Kernel would complain me about no root:
    VFS: Unable to mount root fs via NFS, trying floppy.
    Kernel panic: VFS: Unable to mount root fs on unknown-block(2,0)

I traced the code and found that when passing "/dev/mtdblock1" to
name_to_dev_t() in do_mounts.c, it would return 0 at every try_name(),
 which will fail at open() with the path "/sys/block/%s/dev".

What's the problem? Could anyone tell me?

Thanks and regards,
Colin

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

* Strange! Cannot use JFFS2 as root
@ 2004-10-20 14:02 ` colin
  0 siblings, 0 replies; 11+ messages in thread
From: colin @ 2004-10-20 14:02 UTC (permalink / raw)
  To: linux-mips


Hi all,
I had booted up Linux with nfs root, and write a JFFS2 image to /dev/mtd1.
Here is my cmdline for Kernel:
     go 0x80305018 root=/dev/nfs rw nfsroot=172.19.26.145:/nfs/rootfs
ip=172.19.27.193::172.19.27.254:255.255.254.0:::
mtdparts=maltaflash:1536k(ldr),2048k(root)

After writing the JFFS2 image to /dev/mtd1, I can mount /dev/mtdblcok1 to
some directory.
    mount -t jffs2 /dev/mtdblock1 /mnt

Next, I hope to boot up Linux with JFFS2 root, and try to give this cmdline
to Kernel:
    go 0x80305018 rootfstype=jffs2
mtdparts=maltaflash:1536k(ldr),2048k(root) root=/dev/mtdblock1

and the Kernel would complain me about no root:
    VFS: Unable to mount root fs via NFS, trying floppy.
    Kernel panic: VFS: Unable to mount root fs on unknown-block(2,0)

I traced the code and found that when passing "/dev/mtdblock1" to
name_to_dev_t() in do_mounts.c, it would return 0 at every try_name(),
 which will fail at open() with the path "/sys/block/%s/dev".

What's the problem? Could anyone tell me?

Thanks and regards,
Colin

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

* Strange! Cannot use JFFS2 as root
@ 2004-10-20 14:03 colin
  2004-10-20 14:29 ` Ian Campbell
  0 siblings, 1 reply; 11+ messages in thread
From: colin @ 2004-10-20 14:03 UTC (permalink / raw)
  To: linux-kernel



Hi all,
I had booted up Linux with nfs root, and write a JFFS2 image to /dev/mtd1.
Here is my cmdline for Kernel:
     go 0x80305018 root=/dev/nfs rw nfsroot=172.19.26.145:/nfs/rootfs
ip=172.19.27.193::172.19.27.254:255.255.254.0:::
mtdparts=maltaflash:1536k(ldr),2048k(root)

After writing the JFFS2 image to /dev/mtd1, I can mount /dev/mtdblcok1 to
some directory.
    mount -t jffs2 /dev/mtdblock1 /mnt

Next, I hope to boot up Linux with JFFS2 root, and try to give this cmdline
to Kernel:
    go 0x80305018 rootfstype=jffs2
mtdparts=maltaflash:1536k(ldr),2048k(root) root=/dev/mtdblock1

and the Kernel would complain me about no root:
    VFS: Unable to mount root fs via NFS, trying floppy.
    Kernel panic: VFS: Unable to mount root fs on unknown-block(2,0)

I traced the code and found that when passing "/dev/mtdblock1" to
name_to_dev_t() in do_mounts.c, it would return 0 at every try_name(), which
will fail at open() with the path "/sys/block/%s/dev".

What's the problem? Could anyone tell me?

Thanks and regards,
Colin





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

* Re: Strange! Cannot use JFFS2 as root
  2004-10-20 14:02 ` colin
  (?)
@ 2004-10-20 14:19 ` Charles Eidsness
  2004-10-21  1:49     ` colin
  -1 siblings, 1 reply; 11+ messages in thread
From: Charles Eidsness @ 2004-10-20 14:19 UTC (permalink / raw)
  To: colin; +Cc: linux-mips

Hi Colin,

I had a similar problem. You're passing root=/dev/mtdblock1 which has a
major value of 31 and a minor value of 1 but the by the looks of the
error message the kernel thinks you want to boot from a device with a
major number of 2 and a minor number of zero. You could try passing an
explicitly defined root=1F01 instead (major 31, minor 1). This works for
me. I have no idea why the kernel doesn't recognize the text based
declaration and haven't had time to investigate. Maybe someone else has
a better idea than I do.

Hope that helps,
Charles

colin wrote:
> Hi all,
> I had booted up Linux with nfs root, and write a JFFS2 image to /dev/mtd1.
> Here is my cmdline for Kernel:
>      go 0x80305018 root=/dev/nfs rw nfsroot=172.19.26.145:/nfs/rootfs
> ip=172.19.27.193::172.19.27.254:255.255.254.0:::
> mtdparts=maltaflash:1536k(ldr),2048k(root)
> 
> After writing the JFFS2 image to /dev/mtd1, I can mount /dev/mtdblcok1 to
> some directory.
>     mount -t jffs2 /dev/mtdblock1 /mnt
> 
> Next, I hope to boot up Linux with JFFS2 root, and try to give this cmdline
> to Kernel:
>     go 0x80305018 rootfstype=jffs2
> mtdparts=maltaflash:1536k(ldr),2048k(root) root=/dev/mtdblock1
> 
> and the Kernel would complain me about no root:
>     VFS: Unable to mount root fs via NFS, trying floppy.
>     Kernel panic: VFS: Unable to mount root fs on unknown-block(2,0)
> 
> I traced the code and found that when passing "/dev/mtdblock1" to
> name_to_dev_t() in do_mounts.c, it would return 0 at every try_name(),
>  which will fail at open() with the path "/sys/block/%s/dev".
> 
> What's the problem? Could anyone tell me?
> 
> Thanks and regards,
> Colin
> 
> 
> 
> 
> 
> 

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

* Re: Strange! Cannot use JFFS2 as root
  2004-10-20 14:03 colin
@ 2004-10-20 14:29 ` Ian Campbell
  0 siblings, 0 replies; 11+ messages in thread
From: Ian Campbell @ 2004-10-20 14:29 UTC (permalink / raw)
  To: colin; +Cc: linux-kernel

> I traced the code and found that when passing "/dev/mtdblock1" to
> name_to_dev_t() in do_mounts.c, it would return 0 at every try_name(), which
> will fail at open() with the path "/sys/block/%s/dev".
> 
> What's the problem? Could anyone tell me?

If I remember correctly you need to pass the root in as the major and
minor numbers for jffs2 on 2.6. For example my 2.6 command line is
	root=31:03 rootfstype=jffs2 ro console=ttyS0,115200
rather that root=/dev/mtdblock3.

I can't remember why this is the case though.

Ian.
-- 
Ian Campbell, Senior Design Engineer
                                        Web: http://www.arcom.com
Arcom, Clifton Road, 			Direct: +44 (0)1223 403 465
Cambridge CB1 7EA, United Kingdom	Phone:  +44 (0)1223 411 200


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

* Re: Strange! Cannot use JFFS2 as root
  2004-10-20 14:02 ` colin
  (?)
  (?)
@ 2004-10-20 16:30 ` Eugene Surovegin
  2004-10-21  3:00     ` colin
       [not found]   ` <005601c4b719$ea253970$8b1a13ac@realtek.com.tw>
  -1 siblings, 2 replies; 11+ messages in thread
From: Eugene Surovegin @ 2004-10-20 16:30 UTC (permalink / raw)
  To: colin; +Cc: linux-mips

On Wed, Oct 20, 2004 at 10:02:26PM +0800, colin wrote:
> 
> Hi all,
> I had booted up Linux with nfs root, and write a JFFS2 image to /dev/mtd1.
> Here is my cmdline for Kernel:
>      go 0x80305018 root=/dev/nfs rw nfsroot=172.19.26.145:/nfs/rootfs
> ip=172.19.27.193::172.19.27.254:255.255.254.0:::
> mtdparts=maltaflash:1536k(ldr),2048k(root)
> 
> After writing the JFFS2 image to /dev/mtd1, I can mount /dev/mtdblcok1 to
> some directory.
>     mount -t jffs2 /dev/mtdblock1 /mnt
> 
> Next, I hope to boot up Linux with JFFS2 root, and try to give this cmdline
> to Kernel:
>     go 0x80305018 rootfstype=jffs2
> mtdparts=maltaflash:1536k(ldr),2048k(root) root=/dev/mtdblock1
> 
> and the Kernel would complain me about no root:
>     VFS: Unable to mount root fs via NFS, trying floppy.
>     Kernel panic: VFS: Unable to mount root fs on unknown-block(2,0)
> 
> I traced the code and found that when passing "/dev/mtdblock1" to
> name_to_dev_t() in do_mounts.c, it would return 0 at every try_name(),
>  which will fail at open() with the path "/sys/block/%s/dev".
> 
> What's the problem? Could anyone tell me?

What is the kernel version you are using?

Check that root_dev_names array in init/do_mounts.c has an entry, 
which looks like

	{ "mtdblock", 0x1f00 }

--
Eugene

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

* Re: Strange! Cannot use JFFS2 as root
@ 2004-10-21  1:49     ` colin
  0 siblings, 0 replies; 11+ messages in thread
From: colin @ 2004-10-21  1:49 UTC (permalink / raw)
  To: charles.eidsness; +Cc: linux-mips


Hi Charles,
Thank you. It works by your way.
I had already tried "root=1f:01" and it didn't work, and then I spent whole
day to test it... :-(
It seems that "root=1f01" and "root=31:01" are both acceptable.

Thanks and regards,
Colin

----- Original Message ----- 
From: "Charles Eidsness" <charles.eidsness@ieee.org>
To: "colin" <colin@realtek.com.tw>
Cc: <linux-mips@linux-mips.org>
Sent: Wednesday, October 20, 2004 10:19 PM
Subject: Re: Strange! Cannot use JFFS2 as root


> Hi Colin,
>
> I had a similar problem. You're passing root=/dev/mtdblock1 which has a
> major value of 31 and a minor value of 1 but the by the looks of the
> error message the kernel thinks you want to boot from a device with a
> major number of 2 and a minor number of zero. You could try passing an
> explicitly defined root=1F01 instead (major 31, minor 1). This works for
> me. I have no idea why the kernel doesn't recognize the text based
> declaration and haven't had time to investigate. Maybe someone else has
> a better idea than I do.
>
> Hope that helps,
> Charles
>
> colin wrote:
> > Hi all,
> > I had booted up Linux with nfs root, and write a JFFS2 image to
/dev/mtd1.
> > Here is my cmdline for Kernel:
> >      go 0x80305018 root=/dev/nfs rw nfsroot=172.19.26.145:/nfs/rootfs
> > ip=172.19.27.193::172.19.27.254:255.255.254.0:::
> > mtdparts=maltaflash:1536k(ldr),2048k(root)
> >
> > After writing the JFFS2 image to /dev/mtd1, I can mount /dev/mtdblcok1
to
> > some directory.
> >     mount -t jffs2 /dev/mtdblock1 /mnt
> >
> > Next, I hope to boot up Linux with JFFS2 root, and try to give this
cmdline
> > to Kernel:
> >     go 0x80305018 rootfstype=jffs2
> > mtdparts=maltaflash:1536k(ldr),2048k(root) root=/dev/mtdblock1
> >
> > and the Kernel would complain me about no root:
> >     VFS: Unable to mount root fs via NFS, trying floppy.
> >     Kernel panic: VFS: Unable to mount root fs on unknown-block(2,0)
> >
> > I traced the code and found that when passing "/dev/mtdblock1" to
> > name_to_dev_t() in do_mounts.c, it would return 0 at every try_name(),
> >  which will fail at open() with the path "/sys/block/%s/dev".
> >
> > What's the problem? Could anyone tell me?
> >
> > Thanks and regards,
> > Colin
> >
> >
> >
> >
> >
> >

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

* Re: Strange! Cannot use JFFS2 as root
@ 2004-10-21  1:49     ` colin
  0 siblings, 0 replies; 11+ messages in thread
From: colin @ 2004-10-21  1:49 UTC (permalink / raw)
  To: charles.eidsness; +Cc: linux-mips


Hi Charles,
Thank you. It works by your way.
I had already tried "root=1f:01" and it didn't work, and then I spent whole
day to test it... :-(
It seems that "root=1f01" and "root=31:01" are both acceptable.

Thanks and regards,
Colin

----- Original Message ----- 
From: "Charles Eidsness" <charles.eidsness@ieee.org>
To: "colin" <colin@realtek.com.tw>
Cc: <linux-mips@linux-mips.org>
Sent: Wednesday, October 20, 2004 10:19 PM
Subject: Re: Strange! Cannot use JFFS2 as root


> Hi Colin,
>
> I had a similar problem. You're passing root=/dev/mtdblock1 which has a
> major value of 31 and a minor value of 1 but the by the looks of the
> error message the kernel thinks you want to boot from a device with a
> major number of 2 and a minor number of zero. You could try passing an
> explicitly defined root=1F01 instead (major 31, minor 1). This works for
> me. I have no idea why the kernel doesn't recognize the text based
> declaration and haven't had time to investigate. Maybe someone else has
> a better idea than I do.
>
> Hope that helps,
> Charles
>
> colin wrote:
> > Hi all,
> > I had booted up Linux with nfs root, and write a JFFS2 image to
/dev/mtd1.
> > Here is my cmdline for Kernel:
> >      go 0x80305018 root=/dev/nfs rw nfsroot=172.19.26.145:/nfs/rootfs
> > ip=172.19.27.193::172.19.27.254:255.255.254.0:::
> > mtdparts=maltaflash:1536k(ldr),2048k(root)
> >
> > After writing the JFFS2 image to /dev/mtd1, I can mount /dev/mtdblcok1
to
> > some directory.
> >     mount -t jffs2 /dev/mtdblock1 /mnt
> >
> > Next, I hope to boot up Linux with JFFS2 root, and try to give this
cmdline
> > to Kernel:
> >     go 0x80305018 rootfstype=jffs2
> > mtdparts=maltaflash:1536k(ldr),2048k(root) root=/dev/mtdblock1
> >
> > and the Kernel would complain me about no root:
> >     VFS: Unable to mount root fs via NFS, trying floppy.
> >     Kernel panic: VFS: Unable to mount root fs on unknown-block(2,0)
> >
> > I traced the code and found that when passing "/dev/mtdblock1" to
> > name_to_dev_t() in do_mounts.c, it would return 0 at every try_name(),
> >  which will fail at open() with the path "/sys/block/%s/dev".
> >
> > What's the problem? Could anyone tell me?
> >
> > Thanks and regards,
> > Colin
> >
> >
> >
> >
> >
> >

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

* Re: [*VIP*] Re: Strange! Cannot use JFFS2 as root
@ 2004-10-21  3:00     ` colin
  0 siblings, 0 replies; 11+ messages in thread
From: colin @ 2004-10-21  3:00 UTC (permalink / raw)
  Cc: linux-mips


Hi Eugene,
The Kernel I use is 2.6.4, and I donot see the entry you mentioned.

Regards,
Colin


----- Original Message ----- 
From: "Eugene Surovegin" <ebs@ebshome.net>
To: "colin" <colin@realtek.com.tw>
Cc: <linux-mips@linux-mips.org>
Sent: Thursday, October 21, 2004 12:30 AM
Subject: [*VIP*] Re: Strange! Cannot use JFFS2 as root


> On Wed, Oct 20, 2004 at 10:02:26PM +0800, colin wrote:
> >
> > Hi all,
> > I had booted up Linux with nfs root, and write a JFFS2 image to
/dev/mtd1.
> > Here is my cmdline for Kernel:
> >      go 0x80305018 root=/dev/nfs rw nfsroot=172.19.26.145:/nfs/rootfs
> > ip=172.19.27.193::172.19.27.254:255.255.254.0:::
> > mtdparts=maltaflash:1536k(ldr),2048k(root)
> >
> > After writing the JFFS2 image to /dev/mtd1, I can mount /dev/mtdblcok1
to
> > some directory.
> >     mount -t jffs2 /dev/mtdblock1 /mnt
> >
> > Next, I hope to boot up Linux with JFFS2 root, and try to give this
cmdline
> > to Kernel:
> >     go 0x80305018 rootfstype=jffs2
> > mtdparts=maltaflash:1536k(ldr),2048k(root) root=/dev/mtdblock1
> >
> > and the Kernel would complain me about no root:
> >     VFS: Unable to mount root fs via NFS, trying floppy.
> >     Kernel panic: VFS: Unable to mount root fs on unknown-block(2,0)
> >
> > I traced the code and found that when passing "/dev/mtdblock1" to
> > name_to_dev_t() in do_mounts.c, it would return 0 at every try_name(),
> >  which will fail at open() with the path "/sys/block/%s/dev".
> >
> > What's the problem? Could anyone tell me?
>
> What is the kernel version you are using?
>
> Check that root_dev_names array in init/do_mounts.c has an entry,
> which looks like
>
> { "mtdblock", 0x1f00 }
>
> --
> Eugene

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

* Re: [*VIP*] Re: Strange! Cannot use JFFS2 as root
@ 2004-10-21  3:00     ` colin
  0 siblings, 0 replies; 11+ messages in thread
From: colin @ 2004-10-21  3:00 UTC (permalink / raw)
  Cc: linux-mips


Hi Eugene,
The Kernel I use is 2.6.4, and I donot see the entry you mentioned.

Regards,
Colin


----- Original Message ----- 
From: "Eugene Surovegin" <ebs@ebshome.net>
To: "colin" <colin@realtek.com.tw>
Cc: <linux-mips@linux-mips.org>
Sent: Thursday, October 21, 2004 12:30 AM
Subject: [*VIP*] Re: Strange! Cannot use JFFS2 as root


> On Wed, Oct 20, 2004 at 10:02:26PM +0800, colin wrote:
> >
> > Hi all,
> > I had booted up Linux with nfs root, and write a JFFS2 image to
/dev/mtd1.
> > Here is my cmdline for Kernel:
> >      go 0x80305018 root=/dev/nfs rw nfsroot=172.19.26.145:/nfs/rootfs
> > ip=172.19.27.193::172.19.27.254:255.255.254.0:::
> > mtdparts=maltaflash:1536k(ldr),2048k(root)
> >
> > After writing the JFFS2 image to /dev/mtd1, I can mount /dev/mtdblcok1
to
> > some directory.
> >     mount -t jffs2 /dev/mtdblock1 /mnt
> >
> > Next, I hope to boot up Linux with JFFS2 root, and try to give this
cmdline
> > to Kernel:
> >     go 0x80305018 rootfstype=jffs2
> > mtdparts=maltaflash:1536k(ldr),2048k(root) root=/dev/mtdblock1
> >
> > and the Kernel would complain me about no root:
> >     VFS: Unable to mount root fs via NFS, trying floppy.
> >     Kernel panic: VFS: Unable to mount root fs on unknown-block(2,0)
> >
> > I traced the code and found that when passing "/dev/mtdblock1" to
> > name_to_dev_t() in do_mounts.c, it would return 0 at every try_name(),
> >  which will fail at open() with the path "/sys/block/%s/dev".
> >
> > What's the problem? Could anyone tell me?
>
> What is the kernel version you are using?
>
> Check that root_dev_names array in init/do_mounts.c has an entry,
> which looks like
>
> { "mtdblock", 0x1f00 }
>
> --
> Eugene

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

* Re: [*VIP*] Re: Strange! Cannot use JFFS2 as root
       [not found]   ` <005601c4b719$ea253970$8b1a13ac@realtek.com.tw>
@ 2004-10-21  4:07     ` Eugene Surovegin
  0 siblings, 0 replies; 11+ messages in thread
From: Eugene Surovegin @ 2004-10-21  4:07 UTC (permalink / raw)
  To: linux-mips

On Thu, Oct 21, 2004 at 10:58:55AM +0800, colin wrote:
> The Kernel I use is 2.6.4, and I donot see the entry you mentioned.

Ah, 2.6. 

Then ignore what I said about that entry, it's 2.4 specific. In 2.6 
this stuff was changed to use sysfs.

--
Eugene

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

end of thread, other threads:[~2004-10-21  4:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-20 14:02 Strange! Cannot use JFFS2 as root colin
2004-10-20 14:02 ` colin
2004-10-20 14:19 ` Charles Eidsness
2004-10-21  1:49   ` colin
2004-10-21  1:49     ` colin
2004-10-20 16:30 ` Eugene Surovegin
2004-10-21  3:00   ` [*VIP*] " colin
2004-10-21  3:00     ` colin
     [not found]   ` <005601c4b719$ea253970$8b1a13ac@realtek.com.tw>
2004-10-21  4:07     ` Eugene Surovegin
  -- strict thread matches above, loose matches on Subject: below --
2004-10-20 14:03 colin
2004-10-20 14:29 ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.