Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Tue Jul 29, 2014 11:41 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Jul 23, 2010 7:17 pm 
Offline
Newbie

Joined: Fri Jul 23, 2010 7:02 pm
Posts: 9
I recently resurrected my KuroboxHG from storage. I wanted to upgrade my Woody installation to the latest Lenny release, but I discovered that the original Kurobox forum is no longer active and that the majority of discussion here requires the stock 2.4.17 firmware to be re-flashed with uBoot. Being a stubborn individual and not wanting to alter the stock firmware I set about finding a solution that utilised loader.o. Unfortunately the majority of articles on this topic are written in Japanese and many of the image mirrors are no longer functional.

Over the course of the last week I have constructed a simple (minimal effort) installation procedure and the following is what I have come up with:
http://buffalo.nas-central.org/wiki/Install_Debian_Lenny_on_Stock_Kurobox

This guide details Debian Lenny installation on a Kurobox/KuroboxHG running the stock firmware, eliminating the risk of re-flashing with uBoot. This is achieved by installing Debian Sarge 3.1 as an auxiliary operating system, using loader.o to load a 2.6.25.1 kernel and then booting Debian Lenny 5.0.5 from a separate partition. This method retains separation between the OS(s) and Data, so hopefully this will provide a solution for those who have not yet transitioned to uBoot

In addition to the guide I have also created some up to date images of Sarge and Lenny for use with the KuroboxHG, as discussed in the above wiki entry these images can easily be adapted for use with non-HG boxes.
http://www.nicholassavilerobinson.com/repository/debian-sarge-2.6.25.1-kuroHG-20100722.tgz
http://www.nicholassavilerobinson.com/repository/debian-lenny-2.6.25.1-kuroHG-20100722.tgz

I would welcome any feedback in addition to suggestions for solutions to the following limitations:
http://buffalo.nas-central.org/wiki/Install_Debian_Lenny_on_Stock_Kurobox#Limitations

_________________
Nicholas Robinson
KuroBoxHG · Debian Lenny 5.0.5 · 2.6.25 · Stock Firmware


Top
 Profile  
 
PostPosted: Sat Jul 24, 2010 9:27 pm 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5330
This is very interesting, especially since you could use a different fstab (/ on /dev/sda3 instead of /dev/hda3) on the Lenny partition, and would be compatible with recent kernels, too.


Top
 Profile  
 
PostPosted: Tue Aug 10, 2010 8:45 pm 
Offline
Newbie

Joined: Fri Jul 23, 2010 7:02 pm
Posts: 9
I needed support for a Trendnet TU-ET100C USB-Ethernet adapter with pegasus II chipset (The driver module for this was not present in my 2.6.25.1-kuroboxHG kernel) so I was looking to upgrade/compile a custom kernel.

Before attempting to try and build my own kernel, I decided to upgrade my kernel to 2.6.25.20-svn365-dirty493 via Andre's web-installer. Initially this went well (if you were looking at this post 3 hours ago you would have seen a long description of the procedure I went through), however after running the new kernel 2.6.25.20-svn365-dirty493 for a few hours I discovered some serious instabilities. I was able to induce several kernel panics and oops's. As a result I removed my post to prevent others from breaking their installation.

Fortunately I was able to follow my own HOW TO and restore a functional 2.6.25.1 system.

I then compiled a custom 2.6.25. kernel via a procedure derived from http://www.genbako.com/self-compile-2.6.25.txt and installed it to both Sarge and Lenny partitions. The result: I now have dual ethernet ports on my stock KuroBoxHG running Kernel 2.6.25. in Lenny. I will post the complete procedure of custom kernel builds on the Buffalo wiki shortly.

Whilst this has solved my immediate requirements, there are still limitations as mentioned in my first post http://buffalo.nas-central.org/wiki/Install_Debian_Lenny_on_Stock_Kurobox#Limitations. Please let me know if you have any suggestions.

Andre: Can you elaborate on the fstab limitation with more recent kernels? Also can you direct me to a relevant guide for compiling a recent kernel for PPC?

_________________
Nicholas Robinson
KuroBoxHG · Debian Lenny 5.0.5 · 2.6.25 · Stock Firmware


Top
 Profile  
 
PostPosted: Wed Aug 11, 2010 8:03 am 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5330
The original sources as patched by silver are at http://linkstationwiki.svn.sourceforge. ... universal/ if you want to try to stick to 2.5.20 kernels. I think I added patches e.g. regarding the Buffalo byte swap irrelevant to Kuro users.

The last kernel to support /dev/mtd*, thus making flashing possible, was a 2.6.28, IIRC.

Recent kernels have moved to a PATA driver that only knows /dev/sd?? (instead of /dev/hd??), which requires a change to /etc/fstab, breaking compatibility with previous kernels. They also require .dtb files you've got to produce.

Code:
dtc -b ppc -f -I dts -O dtb -o /boot/kuroboxHG.dtb -V 16 /usr/src/linux/arch/powerpc/boot/dts/kuroboxHG.dts
dtc -b ppc -f -I dts -O dtb -o /boot/kuroboxHD.dtb -V 16 /usr/src/linux/arch/powerpc/boot/dts/kuroboxHD.dts
ln -sf /boot/kuroboxHG.dtb /boot/kurobox.dtb # just in case


My own /etc/fstab (note, UUID entries never worked for me):

Code:
/dev/sda1 / ext3 defaults,noatime,nodiratime 1 1
/dev/sda2 swap swap sw,pri=1 0 0
/dev/sda3 /mnt ext3 defaults,noatime,nodiratime 0 2
proc            /proc           proc    defaults                        0 0
none            /dev/pts        devpts  gid=5,mode=20                   0 0


Personally, I've decided to stick with the 2.6.32.* vanilla kernel line for some time because it' has proven very stable even under heavy I/O traffic here. I could put a (way too fat) .config and the kernel on my server if you want, including CONFIG_USB_PEGASUS=m. Disclaimer: I haven't tested it with my own kernel loader since I'm on uboot; nor have I had the chance to test it on the Kuro Box. I can tell for sure the kernel works for my HG with uboot and no ext3 byte swap, the plain kernel is absolutely untested.


Top
 Profile  
 
PostPosted: Wed Aug 11, 2010 6:28 pm 
Offline
Newbie

Joined: Fri Jul 23, 2010 7:02 pm
Posts: 9
Having experimented with my installation it appears that only loader.o on the Sarge partition is obeyed, i.e The stock 2.4.17 kernel loads the newer kernel and the OPTIONS="root=/dev/hda3 revclock=1" in /etc/kuro_load_param causes Lenny to load, but on the Lenny partition the loader.o never actually loads a new kernel (must just be a reference).

This may mean that the PATA driver restricts which recent kernel image I can use. Do you recall which was the most recent release with the PATA driver supporting /dev/hd*? Alternatively I may need to investigate creating a reloader.o, so that the 2.4.17 kernel loads a 2.6.25 kernel which then loads a recent kernel...

What do you advise as the best procedure for re-building/building from scratch? I am tempted to download the latest kernel supporting /dev/hd* from kernel.org and use make oldconfig with my existing 2.6.25 .config, however undoubtedly there will be problems. What is your strategy for patching updated kernels?

_________________
Nicholas Robinson
KuroBoxHG · Debian Lenny 5.0.5 · 2.6.25 · Stock Firmware


Top
 Profile  
 
PostPosted: Sat Aug 14, 2010 12:47 pm 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5330
I don't have a strategy any more I think. Just apply my existing .config to upstream sources and eventually react to changes. You can find a few configs (temporarily) at http://hvkls.dyndns.org/downloads/tmp/ . Remember, I'm on a Linkstation HG, uboot, and can't test the loader.o method myself.

PS: Looks like there's a typo in 2.6.32.19's /usr/src/linux/arch/powerpc/Makefile:
- BOOT_TARGETS1 := zImage zImage.initrd uImaged
+BOOT_TARGETS1 := zImage zImage.initrd uImage

EDIT: They've fixed that in 2.6.32.21.


Top
 Profile  
 
PostPosted: Fri Aug 27, 2010 4:40 pm 
Offline
Newbie

Joined: Mon May 25, 2009 3:01 pm
Posts: 11
I also just resurrected my Kuro HG from the closet last night and happened upon your wiki page. Nice work; it's great to be running a current version of Debian now.


Top
 Profile  
 
PostPosted: Mon Sep 27, 2010 6:21 pm 
Offline
Newbie

Joined: Fri Jul 23, 2010 7:02 pm
Posts: 9
Scarolan: Great to hear the my guide came in handy. Have you made any modifications that would be worth including in the guide?

_________________
Nicholas Robinson
KuroBoxHG · Debian Lenny 5.0.5 · 2.6.25 · Stock Firmware


Top
 Profile  
 
PostPosted: Tue Sep 28, 2010 8:10 pm 
Offline
Newbie

Joined: Fri Jul 23, 2010 7:02 pm
Posts: 9
Update: The reboot and shutdown limitations have now been lifted

My KuroboxHG has dual NICs, functions as my firewall, DHCP server, DNS server, VPN server and NAS. It 'had' been running without issue for 42 days until yesterday when there was a power-cut. I was unable to get into my network remotely and nobody at home could get online. As a result I had to come home and manually reboot the box until Lenny booted, then manually reinitialize my external NIC to ensure all the required services were again operational.

To prevent anyone else encountering this problem I amended the HOW TO article with a procedure for creating a rebooter script (http://buffalo.nas-central.org/wiki/Install_Debian_Lenny_on_Stock_Kurobox#Optional_Configuration), ensuring that Lenny will always be loaded when cold-booting or rebooting. In addition I streamlined my firewall configuration and implemented some NIC polling/probing via crontab.

The result alleviates the reboot/shutdown limitations, but removes the inherent safety net in dual-booting. This behavior will allow you to reboot the server remotely with confidence that it will return running Lenny. It also simplifies the boot procedure to a single button-push.

Now all I need is to implement some hardware modifications to ensure the kurobox can reboot itself (http://buffalo.nas-central.org/wiki/Aut ... is_applied) and I will be all set!

_________________
Nicholas Robinson
KuroBoxHG · Debian Lenny 5.0.5 · 2.6.25 · Stock Firmware


Top
 Profile  
 
PostPosted: Sun Nov 14, 2010 11:29 am 
Offline
Total Newbie

Joined: Sun Nov 14, 2010 11:10 am
Posts: 1
Hi there,

Thanks for the howto.

I'm currently running your 2.6.25 kernel from the Sarge tarball you posted (with stock firmware and loader.o), but have apt-get dist-upgraded to Lenny. All is running well.

What (if anything) am I missing by not running a newer kernel? I haven't had any stability issues with this kernel ... before this I had a 2.6.17 kernel which I'd grabbed from (I think) a Sylver image ...


Top
 Profile  
 
PostPosted: Sun Nov 14, 2010 5:52 pm 
Offline
Newbie

Joined: Fri Jul 23, 2010 7:02 pm
Posts: 9
From FAQs.org:
Quote:
There are several reasons to upgrade your kernel. Most of the reasons are that you perhaps need a new device driver for your new or old hardware (the previous device driver could have had a bug somewhere) or you need to upgrade due to a bug in the kernel (security one or a non-security one). Usually new kernels run faster than the old ones and are more stable and reliable.

With regards to the Kurobox specifically, by not updating to the latest kernel you will not have access to the latest drivers and known security issues and bugs may exist. In my own experience, running the bundled 2.6.25, I have not experienced any stability issues and my box has very close to 100% uptime. The kernel itself is fairly minimalist, resulting in fast boot time at the expense of compatibility for some of the more exotic drivers. When I used my Kurobox as a Firewall/NAT I recompiled the 2.6.25. kernel to provide iptables and pegasus chipset support. Whilst this satisfied my hardware requirements, the box's boot time increased substantially. Now I use a Buffalo WZR-HP-G300NH with a custom built OpenWrt installation as my gateway, so I have rolled the Kurobox back to the bundled 2.6.25.1 kernel.

Whilst it is possible to upgrade the kernel without replacing the stock Kurobox firmware, there is a ceiling around ~ 2.6.28 due to fstab limitations described above. I have previously updated to 2.6.25.20 (using the sources from Andre's web-installer), however could never achieve stability and the system would crash frequently.

Inevitably the whole issue of kernel upgrades will depend on your requirements, however in my own experience, using the Kurobox behind a firewall as a staging server for web development and a git repository I have found no reason to update. Having said that if you come across a more recent kernel that provides stability, let me know and I will build it into the repository image.

_________________
Nicholas Robinson
KuroBoxHG · Debian Lenny 5.0.5 · 2.6.25 · Stock Firmware


Top
 Profile  
 
PostPosted: Sun Nov 14, 2010 8:29 pm 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5330
If your Linkstation is not connected to the internet), you can trust the participants of your LAN, got all the drivers you need, the kernel is stable for you -- well, you don't necessarily have to upgrade.

If you do: I'm on 2.6.32 (.25 is the current sub-revision), and I'm very happy with this kernel.


Top
 Profile  
 
PostPosted: Mon Dec 13, 2010 4:18 pm 
Offline
Total Newbie

Joined: Mon Dec 13, 2010 4:14 pm
Posts: 3
Thanks for this write up and your work, I have been too nervous to try the uboot thing (I'm completely confused by it all), so this will suit me fine.

I'll provide feedback once installed.


Top
 Profile  
 
PostPosted: Wed Dec 15, 2010 12:57 am 
Offline
Total Newbie

Joined: Mon Dec 13, 2010 4:14 pm
Posts: 3
I have found that I can easily boot in to sarge but it is struggling to get network access when it reboots in to Lenny. Any ideas?

The plan was to have 192.168.1.62 ip for sarge and 192.168.1.63 for lenny, there shouldnt be any problems with that right?

Wiki Tweaks:
Added: section saying to edit the resolv.conf on both sarge and lenny.

Fixed a typo with partition numbering:
==== Partition the Hard Drive ====
Our goal is to create the following partiton-table:
/dev/hda1 Bootable Type 83(Linux) 2GB for Sarge
/dev/hda2 Type 82(LinuxSwap) 256MB
/dev/hda3 Type 83(Linux) 4GB for Lenny
/dev/hda4 Type 83(Linux) the rest of the Disk


Top
 Profile  
 
PostPosted: Wed Dec 15, 2010 6:14 am 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5330
I would go with a swap partition of 512 MB.


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

All times are UTC [ DST ]


Who is online

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