Skip to contentSkip to conversation

MBX860: How to boot with initrd ?

DISCUSSION Wolfgang Denk 4 participants 5 messages Jan 8, 1999 – Jan 10, 1999

lore
Share & tools
lore
#0 lore raw

Hi,

I'm trying to boot with `initrd' support on a MBX860 system. I know how to configure and build the kernel, and I know how to build the disk image, and I even seem to be able to build the zImage.initrd image. But I must be missing something, because such an image will not boot; all I see is:

	...
	Bytes Received =&941768, Bytes Loaded =&941768
	Bytes/Second   =&134538, Elapsed Time =7 Second(s)loaded at:     00210000 0030E440
	relocated to:  00100000 001FE440
	board data at: 023F4228 023F4250
	relocated to:  00200100 00200128
	zimage at:     00216000 002674C9
	relocated to:  023A3000 023F44C9
	initrd at:     002674C9 002E45DF
	avail ram:     0030E440 023A3000

	Linux/PPC load: console=tty0 console=ttyS0,9600n8
	Uncompressing Linux...done.
	Now booting the kernel

Then the system hangs, and I have to reset it.

Any help appreciated...

Let's assume that I want to populate the initrd' with exactly the same files as included in the mbxroot.min.tgz' example. [This is what I'm testing with, additionally I have only added a link /linuxrc' which points to /bin/sh'].

What might be missing? I'm sure it's just a minor detail, however critical :-(

TIA,

Wolfgang

Signature · 8 lines
Phone:  (+49)-89-95720-110   Fax: (+49)-89-95720-112   [email protected]
Office: (+49)-89-722-27328               [email protected]
He who hesitates is not only lost, but miles from the next exit.

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to [email protected] ]]
#1 lore raw

F'up to my own message:

Quoted 2 lines · In message <[email protected]> I wrote:

I'm trying to boot with `initrd' support on a MBX860 system. I know

...

Quoted 5 lines

Linux/PPC load: console=tty0 console=ttyS0,9600n8 Uncompressing Linux...done.
Now booting the kernel

Then the system hangs, and I have to reset it.

I guess I should have mentioned that I know that I have to add a "root=/dev/ram" to the command line when booting when using the generic code. I have modified arch/ppc/boot/misc.c a bit; maybe this in of general interest:

ppc/boot/misc.c renamed from ppc/boot/misc.c.ORIG +8 -0
@@ -51,7 +51,15 @@
 char	*cmd_line = cmd_buf;
 
 #if defined(CONFIG_MBX) || defined(CONFIG_FADS)
+#if defined(CONFIG_ROOT_NFS)
 char	*root_string = "root=/dev/nfs";
+#else
+# if defined(CONFIG_BLK_DEV_INITRD)
+char	*root_string = "root=/dev/ram";
+# else
+char	*root_string = "";
+# endif
+#endif
 char	*nfsaddrs_string = "nfsaddrs=";
 char	*nfsroot_string = "nfsroot=";
 char	*defroot_string = "/sys/mbxroot";

And, which makes things even more interesting: there was one kernel where I was able to boot from the initrd; however, I got some error messages from the hard disk:

    Linux/PPC load: console=tty0 console=ttyS0,9600n8 root=/dev/ram

    XXX Linux/PPC load: console=tty0 console=ttyS0,9600n8 root=/dev/ram
    Uncompressing Linux...done.
    Now booting the kernel
    Linux version 2.2.0-pre5 ([email protected]) (gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)) #3 Sat Jan 9 11:43:50 MET 1999
    Boot arguments: console=tty0 console=ttyS0,9600n8 root=/dev/ram root=/dev/nfs nfsroot=/sys/mbxroot
    time_init: decrementer frequency = 150000000/60
    Calibrating delay loop... 39.63 BogoMIPS
    Memory: 34996k available (592k kernel code, 744k data, 28k init) [c0000000,c2400000]
    POSIX conformance testing by UNIFIX
    PCI: Probing PCI hardware
    Linux NET4.0 for Linux 2.2
    Based upon Swansea University Computer Society NET3.039
    NET4: Unix domain sockets 1.0 for Linux NET4.0.
    NET4: Linux TCP/IP 1.0 for NET4.0
    IP Protocols: ICMP, UDP, TCP, IGMP
    Starting kswapd v 1.5 
    CPM UART driver version 0.02
    ttyS00 at 0x0280 is a SMC
    ttyS01 at 0x0380 is a SMC
    ttyS02 at 0x0100 is a SCC
    ttyS03 at 0x0200 is a SCC
    pty: 256 Unix98 ptys configured
    RAM disk driver initialized:  16 RAM disks of 4096K size
    hdc: probing with STATUS(0x80) instead of ALTSTATUS(0x08)
    hdc: probing with STATUS(0x80) instead of ALTSTATUS(0x08)
    hdc: no response (status = 0x80), resetting drive
    hdc: probing with STATUS(0x80) instead of ALTSTATUS(0x08)
    hdc: no response (status = 0x80)
    hdg: probing with STATUS(0x24) instead of ALTSTATUS(0x08)
    hdg: probing with STATUS(0x24) instead of ALTSTATUS(0x08)
    hdg: no response (status = 0xa1), resetting drive
    hdg: probing with STATUS(0x24) instead of ALTSTATUS(0x08)
    hdg: no response (status = 0xa1)
    hdh: probing with STATUS(0x24) instead of ALTSTATUS(0x08)
    hdh: probing with STATUS(0x24) instead of ALTSTATUS(0x08)
    hdh: no response (status = 0xa1), resetting drive
    hdh: probing with STATUS(0x24) instead of ALTSTATUS(0x08)
    hdh: no response (status = 0xa1)
    hdc: probing with STATUS(0x80) instead of ALTSTATUS(0x08)
    hdc: probing with STATUS(0x80) instead of ALTSTATUS(0x08)
    hdc: no response (status = 0x80), resetting drive
    hdc: probing with STATUS(0x80) instead of ALTSTATUS(0x08)
    hdc: no response (status = 0x80)
    hdg: probing with STATUS(0x24) instead of ALTSTATUS(0x08)
    hdg: probing with STATUS(0x24) instead of ALTSTATUS(0x08)
    hdg: no response (status = 0xa1), resetting drive
    hdg: probing with STATUS(0x24) instead of ALTSTATUS(0x08)
    hdg: no response (status = 0xa1)
    hdh: probing with STATUS(0x24) instead of ALTSTATUS(0x08)
    hdh: probing with STATUS(0x24) instead of ALTSTATUS(0x08)
    hdh: no response (status = 0xa1), resetting drive
    hdh: probing with STATUS(0x24) instead of ALTSTATUS(0x08)
    hdh: no response (status = 0xa1)
    CPM ENET Version 0.1, 08:00:3e:26:38:4a
    RAMDISK: Compressed image found at block 0
    EXT2-fs warning: checktime reached, running e2fsck is recommended
    VFS: Mounted root (ext2 filesystem).ê

    ### Initial RAM disk starting interactive shell ###
    bash# 

Ok, so I removed the IDE support from the configuration because I don't need it right now; the kernel did not boot any more. Restored the old configuration - didn't boot either.

Since then, all kernels hang the same way, and I don't have an idea what might be wrong..

Wolfgang

Signature · 10 lines
Phone:  (+49)-89-95720-110   Fax: (+49)-89-95720-112   [email protected]
Office: (+49)-89-722-27328               [email protected]
Harrisberger's Fourth Law of the Lab:
	Experience is directly proportional to the
	amount of equipment ruined.

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to [email protected] ]]
#2 lore raw
In reply to Wolfgang Denk

Does this source tree boot without the initrd?

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#3 lore raw
In reply to Wolfgang Denk
Quoted 2 lines · Wolfgang Denk

.... But I must be missing something, because such an image will not boot; all I see is:

Hmmm. I know initrd works because I use it quite often. All of the memory relocation looks OK. Cort had a good suggestion, can you build a kernel that boots using NFS (or at least boots to the point of trying to mount the root fs).

Quoted 1 line

Linux/PPC load: console=tty0 console=ttyS0,9600n8

This looks a little weird. It should not be necessary and I don't know what happens when it is used.

Quoted 1 line

Any help appreciated...

Look for 'log_buf' in your System.map. It will have an address something like 'c00daa78'. When you reset the MBX, use the EPPC-Bug to dump the memory starting at daa78 (in this example). This is the text of the kernel printk until the serial device is initialized. It may hold some clues.

You could also use 'noinitrd' on the command line to determine if the problem is related to initrd or something else.

Quoted 4 lines

Let's assume that I want to populate the initrd' with exactly the same files as included in the mbxroot.min.tgz' example. [This is what I'm testing with, additionally I have only added a link /linuxrc' which points to /bin/sh'].

That should work fine.

Quoted 2 lines

What might be missing? I'm sure it's just a minor detail, however critical :-(

They always are :-). One wrong bit can screw up everything...... and you have a 50% change of getting it right :-).

    -- Dan

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#4 lore raw
Quoted 12 lines · Dan Malek
Quoted 2 lines · Wolfgang Denk

.... But I must be missing something, because such an image will not boot; all I see is:

Hmmm. I know initrd works because I use it quite often. All of the memory relocation looks OK. Cort had a good suggestion, can you build a kernel that boots using NFS (or at least boots to the point of trying to mount the root fs).

Quoted 4 lines
Quoted 1 line

Linux/PPC load: console=tty0 console=ttyS0,9600n8

This looks a little weird. It should not be necessary and I don't know what happens when it is used.

Actually, it's pretty handy, if you have a VGA display.. it will duplicate everything printed to the console to tty0 (VGA) and ttyS0 (the serial port). This is hardcoded in arch/ppc/boot somewhere.

I don't know how much this will help, but I have had some problems with the bootloader when compiled with some versions of egcs on a Blackhawk board. You could try compiling arch/ppc/boot/*.c with -O instead of -O2.

--------------------------------------------------------------------------

| Troy Benjegerdes    |       [email protected]     |    [email protected]   |
|    Unix is user friendly... You just have to be friendly to it first.  |
| This message composed with 100% free software.    http://www.gnu.org   |

--------------------------------------------------------------------------

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]