Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Fri Dec 15, 2017 5:02 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 18 posts ]  Go to page 1 2 Next
Author Message
PostPosted: Tue Feb 23, 2010 5:06 pm 
Offline
Total Newbie

Joined: Tue Feb 23, 2010 4:42 pm
Posts: 4
Hi Guys, I am aware from reading lots of topics on this forum that the TS GL/R5 PRO V1 can only support 2TB Partitions and this is because of a limit within the exisitng 2.4 Linux Kernel.
The question I have is - If I installed the 2.6 Kernel via the webinstaller would this remove the 2TB partition limitation, and if not why not?
What are the benefits of going to the 2.6 Kernel on a TS GL/R5 PRO V1 if any.

Thanks.


Top
   
PostPosted: Wed Feb 24, 2010 12:55 am 
Offline
Moderator
User avatar

Joined: Tue Jul 26, 2005 5:22 pm
Posts: 1123
Location: United Kingdom
Which 2.6 kernel?


Top
   
PostPosted: Wed Feb 24, 2010 10:01 am 
Offline
Total Newbie

Joined: Tue Feb 23, 2010 4:42 pm
Posts: 4
The latest one I guess if I followed the information I found in the following location
http://hvkls.dyndns.org/downloads/documentation/README-1st_LIESMICH-zuerst.html


Top
   
PostPosted: Wed Feb 24, 2010 10:15 am 
Offline
Moderator
User avatar

Joined: Tue Jul 26, 2005 5:22 pm
Posts: 1123
Location: United Kingdom
I guess you could try it. It is labelled experimental so I have no idea if it actually works.

Note that it requires a non-SATA drive with a complete root filing system set up on an ext3 filing system (TeraStations normally use XFS) which implies an extra drive for booting purposes. Looking at the example given it appears a USB drive might be appropriate.


Top
   
PostPosted: Mon Dec 13, 2010 8:22 pm 
Offline
Newbie

Joined: Sun Jul 26, 2009 3:26 pm
Posts: 47
Location: London
Where did this go? I am looking at going to a 2.6 kernel because of the partition size limits in 2.4 but the kernel development forum is so confusing its hard to make any sense from what the state is.


Top
   
PostPosted: Thu Sep 22, 2011 11:09 pm 
Offline
Total Newbie

Joined: Thu Sep 22, 2011 11:07 pm
Posts: 1
I would be interested in trying to get this going with a 2GB usb stick. any ideas on how to boot from the USB stick?


Top
   
PostPosted: Fri Sep 23, 2011 12:45 pm 
Offline
Moderator
User avatar

Joined: Tue Jul 26, 2005 5:22 pm
Posts: 1123
Location: United Kingdom
plastikman wrote:
I would be interested in trying to get this going with a 2GB usb stick. any ideas on how to boot from the USB stick?
We worked out how to boot off a USB stick/drive for the original TeraStation and the Home server model by altering the initrc linux startup script embedded in the firmware for starting the system. This went under the name of the "Safe Boot" revisions as it gave you a way of getting into the system whatever the state of the hard disks.

I have had on my TODO list for a long time looking at doing the equivalent changes to the start-up script for the Pro model, but never managed to get around to actually doing it even though it is probably only a few hours work (if that). I will see if I can get this done sometime in the near future and then post an updated firmware incorporating this change.


Top
   
PostPosted: Sun Aug 12, 2012 12:38 am 
Offline
Newbie

Joined: Thu Nov 30, 2006 7:30 am
Posts: 30
itimpi wrote:
plastikman wrote:
I would be interested in trying to get this going with a 2GB usb stick. any ideas on how to boot from the USB stick?
We worked out how to boot off a USB stick/drive for the original TeraStation and the Home server model by altering the initrc linux startup script embedded in the firmware for starting the system. This went under the name of the "Safe Boot" revisions as it gave you a way of getting into the system whatever the state of the hard disks.

I have had on my TODO list for a long time looking at doing the equivalent changes to the start-up script for the Pro model, but never managed to get around to actually doing it even though it is probably only a few hours work (if that). I will see if I can get this done sometime in the near future and then post an updated firmware incorporating this change.


Did you make any progress on this? If not, can you point to references for the changes you're talking about?

I'm trying to breath some new life into my TS Pro v1. For the longest time, I was able to leverage Debian Sarge for additional functionality. Now I want some additional things in that can't be provided with Sarge (or compiled easily for glibc 2.3 ABI). I can't upgrade glibc because the kernel is too old.

Having a 2.6 kernel would give me an upgrade path.

I take it that nobody knows enough to embed a kernel into the firmware?


Top
   
PostPosted: Sun Aug 12, 2012 10:35 am 
Offline
Moderator
User avatar

Joined: Tue Jul 26, 2005 5:22 pm
Posts: 1123
Location: United Kingdom
entropy wrote:
itimpi wrote:
plastikman wrote:
I would be interested in trying to get this going with a 2GB usb stick. any ideas on how to boot from the USB stick?
We worked out how to boot off a USB stick/drive for the original TeraStation and the Home server model by altering the initrc linux startup script embedded in the firmware for starting the system. This went under the name of the "Safe Boot" revisions as it gave you a way of getting into the system whatever the state of the hard disks.

I have had on my TODO list for a long time looking at doing the equivalent changes to the start-up script for the Pro model, but never managed to get around to actually doing it even though it is probably only a few hours work (if that). I will see if I can get this done sometime in the near future and then post an updated firmware incorporating this change.


Did you make any progress on this? If not, can you point to references for the changes you're talking about?

I'm trying to breath some new life into my TS Pro v1. For the longest time, I was able to leverage Debian Sarge for additional functionality. Now I want some additional things in that can't be provided with Sarge (or compiled easily for glibc 2.3 ABI). I can't upgrade glibc because the kernel is too old.

Having a 2.6 kernel would give me an upgrade path.

I take it that nobody knows enough to embed a kernel into the firmware?

No I did not get any further, and as far as I am concerned my TeraTations are getting to end-of-life so I am no longer investing any effort in them.

I can easily provide details of the changes made to the linux.rc for the original TeraTations to support running from a USB stick if you want to look at working out the equivalent changes for the TSP. It is also easy to change the kernel image - the difficulty is in making sure that it is built correctly, and that it fits into the space allowed in Flash. My suspicion is that a 2.6 kernel would be larger which would be an issue as there is very little room spare in the flash.


Top
   
PostPosted: Sun Aug 12, 2012 11:21 pm 
Offline
Newbie

Joined: Thu Nov 30, 2006 7:30 am
Posts: 30
itimpi wrote:
I can easily provide details of the changes made to the linux.rc for the original TeraTations to support running from a USB stick if you want to look at working out the equivalent changes for the TSP. It is also easy to change the kernel image - the difficulty is in making sure that it is built correctly, and that it fits into the space allowed in Flash. My suspicion is that a 2.6 kernel would be larger which would be an issue as there is very little room spare in the flash.


So this is not an area that I've dealt with much on the Terastation (updating anything other than image.dat). Let me describe what I had in mind, and let me know what you think.

I agree that my TS is getting long in the tooth. Howver, the hardware has been solid for me except the occassional drive replacement (not really the fault of the TS). I could replace what I've got now with a Raspberry Pi running Open Media Vault connected to a 4 drive RAID enclosure and get something much more powerful and expandable, but, I hate to waste good working hardware. So my plan to was get enough of the OS up to a later version of Debian that I could make it useful. Here's why I'm stuck: Most of the stuff I've tried to load required GLIB 2.4 ABI, but the Terastation Pro v1 only has 2.3 ABI. So I've tried updating the glibc to the version in even Sarge and anything linked against it then complain about the kernel being too old. So it seems that the only way forward would be to get a more modern kernel running, then try to upgrade the system. As I see it, this can only happen in two ways:

1. Modify the kernel that is burned into firmware to boot directly to 2.6 (risky - what are the backout options? Does this destory my ability to do an EM recovery if the kernel doesn't boot?)
2. Modify the initrd to include loader.o. Everything then running in the firmware kernel (2.4) would boot normally with initrd and then turn control over to a 2.6 kernel which would have to be running if the OS libraries was updated. This would have to be updated in 2 stages: a) modify the initrd to boot 2.6 from md0 using loader.o, followed by lots of testing including EM flashing b) Update the OS image to a newer version. If there are any problems with b), then the backout plan is to downrev the OS image to a previously working copy.

The reason that I want to do this is a couple of reasons:
- native NFS implemenation (even NFS v4), currently using usermode NFSv3
- more modern tools to work with
- possible conversion to open media vault
- ability to do more modern things like mDNS (howl was excluded from Sarge for licensing)
- iSCSI
- git server (I can actually do this now)
- ability to use more UPSs
- Samba v4?

What I'm not worried about:
- complete inability to run any Buffalo tools - ie. it's no longer a "Terastation" (of course things like watchdogs, EM flash, etc need to work correctly)

What would worry me:
- Inability to flash the firmware after upgrade (In scenario #2 above, EM mode should be available?)
- Permanent brick

The only thing that I see here that would risk a permanent brick is #1 (assuming the toolset is reliable - see below).

I just did some research and found what I think you're possibly talking about to modify linuxrc: http://buffalo.nas-central.org/wiki/How ... _an_initrd. I have never seen these tools before, but downloading and compiling on my x86_64 resulted in the ability to extract a blob that looks like a kernel (hard to tell) and definitely extracted a initrd compressed filesystem which I can now mount and at least see the linuxrc.

Can you tell me:
- is firmimgtool reliable?
- Has anyone used a blob created by firmimgtool to reliably flash the kernel/initrd back on a TS Prov1?
- Can you tell me why if loader.o was in initrd I would not be able to boot the kernel from md0? If it's a problem with the raid volume being open and handoff, I do have spare space at the end of my disk I could create additional partitions to boot from that would simply store the kernel image, which could then boot md0.
- Can you point me to the modifications that I could do to the linuxrc to boot 2.6 (either via flash root fs or otherwise)?
- It appears that I should be able to flash the system from the running OS using dd and mtdparts but I don't see any information directly related to TS Pro v1 - this might be handy.
- Where can I get a 2.6 kernel (I'd prefer a known working blob, but I can compile my own if someone has the source available) for TSProv1

I'm sure I've made plenty of bad assumptions, so I'd love to hear what they are ;)


Top
   
PostPosted: Tue Aug 14, 2012 2:41 pm 
Offline
Moderator
User avatar

Joined: Tue Jul 26, 2005 5:22 pm
Posts: 1123
Location: United Kingdom
I looked at one point at trying to get a 2.6 kernel onto my Terastations, but never succeeded. I was interested as it would have extended their life as far as I was concerned.

Looking at specific questions you asked:
- the firmimgtool is perfectly reliable. I used it when creqting alternqtive firmware which could run from a USB stick.
- I never found a way to get the kernel booted from the HD. It might be possible to get uBoot to run if you switched the system partitions to using a ext2 file system (uboot did not handle xfs) but I never finished following up on this.
- I have no idea what changes are rquired to boot 2.6 from HD. Getting at the linux.rc start-up script is easy, but not what to do with it.
- It IS possible to update the firmware in flash from a running OS. But any mistake means the system will no longer boot and the only recovery method is via a JTAG flash.
- I have no idea where to get a 2.6 kernel, or even to get the required source qnd configuration files to build custom one.

If you do get anywhere with this I would be interested as it might be worth me resurecting my TSP systems in that case.


Top
   
PostPosted: Fri Aug 17, 2012 6:14 am 
Offline
Newbie

Joined: Thu Nov 30, 2006 7:30 am
Posts: 30
itimpi wrote:
- the firmimgtool is perfectly reliable. I used it when creqting alternqtive firmware which could run from a USB stick.

What's the advantage of running the firmware from a USB stick? Did you outgrow the factory root filesystem?

itimpi wrote:
- I never found a way to get the kernel booted from the HD. It might be possible to get uBoot to run if you switched the system partitions to using a ext2 file system (uboot did not handle xfs) but I never finished following up on this.
- I have no idea what changes are rquired to boot 2.6 from HD. Getting at the linux.rc start-up script is easy, but not what to do with it.

Hmm. I was under the impresion that progress had been made and using loader.o you could boot the kernel from the hard drive. I had found this wiki page: http://buffalo.nas-central.org/wiki/Ter ... o_kernel26 which referenced this thread: viewtopic.php?f=11&t=2935. It looked like Sylver made good progress with this (to a point it was pretty safe to boot it). But by the time I found the thread, all the binaries were already gone. Maybe the subversion repository would be a place to start, but I would have felt a lot better trying to boot a true and tested kernel first :)

I also notice that Andre's webinstaller works for the Terastation, but no mention of the Pro. I will ping him and see if he made any progress on TSP v1.

itimpi wrote:
- It IS possible to update the firmware in flash from a running OS. But any mistake means the system will no longer boot and the only recovery method is via a JTAG flash.
- I have no idea where to get a 2.6 kernel, or even to get the required source qnd configuration files to build custom one.

If you do get anywhere with this I would be interested as it might be worth me resurecting my TSP systems in that case.

[/quote]
I don't currently have a JTAG rig so I hope I don't end up needing one.


Top
   
PostPosted: Sat Aug 18, 2012 1:06 am 
Offline
Newbie

Joined: Thu Nov 30, 2006 7:30 am
Posts: 30
entropy wrote:
I also notice that Andre's webinstaller works for the Terastation, but no mention of the Pro. I will ping him and see if he made any progress on TSP v1.


Actually it says that terastation is unsupported when you run it. If you change the script to not bail out when it detects a terastation, it will install most of the bits. It can't find the kernel modules though.

It seems that it must have worked at one point because attempting to boot the kernel at least begins the boot process:
Code:
INIT: version 2.78 booting                                                      
Warning: kernel-module version mloader module loaded                           
ismatch                                                                         
        /boot/kernel=/boot/vmlinux.bin                                         
loader.o was comcmdline=root=/dev/hda1                                         
piled for kernel version 2.4.20_mvl31-ppc_linkstation                           
        while this kernel is version 2.4.20_mvl31-ppc_terastation               
Warning: loading /boot/loader.o will taint the kernel: forced load             
  See http://www.tux.org/lkml/#export-tainted for information about tainted mods
KERNELBASE=c0000000 (r6=74eb71c r7=74eb72a) r3=0 (r4=0 r5=0)                   
---cmdline=root=/dev/hda1                                                       
Linux version 2.6.25.20-svn365-dirty493 (root@ls) (gcc version 4.1.2 20061115 (8
Early serial console at MMIO 0x80004600 (options '57600n8')                     
console [uart0] enabled                                                         
BUFFALO Network Attached Storage Series                                         
(C) 2002-2005 BUFFALO INC.                                                     
Zone PFN ranges:                                                               
  DMA             0 ->    32768                                                 
  Normal      32768 ->    32768                                                 
Movable zone start PFN for each node                                           
early_node_map[1] active PFN ranges                                             
    0:        0 ->    32768                                                     
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512     
Kernel command line: root=/dev/hda1                                             
OpenPIC Version 1.2 (1 CPUs and 11 IRQ sources) at 80040000                     
PID hash table entries: 512 (order: 9, 2048 bytes)                             
Bus clock freq: 131072000                                                       
decrementer frequency = 32.521743 MHz                                           
Console: colour dummy device 80x25                                             
console handover: boot [uart0] -> real [tty0]                                   


But this is where it ends. I suspect there is more but the last line is probably messing with my serial console.


Top
   
PostPosted: Sat Oct 27, 2012 9:34 pm 
Offline
Total Newbie

Joined: Sat Oct 27, 2012 9:04 pm
Posts: 3
Hi,

Did any of this go anywhere?

I recently got a TeraStation Pro 1 for hacking and using as some off site backup and like several others in the thread I hate to see good hardware go to waste ;). Running larger drives and a sensible distro with web and SSH is very appealing.

It's PPC and the SoC seems well enough supported and looking at the state of the current and recent kernel trees I think something may be possible for the underlying hardware without insane amounts of work (famous last words).

I have a fair bit of experience in embedded kernel dev and using OpenEmbedded to build distributions for embedded boxes (I did the initial OpenEmbedded work for the RaspberryPI and I also headed up the userspace firmware team that built the OpenPandora among other bits and bobs over the years).

What I would like to know is a bit more information about the device, bootloader setup and the like, things such as what options may exist for kicking the 2.4 kernel out when running and just chaining a new kernel and root off the USB site, kexec, syscall hacks etc. that sort of thing. I used to do something very similar on the GP2X to kick out 2.4 and launch RTEMS (a real time kernel).

My aim would be to have a agent on the 2.4 stock flash (with a few init hacks) and just use root rights to wreck the 2.4 kernel and jump to something at a known point in RAM (uboot would be ideal) that could then cleanly run a recent kernel and bring up it's root off a USB stick. All without resorting to the usual bricking, jTAG, serial and heap of pain when something goes south. Just reflash the 2.4 firmware and your back to stock, that would be the idea anyway ;).

I have only just got around to rooting the device. Not yet had a chance to get serial setup and I keep running into brick walls with documentation when researching this sort of stuff as a lot of the handy sites have long since passed into the aether. I really don't want to sink masses of time looking at ways to get a 2.6 kernel launched from the existing userspace if everyone knows how to do it and it is just undocumented common knowledge ;).

Thanks,

John


Top
   
PostPosted: Sun Oct 28, 2012 1:28 pm 
Offline
Total Newbie

Joined: Sat Oct 27, 2012 9:04 pm
Posts: 3
In a moment of boredom I have done a little more playing with this.

My current plan (for ease) after some more reading and tinkering is to hack kexec support (well backporting a later 2.4 PPC patch) into the Buffalo kernel if that turns out to be viable. Ideally in such a way that can be flashed using the nasty windows flashing tool. Going to dig out my various jTAG tools before I start randomly flashing stuff ;).

As for launching some other kernel of any description. My view was to have a script placed in the existing rootfs that will check for the presence of a USB stick with an initial FAT volume with some control files and if they are found kexec uboot off that FAT partition leaving you pretty much free to do whatever you want on the device. The normal idea would be then having that uboot then load a kernel off a 2nd EXT3 volume but it could actually be anything from just about anywhere ;).

If the stick is removed or there is something like a 'DISABLE' file on the USB FAT volume the script will will just skip over and load the normal 2.4 firmware as is.

So Angstrom, Yocto, Debian PPC, some of the other Buffalo PPC userspaces or anything else you can sensibly run on the modest PPC spec would be something that really comes down to the users choice. I am not really interested in making some sort of specific distro for the device (just add support to OpenEmbeded), it's more fun to open things up for others to play with.

It leaves a few more questions about things like the current rootfs being on part of the array and suchlike but none of that is a massive problem when it comes down to it. Not yet sure how this will play with larger disks (part of my aim) but that is the fun ;).


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 18 posts ]  Go to page 1 2 Next

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 3 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