Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Thu Sep 18, 2014 4:38 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Mar 01, 2010 3:49 am 
Offline
Newbie

Joined: Mon Mar 01, 2010 2:46 am
Posts: 5
Hello,
I've played around a bunch with NSLU2, so I'm familiar with some of these embedded devices. I installed a serial console to my HS-DH1000GL (v2), using a hacked CD-ROM audio cable and socket.

I previously had Buffalo firmware from filename "HS-DHGL_211_101b.zip" - which is assumed to be version 2.11.

I already had installed this (from late 2009) but was attempting to install FreeLink using the instructions below:
FreeLink_for_the_Linkstation_Pro

However, it seems that the instructions were incorrect. THEN, I saw in the discussion of the wiki:
Talk:FreeLink_for_the_LinkStation_PRO/LIVE
that it's not working for firmware 2.11. I can confirm something got hosed. However, I do have serial access, and can boot via TFTP from uboot. I have tried the instructions elsewhere for restoring a hard drive (in case of replacement - repartition). That doesn't work. I even removed the 1TB HDD, connected it to a USB-SATA controller and in linux deleted all partitions, and then retried but got the same results. It is not even looking at the SATA drive partition 1 to boot. I am convinced that following the FreeLink Wiki instructions, somehow the uboot env parameters were changed.

I've tried the selections using LSUpdater.exe for "Rebuild partition table", "delete user config", "force update", after doing the usual editing of lsupdater.ini "VersionCheck = 0" and "Debug = 1" and it seems to go through an update (after TFTP booting the two files uImage.buffalo and initrd.buffalo) but after reboot, it continues to only boot from TFTP. It will continue to try to get the files via TFTP, and after timeout it tries again over TFTP. I searched for "bad partition 1" in the forums, but no searched post seemed relevant.

I keep getting the message that it cannot boot due to bad partition 1 on ide0, then it tries partition 1 on ide1:

Code:
Orion1   CPU =  Low

=== BUFFALO LS-GL U-Boot. ===
 ** LOADER **
 ** BUFFALO BOARD: BUFFALO_BOARD_LS_GL LE (CFG_ENV_ADDR=fffff000)


U-Boot 1.1.1 (Apr 18 2007 - 18:35:44) Marvell version: 1.12.1 - TINY

DRAM CS[0] base 0x00000000   size 128MB
DRAM Total size 128MB
[256kB@fffc0000] [0kB@f8000000] ## Unknown FLASH at f8000000: Size = 0x00000000 = 0 MB
Flash: 256 kB
Addresses 20M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (20M - 16M): Done

Soc: 88F5182 A2
CPU: ARM926 (Rev 0) running @ 400Mhz
Orion 1 streaming disabled
SysClock = 200Mhz , TClock = 166Mhz


USB 0: host mode
USB 1: host mode
PCI 0: PCI Express Root Complex Interface
PCI 1: Conventional PCI, speed = 33000000
Net:   egiga0 [PRIME]
Using 88E1118 phy

Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0: OK
Model: SAMSUNG HD103UJ                          Firm: 1AA01114 Ser#: XXXXXXXXXXXXXXXXX   <-- I modified this post to comment out the s/n
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)

Using device ide0, partition 1

Loading from block device ide device 0, partition 1: Name: hda1
  Type: U-Boot  File:/initrd.buffalo

0 bytes read
Using device ide1, partition 1
** Bad partition 1 **
Lost all init_rd
hit any key to switch tftp boot.
Hit any key to stop autoboot:  0
Using egiga0 device
TFTP from server 192.168.11.1; our IP address is 192.168.11.150
Filename 'uImage.buffalo'.
Load address: 0x100000
Loading: T T
Retry count exceeded; starting again
Using egiga0 device
TFTP from server 192.168.11.1; our IP address is 192.168.11.150
Filename 'uImage.buffalo'.
Load address: 0x100000
Loading: T T
Retry count exceeded; starting again


This is what happens when I change the IP to my network (server and client IP addr changed):
Code:
Orion1   CPU =  Low

=== BUFFALO LS-GL U-Boot. ===
 ** LOADER **
 ** BUFFALO BOARD: BUFFALO_BOARD_LS_GL LE (CFG_ENV_ADDR=fffff000)

U-Boot 1.1.1 (Apr 18 2007 - 18:35:44) Marvell version: 1.12.1 - TINY

DRAM CS[0] base 0x00000000   size 128MB
DRAM Total size 128MB
[256kB@fffc0000] [0kB@f8000000] ## Unknown FLASH at f8000000: Size = 0x00000000 = 0 MB
Flash: 256 kB
Addresses 20M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (20M - 16M): Done

Soc: 88F5182 A2
CPU: ARM926 (Rev 0) running @ 400Mhz
Orion 1 streaming disabled
SysClock = 200Mhz , TClock = 166Mhz

USB 0: host mode
USB 1: host mode
PCI 0: PCI Express Root Complex Interface
PCI 1: Conventional PCI, speed = 33000000
Net:   egiga0 [PRIME]
Using 88E1118 phy

Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0: OK
Model: SAMSUNG HD103UJ                          Firm: 1AA01114 Ser#: XXXXXXXXXXXXXXXXX   <-- I modified this post to comment out the s/n
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)

Using device ide0, partition 1

Loading from block device ide device 0, partition 1: Name: hda1
  Type: U-Boot  File:/initrd.buffalo

4697066 bytes read
Using device ide1, partition 1
** Bad partition 1 **
Booting from Device 0
hit any key to switch tftp boot.
Hit any key to stop autoboot:  0
Hit any key to stop autoboot:  0
Using egiga0 device
TFTP from server 10.54.89.229; our IP address is 10.54.89.236
Filename 'uImage.buffalo'.
Load address: 0x100000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##################################
done
Bytes transferred = 1834908 (1bff9c hex)
Using egiga0 device
TFTP from server 10.54.89.229; our IP address is 10.54.89.236
Filename 'initrd.buffalo'.
Load address: 0x800000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########
done
Bytes transferred = 4697066 (47abea hex)
<<stop_sound>>
## Booting image at 00100000 ...
   Image Name:   Linux-2.6.16.16-arm1
   Created:      2007-08-31   4:07:21 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1834844 Bytes =  1.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 00800000 ...
   Image Name:   initrd
   Created:      2008-01-16  10:55:10 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4697002 Bytes =  4.5 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

arg:console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M panic=5 BOOTVER=1.10 tftpboot=yes
CONFIG_BUFFALO_PLATFORM CONFIG_BUFFALO_LINKSTATION_LSGL ---
Uncompressing Linux....................................................................................................................... done, booting the kernel.
Linux version 2.6.16.16-arm1 (root@dh2-bs) (gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)) #6 Fri Aug 31 13:07:15 JST 2007
CPU: ARM926EJ-Sid(wb) [41069260] revision 0 (ARMv5TEJ)
Machine: MV-88fxx81
Using UBoot passing parameters structure
Sys Clk = 200000000, Tclk = 166664740


Here are my env variables (except for MAC address - changed on purpose for this post):

Code:
Marvell>> printenv
bootargs=$(bootargs_base) $(bootargs_root)
baudrate=115200
loads_echo=0
rootpath=/nfs/arm
cpuName=926
CASset=min
MALLOC_len=4
bootargs_end=:::DB88FXX81:eth0:none
ethact=egiga0
ethaddr=00:16:01:FF:FF:FF      <-- I Modified this for the forum post
buffalo_ver=BOOTVER=1.10
buffalo_minor_ver=BOOT_MINOR_VER=1.00
build_time=18:35:39
initrd=initrd.buffalo
kernel=uImage.buffalo
bootargs_base=console=ttyS0,115200
bootargs_root=root=/dev/sda2 rw initrd=0x00800040,15M panic=5
def_tftp=tftp 0x00100000 $(kernel);tftp 0x00800000 $(initrd);setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver) tftpboot=yes;bootm 0x00100000 0x00800000
ipaddr=10.54.89.236
serverip=10.54.89.229
stdin=serial
stdout=serial
stderr=serial
enaMonExt=no
enaFlashBuf=yes
enaCpuStream=no
ethprime=egiga0
bootdelay=3
disaMvPnp=no
overEthAddr=no
usb0Mode=host
usb1Mode=host
filesize=0
force_tftp=1
bootcmd=tftp 0x00100000 $(kernel);tftp 0x00800000 $(initrd);setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver) tftpboot=yes;bootm 0x00100000 0x00800000

Environment size: 995/4092 bytes


Note that I have changed the ipaddr and serverip addresses so that the Linkstation Live v2 can boot from files served from my PC. If I terminate the TFTP server, or even if I revert to the original default IP parameters for ipaddr=192.168.11.150 and serverip=192.168.11.1 the linkstation pro refuses to boot from the SATA drive.

Can someone tell me if their environment variables are similar?
I understand that there is a way to install a newer uboot via U-boot_for_LS_Pro (that is version 1.1.1 - old) or even newer versions not in the wiki like here: davy_gravy 1.1.4 but I don't want to go through that risk and then still have the env vars set incorrectly.

Thanks!
-Rob


Top
 Profile  
 
PostPosted: Wed Mar 03, 2010 12:29 pm 
Offline
Newbie

Joined: Sat Nov 01, 2008 11:48 am
Posts: 10
My bootcmd is quite different to yours:

Code:
bootcmd=ide reset; ext2load ide 1:1 0x00100000 /uImage; setenv bootargs console=ttyS0,115200 root=/dev/sdb1 rw rootdelay=10 ; bootm 0x00100000


My setup is a bit unusual as I use a USB flash driver as my root partition, my harddisk is detected as IDE device 1, whereas your boot log shows yours as being detected as device 0, and also I don't have an initrd image. Taking this into account, then I think your bootcmd should be:

Code:
bootcmd=ide reset; ext2load ide 0:1 0x00100000 /uImage.buffalo; ext2load ide 0:1 0x00800000 /initrd.buffalo; setenv bootargs console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M ; bootm 0x00100000 0x00800000


I'd recommend trying this sequence manually, typing each command and checking it works before you change the bootcmd environment variable.


Top
 Profile  
 
PostPosted: Mon Mar 15, 2010 7:11 am 
Offline
Newbie

Joined: Mon Mar 01, 2010 2:46 am
Posts: 5
gmv100 wrote:
My bootcmd is quite different to yours:

Code:
bootcmd=ide reset; ext2load ide 1:1 0x00100000 /uImage; setenv bootargs console=ttyS0,115200 root=/dev/sdb1 rw rootdelay=10 ; bootm 0x00100000


My setup is a bit unusual as I use a USB flash driver as my root partition, my harddisk is detected as IDE device 1, whereas your boot log shows yours as being detected as device 0, and also I don't have an initrd image. Taking this into account, then I think your bootcmd should be:

Code:
bootcmd=ide reset; ext2load ide 0:1 0x00100000 /uImage.buffalo; ext2load ide 0:1 0x00800000 /initrd.buffalo; setenv bootargs console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M ; bootm 0x00100000 0x00800000


I'd recommend trying this sequence manually, typing each command and checking it works before you change the bootcmd environment variable.


Thanks for the tip. I would have replied sooner but there were some intermittent issues with the site and I couldn't get to it for a few days. I tried your suggestion but was still unable to boot. I ran live ubuntu (has XFS support), saw and mounted all 4 partitions correctly. I manually copied the uImage.buffalo onto /dev/sdc1 but uboot still complained about unable to boot, and then reverted to TFTP booting again. Weird... I'm seriously considering replacing uboot if I can get anyone to confirm one of the ones from davy_gravy will work per these instructions. I'm assuming that the attempted Freelink install from HERE is what hosed it up, as the 2.11 firmware seems to break the Freelink instructions in an unrecoverable way.

As an alternative, I am seriously considering reverting all uboot parameters from this page. I just don't know if 2.11 changed some of the parameters in such a way as to break those defaults.

Thanks for responding to my post though! :D


Top
 Profile  
 
PostPosted: Mon Jul 05, 2010 1:42 am 
Offline
Newbie

Joined: Mon Mar 01, 2010 2:46 am
Posts: 5
Hello,
After attempting single-line entries one at a time, it is clear to me that the uImage.buffalo file is on 0:1 but initrd.buffalo is not. Using the command below:

Code:
Marvell>> ext2ls ide 0:1
Using device ide 0:1, directory: /
<DIR>       1024 .
<DIR>       1024 ..
<DIR>      12288 lost+found
         1942020 uImage.buffalo


there is no initrd.buffalo file. I just wish that there was some way to TFTP a file onto the IDE (SATA) filesystem, instead of disassembly then mounting on a linux server. I ended up using instructions from HERE which worked with Windows 7. That was for the missing initrd.buffalo file. However, I was unable to successfully mount partition 6 and copy the hddrootfs file anywhere. I'll try some more ideas and will post back here.


Top
 Profile  
 
PostPosted: Tue Jul 06, 2010 12:57 pm 
Offline
Newbie

Joined: Mon Mar 01, 2010 2:46 am
Posts: 5
I got this working, but it wasn't easy. Thanks to help from tarpman!

1) Quotes don't seem to preserve the evironment variables in OEM uboot; the arguments are still run! I.e., if I typed:
Code:
setenv bootcmd="ide reset; ext2load ide 0:1 0x00100000 /uImage.buffalo; ext2load ide 0:1 0x00800000 /initrd.buffalo; setenv bootargs console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M ; bootm 0x00100000 0x00800000"
the very first command would be quoted but the subsequent commands would be run directly as if I typed them from the command-line!

2) Semicolons, forward-slashes, and dollar-signs (for environment variables) have to be escaped. I.e., you must use "\;", "\/", and "\$", respectively (without the quotes), for those characters.

3) 16-parameter limit! So be prepared to be creative. This worked for me for Debian's install on the ARM9 Onion processor (assuming rootfs = /dev/sda4) using the images HERE:
Code:
setenv initrd initrd.buffalo
setenv kernel uImage.buffalo
setenv bootargs_root root=/dev/sda4 rw panic=5
setenv e2lk ext2load ide 0:1 0x00100000
setenv e2li ext2load ide 0:1 0x00800000
setenv bootargs \$(bootargs_base) \$(bootargs_root) \$(buffalo_ver)
setenv bootcmd ide reset\; \$(e2lk) \/\$(kernel)\; \$(e2li) \/\$(initrd)\; setenv bootargs \$(bootargs_base) \$(bootargs_root)\; bootm 0x00100000 0x00800000

pertinent printenv execution shows:[code]
bootargs_root=root=/dev/sda4 rw panic=5
bootargs=$(bootargs_base) $(bootargs_root) $(buffalo_ver)
bootcmd=ide reset; $(e2lk) /$(kernel); $(e2li) /$(initrd); setenv bootargs $(bootargs_base) $(bootargs_root); bootm 0x00100000 0x00800000

This actually works, provided you first TFTP boot those files from an appropriately-configured uboot and TFTP server.

Note that using the fw_printenv and fw_setenv from the Debian package uboot-envtools may work differently. However, I had serial console access to my LS-LIVEv2 so I used that.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 9 guests


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:

Protected by Anti-Spam ACP
Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group