All of lore.kernel.org
 help / color / mirror / Atom feed
* ram-disk root file system
@ 2007-01-17  5:02 Dan Wilson
  2007-01-17  7:54 ` David H. Lynch Jr.
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Wilson @ 2007-01-17  5:02 UTC (permalink / raw)
  To: linuxppc-embedded

We are attempting to use an initrd ram-disk as the permanent root file=
 system for a MPC8541-based system.

We are using ELDK 4 to cross-compile, and are running linux 2.6.15 kernel,=
 with u-boot 1.1.6 as our bootloader.

I built an initrd file system, compressed it, then ran mkimage against it,=
 and it seems to be successfully loaded by u-boot, and linux sees the=
 initrd file and claims to have mounted it.  However, it then reports that=
 it is unable to find any files on the mounted root file system, as shown=
 in the log below.  I added some additional diagnostics to show what the=
 error codes were, and what was happening, but do not understand what I=
 might have done wrong.  If I boot linux from an NFS system or from compact=
 flash, I am able to mount the image and see all the files, so I believe=
 the initrd file system was created correctly.

Here's the trace.  Any help or pointers that anyone can give will be=
 greatly appreciated!

Thanks,
Dan.

Speed: 100, half duplex
Using TSEC0 device
TFTP from server 10.0.80.16; our IP address is 10.0.55.91
Filename 'dw_eldk'.
Load address: 0x4000000
Loading: #################################################################
          #################################################################
          #################################################################
          ###############################
done
Bytes transferred =3D 1154111 (119c3f hex)
Speed: 100, half duplex
Using TSEC0 device
TFTP from server 10.0.80.16; our IP address is 10.0.55.91
Filename 'fm2224ep_initrd.uboot'.
Load address: 0x4200000
Loading: #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          ####################################
done
Bytes transferred =3D 5840574 (591ebe hex)
## Booting image at 04000000 ...
    Image Name:   Linux-2.6.15
    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
    Data Size:    1154047 Bytes =3D  1.1 MB
    Load Address: 00000000
    Entry Point:  00000000
    Verifying Checksum ... OK
    Uncompressing Kernel Image ... OK
## Loading RAMDisk Image at 04200000 ...
    Image Name:   FM2224EP Ramdisk Image
    Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
    Data Size:    5840510 Bytes =3D  5.6 MB
    Load Address: 00000000
    Entry Point:  00000000
    Verifying Checksum ... OK
    Loading Ramdisk to 1f92c000, end 1febde7e ... OK
Memory CAM mapping: CAM0=3D256Mb, CAM1=3D256Mb, CAM2=3D0Mb residual: 0Mb
Linux version 2.6.15 (dwilson@washington) (gcc version 4.0.0 (DENX ELDK 
4.0 4.0.0)) #6 Tue Jan 16 15:00:18 PST 2007
fm2224ep_setup_arch
CDS Version =3D f0 in PCI slot 1
Built 1 zonelists
Kernel command line: root=3D/dev/ram 
ip=3D10.0.55.91:10.0.80.21:10.0.0.254:255.255.0.0:FM2224EP_67:eth0 
console=3DttyS0,9600 
nfsroot=3D10.0.80.21:/vol/local/common/kirkwood/hosts/eldk-test,v3,tcp rw 
init=3D/bin/ash
OpenPIC Version 1.2 (1 CPUs and 60 IRQ sources) at fcfb8000
PID hash table entries: 4096 (order: 12, 65536 bytes)
Warning: real time clock seems stuck!
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 510976k available (1880k kernel code, 512k data, 136k init, 0k 
highmem)
Mount-cache hash table entries: 512
populate_roots calling unpack_to_roots: start =3D c0257000, end=3Dc0257085,=
 
len=3D85
checking if image is initramfs...<3>image check, start=3Ddf92c000, 
end=3Ddfebde7e, err=3Dc01dae84
it isn't (no cpio magic); looks like an initrd
wasn't initramfs (no cpio magic), opening /initrd.image, fd=3D0
Freeing initrd memory: 5703k freed
NET: Registered protocol family 16
PCI: Probing PCI hardware
Generic PHY: Registered new driver
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
Generic RTC Driver v1.07
Serial: 8250/16550 driver $Revision: #1 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xe0004500 (irq =3D 90) is a 16550A
serial8250.0: ttyS1 at MMIO 0xe0004600 (irq =3D 90) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 32768K size 1024 blocksize
loop: loaded (max 8 devices)
Gianfar MII Bus: probed
eth0: Gianfar Ethernet Controller Version 1.2, 00:15:ed:00:09:41
eth0: Running with NAPI enabled
eth0: 256/256 RX/TX BD ring size
eth1: Gianfar Ethernet Controller Version 1.2, 07:de:29:00:07:de
eth1: Running with NAPI enabled
eth1: 256/256 RX/TX BD ring size
Marvell 88E1101: Registered new driver
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with=
 idebus=3Dxx
IDE phys mem : f0000000...f001ffff (size 0001ffff)
IDE virt base: 0xe1080000
CSR virt base: 0xe1100000
vector: 0x80c40072
port: 0xe1080002 =3D> 0x00
port: 0xe1080007 =3D> 0x00
port: 0xe108000b =3D> 0x00
port: 0xe108000f =3D> 0x00
port: 0xe1080013 =3D> 0x00
port: 0xe1080017 =3D> 0x00
port: 0xe108001b =3D> 0xE0
port: 0xe108001f =3D> 0x50
port: 0xe109001b =3D> 0x50
port: 0xe1080000 =3D> 0xF0
hda: SanDisk SDCFB-1024, CFA DISK drive
ide0 at 0xe1080002-0xe1080009,0xe109001b on irq 114
hda: max request size: 128KiB
hda: 2001888 sectors (1024 MB) w/1KiB Cache, CHS=3D1986/16/63
hda: cache flushes not supported
  hda: unknown partition table
i2c /dev entries driver
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 7, 524288 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
IP-Config: Complete:
       device=3Deth0, addr=3D10.0.55.91, mask=3D255.255.0.0,=
 gw=3D10.0.0.254,
      host=3DFM2224EP_67, domain=3D, nis-domain=3D(none),
      bootserver=3D10.0.80.21, rootserver=3D10.0.80.21, rootpath=3D
init: ramdisk_execute_command =3D /init
loading ramdisk image initrd.image
RAMDISK: Compressed image found at block 0
EXT2-fs warning: checktime reached, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 136k init
run_init_process trying to exec /bin/ash
back from execve, errno=3D2
Failed to execute /bin/ash.  Attempting defaults...
run_init_process trying to exec /sbin/init
back from execve, errno=3D14
run_init_process trying to exec /etc/init
back from execve, errno=3D14
run_init_process trying to exec /bin/init
back from execve, errno=3D14
run_init_process trying to exec /bin/sh
back from execve, errno=3D14
Kernel panic - not syncing: No init found.  Try passing init=3D option to 
kernel.
  <0>Rebooting in 180 seconds..<6>phy0:0: Link is Up - 100/Half

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

* Re: ram-disk root file system
  2007-01-17  5:02 ram-disk root file system Dan Wilson
@ 2007-01-17  7:54 ` David H. Lynch Jr.
  2007-01-18  2:22   ` Dan Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: David H. Lynch Jr. @ 2007-01-17  7:54 UTC (permalink / raw)
  To: Dan Wilson; +Cc: linuxppc-embedded

Dan Wilson wrote:
> We are attempting to use an initrd ram-disk as the permanent root file system for a MPC8541-based system.
>
> We are using ELDK 4 to cross-compile, and are running linux 2.6.15 kernel, with u-boot 1.1.6 as our bootloader.
>
> I built an initrd file system, compressed it, then ran mkimage against it, and it seems to be successfully loaded by u-boot, and linux sees the initrd file and claims to have mounted it.  However, it then reports that it is unable to find any files on the mounted root file system, as shown in the log below.  I added some additional diagnostics to show what the error codes were, and what was happening, but do not understand what I might have done wrong.  If I boot linux from an NFS system or from compact flash, I am able to mount the image and see all the files, so I believe the initrd file system was created correctly.
    I had similar problems with a permanent initramfs filesystem. It is
possible your problem has nothing to do with your filesystem.

    First, I presume the debugging you added was in init/main.c.
          Before you attempt to exec init, you can add code to open
anyfile that you want on the ramdisk. opening a file requires less
things to be right than exec'ing and that may isolate your problem
further. I beleive you can enable system call tracing and find out more
about where things are going off the rails.
          You can also write a trivial hello world - one that does not
use any libraries and very little code, and see if you can exec that.

    When you boot Linux NFS - are you using the same linux kernel ?
         
   


-- 
Dave Lynch 					  	    DLA Systems
Software Development:  				         Embedded Linux
717.627.3770 	       dhlii@dlasys.net 	  http://www.dlasys.net
fax: 1.253.369.9244 			           Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.

"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein

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

* Re: ram-disk root file system
@ 2007-01-17 22:57 dwilson
  0 siblings, 0 replies; 4+ messages in thread
From: dwilson @ 2007-01-17 22:57 UTC (permalink / raw)
  To: linuxppc-embedded

David H. Lynch Jr. wrote:

> Dan Wilson wrote:
>> We are attempting to use an initrd ram-disk as the permanent root file
system for a MPC8541-based system.
>>
>> We are using ELDK 4 to cross-compile, and are running linux 2.6.15
kernel, with u-boot 1.1.6 as our bootloader.
>>

>    I had similar problems with a permanent initramfs filesystem. It is
>possible your problem has nothing to do with your filesystem.
>

Can you tell me what your problem was, and how you resolved it?
I spent some time today reading about initramfs file systems, and have
built one of those
and tried it, with the same result, although linux did report that it saw
an initramfs instead
of an initrd.

>    First, I presume the debugging you added was in init/main.c.
>          Before you attempt to exec init, you can add code to open
>anyfile that you want on the ramdisk. opening a file requires less
>things to be right than exec'ing and that may isolate your problem
>further. I beleive you can enable system call tracing and find out more
>about where things are going off the rails.
>          You can also write a trivial hello world - one that does not
>use any libraries and very little code, and see if you can exec that.
>
>    When you boot Linux NFS - are you using the same linux kernel ?

Yes, I am using the same kernel.

Thanks for your help,

Dan.

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

* Re: ram-disk root file system
  2007-01-17  7:54 ` David H. Lynch Jr.
@ 2007-01-18  2:22   ` Dan Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Wilson @ 2007-01-18  2:22 UTC (permalink / raw)
  To: linuxppc-embedded

On 1/17/2007 at 2:54 AM David H. Lynch Jr. wrote:

>           Before you attempt to exec init, you can add code to open
> anyfile that you want on the ramdisk. opening a file requires less
> things to be right than exec'ing and that may isolate your problem
> further. I beleive you can enable system call tracing and find out more
> about where things are going off the rails.
>           You can also write a trivial hello world - one that does not
> use any libraries and very little code, and see if you can exec that.
> 

Hello world executed, which proved that the initramfs was mounted=
 correctly.

I then rebuilt busybox as a static executable, and now it runs and I get an
ash prompt.  I've still got some problems, but at least I'm moving forward
again!

Thanks for the pointer - simplifying back a hello world program was the
right move...

Best regards,

Dan.

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

end of thread, other threads:[~2007-01-18  2:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-17  5:02 ram-disk root file system Dan Wilson
2007-01-17  7:54 ` David H. Lynch Jr.
2007-01-18  2:22   ` Dan Wilson
  -- strict thread matches above, loose matches on Subject: below --
2007-01-17 22:57 dwilson

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.