root=/dev/ram0
Hi All,
I'm trying to mount a compressed ramdisk image on /dev/ram0 and run my root filesystem from there. My problem is that when I try to boot I get the following error:
VFS: Cannot open root device "ram0" or 01:00
Please append a correct "root=" boot option
earlier in the boot process the ram disks are recognized:
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024
blocksize
I'm using kernel 2.4.5-pre3 from Ben H's source.
Anyone know why the kernel isn't able to open /dev/ram0?
Thanks,
Andy
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Andrew,
First make sure you are passing the correct boot args to the kernel:
root=/dev/ram0
Is this echoed by the kernel during boot?
Also, make sure you have 'Second extended filesystem' support ('CONFIG_EXT2_FS=y' in .config) compiled into your kernel.
That's really all I can suggest without more information.
Quoted 13 lines · you
Hi All,
I'm trying to mount a compressed ramdisk image on/dev/ram0and run my root filesystem from there. My problem is that when I try to boot I get the following error:VFS: Cannot open root device "ram0" or 01:00
Please append a correct "root=" boot optionearlier in the boot process the ram disks are recognized:
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024
blocksize
Quoted 7 lines
I'm using kernel 2.4.5-pre3 from Ben H's source.
Anyone know why the kernel isn't able to open
/dev/ram0?Thanks,
Andy
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 8 lines · Paul Ruhland
Andrew,
First make sure you are passing the correct boot args to the kernel:
root=/dev/ram0Is this echoed by the kernel during boot?
Yup.
Quoted 4 lines
Also, make sure you have 'Second extended filesystem' support ('
CONFIG_EXT2_FS=y' in .config) compiled into your kernel.
I definitely do
Quoted 2 lines
That's really all I can suggest without more information.
What other informatin would be useful? This has got me stumped. The ramdisk support in the kernel seems to be working OK. I booted the system up with an nfs mounted root partition and did the following:
#dd if=/dev/zero of=/dev/ram0 bs=1k count=4096 #dd if=/fs of=/dev/ram0 (fs is my filesystem image)
This went off without a hitch so I tried mounting /dev/ram0:
#mount /dev/ram0 /mnt
also fine and when I look in /mnt the filesystem looks OK too.
Thanks,
Andy
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
You might want to try setting ramdisk_size too. It's been a while since I played with this stuff and the argument may be called something else.
Rey Estrada
Motorola Computer Group
2900 S Diablo Way
Tempe, AZ 85282
-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Andrew Dixon
Sent: Thursday, July 26, 2001 2:33 PM
To: '[email protected]'
Subject: Re: root=/dev/ram0
Quoted 8 lines · Paul Ruhland
Andrew,
First make sure you are passing the correct boot args to the kernel:
root=/dev/ram0Is this echoed by the kernel during boot?
Yup.
Quoted 4 lines
Also, make sure you have 'Second extended filesystem' support ('
CONFIG_EXT2_FS=y' in .config) compiled into your kernel.
I definitely do
Quoted 2 lines
That's really all I can suggest without more information.
What other informatin would be useful? This has got me stumped. The ramdisk support in the kernel seems to be working OK. I booted the system up with an nfs mounted root partition and did the following:
#dd if=/dev/zero of=/dev/ram0 bs=1k count=4096
#dd if=/fs of=/dev/ram0 (fs is my filesystem image)
This went off without a hitch so I tried mounting /dev/ram0:
#mount /dev/ram0 /mnt
also fine and when I look in /mnt the filesystem looks OK too.
Thanks,
Andy
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Hi,
Can you give the following details,
Are you trying to load it as initrd? Not I assume, else confirm that CONFIG_BLK_DEV_INITRD=y
Incase you are setting /dev/ram0 as the rootfs using rdev or equivalent, how does the rootfs end up on the ramdisk when the kernel starts up?
Amit
ps - Did not mean to skip the list.
Quoted 33 lines · Andrew Dixon
Quoted 8 lines · Paul Ruhland
Andrew,
First make sure you are passing the correct boot args to the kernel:
root=/dev/ram0
Is this echoed by the kernel during boot?
Yup.
Quoted 4 lines
Also, make sure you have 'Second extended filesystem' support ('
CONFIG_EXT2_FS=y' in .config) compiled into your kernel.I definitely do
Quoted 3 lines
That's really all I can suggest without more information.
What other informatin would be useful? This has got me stumped. The ramdisk support in the kernel seems to be working OK. I booted the system up with an nfs mounted root partition and did the following:
#dd if=/dev/zero of=/dev/ram0 bs=1k count=4096 #dd if=/fs of=/dev/ram0 (fs is my filesystem image)
Quoted 12 lines
This went off without a hitch so I tried mounting
/dev/ram0:#mount
/dev/ram0/mntalso fine and when I look in /mnt the filesystem looks OK too.
Thanks,
Andy
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Hi Andy,
configure your kernel with
- ramdisk support
- ramdisk support as boot device
- extended fs 2 support
make a minimal ramdisk consisting of the files/directories /linuxrc/dev/console
where
/linuxrc is a copy of sash/dev/console is created with: mknod /dev/console c 5 1
compress the ramdisk and move it to
linux/arch/ppc/boot/tree/ramdisk.image.gz
There are two different ways to set the kernel command line (eventually in linux/arch/ppc/boot/tree/main.c)
- leave it empty (do it this way for a start)
- set it to: root=/dev/ram0 init=/linuxrc rw
Build the kernel: make zImage.initrd
Download the image and boot.
I hope this helps
- Peter
Quoted 13 lines · Andrew Dixon
Hi All,
I'm trying to mount a compressed ramdisk image on/dev/ram0and run my root filesystem from there. My problem is that when I try to boot I get the following error:VFS: Cannot open root device "ram0" or 01:00
Please append a correct "root=" boot optionearlier in the boot process the ram disks are recognized:
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024
blocksize
Quoted 7 lines
I'm using kernel 2.4.5-pre3 from Ben H's source.
Anyone know why the kernel isn't able to open
/dev/ram0?Thanks,
Andy
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 6 lines · Amit D Chaudhary
Hi,
Can you give the following details,
Are you trying to load it as initrd? Not I assume, else confirm thatCONFIG_BLK_DEV_INITRD=y
I am trying to load it as initrd.
andrew.dixon@pig2:/usr/src/linux$ cat .config |grep CONFIG_BLK_DEV_INITRD CONFIG_BLK_DEV_INITRD=y
And this is set up correctly in the kernel. Just to make sure that my configuration was a workable solution I recompiled everything for an i86 architecture and I tried it out on my laptop. I put my compressed ramdisk image and kernel onto a floppy and used ldlinux.sys as a boot loader passing it the command:
root=/dev/ram0 initrd=fs.gz
and it works fine. This prompted me to do a little searching through the ramdisk source (/usr/src/linux/drivers/block/rd.c) and I found that the ramdisk expects to find the ramdisk image on the floppy drive:
if (MAJOR(ROOT_DEV) != FLOPPY_MAJOR #ifdef CONFIG_BLK_DEV_INITRD && MAJOR(real_root_dev) != FLOPPY_MAJOR #endif ) //ADD //we don't want to return here because our real_root_dev is not the //floppy but the disk or flash device. Right? Right! // return;
It still doesn't work but I've got that feeling that I'm getting closer. I'm going to make sure that the hard disk is detected before the ramdisk tries to load the image
later,
Andy
P.S. Do people on the list like to be cc'd on responses or should I keep all mail to the list only?
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Interesting, try the following,
Don't specify root= anywhere including kernel cmdline
in your initrd, ensure thet there is a symlink /linuxrc to /bin/sh(or equivalent).
Amit
Quoted 42 lines · Andrew Dixon
Quoted 6 lines · Amit D Chaudhary
Hi,
Can you give the following details,
Are you trying to load it as initrd? Not I assume, else confirm thatCONFIG_BLK_DEV_INITRD=yI am trying to load it as initrd.
andrew.dixon@pig2:/usr/src/linux$ cat .config |grep CONFIG_BLK_DEV_INITRD CONFIG_BLK_DEV_INITRD=yAnd this is set up correctly in the kernel. Just to make sure that my configuration was a workable solution I recompiled everything for an i86 architecture and I tried it out on my laptop. I put my compressed ramdisk image and kernel onto a floppy and used ldlinux.sys as a boot loader passing it the command:
root=/dev/ram0 initrd=fs.gz
and it works fine. This prompted me to do a little searching through the ramdisk source (
/usr/src/linux/drivers/block/rd.c) and I found that the ramdisk expects to find the ramdisk image on the floppy drive:if (MAJOR(ROOT_DEV) != FLOPPY_MAJOR #ifdef CONFIG_BLK_DEV_INITRD && MAJOR(real_root_dev) != FLOPPY_MAJOR #endif ) //ADD //we don't want to return here because our real_root_dev is not the //floppy but the disk or flash device. Right? Right! // return;It still doesn't work but I've got that feeling that I'm getting closer. I'm going to make sure that the hard disk is detected before the ramdisk tries to load the image
Quoted 9 lines
later,
Andy
P.S. Do people on the list like to be cc'd on responses or should I keep all mail to the list only?
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/