Skip to contentSkip to conversation

ramdisk

DISCUSSION Xu Yang 5 participants 12 messages Sep 3, 2007 – Sep 19, 2007

lore
Share & tools
lore

Xu Yang

author
#0 lore raw

Hi everyone,

I want to use ramdisk to boot my filesystem, as I can't use NFS and harddisk.

I have load the ramdisk into the ram memory (start address :0x4000000)

and in the boot options I specified : root =dev/ram0 initrd=0x4000000

but the kernel said it can not find any file system on it.

Here is the information I can supply :
U-Boot 1.2.0 (Aug 31 2007 - 20:54:55)

*** Auto-detects ethernet chip ***

DRAM: 0 kB
## Unknown FLASH on Bank 1 - Size = 0x00000000 = 0 MB
Flash: 0 kB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial

Hit any key to stop autoboot: 0
## Booting image at 00007fc0 ...

   Image Name:   Linux-2.6.19-arm2
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    740372 Bytes = 723 kB

Load Address: 00008000
Entry Point: 00008000
OK

## Loading Ramdisk Image at 04000000 ...

   Image Name:   ramdisc
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    12582962 Bytes = 12 MB

Load Address: 04000000
Entry Point: 04000000

Starting kernel ...

.........................................................................................

RAMDISK driver initialized: 16 RAM disks of 10240K size 1024 blocksize <6>loop: loaded (max 8 devices)
<6>mice: PS/2 mouse device common for all mice
<6>VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 3 No filesystem could mount root, tried: ext2 cramfs vfat <0>Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)

Who can give me some hints ? or point me some direction to handle this.

I appreciate this very much.

regards,

Yang

#1 lore raw
Quoted 10 lines · Xu Yang

Hi everyone,

I want to use ramdisk to boot my filesystem, as I can't use NFS and harddisk.

I have load the ramdisk into the ram memory (start address :0x4000000)

and in the boot options I specified : root =dev/ram0 initrd=0x4000000

but the kernel said it can not find any file system on it.

Looking at the information below, did the program which loaded the filesystem into RAM decompress it? It noted that it was compressed so I would assume so, but I am unfamiliar with ARM tools, so I ask the question. Also, should the boot device be "/dev/ram0" rather than "dev/ram0" or is that correct for your system?

Quoted 54 lines

Here is the information I can supply :
U-Boot 1.2.0 (Aug 31 2007 - 20:54:55)

*** Auto-detects ethernet chip ***

DRAM: 0 kB
## Unknown FLASH on Bank 1 - Size = 0x00000000 = 0 MB
Flash: 0 kB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial

Hit any key to stop autoboot: 0
## Booting image at 00007fc0 ...

   Image Name:   Linux-2.6.19-arm2
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    740372 Bytes = 723 kB

Load Address: 00008000
Entry Point: 00008000
OK

## Loading Ramdisk Image at 04000000 ...

   Image Name:   ramdisc
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    12582962 Bytes = 12 MB

Load Address: 04000000
Entry Point: 04000000

Starting kernel ...

.........................................................................................

RAMDISK driver initialized: 16 RAM disks of 10240K size 1024 blocksize <6>loop: loaded (max 8 devices)
<6>mice: PS/2 mouse device common for all mice
<6>VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 3 No filesystem could mount root, tried: ext2 cramfs vfat <0>Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)

Who can give me some hints ? or point me some direction to handle this.

I appreciate this very much.

regards,

Yang

Signature · 3 lines
Bill Davidsen <[email protected]>
  "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot
author
#2 lore raw

thanks for the reply.

no , it is not decompressed. isn' t the kernel supposed to do that? As we have tried to load this filesystem on the pc, it turns out the the kernel can recognize it.

concerning the root=/dev/ram0,
as the default value is root=/dev/nfs, so I just modify the nfs to ram0. is this might be a problem?

regards,

2007/9/3, Bill Davidsen <[email protected]>:

Quoted 78 lines
Quoted 10 lines · Xu Yang

Hi everyone,

I want to use ramdisk to boot my filesystem, as I can't use NFS and harddisk.

I have load the ramdisk into the ram memory (start address :0x4000000)

and in the boot options I specified : root =dev/ram0 initrd=0x4000000

but the kernel said it can not find any file system on it.

Looking at the information below, did the program which loaded the filesystem into RAM decompress it? It noted that it was compressed so I would assume so, but I am unfamiliar with ARM tools, so I ask the question. Also, should the boot device be "/dev/ram0" rather than "dev/ram0" or is that correct for your system?

Quoted 47 lines

Here is the information I can supply :
U-Boot 1.2.0 (Aug 31 2007 - 20:54:55)

*** Auto-detects ethernet chip ***

DRAM: 0 kB
## Unknown FLASH on Bank 1 - Size = 0x00000000 = 0 MB
Flash: 0 kB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial

Hit any key to stop autoboot: 0
## Booting image at 00007fc0 ...

   Image Name:   Linux-2.6.19-arm2
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    740372 Bytes = 723 kB

Load Address: 00008000
Entry Point: 00008000
OK

## Loading Ramdisk Image at 04000000 ...

   Image Name:   ramdisc
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    12582962 Bytes = 12 MB

Load Address: 04000000
Entry Point: 04000000

Starting kernel ...

.........................................................................................

RAMDISK driver initialized: 16 RAM disks of 10240K size 1024 blocksize <6>loop: loaded (max 8 devices)
<6>mice: PS/2 mouse device common for all mice
<6>VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 3 No filesystem could mount root, tried: ext2 cramfs vfat <0>Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)

Quoted 7 lines

Who can give me some hints ? or point me some direction to handle this.

I appreciate this very much.

regards,

Yang

--
Bill Davidsen <[email protected]>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot

#3 lore raw
Quoted 11 lines · Xu Yang

thanks for the reply.

no , it is not decompressed. isn' t the kernel supposed to do that? As we have tried to load this filesystem on the pc, it turns out the the kernel can recognize it.

concerning the root=/dev/ram0,
as the default value is root=/dev/nfs, so I just modify the nfs to ram0. is this might be a problem?

Hopefully someone who works with this regularly can provide some answers, the only time I used booting into a RAM-only system the tools which I had "just worked" and I followed the steps outlined without fully understanding the details. However, I just tried loop mounting a compressed filesystem and that didn't work, while decompressing into a ramdisk and mounting worked fine. That's why I asked if your tool was just copying to RAM without decompression, since I have no ides what tool you use.

As for the name, your original post used "dev" without a leading "/" and while I assumed it was a typo, I thought it was worth mentioning since you were looking for suggestions. I would expect /dev/ram0 to be correct.

I would try the decompressed image next, and I have no other ideas at the moment.

Quoted 88 lines

regards,

2007/9/3, Bill Davidsen <[email protected]>:

Quoted 81 lines
Quoted 11 lines · Xu Yang

Hi everyone,

I want to use ramdisk to boot my filesystem, as I can't use NFS and harddisk.

I have load the ramdisk into the ram memory (start address :0x4000000)

and in the boot options I specified : root =dev/ram0 initrd=0x4000000

but the kernel said it can not find any file system on it.

Looking at the information below, did the program which loaded the filesystem into RAM decompress it? It noted that it was compressed so I would assume so, but I am unfamiliar with ARM tools, so I ask the question. Also, should the boot device be "/dev/ram0" rather than "dev/ram0" or is that correct for your system?

Quoted 47 lines

Here is the information I can supply :
U-Boot 1.2.0 (Aug 31 2007 - 20:54:55)

*** Auto-detects ethernet chip ***

DRAM: 0 kB
## Unknown FLASH on Bank 1 - Size = 0x00000000 = 0 MB
Flash: 0 kB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial

Hit any key to stop autoboot: 0
## Booting image at 00007fc0 ...

   Image Name:   Linux-2.6.19-arm2
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    740372 Bytes = 723 kB

Load Address: 00008000
Entry Point: 00008000
OK

## Loading Ramdisk Image at 04000000 ...

   Image Name:   ramdisc
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    12582962 Bytes = 12 MB

Load Address: 04000000
Entry Point: 04000000

Starting kernel ...

.........................................................................................

RAMDISK driver initialized: 16 RAM disks of 10240K size 1024 blocksize <6>loop: loaded (max 8 devices)
<6>mice: PS/2 mouse device common for all mice
<6>VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 3 No filesystem could mount root, tried: ext2 cramfs vfat <0>Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)

Quoted 8 lines

Who can give me some hints ? or point me some direction to handle this.

I appreciate this very much.

regards,

Yang

--
Bill Davidsen <[email protected]>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot

Signature · 3 lines
bill davidsen <[email protected]>
 CTO TMR Associates, Inc
 Doing interesting things with small computers since 1979
author
#4 lore raw

Hi Bill,

OK I will try it.
Thanks,

2007/9/4, Bill Davidsen <[email protected]>:

Quoted 123 lines
Quoted 11 lines · Xu Yang

thanks for the reply.

no , it is not decompressed. isn' t the kernel supposed to do that? As we have tried to load this filesystem on the pc, it turns out the the kernel can recognize it.

concerning the root=/dev/ram0,
as the default value is root=/dev/nfs, so I just modify the nfs to ram0. is this might be a problem?

Hopefully someone who works with this regularly can provide some answers, the only time I used booting into a RAM-only system the tools which I had "just worked" and I followed the steps outlined without fully understanding the details. However, I just tried loop mounting a compressed filesystem and that didn't work, while decompressing into a ramdisk and mounting worked fine. That's why I asked if your tool was just copying to RAM without decompression, since I have no ides what tool you use.

As for the name, your original post used "dev" without a leading "/" and while I assumed it was a typo, I thought it was worth mentioning since you were looking for suggestions. I would expect /dev/ram0 to be correct.

I would try the decompressed image next, and I have no other ideas at the moment.

Quoted 88 lines

regards,

2007/9/3, Bill Davidsen <[email protected]>:

Quoted 81 lines
Quoted 11 lines · Xu Yang

Hi everyone,

I want to use ramdisk to boot my filesystem, as I can't use NFS and harddisk.

I have load the ramdisk into the ram memory (start address :0x4000000)

and in the boot options I specified : root =dev/ram0 initrd=0x4000000

but the kernel said it can not find any file system on it.

Looking at the information below, did the program which loaded the filesystem into RAM decompress it? It noted that it was compressed so I would assume so, but I am unfamiliar with ARM tools, so I ask the question. Also, should the boot device be "/dev/ram0" rather than "dev/ram0" or is that correct for your system?

Quoted 47 lines

Here is the information I can supply :
U-Boot 1.2.0 (Aug 31 2007 - 20:54:55)

*** Auto-detects ethernet chip ***

DRAM: 0 kB
## Unknown FLASH on Bank 1 - Size = 0x00000000 = 0 MB
Flash: 0 kB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial

Hit any key to stop autoboot: 0
## Booting image at 00007fc0 ...

   Image Name:   Linux-2.6.19-arm2
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    740372 Bytes = 723 kB

Load Address: 00008000
Entry Point: 00008000
OK

## Loading Ramdisk Image at 04000000 ...

   Image Name:   ramdisc
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    12582962 Bytes = 12 MB

Load Address: 04000000
Entry Point: 04000000

Starting kernel ...

.........................................................................................

RAMDISK driver initialized: 16 RAM disks of 10240K size 1024 blocksize <6>loop: loaded (max 8 devices)
<6>mice: PS/2 mouse device common for all mice
<6>VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 3 No filesystem could mount root, tried: ext2 cramfs vfat <0>Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)

Quoted 8 lines

Who can give me some hints ? or point me some direction to handle this.

I appreciate this very much.

regards,

Yang

--
Bill Davidsen <[email protected]>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot

--
bill davidsen <[email protected]>
CTO TMR Associates, Inc
Doing interesting things with small computers since 1979

#5 lore raw
In reply to Xu Yang
Quoted 7 lines · Xu Yang

Hi everyone,

I want to use ramdisk to boot my filesystem, as I can't use NFS and harddisk.

I have load the ramdisk into the ram memory (start address :0x4000000)

and in the boot options I specified : root =dev/ram0 initrd=0x4000000

Since you don't know what the default directory is, perhaps root should be /dev/ram0. Also, make sure you actually create those device nodes in /dev

[Snipped...]

Quoted 6 lines

but the kernel said it can not find any file system on it.

regards,

Yang

Cheers,
Dick Johnson
Penguin : Linux version 2.6.22.1 on an i686 machine (5588.30 BogoMips). My book : http://www.AbominableFirebug.com/
_

****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.

author
#6 lore raw

Hi Dick,
Thanks for the reply.

then how to create these device nodes in /dev? from the information i got from the cosole(unknown block(1,0) ), it seems that I didn't create the device? I thought the kernel should do this work right? if not how to create it?

thanks,

regards,

2007/9/4, linux-os (Dick Johnson) <[email protected]>:

Quoted 36 lines · Xu Yang
Quoted 8 lines

Hi everyone,

I want to use ramdisk to boot my filesystem, as I can't use NFS and harddisk.

I have load the ramdisk into the ram memory (start address :0x4000000)

and in the boot options I specified : root =dev/ram0 initrd=0x4000000

Since you don't know what the default directory is, perhaps root should be /dev/ram0. Also, make sure you actually create those device nodes in /dev

[Snipped...]

Quoted 6 lines

but the kernel said it can not find any file system on it.

regards,

Yang

Cheers,
Dick Johnson
Penguin : Linux version 2.6.22.1 on an i686 machine (5588.30 BogoMips). My book : http://www.AbominableFirebug.com/
_

****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.

#7 lore raw
Quoted 12 lines · Xu Yang

Hi Dick,
Thanks for the reply.

then how to create these device nodes in /dev? from the information i got from the cosole(unknown block(1,0) ), it seems that I didn't create the device? I thought the kernel should do this work right? if not how to create it?

thanks,

regards,

mkknod /dev/ram0 b 1 0
mkknod /dev/ram1 b 1 1
mkknod /dev/ram2 b 1 2

Do this in the file-system you create for the RAM Disk.

Quoted 39 lines

2007/9/4, linux-os (Dick Johnson) <[email protected]>:

Quoted 36 lines · Xu Yang
Quoted 8 lines

Hi everyone,

I want to use ramdisk to boot my filesystem, as I can't use NFS and harddisk.

I have load the ramdisk into the ram memory (start address :0x4000000)

and in the boot options I specified : root =dev/ram0 initrd=0x4000000

Since you don't know what the default directory is, perhaps root should be /dev/ram0. Also, make sure you actually create those device nodes in /dev

[Snipped...]

Quoted 6 lines

but the kernel said it can not find any file system on it.

regards,

Yang

Cheers,
Dick Johnson
Penguin : Linux version 2.6.22.1 on an i686 machine (5588.30 BogoMips). My book : http://www.AbominableFirebug.com/
_

****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.

Cheers,
Dick Johnson
Penguin : Linux version 2.6.22.1 on an i686 machine (5588.30 BogoMips). My book : http://www.AbominableFirebug.com/
_

****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.

#8 lore raw
In reply to linux-os (Dick Johnson)
Quoted 6 lines · linux-os (Dick Johnson)
Quoted 5 lines · Xu Yang

Hi everyone,

I want to use ramdisk to boot my filesystem, as I can't use NFS and harddisk.

Quoted 8 lines
Quoted 3 lines

I have load the ramdisk into the ram memory (start address :0x4000000)

and in the boot options I specified : root =dev/ram0 initrd=0x4000000

Since you don't know what the default directory is, perhaps root should be /dev/ram0. Also, make sure you actually create those device nodes in /dev

Hey Dick,
where exactly (on which file system) is Xu supposed to create the device nodes? ;-)
Xu's problem is, he can't mount his _root_ filesystem in the first place. Therefore I doubt it'd help to have some device nodes somewhere ...

Xu,
all answers to your posting commented on your kernel command line. The command line you quoted contains "root =dev/ram0".
You probably meant to write "root=/dev/ram0". To not waste our time, please clarify if this was a typo before asking further questions.

regards,
Uli

Signature · 12 lines
------- ROAD ...the handyPC Company - - -  ) ) )

Uli Luckas
Software Development

ROAD GmbH
Bennigsenstr. 14 | 12159 Berlin | Germany
fon: +49 (30) 230069 - 64 | fax: +49 (30) 230069 - 69
url: www.road.de

Amtsgericht Charlottenburg: HRB 96688 B
Managing directors: Hans-Peter Constien, Hubertus von Streit
author
#9 lore raw

Hi Uli,

yes, it is my mistake. actually in the boot option line It was root=/dev/ram0 . sorry for the misleading.

regards,

yang

2007/9/5, Uli Luckas <[email protected]>:

Quoted 45 lines · linux-os (Dick Johnson)
Quoted 6 lines · Xu Yang
Quoted 5 lines

Hi everyone,

I want to use ramdisk to boot my filesystem, as I can't use NFS and harddisk.

Quoted 8 lines
Quoted 3 lines

I have load the ramdisk into the ram memory (start address :0x4000000)

and in the boot options I specified : root =dev/ram0 initrd=0x4000000

Since you don't know what the default directory is, perhaps root should be /dev/ram0. Also, make sure you actually create those device nodes in /dev

Hey Dick,
where exactly (on which file system) is Xu supposed to create the device nodes? ;-)
Xu's problem is, he can't mount his _root_ filesystem in the first place. Therefore I doubt it'd help to have some device nodes somewhere ...

Xu,
all answers to your posting commented on your kernel command line. The command line you quoted contains "root =dev/ram0".
You probably meant to write "root=/dev/ram0". To not waste our time, please clarify if this was a typo before asking further questions.

regards,
Uli

--

------- ROAD ...the handyPC Company - - - ) ) )

Uli Luckas
Software Development

ROAD GmbH
Bennigsenstr. 14 | 12159 Berlin | Germany
fon: +49 (30) 230069 - 64 | fax: +49 (30) 230069 - 69
url: www.road.de

Amtsgericht Charlottenburg: HRB 96688 B
Managing directors: Hans-Peter Constien, Hubertus von Streit

author
#10 lore raw

then is there any new hint about that?
I didn't do the memory patition , would this cause the problem?

2007/9/5, Xu Yang <[email protected]>:

Quoted 57 lines

Hi Uli,

yes, it is my mistake. actually in the boot option line It was root=/dev/ram0 . sorry for the misleading.

regards,

yang

2007/9/5, Uli Luckas <[email protected]>:

Quoted 45 lines · linux-os (Dick Johnson)
Quoted 6 lines · Xu Yang
Quoted 5 lines

Hi everyone,

I want to use ramdisk to boot my filesystem, as I can't use NFS and harddisk.

Quoted 8 lines
Quoted 3 lines

I have load the ramdisk into the ram memory (start address :0x4000000)

and in the boot options I specified : root =dev/ram0 initrd=0x4000000

Since you don't know what the default directory is, perhaps root should be /dev/ram0. Also, make sure you actually create those device nodes in /dev

Hey Dick,
where exactly (on which file system) is Xu supposed to create the device nodes? ;-)
Xu's problem is, he can't mount his _root_ filesystem in the first place. Therefore I doubt it'd help to have some device nodes somewhere ...

Xu,
all answers to your posting commented on your kernel command line. The command line you quoted contains "root =dev/ram0".
You probably meant to write "root=/dev/ram0". To not waste our time, please clarify if this was a typo before asking further questions.

regards,
Uli

--

------- ROAD ...the handyPC Company - - - ) ) )

Uli Luckas
Software Development

ROAD GmbH
Bennigsenstr. 14 | 12159 Berlin | Germany
fon: +49 (30) 230069 - 64 | fax: +49 (30) 230069 - 69
url: www.road.de

Amtsgericht Charlottenburg: HRB 96688 B
Managing directors: Hans-Peter Constien, Hubertus von Streit

#11 lore raw

Hi Xu,

As far we have worked on it, the parameter to be passed is
"root=/dev/ram" and not "root=/dev/ram0". Atleast I used it to boot the kernel on a U-Boot boot loader.

I guess I can help you out. But I will need more details. But I
would like you to try "root=/dev/ram" first and let me know if its working.

Midhun.