Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Sun Nov 19, 2017 6:09 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Tue Aug 24, 2010 10:01 pm 
Offline
Newbie

Joined: Tue Aug 24, 2010 7:25 pm
Posts: 10
Hello,

My LS2 runs fine, but it will not update its firmware or enter EM mode. I am looking for help in diagnosing the problem.

This mipsel-based Linkstation HD-HLAN with an ST Micro flash has some history.

Sometime in July 2006 I installed OpenLink (probably version 0.52b) and converted to a full Debian sarge system. Unable to get NFS to work, I installed a Japanese kernel that I believe came from a gentleman named Eiji (my apologies to Eijii if that is not the case). The output by 'uname -a | cat -v' is somewhat garbled: "Linux storage 2.4.20_mipsel_linkstation #88 2005M-GM-/ 2M-7M-n 25M-FM-| M-6M-bM-MM-KM-FM-| 20:17:00 JST mips GNU/Linux"

After playing with the kernel in a bootloader I somehow flashed it into ROM. I think I used a bootloader version from a gentleman named Andre. The '/boot' directory has several files that look like 'try_new_kernelII.running'. (My apologies to Andre, as well).

Next, I compiled 'avr_evtd' (the old one with the underscore) and got rid of 'mc_ctld'. That made the LS2 work great for a while.

In early 2007, the box went into storage.

Now, with Debian sarge being dated, I would like to upgrade to lenny. After reading documents for a while, I settled on the following upgrade path: Flash with FreeLink, install U-Boot, install kernel 2.6, upgrade to lenny.

That is when the mystery started.

I have been unable to update the firmware, or enter EM mode. To be fair, I am using the firmware updater in XP on a VirtualBox, but they are all on the same 24-bit subnet and can ping each other. The LS2 even has the IP address 192.168.11.150. I just don't think the Linkstation is listening on the UDP port.

I remember vaguely that future flashing might require EM mode. Back in 2006, I removed the stock (or OpenLink) filesystem. Entering EM mode, however, has been just as much of a challenge.

After reading that OpenLink may not support entering EM mode by pressing the reset button, I upgraded to 'avr-evtd' version 1.7.6. That also did nothing, so I looked at the contents of /dev/mtd2. The flash lacks the signature OKOK and instead shows: "BUFFALO ls_flash format^@^@^@^@^@^@^A^@^@,^@^@^@^^$^@^@^@^@^@^@/tmp/conf_save.tar.gz^@^@^@^@^@^@^@^@^@^@^@^_M-^K^H^H%8`D^@^Cconf_save.tar^@M". The EventScript, of course, will not write to it because it lacks the signature.

Next, I tried to enter EM mode by faking several HDD-related problems:

a. Removed HDD, booted, and then booted with HDD reconnected. That booted normally.
b. Deleted '/boot'. That booted normally, too.
c. Deleted '/sbin/init'. That hangs somehow, but does not enter EM and is not recognized by firmware updater, either.
d. Deleted the partition table. Same symptoms as (c).

After reaching the end of my knowledge, I am now looking for advice on how to proceed without having to build a JTAG cable. I am thinking about taking one of the following steps:

1. Manually write "NGNGNG" into /dev/mtdblock2. That seems dangerous, if my firmware is corrupted and cannot enter EM mode for some other reason.
2. Manually write "OKOK into /dev/mtdblock2. That approach does not seem much better, since 'avr-evtd' will simply follow up with step 1 when I press the reset button.
3. Install U-Boot into ROM (after playing with it in RAM) to check out the 'emmode' and 'writeok' functionalities as well as its flash capabilities.
4. Program the flash manually using 'cat' or similar, after trying to figure out what has to go where.
5. Find a Windoze computer to see if that makes a difference for the firmware updater.

Otherwise, the LS2 is completely stable. I have full access via ssh and a working gcc development environment. The 'sarge' repos are enabled. It looks like a normal Debian system, except it still uses 'busybox'.

Any of your recommendations are welcome. I am looking for advice on how to upgrade the firmware in my circumstances.

General suggestions as to which firmware to use would also be helpful. Some people seem to like foonas-em over FreeLink. Perhaps I can also just keep OpenLink.

Thank you very much for your help,
Felix


Top
   
PostPosted: Wed Aug 25, 2010 11:50 am 
Offline
Betatester
User avatar

Joined: Thu Jul 14, 2005 4:38 pm
Posts: 941
Location: England
lechner wrote:
Now, with Debian sarge being dated, I would like to upgrade to lenny. After reading documents for a while, I settled on the following upgrade path: Flash with FreeLink, install U-Boot, install kernel 2.6, upgrade to lenny.



Forgetting the rest for the moment, I believe you can boot/load into foonas-em (not foonas, they are different) from the hdd and install freelink from the foonas-em page, or ssh in and make alterations as required (i.e wipe sda1 and untar new freelink image). Using the foonas-em auto-installer does repartition your drive and wipe all data though.

--edit--

Sorry that was a bum steer ^^

I believe you need to install u-boot and have a 2.6 kernel before you upgrade to Lenny else your system won't boot

-------

Basically I'd go with :

    LNI's u-boot & foonas-em in ROM to start with (providing you can flash foonas-em to your chip, which I think you can)
    Providing you get foonas-em in flash, boot up linkstation and press power button 3 times, that'd bring up foonas-em
    Open web browser goto '192.168.11.foonas-em'snewdhcpaddress' and let foonas-em repartition and install freelink (wiping all data)
    Else ssh '192.168.11.foonas-em'snewdhcpaddress' and untar freelink onto hda1 (keeping your data)

I'm unsure though if #6 whilst installing u-boot may give you touble though -- http://downloads.buffalo.nas-central.or ... EUBOOT.TXT

foonas-em from hdd viewtopic.php?f=12&t=4317&p=82886&hilit=Bauldrick+testdrove#p82886

I could also be talking absolute $hi&, it's very late and it's been a very long time since I messed with any of that really :o and I've forgotten what you wanted to really do with/to your LS2 - I don't understand you referencing Openlink, I just presume you want Debian Lenny. If so you HAVE to use u-boot and have a 2.6 kernel boot


Top
   
PostPosted: Fri Aug 27, 2010 12:32 am 
Offline
Newbie

Joined: Tue Aug 24, 2010 7:25 pm
Posts: 10
Thank you, Bauldrick, both for your original reply and the later edit. I now have Debian lenny with 2.6.22.ls.gz and davy_gravy's 2.6.30.5 up and running.

Now I just have a few questions:

a. One of the posts mentioned that you flashed your LS2 with foonas-em even though you have an ST Micro chip. Is it safe to flash it from LNI's old u-boot 1.1.4-2.0.1?

b. How did shihsung compile his 2009-06 version of u-boot? I tried under native toolchain on the way up in 'etch' and now in 'lenny'. It gets confused about being little-endian after his patch is applied.

c. I am unable to create extX partitions that are recognized by LNI's u-boot. I even tried ext2, inode size 128 and partition start/end on old DOS cylinder boundary. Is there a trick? I always get the same error:

ext2ls ide 0:3:/
Error (no IRQ) dev 0 blk 449803937: status 0x51
** ext2fs_devread() read error - last part
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - ide 0:3 **

d. Despite my tweaking of 'avr-evtd', I seem to be unable to get the LS2 to shut down properly. I am still using an old binary '/sbin/shutdown' that I saved from OpenLink (or stock). That syncs and changes runlevels but does not turn it off, however.

c. Is there still anything I have to do regarding 'rtc'? I already marked my filesystems exempt from checks with tune2fs.

A lot of people put a lot of effort into this little box with 64 megs of ram. That gets me to the next question: How can I upgrade the memory? Just kidding...

Thank you for your help. It was really hard to figure all this out.

Felix


Top
   
PostPosted: Fri Aug 27, 2010 1:26 pm 
Offline
Betatester
User avatar

Joined: Thu Jul 14, 2005 4:38 pm
Posts: 941
Location: England
I get a little confused by the way you explain things, it's probably me, so I'll write what I think you have currently :oops: :

lechner wrote:
I now have Debian Lenny with 2.6.22.ls.gz and davy_gravy's 2.6.30.5 up and running


What do you get from
Code:
uname -a
is it 2.6.22 or 2.6.30.5?

You have LNI's latest u-boot (that's good). That looks for vmlinuz in /boot, vmlinuz is a link to whatever kernel you want to load (2.6.22 - 2.6.30.5...)

a) I don't have the ST chip, but davy_gravy did some work/testing on getting foonas-em into the second half of flash on that chip. It's a few posts down on the second link I put in above post. I think you may have read about problems flashing foonas-em with LNI's original u-boot, but that was fixed and you have the correct one.
I think if you read through and follow that second link I posted (davy_gravy's 2 posts) you'd have foonas-em in flash - just be carefull about what foonas-em you use, I'll look that up but I'm sure davy_gravy has made a few and one in particular was not meant to fit in flash.

b) I have not tried compiling shihsungs u-boot (although I do you use his and not LNI's), but if I were you I wouldn't consider changing or worrying too much about that at present.

c) In my first post I stated that foonas-em would allow you to 'auto install' freelink for you. This would repartition your hdd for you, but obviously wipe everything, is that a possible option?

d) There was an option set in the kernel .config that did that I think, I can't quite remember and it depends what kernel you're booted into (if uname -a says 2.6.22, then I bet thats the cause)

c again, but probably meant to say e ;) ) ... I can remember problems with that, but if it boots then I don't think you need worry....
Links: (check them all before using!)
Load foonas-em from hdd via u-boot
foonas-em for loading from hdd (from foonas.org)
Install foonas-em to flash via u-boot
foonas-em for flashing into ST chip (inode safe)


Last edited by Bauldrick on Fri Aug 27, 2010 2:04 pm, edited 4 times in total.
proper grammer like


Top
   
PostPosted: Fri Aug 27, 2010 2:33 pm 
Offline
Betatester
User avatar

Joined: Thu Jul 14, 2005 4:38 pm
Posts: 941
Location: England
Damn, I'm an idiot, I remember the rtc issue now - it's screws up going from 2.6.22 (which'd be foonas-em from foonas.org) to 2.6.30 (davy_gravy's kernel)

Please to read this Installing Lenny on the LS2 using foonas-em before you do anything I mentioned before ;) sorry :?

After reading that again I understand you question c) .... hmmmm


Top
   
PostPosted: Sun Aug 29, 2010 6:25 am 
Offline
Newbie

Joined: Tue Aug 24, 2010 7:25 pm
Posts: 10
Thank you, Bauldrick, for all the good advice. I managed to get 'foonas-em' into the higher part of the flash after several attempts. Now it boots flawlessly. That will be one of the best things I ever did to that little box.

The 'rtc' issue went away after I recreated the device node and no longer boot into kernel 2.6.22.

It all took a long time, but now pretty much everything works like it is supposed to. My only real issue is that I still cannot create an extX filesystem that is bootable from LNI's 'u-boot'. Perhaps it has something to do with the starting cylinder. The partition I created is about 110GB into the disk. It is a mystery to me.

I also had some problems with 'avr-evtd' 1.7.6 and sent a patch to the maintainer. I somehow thought it was once part of Debian. I will probably package it and send it to this list or the folks at Debian after I get back from a trip in a couple of weeks.

As for shihsung's newer versions of 'u-boot' I would be curious if any LS2 owners have installed it. Is the flash problem the same I have with the ST Micro chip, or is this a different problem? Most importantly, how can I flash over it if 'u-boot' itself is broken. Foonas-em uses the 2.6 kernel which was also reported to have problems flashing. Upgrading is not a priority, but I do think it will solve my extX filesystem issue.

Thanks again for all the help,
Felix


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 8 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:
Powered by phpBB® Forum Software © phpBB Limited