How to mount romfs in flash as root filesystem?
kd at flaga.is
Tue Apr 30 19:33:21 EST 2002
> -----Original Message-----
> From: Gunnar Larisch [mailto:la at softing.com]
> Sent: 30. apríl 2002 08:41
> To: Wolfgang Denk
> Cc: Dross Zhou; linuxppc-embedded at lists.linuxppc.org
> Subject: Re: How to mount romfs in flash as root filesystem?
> On Mon, Apr 29, 2002 at 04:35:24PM +0200, Wolfgang Denk wrote:
> > In message
> <20020429141408.33240.qmail at web15001.mail.bjs.yahoo.com> you wrote:
> > >
> > > Now my kernel has support ROMFS ,i can mount
> > > /dev/mtdblock0 /mnt -t romfs and use chroot /mnt as
> > > root filesystem.But i want to mount /dev/mtdblock0 as
> > > root filesystem when system reboot,how to?I have try
> > > many parameters into kernel such as "root=/dev/mtdblk0
> > > romfs ro", but it is no use, it also mount NFS
> > Probably because you mistyoed the device name? There
> is an 'o'
> > missing, it seems.
> > > root,how can i mount /dev/mtdblock0 (ROMFS) as root
> > > filesystem?I used linux2.4.4 from denx .
> > Just pass "root=/dev/mtdblock0", that's all.
> This will not work. You must use "root=/dev/mtdblock/0" and
wrong! Wolfgang is correct just check how the root parameter is parsed
init/do_mounts.c function name_to_kdev_t().
If you pass root=/dev/mtdblock/0 it will try to convert the third "/" to
a number which it can not and the minor number becomes 0 which is
accedentally correct but is very wrong if you plan to mount
as you root.
> Linux must be
> configured with devfs, devfs must be mounted before and boot support
It can be either way. You can use devfs in which case you must make it
mountable at boot. You can also get away without devfs but then you must
suppply all the necessary device nodes in your filesystem.
> from ramdisk must be disabled.
Don't spread wrong information!
> Gunnar Larisch
> Gunnar Larisch
> Softing AG - Dep. Industrial Communication
> Richard-Reitzner-Allee 6
> 85540 Haar (near Munich)
> Tel.: ++49 / (0) 89 / 4 56 56 - 183
> Fax.: ++49 / (0) 89 / 4 56 56 - 399
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded