Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Tue Jun 19, 2018 5:05 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sun Nov 29, 2009 2:49 pm 
Offline
Newbie

Joined: Sun Nov 20, 2005 7:40 pm
Posts: 51
Hi,

now that at least u-boot and netcat work on my ls2, it seems, that kernel 2.6.30.5 doesn't boot correctly. However, I don't know how to find out what's wrong, because u-boot is already left and the ls2 isn't pingable. So let's start with my environment:
Code:
(UNKNOWN) [192.168.11.150] 6666 (?) open                                                                                                                     
Bus 0: OK Bus 1: OK                                                                                                                                         
  Device 0: Model: WDC WD1600BB-56GUC0  Firm: 20.02H20 Ser#: W -DCWLA59278682                                                                               
            Type: Hard Disk                                                                                                                                 
            Supports 48-bit addressing                                                                                                                       
            Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)                                                                                               
Boot in 05 seconds ('s' to stop)...s                                                                                                                         

=> printenv
printenv   
bootargs=root=/dev/hda1
bootcmd=run bootcmd1   
nfsboot=run nfsload nfsargs;bootm
bootdelay=10                     
baudrate=57600
autoload=no
stdin=nc
stdout=nc
stderr=nc
ipaddr=192.168.11.150
netmask=255.255.255.0
serverip=192.168.11.149
ncip=192.168.11.149
netretry=no
nc=setenv stdin nc;setenv stdout nc;setenv stderr nc
ser=setenv stdin serial;setenv stdout serial;setenv stderr serial
ldaddr=82000000
guaddr=81000000
hdpart=0:1
hdfile=boot/vmlinuz
hdload=echo Loading ${hdpart}:${hdfile};ext2load ide ${hdpart} ${ldaddr} ${hdfile}
boothd=setenv bootargs root=/dev/hda1;bootm ${ldaddr}
hdboot=run hdload boothd
flboot=setenv bootargs root=/dev/hda1;bootm bfc40000
emboot=setenv bootargs root=/dev/ram0;bootm bfc40000
rootpath=/opt/nfsroot/mipsel
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
nfsfile=vmlinuz
nfsload=nfs ${ldaddr} ${serverip}:${rootpath}/${nfsfile}
bootretry=30
bootcmd1=run hdboot;run flboot
bootcmd2=run flboot
bootcmd3=run emboot
ubpart=0:3
ubfile=share/u-boot/u-boot-v2-mips.flash.bin
ubload=echo Loading ${ubpart}:${ubfile};ext2load ide ${ubpart} ${ldaddr} ${ubfile}
ubsaddr=bfc00000
ubeaddr=bfc2ffff
ubflash=protect off ${ubsaddr} ${ubeaddr};era ${ubsaddr} ${ubeaddr};cp.b ${ldaddr} ${ubsaddr} ${filesize};cmp.b ${ldaddr} ${ubsaddr} ${filesize}
upgrade=run ubload ubflash
ethact=rc32434_eth

Environment size: 1387/65532 bytes
=> ext2ls ide 0:1 /boot
ext2ls ide 0:1 /boot
<DIR>       1024 .
<DIR>       1024 ..
         5587343 vmlinuz-2.6.30.5
           49975 config-2.6.30.5
          894598 System.map-2.6.30.5
          164732 u-boot-v2-mips.flash.bin
<SYM>         16 vmlinuz
<SYM>         15 config
<SYM>         19 System.map

The last 3 files are symlinks to the ones above. So here you can see only kernel version 2.6.30.5. I've untared davy_gravy's kernel in /, so the module files are also available:
Code:
=> ext2ls ide 0:1 /lib/modules
ext2ls ide 0:1 /lib/modules
<DIR>       1024 .
<DIR>       2048 ..
           16768 idtinfo.o
<DIR>       1024 2.4.20_mipsel_linkstation
<DIR>       1024 2.6.30.5

My u-boot is this one. The LS2 was booted in christmas tree mode. I haven't flashed it before, I have only installed OpenLink 0.52b and a updated busybox to a more recent version (I think 1.9.x was the last one I could compile on kernel 2.4.20/glibc version of OpenLink 0.52b).
So what happen, when booting the new kernel? (hdfile is set correctly, so I can just call 'boot', right?)
Code:
=> boot
boot
Loading 0:1:boot/vmlinuz

5587343 bytes read
## Booting image at 82000000 ...
Loading .text @ 0x80002000 (3644260 bytes)
Loading __ex_table @ 0x8037bb70 (6784 bytes)
Loading .notes @ 0x8037d5f0 (36 bytes)
Loading .rodata @ 0x8037e000 (331828 bytes)
Loading .init.rodata @ 0x803cf034 (256 bytes)
Loading .pci_fixup @ 0x803cf134 (1736 bytes)
Loading __ksymtab @ 0x803cf7fc (18920 bytes)
Loading __ksymtab_gpl @ 0x803d41e4 (9248 bytes)
Loading __kcrctab @ 0x803d6604 (9460 bytes)
Loading __kcrctab_gpl @ 0x803d8af8 (4624 bytes)
Loading __ksymtab_strings @ 0x803d9d08 (61219 bytes)
Loading __param @ 0x803e8c2c (5076 bytes)
Loading .data @ 0x803ea000 (102016 bytes)
Loading .data.cacheline_aligned @ 0x80403000 (1536 bytes)
Loading .init.text @ 0x80404000 (142984 bytes)
Loading .init.data @ 0x80426e88 (21880 bytes)
Loading .init.setup @ 0x8042c400 (864 bytes)
Loading .initcall.init @ 0x8042c760 (672 bytes)
Loading .con_initcall.init @ 0x8042ca00 (4 bytes)
Loading .exit.text @ 0x8042ca04 (3748 bytes)
Loading .init.ramfs @ 0x8042e000 (512 bytes)
Clearing .bss @ 0x8042f000 (166304 bytes)

Starting kernel @ 0x80006230...

...and that's it. I also run tcpdump on eth0 to see if anything comes up, but there's nothing. Also I can't hear any hdd activity. Well, I wonder how kernel 2.6.30.5 might access my hard disk, since the old kernel (and OpenLink 0.52b) were using /dev/hda while the new kernel might expect /dev/sda.

So what should I do? Do I need to load u-boot into the flash rom first? Or do I need foonas-em?

In the end I want to have Lenny on my LS2. I've read Endy's blog for installing u-boot and I've seen, that there's a guide to install Lenny here. However, I was hoping that I don't need to setup a development environment with this SDK stuff in order to compile everything myself.


Top
   
PostPosted: Mon Nov 30, 2009 11:07 am 
Offline
Newbie

Joined: Thu Dec 13, 2007 2:31 pm
Posts: 21
You should change the bootargs to /dev/sdaX, since the new kernel use scsi simulated drivers to access harddisk.


Top
   
PostPosted: Mon Nov 30, 2009 9:42 pm 
Offline
Newbie

Joined: Sun Nov 20, 2005 7:40 pm
Posts: 51
Thanks, but now I see, that changing bootargs will be overwritten later, because "boot" calls "bootcmd1", which calls "hdboot", which calls "boothd", which calls "setenv bootargs root=/dev/hda1;[...]", so it's being reverted to hda1. Since I don't know how to setenv a value that includes a semi-colon (if i "setenv something val1; val2", it would be interpreted as "setenv something val1" and another command "val2").

So I called the commands directly:
Code:
setenv bootargs root=/dev/sda1
run hdload
bootm ${ldaddr}

Everything seems to be fine, the LS2 stays in christmas tree mode, i hear the hdd working, i see the network interface coming up after some seconds, i can ssh to the linkstation, but *surprise* the old kernel has been booted.

How is that possible?

Though there was no error, it seems as if hdload could not load the new kernel into ram.
I've read in some thread, that there's a unprotect command, but I thought it is used to remove write-protection from flash when I want to write u-boot into it.

edit: once again with the full input/output of netcat...
Code:
=> printenv
printenv   
bootcmd=run bootcmd1
nfsboot=run nfsload nfsargs;bootm
bootdelay=10                     
baudrate=57600                   
autoload=no                     
stdin=nc                         
stdout=nc                       
stderr=nc                       
ipaddr=192.168.11.150           
netmask=255.255.255.0           
serverip=192.168.11.149         
ncip=192.168.11.149             
netretry=no                     
nc=setenv stdin nc;setenv stdout nc;setenv stderr nc
ser=setenv stdin serial;setenv stdout serial;setenv stderr serial
ldaddr=82000000                                                 
guaddr=81000000                                                 
hdpart=0:1                                                       
hdfile=boot/vmlinuz                                             
hdload=echo Loading ${hdpart}:${hdfile};ext2load ide ${hdpart} ${ldaddr} ${hdfile}
boothd=setenv bootargs root=/dev/hda1;bootm ${ldaddr}                             
hdboot=run hdload boothd                                                         
flboot=setenv bootargs root=/dev/hda1;bootm bfc40000                             
emboot=setenv bootargs root=/dev/ram0;bootm bfc40000                             
rootpath=/opt/nfsroot/mipsel                                                     
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
nfsfile=vmlinuz                                                                                                                           
nfsload=nfs ${ldaddr} ${serverip}:${rootpath}/${nfsfile}                                                                                 
bootretry=30                                                                                                                             
bootcmd1=run hdboot;run flboot
bootcmd2=run flboot
bootcmd3=run emboot
ubpart=0:3
ubfile=share/u-boot/u-boot-v2-mips.flash.bin
ubload=echo Loading ${ubpart}:${ubfile};ext2load ide ${ubpart} ${ldaddr} ${ubfile}
ubsaddr=bfc00000
ubeaddr=bfc2ffff
ubflash=protect off ${ubsaddr} ${ubeaddr};era ${ubsaddr} ${ubeaddr};cp.b ${ldaddr} ${ubsaddr} ${filesize};cmp.b ${ldaddr} ${ubsaddr} ${filesize}
upgrade=run ubload ubflash
ethact=rc32434_eth
bootargs=root=/dev/sda1

Environment size: 1387/65532 bytes
=> run hdload
run hdload
Loading 0:1:boot/vmlinuz

5587343 bytes read
=> bootm ${ldaddr}
bootm ${ldaddr}
## Booting image at 82000000 ...
Loading .text @ 0x80002000 (3644260 bytes)
Loading __ex_table @ 0x8037bb70 (6784 bytes)
Loading .notes @ 0x8037d5f0 (36 bytes)
Loading .rodata @ 0x8037e000 (331828 bytes)
Loading .init.rodata @ 0x803cf034 (256 bytes)
Loading .pci_fixup @ 0x803cf134 (1736 bytes)
Loading __ksymtab @ 0x803cf7fc (18920 bytes)
Loading __ksymtab_gpl @ 0x803d41e4 (9248 bytes)
Loading __kcrctab @ 0x803d6604 (9460 bytes)
Loading __kcrctab_gpl @ 0x803d8af8 (4624 bytes)
Loading __ksymtab_strings @ 0x803d9d08 (61219 bytes)
Loading __param @ 0x803e8c2c (5076 bytes)
Loading .data @ 0x803ea000 (102016 bytes)
Loading .data.cacheline_aligned @ 0x80403000 (1536 bytes)
Loading .init.text @ 0x80404000 (142984 bytes)
Loading .init.data @ 0x80426e88 (21880 bytes)
Loading .init.setup @ 0x8042c400 (864 bytes)
Loading .initcall.init @ 0x8042c760 (672 bytes)
Loading .con_initcall.init @ 0x8042ca00 (4 bytes)
Loading .exit.text @ 0x8042ca04 (3748 bytes)
Loading .init.ramfs @ 0x8042e000 (512 bytes)
Clearing .bss @ 0x8042f000 (166304 bytes)

Starting kernel @ 0x80006230...

...and finally the old kernel...
Code:
$ uname -a
Linux tuxi 2.4.20_mipsel_linkstation #88 2005ǯ 2�� 25�� ������ 20:17:00 JST mips unknown


Top
   
PostPosted: Tue Dec 01, 2009 3:00 am 
Offline
Newbie

Joined: Thu Dec 13, 2007 2:31 pm
Posts: 21
You should change the symbol link of vmlinuz under your /boot, and you if you want to set semi-colon, you only need to put such as "\;" :o)


Top
   
PostPosted: Tue Dec 01, 2009 1:33 pm 
Offline
Betatester
User avatar

Joined: Thu Jul 14, 2005 4:38 pm
Posts: 941
Location: England
DavyGravy wrote:
-1. :) Do not skip steps or reading. Make sure that you understand that the old kernel (2.4 & 2.6.22.19) had a custom (non-mainline) rtc driver that was "nonstandard". The new kernel uses the mainline driver for the rtc chip, but setting the hwclock in one kernel and then booting into the other kernel can cause some problems. These problems can easily be avoided if you do the workarounds. Don't skip those workarounds. Read and understand. Then do. If you don't understand, ask first, or maybe read again. :)



DavyGravy wrote:
it sounds like you are encountering a problem w/ conversion from old to new kernel usage. Bauldrick & I spent hours and hours on that... it can be messy/tricky... Did you run tune2fs to stop the autofsck, as shown, and also run fsck after unmounting and before rebooting?


DavyGravy wrote:
try these explicit commands...

Code:
set bootargs 'root=/dev/sda1 rw netconsole=6666@192.168.11.150/,@192.168.11.149/'
ext2load ide 0:1 82000000 boot/vmlinuz-2.6.30.5
bootm 82000000


does that do anything better?


Taken from post : viewtopic.php?f=12&t=20753&p=132968&hilit=foonas+em#p132968

Hope it helps :shock: you either have the rtc problem or as suggested change bootcmds


Top
   
PostPosted: Tue Dec 01, 2009 7:46 pm 
Offline
Newbie

Joined: Sun Nov 20, 2005 7:40 pm
Posts: 51
Hey, it works! ...more or less. But thanks to the extended bootargs I can now see, what's happening:
- kernel 2.6.30.5 is being loaded
- ...but fails
- system restarts immediately
- ...and stays in christmas tree mode (!) -> that's why I thought that it did not restart
- default kernel 2.4.20 is being loaded again during restart
Code:
=> setenv bootargs 'root=/dev/sda1 rw netconsole=6666@192.168.11.150/,@192.168.11.149/'
setenv bootargs 'root=/dev/sda1 rw netconsole=6666@192.168.11.150/,@192.168.11.149/'   
=> ext2load ide 0:1 82000000 boot/vmlinuz-2.6.30.5                                     
ext2load ide 0:1 82000000 boot/vmlinuz-2.6.30.5                                       

5587343 bytes read
=> bootm 82000000
bootm 82000000   
## Booting image at 82000000 ...
Loading .text @ 0x80002000 (3644260 bytes)
Loading __ex_table @ 0x8037bb70 (6784 bytes)
Loading .notes @ 0x8037d5f0 (36 bytes)     
Loading .rodata @ 0x8037e000 (331828 bytes)
Loading .init.rodata @ 0x803cf034 (256 bytes)
Loading .pci_fixup @ 0x803cf134 (1736 bytes)
Loading __ksymtab @ 0x803cf7fc (18920 bytes)
Loading __ksymtab_gpl @ 0x803d41e4 (9248 bytes)
Loading __kcrctab @ 0x803d6604 (9460 bytes)   
Loading __kcrctab_gpl @ 0x803d8af8 (4624 bytes)
Loading __ksymtab_strings @ 0x803d9d08 (61219 bytes)
Loading __param @ 0x803e8c2c (5076 bytes)           
Loading .data @ 0x803ea000 (102016 bytes)           
Loading .data.cacheline_aligned @ 0x80403000 (1536 bytes)
Loading .init.text @ 0x80404000 (142984 bytes)           
Loading .init.data @ 0x80426e88 (21880 bytes)           
Loading .init.setup @ 0x8042c400 (864 bytes)             
Loading .initcall.init @ 0x8042c760 (672 bytes)         
Loading .con_initcall.init @ 0x8042ca00 (4 bytes)       
Loading .exit.text @ 0x8042ca04 (3748 bytes)             
Loading .init.ramfs @ 0x8042e000 (512 bytes)             
Clearing .bss @ 0x8042f000 (166304 bytes)               

Starting kernel @ 0x80006230...

Linux version 2.6.30.5 (davygravy@DuoBuntu) (gcc version 4.2.4) #1 Sun Sep 27 17:04:12 CDT 2009
console [early0] enabled                                                                       
CPU revision is: 0001800a (MIPS 4Kc)                                                           
RC32434: GPIO controller initialized                                                           
HD-HLAN: GPIO pins initialized                                                                                                                               
Determined physical RAM map:                                                                                                                                 
 memory: 04000000 @ 00000000 (usable)                                                                                                                       
Initrd not found or empty - disabling initrd                                                                                                                 
Zone PFN ranges:                                                                                                                                             
  Normal   0x00000000 -> 0x00004000                                                                                                                         
Movable zone start PFN for each node                                                                                                                         
early_node_map[1] active PFN ranges                                                                                                                         
    0: 0x00000000 -> 0x00004000                                                                                                                             
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256                                                                                   
Kernel command line: root=/dev/sda1 rw netconsole=6666@192.168.11.150/,@192.168.11.149/ console=                                                             
Primary instruction cache 8kB, VIPT, 4-way, linesize 16 bytes.                                                                                               
Primary data cache 8kB, 4-way, VIPT, no aliases, linesize 16 bytes                                                                                           
NR_IRQS:168                                                                                                                                                 
RC32434: Interrupt controller initialized                                                                                                                   
PID hash table entries: 256 (order: 8, 1024 bytes)                                                                                                           
HD-HLAN: CPU frequency detected at 400 MHz                                                                                                                   
RC32434: periodic timer initialized                                                                                                                         
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)                                                                                               
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)                                                                                                 
Memory: 60444k/65536k available (3558k kernel code, 5016k reserved, 542k data, 172k init, 0k highmem)                                                       
Calibrating delay loop... 398.33 BogoMIPS (lpj=796672)                                                                                                       
Mount-cache hash table entries: 512                                                                                                                         
net_namespace: 1012 bytes                                                                                                                                   
NET: Registered protocol family 16                                                                                                                           
RC32434: PCI controller initialized                                                                                                                         
bio: create slab <bio-0> at 0                                                                                                                               
SCSI subsystem initialized                                                                                                                                   
usbcore: registered new interface driver usbfs                                                                                                               
usbcore: registered new interface driver hub                                                                                                                 
usbcore: registered new device driver usb                                                                                                                   
pci 0000:00:04.0: PME# supported from D0 D1 D2 D3hot                                                                                                         
pci 0000:00:04.0: PME# disabled                                                                                                                             
pci 0000:00:04.1: PME# supported from D0 D1 D2 D3hot                                                                                                         
pci 0000:00:04.1: PME# disabled                                                                                                                             
pci 0000:00:04.2: PME# supported from D0 D1 D2 D3hot                                                                                                         
pci 0000:00:04.2: PME# disabled                                                                                                                             
NET: Registered protocol family 2                                                                                                                           
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)                                                                                               
TCP established hash table entries: 2048 (order: 2, 16384 bytes)                                                                                             
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)                                                                                                     
TCP: Hash tables configured (established 2048 bind 2048)                                                                                                     
Switched to NOHz mode on CPU #0                                                                                                                             
TCP reno registered                                                                                                                                         
NET: Registered protocol family 1                                                                                                                           
VFS: Disk quotas dquot_6.5.2                                                                                                                                 
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)                                                                                                   
NTFS driver 2.1.29 [Flags: R/W].                                                                                                                             
msgmni has been set to 118                                                                                                                                   
io scheduler noop registered                                                                                                                                 
io scheduler cfq registered (default)                                                                                                                       
Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled                                                                                                     
serial8250.0: ttyS0 at MMIO 0x18058000 (irq = 104) is a 16550A                                                                                               
brd: module loaded                                                                                                                                           
loop: module loaded                                                                                                                                         
Driver 'sd' needs updating - please use bus_type methods                                                                                                     
pata_it821x: controller in pass through mode.                                                                                                               
scsi0 : pata_it821x                                                                                                                                         
scsi1 : pata_it821x                                                                                                                                         
ata1: PATA max UDMA/133 cmd 0x18200010 ctl 0x18200020 bmdma 0x18200000 irq 146                                                                               
ata2: PATA max UDMA/133 cmd 0x18200018 ctl 0x18200024 bmdma 0x18200008 irq 146                                                                               
RC32434: Ethernet controller initialized                                                                                                                     
netconsole: local port 6666                                                                                                                                 
netconsole: local IP 192.168.11.150                                                                                                                         
netconsole: interface eth0                                                                                                                                   
netconsole: remote port 6666                                                                                                                                 
netconsole: remote IP 192.168.11.149                                                                                                                         
netconsole: remote ethernet address ff:ff:ff:ff:ff:ff                                                                                                       
netconsole: device eth0 not up yet, forcing it                                                                                                               
netconsole: carrier detect appears untrustworthy, waiting 4 seconds                                                                                         
ata1.00: ATA-6: WDC WD1600BB-56GUC0, 20.02H20, max UDMA/100                                                                                                 
ata1.00: 312581808 sectors, multi 16: LBA48                                                                                                                 
ata1.00: configured for UDMA/100                                                                                                                             
scsi 0:0:0:0: Direct-Access     ATA      WDC WD1600BB-56G 20.0 PQ: 0 ANSI: 5                                                                                 
sd 0:0:0:0: [sda] 312581808 512-byte hardware sectors: (160 GB/149 GiB)                                                                                     
sd 0:0:0:0: [sda] Write Protect is off                                                                                                                       
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA                                                                     
 sda: sda1 sda2 sda3                                                                                                                                         
sd 0:0:0:0: [sda] Attached SCSI disk                                                                                                                         
console [netcon0] enabled                                                                                                                                   
netconsole: network logging started                                                                                                                         
physmap platform flash device: 00400000 at 1fc00000                                                                                                         
physmap-flash.0: Found 1 x16 devices at 0x0 in 8-bit bank                                                                                                   
 Amd/Fujitsu Extended Query Table at 0x0040                                                                                                                 
number of CFI chips: 1                                                                                                                                       
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.                                                                                     
RedBoot partition parsing not available                                                                                                                     
RC32434: SPI controller initialized                                                                                                                         
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver                                                                                                   
ehci_hcd 0000:00:04.2: EHCI Host Controller                                                                                                                 
ehci_hcd 0000:00:04.2: new USB bus registered, assigned bus number 1                                                                                         
ehci_hcd 0000:00:04.2: Enabling legacy PCI PM                                                                                                               
ehci_hcd 0000:00:04.2: irq 148, io mem 0x40022000                                                                                                           
ehci_hcd 0000:00:04.2: USB 2.0 started, EHCI 1.00                                                                                                           
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002                                                                                               
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1                                                                                           
usb usb1: Product: EHCI Host Controller                                                                                                                     
usb usb1: Manufacturer: Linux 2.6.30.5 ehci_hcd                                                                                                             
usb usb1: SerialNumber: 0000:00:04.2                                                                                                                         
usb usb1: configuration #1 chosen from 1 choice                                                                                                             
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 5 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci_hcd 0000:00:04.0: OHCI Host Controller
ohci_hcd 0000:00:04.0: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:04.0: irq 148, io mem 0x40020000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: OHCI Host Controller
usb usb2: Manufacturer: Linux 2.6.30.5 ohci_hcd
usb usb2: SerialNumber: 0000:00:04.0
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 3 ports detected
ohci_hcd 0000:00:04.1: OHCI Host Controller
ohci_hcd 0000:00:04.1: new USB bus registered, assigned bus number 3
ohci_hcd 0000:00:04.1: irq 148, io mem 0x40021000
usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: OHCI Host Controller
usb usb3: Manufacturer: Linux 2.6.30.5 ohci_hcd
usb usb3: SerialNumber: 0000:00:04.1
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
rtc-rs5c348 spi0.2: chip found, driver version 0.2
rtc-rs5c348 spi0.2: spiclk 1000 KHz.
rtc-rs5c348 spi0.2: rtc core: registered rtc-rs5c348 as rtc0
TCP cubic registered
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
NET4: DECnet for Linux: V.2.5.68s (C) 1995-2003 Linux DECnet Project Team
DECnet: Routing cache hash table of 1024 buckets, 4Kbytes
NET: Registered protocol family 12
turn off boot console early0
rtc-rs5c348 spi0.2: retrieved date/time is not valid.
rtc-rs5c348 spi0.2: setting system clock to 1970-01-01 00:00:00 UTC (0)
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with writeback data mode.
VFS: Mounted root (ext3 filesystem) on device 8:1.
Freeing unused kernel memory: 172k freed
Warning: unable to open an initial console.
Algorithmics/MIPS FPU Emulator v1.5
sd 0:0:0:0: [sda] Synchronizing SCSI cache
Restarting system.

Yes, I've turned off autofsck. But as you can see, there's a problem with the hwclock. However, does that cause the restart? Or is the restart caused by "Warning: unable to open an initial console."?
I also did not run fsck manually, but that doesn't seem to be a problem ("VFS: Mounted root (ext3 filesystem) on device 8:1.").

edit: Oh, is it the superblock/magic number thing, that causes the reboot? I know that Buffalo changed it and patched their software to work with the new superblock/magic number, but standard software doesn't. Is it the kernel that checks the superblock/magic number? Or is it mount and fsck? ...by the way: the fsck binary (fsck 1.27 (8-Mar-2002), the original one from OpenLink 0.52b) tells me "Bad magic number in super-block". But OpenLink still boots fine. So I guess the current magic number is the special one and I need to change it to the default one, right?

edit2: damn, strange things happen in my filesystem:
Code:
?rwsrwsrwt  65535 4294967295 4294967295 4294967295 Jan  1  1970 dir1
?rwsrwsrwt  65535 4294967295 4294967295 4294967295 Jan  1  1970 dir2


edit3: aaaaaaaaaaaaaaand it's gone! Yes, after restarting the ls2, I can't ssh to it anymore. It's still pingable and nmap tells me about an open ftp port, but ssh is gone. Let's hope that my full hd backup can solve the problem...


Top
   
PostPosted: Tue Dec 01, 2009 9:08 pm 
Offline
Betatester
User avatar

Joined: Thu Jul 14, 2005 4:38 pm
Posts: 941
Location: England
Have you tried davy_gravy's write up? viewtopic.php?f=12&t=20753&p=132251&hilit=steps+reading#p132251

He did a great job of writing it all up after him and I (most definately mostly him!) struggled to get it working.

It looks like you need to set hardware clock etc....

You can still get uboot up and see it failing to boot? Just can't ssh in after it appears to boot? (or am I wrong there <)

-edit-

(most definately me struggling, him figuring it out, is what I meant - if he's watching :p )


Top
   
PostPosted: Tue Dec 01, 2009 9:29 pm 
Offline
Newbie

Joined: Sun Nov 20, 2005 7:40 pm
Posts: 51
No, I haven't written u-boot into flash, so currently I can't. I keep my fingers crossed that ssh will work again after restoring the backup.

Thanks for the link - that's a nice summary. Page 5 in a non-pinned thread ...really, that's a good hiding place. ;)


Top
   
PostPosted: Wed Dec 02, 2009 12:37 am 
Offline
Newbie

Joined: Sun Nov 20, 2005 7:40 pm
Posts: 51
Wooohoo!

u-boot in flash - done
foonas-em in flash - done
lenny on hdd - next

Installing u-boot (/boot/u-boot-v2-mips.flash.bin)
Code:
=> setenv ubfile boot/u-boot-v2-mips.flash.bin
setenv ubfile boot/u-boot-v2-mips.flash.bin   
=> setenv ubpart 0:1                         
setenv ubpart 0:1                             
=> saveenv                                   
saveenv                                       
Saving Environment to Flash...               
Un-Protected 1 sectors                       
Erasing Flash...                             
Flash erase: first = 10 @ 0xbfc30000         
             last  = 10 @ 0xbfc30000         
Flash erase: Done                             
Erased 1 sectors                             
Writing to Flash... done                     
Protected 1 sectors                           

=> run upgrade                   
run upgrade                       
Loading 0:1:boot/u-boot-v2-mips.flash.bin

164732 bytes read
Un-Protected 10 sectors

Flash erase: first = 0 @ 0xbfc00000
             last  = 9 @ 0xbfc20000
Flash erase: Done                 
Erased 10 sectors                 
Copy to Flash... done             
Total of 164732 bytes were the same



Installing Foonas-EM (/boot/foonas)
Code:
Environment size: 1482/65532 bytes
=> ext2load ide 0:1 82000000  /boot/foonas
ext2load ide 0:1 82000000  /boot/foonas   

3466346 bytes read
=> protect off bfc40000 bffbffff
protect off bfc40000 bffbffff   
Un-Protected 56 sectors         
=> erase bfe00000 bffbffff     
erase bfe00000 bffbffff         

Flash erase: first = 39 @ 0xbfe00000
             last  = 66 @ 0xbffb0000
Flash erase: Done                   
Erased 28 sectors                   
=> erase bfc40000 bffbffff         
erase bfc40000 bffbffff             

Flash erase: first = 11 @ 0xbfc40000
             last  = 66 @ 0xbffb0000
Flash erase: Done                   
Erased 56 sectors                   
=> cp.b 82000000 bfc40000 180000   
cp.b 82000000 bfc40000 180000       
Copy to Flash... done               
=> cp.b 82180000 bfdc0000 40000     
cp.b 82180000 bfdc0000 40000       
Copy to Flash... done               
=> cp.b 821c0000 bfe00000 18E46A   
cp.b 821c0000 bfe00000 18E46A       
Copy to Flash... done               
=> cmp.b 0x82000000 bfc40000 34e46a
cmp.b 0x82000000 bfc40000 34e46a   
Total of 3466346 bytes were the same
=> flinfo                           
flinfo                             

Bank # 1: Flash chip: STMICRO M29W324DB

CFI Query Results:
Primary Vendor Command Set: 0x0002 (AMD/Fujitsu Standard)
Primary Algorithm Table at 0x0040                       
Alternate Vendor Command Set: 0x0000 (None)             
No Alternate Algorithm Table                             
Vcc Min.: 2.7 V                                         
Vcc Max.: 3.6 V                                         
Vpp Min.: 11.5 V                                         
Vpp Max.: 12.5 V                                         
Typical byte/word write timeout: 16 us                   
Maximum byte/word write timeout: 256 us                 
Full buffer write not supported                         
Typical block erase timeout: 1024 ms                     
Maximum block erase timeout: 8192 ms                     
Chip erase not supported                                 
Device size: 0x400000 bytes (4 MiB)                     
Flash Device Interface description: 0x0002               
  - x8 / x16 via BYTE# with asynchronous interface       
Max. bytes in buffer write: 1                           
Number of Erase Block Regions: 2                         

Actual values used by U-Boot:
Word   write timeout:      2 ms
Buffer write timeout:      2 ms
Sector erase timeout:   8192 ms

Size: 4 MiB in 71 Sectors
  Sector Start Addresses:
    BFC00000 (RO) BFC02000 (RO) BFC04000 (RO) BFC06000 (RO) BFC08000 (RO)
    BFC0A000 (RO) BFC0C000 (RO) BFC0E000 (RO) BFC10000 (RO) BFC20000 (RO)
    BFC30000 (RO) BFC40000 (RW) BFC50000 (RW) BFC60000 (RW) BFC70000 (RW)
    BFC80000 (RW) BFC90000 (RW) BFCA0000 (RW) BFCB0000 (RW) BFCC0000 (RW)
    BFCD0000 (RW) BFCE0000 (RW) BFCF0000 (RW) BFD00000 (RW) BFD10000 (RW)
    BFD20000 (RW) BFD30000 (RW) BFD40000 (RW) BFD50000 (RW) BFD60000 (RW)
    BFD70000 (RW) BFD80000 (RW) BFD90000 (RW) BFDA0000 (RW) BFDB0000 (RW)
    BFDC0000 (RW) BFDD0000 (RW) BFDE0000 (RW) BFDF0000 (RW) BFE00000 (RW)
    BFE10000 (RW) BFE20000 (RW) BFE30000 (RW) BFE40000 (RW) BFE50000 (RW)
    BFE60000 (RW) BFE70000 (RW) BFE80000 (RW) BFE90000 (RW) BFEA0000 (RW)
    BFEB0000 (RW) BFEC0000 (RW) BFED0000 (RW) BFEE0000 (RW) BFEF0000 (RW)
    BFF00000 (RW) BFF10000 (RW) BFF20000 (RW) BFF30000 (RW) BFF40000 (RW)
    BFF50000 (RW) BFF60000 (RW) BFF70000 (RW) BFF80000 (RW) BFF90000 (RW)
    BFFA0000 (RW) BFFB0000 (RW) BFFC0000 (RO) BFFD0000 (RO) BFFE0000 (RO)
    BFFF0000 (RO)                                                       

=> run emboot
run emboot
## Booting image at bfc40000 ...
Found gzip-ed image at 0xbfc40000. Uncompressing ...done
Loading .text @ 0x80002000 (2850008 bytes)
Loading __ex_table @ 0x802b9ce0 (6776 bytes)
Loading .notes @ 0x802bb758 (36 bytes)
Loading .rodata @ 0x802bc000 (231148 bytes)
Loading .init.rodata @ 0x802f46ec (292 bytes)
Loading .pci_fixup @ 0x802f4810 (1736 bytes)
Loading __ksymtab @ 0x802f4ed8 (17648 bytes)
Loading __ksymtab_gpl @ 0x802f93c8 (9120 bytes)
Loading __ksymtab_strings @ 0x802fb768 (57736 bytes)
Loading __param @ 0x803098f0 (1808 bytes)
Loading .data @ 0x8030a000 (104704 bytes)
Loading .data.cacheline_aligned @ 0x80324000 (1536 bytes)
Loading .init.text @ 0x80325000 (134036 bytes)
Loading .init.data @ 0x80345b98 (21840 bytes)
Loading .init.setup @ 0x8034b0f0 (852 bytes)
Loading .initcall.init @ 0x8034b444 (632 bytes)
Loading .con_initcall.init @ 0x8034b6bc (4 bytes)
Loading .exit.text @ 0x8034b6c0 (3868 bytes)
Loading .init.ramfs @ 0x8034d000 (4145664 bytes)
Clearing .bss @ 0x80742000 (109120 bytes)

Starting kernel @ 0x80006230...


printenv
Code:
=> printenv                                                              
printenv                                                                 
bootcmd=run bootcmd1                                                     
nfsboot=run nfsload nfsargs;bootm                                       
bootdelay=10                                                             
baudrate=57600                                                           
autoload=no                                                             
stdin=nc                                                                 
stdout=nc                                                               
stderr=nc                                                               
ipaddr=192.168.11.150                                                   
netmask=255.255.255.0                                                   
serverip=192.168.11.149                                                 
ncip=192.168.11.149                                                     
netretry=no                                                             
nc=setenv stdin nc;setenv stdout nc;setenv stderr nc                     
ser=setenv stdin serial;setenv stdout serial;setenv stderr serial       
ldaddr=82000000                                                         
guaddr=81000000                                                         
hdpart=0:1                                                               
hdfile=boot/vmlinuz                                                     
hdload=echo Loading ${hdpart}:${hdfile};ext2load ide ${hdpart} ${ldaddr} ${hdfile}
hdboot=run hdload boothd                                                         
flboot=setenv bootargs root=/dev/hda1;bootm bfc40000
emboot=setenv bootargs root=/dev/ram0;bootm bfc40000
rootpath=/opt/nfsroot/mipsel
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
nfsfile=vmlinuz
nfsload=nfs ${ldaddr} ${serverip}:${rootpath}/${nfsfile}
bootretry=30
bootcmd1=run hdboot;run flboot
bootcmd2=run flboot
bootcmd3=run emboot
ubload=echo Loading ${ubpart}:${ubfile};ext2load ide ${ubpart} ${ldaddr} ${ubfile}
ubsaddr=bfc00000
ubeaddr=bfc2ffff
ubflash=protect off ${ubsaddr} ${ubeaddr};era ${ubsaddr} ${ubeaddr};cp.b ${ldaddr} ${ubsaddr} ${filesize};cmp.b ${ldaddr} ${ubsaddr} ${filesize}
upgrade=run ubload ubflash
ethact=rc32434_eth
bootargs=root=/dev/sda1 rw netconsole=6666@192.168.11.150/,@192.168.11.149/
boothd=setenv bootargs root=/dev/sda1 rw netconsole=6666@192.168.11.150/,@192.168.11.149/;bootm 82000000
ubfile=boot/u-boot-v2-mips.flash.bin
ubpart=0:1
filesize=34E46A

Environment size: 1498/65532 bytes


Thank you so much!


Top
   
PostPosted: Wed Dec 02, 2009 1:53 am 
Offline
Betatester
User avatar

Joined: Thu Jul 14, 2005 4:38 pm
Posts: 941
Location: England
booyaka!!

u-boot - excellent job
foonas-em - superb and it makes life easier


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 10 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited