I locked myself out fiddling with the bootscripts. Which got saved under jffs2. So now my nslu is not booting anymore fully complete so i can't fix the bootscripts.
I'm using a serial console, and i managed to change the cmdline of the kernel.
cmdline = *= root=/dev/mtdblock4 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/bin/sh noinitrd
gives me a kernel panic (no sync). The original commandline dies at some point in the bootscripts (it's a loop somewhere - which i could fix if i had access to the jffs partiion)
I tried hitting Ctrl-C when it says to continue in failsafe mode. Nothing happens. Tried the reset button procedure. Pretty sure, it's not working on nslu2. I noticed that when i keep the reset button pressed it stops booting, but when i release it it continues nicely.
I was thinking if i could boot somehow without mounting the jffs2 partition. Is there any method to do that without actually erasing it?
here's the log:
+Ethernet eth0: MAC address 00:18:39:ab:18:5c
IP: 192.168.0.1/255.255.255.0, Gateway: 192.168.0.1
Default server: 0.0.0.0, DNS server IP: 0.0.0.0
RedBoot(tm) bootstrap and debug environment [ROMRAM]
Red Hat certified release, version 1.92 - built 15:16:07, Feb 3 2004
Platform: IXDP425 Development Platform (XScale)
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
RAM: 0x00000000-0x02000000, 0x000723a0-0x01ff3000 available
FLASH: 0x50000000 - 0x50800000, 64 blocks of 0x00020000 bytes each.
== Executing boot script in 2.000 seconds - enter ^C to abort
RedBoot> boot;exec 0x01d00000
have eRcOmM
copy kernel code from flash to RAM
copy ramdisk file from flash to RAM
run kernel
Using base address 0x01d00000 and length 0x0000be50
Ans
APEX Boot Loader 1.5.14 -- Copyright (c) 2004,2005,2006,2007 Marc Singer
compiled for OpenWRT NSLU2 (8MiB Flash) on 2009.Feb.15-00:55:25
APEX comes with ABSOLUTELY NO WARRANTY. It is free software and
you are welcome to redistribute it under certain circumstances.
For details, refer to the file COPYING in the program source.
apex => mem:0x00200000+0xbe50 (48720 bytes)
env => nor:0x7c000+15k (in-use)
Use the command 'help help' to get started.
# sdram-init
1 bank of 2 128Mib chips
# memscan -u 0+256m
0x0 0x02000000 (32 MiB)
# copy $kernelsrc $bootaddr
# copy fis://kernel 0x00008000
1048544 bytes transferred
# wait 10 Type ^C key to cancel autoboot.
Type ^C key to cancel autoboot.
# boot
ATAG_HEADER
ATAG_MEM: start 0x00000000 size 0x02000000
ATAG_CMDLINE: (97 bytes) '*= root=/dev/mtdblock4 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd'
ATAG_END
Booting kernel at 0x00008000...
Uncompressing Linux.................................................................... done, booting the kernel.
Linux version 2.6.26.6 (nbd@baustelle) (gcc version 4.1.2) #17 Sun Feb 15 00:54:31 CET 2009
CPU: XScale-IXP42x Family [690541f1] revision 1 (ARMv5TE), cr=000039ff
Machine: Linksys NSLU2
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT undefined 5 cache
CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
Kernel command line: *= root=/dev/mtdblock4 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 30320KB available (1856K code, 172K data, 92K init)
SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 640 bytes
NET: Registered protocol family 16
IXP4xx: Using 16MiB expansion bus window size
NSLU2: Using MAC address 00:18:39:ab:18:5c for port 0
PCI: IXP4xx is host
PCI: IXP4xx Using direct access for memory space
PCI: bus0: Fast back to back transfers disabled
dmabounce: registered device 0000:00:01.0 on pci bus
dmabounce: registered device 0000:00:01.1 on pci bus
dmabounce: registered device 0000:00:01.2 on pci bus
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
IXP4xx Queue Manager initialized.
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
msgmni has been set to 59
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xc8000000 (irq = 15) is a XScale
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0xc8001000 (irq = 13) is a XScale
eth0: MII PHY 1 on NPE-B
IXP4XX-Flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
Searching for RedBoot partition table in IXP4XX-Flash.0 at offset 0x7e0000
6 RedBoot partitions found on MTD device IXP4XX-Flash.0
Creating 6 MTD partitions on "IXP4XX-Flash.0":
0x00000000-0x00040000 : "RedBoot"
0x00040000-0x00060000 : "SysConf"
0x00060000-0x00080000 : "Loader"
0x00080000-0x00180000 : "Kernel"
0x00180000-0x007e0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=300000, len=4E0000
0x00300000-0x007e0000 : "rootfs_data"
0x007e0000-0x00800000 : "FIS directory"
i2c /dev entries driver
rtc-x1205 0-006f: chip found, driver version 1.0.8
rtc-x1205 0-006f: rtc core: registered rtc-x1205 as rtc0
i2c-gpio i2c-gpio.0: using pins 7 (SDA) and 6 (SCL)
IXP4xx Watchdog Timer: heartbeat 60 sec
Registered led device: nslu2:green:ready
Registered led device: nslu2:red:status
Registered led device: nslu2:green:disk-1
Registered led device: nslu2:green:disk-2
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
XScale DSP coprocessor detected.
rtc-x1205 0-006f: setting system clock to 2009-04-25 21:27:01 UTC (1240694821)
VFS: Mounted root (squashfs filesystem) readonly.
Freeing init memory: 92K
Please be patient, while OpenWrt loads ...
- preinit -
Press CTRL-C for failsafe
switching to jffs2
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs
- init -