RE: How to mount romfs in flash as root filesystem?

From: Kári Davíesson <hidden>
Date: 2002-05-02 12:00:11

Hmm,

I have mounted my root filesystem as cramfs, jffs2 and even ext2 at one
point.
Currently I am using jffs2 and cramfs in some boards.

Kernel version 2.4.19-pre6.

K.D.
-----Original Message-----
From: Dross Zhou [mailto:zjuzhou@yahoo.com.cn]
Sent: 2. maí 2002 11:57
To: K�ri Dav眇sson
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: RE: How to mount romfs in flash as root filesystem?



I have compiled it into kernel,not module,it is romfs.
quoted
What file system do you have on your flash?
Is it compiled into the kernel?
It does not work to have the fs used on for the root
fs compiled as a
module.

K.D.
quoted
-----Original Message-----
From: Dross Zhou [mailto:zjuzhou@yahoo.com.cn]
Sent: 1. maí 2002 04:35
To: K�ri Dav眇sson
Subject: RE: How to mount romfs in flash as root
filesystem?
quoted

 --- K�ri Dav眇sson [off-list ref] 的正文:> >
-----Original Message-----
quoted
quoted
From: Gunnar Larisch [mailto:la@softing.com]
Sent: 30. apr�l 2002 08:41
To: Wolfgang Denk
Cc: Dross Zhou;
linuxppc-embedded@lists.linuxppc.org
quoted
Subject: Re: How to mount romfs in flash as
root
quoted
quoted
filesystem?
quoted


On Mon, Apr 29, 2002 at 04:35:24PM +0200,
Wolfgang
quoted
quoted
Denk wrote:
quoted
quoted
In message
[ref]
quoted
quoted
quoted
you wrote:
quoted
quoted
quoted
	Now my kernel has support ROMFS ,i can
mount
quoted
quoted
quoted
quoted
quoted
/dev/mtdblock0 /mnt -t romfs and use
chroot
quoted
quoted
/mnt as
quoted
quoted
quoted
root filesystem.But i want to mount
/dev/mtdblock0 as
quoted
quoted
quoted
root filesystem when system reboot,how
to?I
quoted
quoted
have try
quoted
quoted
quoted
many parameters into kernel such as
"root=/dev/mtdblk0
quoted
quoted
quoted
romfs ro", but it is no use, it also mount
NFS
quoted
quoted
quoted
quoted
Probably because you mistyoed  the  device
name?  There
quoted
is  an  'o'
quoted
missing, it seems.
quoted
root,how can i mount /dev/mtdblock0
(ROMFS) as
quoted
quoted
root
quoted
quoted
quoted
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
quoted
quoted
parameter is parsed
in
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
quoted
quoted
to mount
/dev/mtdblock/1
as you root.
quoted
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.
quoted
from ramdisk must be disabled.
Don't spread wrong information!

Regards,

K.D.
quoted
Gunnar Larisch
--
Gunnar Larisch
Dipl.-Ing.
Entwicklung
Softing AG - Dep. Industrial Communication
Richard-Reitzner-Allee 6
85540 Haar (near Munich)
Germany
Tel.: ++49 / (0) 89 / 4 56 56 - 183
Fax.: ++49 / (0) 89 / 4 56 56 - 399
	I have try pass root=/dev/mtdblock0 to kernel,
but it always mount NFS as root filesystem.Here is
my
quoted
output message:

Video Network Server v1.1
quoted
MPC850,32M RAM,4M FLASH,USB
quoted
quoted
quoted
quoted
loaded at:     00200000 0020B1F8
quoted
relocated to:  00180000 0018B1F8
quoted
board data at: 001801B8 001801D4
quoted
relocated to:  00200100 0020011C
quoted
zimage at:     00206000 00286ADE
quoted
avail ram:     00287000 02000000
quoted
quoted
Linux/PPC load: root=/dev/mtdblock0
quoted
Uncompressing Linux...done.
quoted
Now booting the kernel
Linux version 2.4.4 (root@localhost.localdomain)
(gcc
quoted
version 2.95.2 19991030 (
On node 0 totalpages: 8192
quoted
zone(0): 8192 pages.
quoted
zone(1): 0 pages.
quoted
zone(2): 0 pages.
quoted
Kernel command line: root=/dev/mtdblock0
quoted
Decrementer Frequency: 3000000
quoted
Calibrating delay loop... 47.61 BogoMIPS
quoted
Memory: 30732k available (988k kernel code, 380k
data,
quoted
52k init, 0k highmem)
Dentry-cache hash table entries: 4096 (order: 3,
32768
quoted
bytes)
=== message truncated ===
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help