Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Tue Sep 02, 2014 8:33 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 87 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Vanilla kernel testing
PostPosted: Wed Oct 01, 2008 4:21 pm 
Offline
Regular Member
User avatar

Joined: Fri Jul 25, 2008 3:23 pm
Posts: 160
Location: Kobe, Japan
:down:
Read complete HOWTO here
http://buffalo.nas-central.org/index.ph ... all_Gentoo

:up:
:up:


This kernel won't work with stock firmware!
Code:
 # uname -a
Linux LSmini 2.6.27-rc6lsmini-00034-g681a6e0 #71 PREEMPT Thu Oct 2 22:25:54 JST 2008 armv5tel Feroceon rev 0 (v5l) Buffalo Linkstation Mini GNU/Linux

LS-Mini-2.6.27-rc6.tbz2
sha1sum cb90bc7a7bd10b5a3597cb21fda9d7fae4462a60

Configured to boot from /dev/md3 via initrd.
Built-in filesystem: ext3.
NFS, iscsi and other than ext3 filesystems built as modules.

You will need to repartition you harddrives. Start with one:

Code:
cat > disks
unit: sectors

/dev/sd1 : start=       63, size=    80262, Id=fd
/dev/sd2 : start=    80325, size=   514080, Id=82
/dev/sd3 : start=   594405, size=  9783585, Id=fd
/dev/sd4 : start= 10377990, size=966390075, Id=fd
^D
DISK=sdc
cat disks | sfdisk /dev/$DISK

cd /dev/
MAKEDEV md

for i in 1 3 4; do mdadm --create --verbose /dev/md$i --level=1 --raid-devices=2 /dev/$DISK$i missing; done;
mkfs.ext3 -L link-boot /dev/md1
mkfs.ext3 -L link-root /dev/md3
mkfs.ext3 -m0 -L link-data /dev/md4
mkswap /dev/${DISK}2

mkdir -p /mnt/linkstation/; mount /dev/md3 /mnt/linkstation/
mkdir -p /mnt/linkstation/boot/; mount /dev/md1 /mnt/linkstation/boot/
mkdir -p /mnt/linkstation/mnt/share/; mount /dev/md4 /mnt/linkstation/mnt/share/

Then extract your favorite distribution's tarball to the mount point and
untar the archive to /.

/etc/fstab for your convenience:
Code:
/dev/md3        /               ext3    defaults,noatime,errors=remount-ro      0 0
/dev/md1   /boot      ext3   defaults,noatime,errors=remount-ro   0 0
/dev/md4   /mnt/share   ext3   defaults,noatime,errors=remount-ro   0 0
/dev/sda2   none      swap   sw               0 0
shm      /dev/shm   tmpfs   nodev,nosuid,noexec         0 0
See also: source of linuxrc


Last edited by LaitrKeiows on Fri Oct 24, 2008 7:16 am, edited 9 times in total.

Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 7:59 am 
Offline
Newbie

Joined: Fri Jun 27, 2008 11:27 am
Posts: 52
Location: Turku, Finland
w00t! Now we're talking :) You really deserve a bunch of thanks for doing that :)

Now for a few clarifications:
LaitrKeiows wrote:
You will need to repartition you harddrives. Start with one:

I guess this means formatting the partitions? Can't remember if XFS was shrinkable or not, but my initial thought would be that it wasn't. If this is the case, is there ANY way of repartitioning the drives without clearing them. I currently have about 500gb of stuff on it that I can't fit anywhere else, and even though I could probably throw away most of it (lots of backups etc) it would really be better for me to be able to save it :)

LaitrKeiows wrote:
Built-in: ext3, nfs and iscsi.

So you built in these features in the kernel? Do you have modules available from some place as well? If not, could you guide us in how to create modules (compiler/kernel versions and configs?)

LaitrKeiows wrote:
Then extract your favorite distribution's tarball to the mount point

Does this refer to any specific tarball distribution (if so, downloadable from where), or does it just mean "put your distro of choice in the mount point" :) Which distro are you currently using? I'm most comfortable with SuSE so that would probably be the one that I would use... not sure how much hassle that is to install without the installer though (not even sure if it is possible :) )

LaitrKeiows wrote:
See also: source of linuxrc

Not really that familiar with linux on the embedded systems level. This is just the boot script that you have in the initrd right?

Again: thanks a bunch for posting this :)
-NRG


Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 8:06 am 
Offline
Regular Member
User avatar

Joined: Fri Jul 25, 2008 3:23 pm
Posts: 160
Location: Kobe, Japan
NRGizeR wrote:
If this is the case, is there ANY way of repartitioning the drives without clearing them.

You have two drives, so you can repartition only one, and then move data from last one.
First of all you must check that you can really access your data from one of drives.
I can not check that because I get rid of stock firmware completely.

NRGizeR wrote:
So you built in these features in the kernel? Do you have modules available from some place as well? If not, could you guide us in how to create modules (compiler/kernel versions and configs?)

Read: HOWTO Gentoo Crosscompile ARM9 kernel
I can build and upload modules for you, just tell me what modules you need.

NRGizeR wrote:
Does this refer to any specific tarball distribution (if so, downloadable from where), or does it just mean "put your distro of choice in the mount point" :) Which distro are you currently using?

I prefer Genlink, but you probably can use Freelink.

As for the linuxrc read here: HOWTO Initrd for Linkstation with RAID

I am going to update this guide with detailed instruction how to install Genlink to Mini.


Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 8:37 am 
Offline
Newbie

Joined: Fri Jun 27, 2008 11:27 am
Posts: 52
Location: Turku, Finland
LaitrKeiows wrote:
You have two drives, so you can repartition only one, and then move data from last one.

This is pretty unlikely right? I mean since it's a RAID disk, the data would be spread out over both disks? Any tips on how to get around this? Do you still have your disks RAIDed or are you using something else (separate disks, LVM etc)?

LaitrKeiows wrote:
I can build and upload modules for you, just tell me what modules you need.

Well at least an NFS module would be nifty :) Not really sure at the moment what other stuff one might want, could be cool to try to run some USB devices off of the mini later on (like for example a webcam :) ).

LaitrKeiows wrote:
I prefer Genlink, but you probably can use Freelink.

Cool, I'll have a look at those.

-NRG


Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 8:39 am 
Offline
Newbie

Joined: Fri Jun 27, 2008 11:27 am
Posts: 52
Location: Turku, Finland
Oh, forgot to mention. The reason RAID is a problem for me is that I currently use RAID 0 and not RAID 1.


Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 9:02 am 
Offline
Regular Member
User avatar

Joined: Fri Jul 25, 2008 3:23 pm
Posts: 160
Location: Kobe, Japan
NRGizeR wrote:
The reason RAID is a problem for me is that I currently use RAID 0
You have to back up your data, sorry :(
NRGizeR wrote:
Well at least an NFS module would be nifty
NFS is built-in, no need to load modules etc.

I've ordered second LS Mini for use a as development board only.


Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 10:25 am 
Offline
Newbie

Joined: Fri Jun 27, 2008 11:27 am
Posts: 52
Location: Turku, Finland
Yeah, that was what I suspected... soooo... how is that done for the regular vanilla linkstation? I mean, there's no place on the disks for the standard linux install right? /dev/root comes from where? Is that just an image somewhere or what's the deal with that. I'm sure I've read this somewhere but I can't remember how it worked...

What I'm checking now is if there is a possibility to change a RAID0 to a RAID1 without formatting. I only had about 400gb, so it would all fit onto one of the drives, so if that works I'll be fine :)

-NRG

(Pretty hard core to order a separate linkstation just as a toy btw :) )


Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 2:43 pm 
Offline
Regular Member
User avatar

Joined: Fri Jul 25, 2008 3:23 pm
Posts: 160
Location: Kobe, Japan
I've just uploaded updated image with more modules etc.

NRGizeR wrote:
(Pretty hard core to order a separate linkstation just as a toy btw :) )
They cost around $300 here, which is a lot cheaper than if I buy separate HDDs.
I will use it's 500Gb drives to upgrade my family's laptops 8-)


Top
 Profile  
 
PostPosted: Fri Oct 03, 2008 6:22 am 
Offline
Newbie

Joined: Fri Jun 27, 2008 11:27 am
Posts: 52
Location: Turku, Finland
LaitrKeiows wrote:
They cost around $300 here

:finger:... I payed about twice that when I bought my mini ~3 months ago. US$ 300 is about 210€ and right now the cheapest mini I can find here (Finland) is about 350€ :down: but oh well... good for you :)

I ordered a ministation last night to back up my linkstation data to be able to wipe it :) I'll probably get to play around with this this weekend :)

One open issue still... /dev/root. That's a flash drive right? Have you left that one intact or are you using that for your OS right now? I mean it's still a nice 4gb space... it could be that I'm totally mistaken and that /dev/root is just an image or something, but I sure can't find it on the hdds.

-NRG


Top
 Profile  
 
PostPosted: Fri Oct 03, 2008 6:32 am 
Offline
Regular Member
User avatar

Joined: Fri Jul 25, 2008 3:23 pm
Posts: 160
Location: Kobe, Japan
NRGizeR wrote:
One open issue still... /dev/root. That's a flash drive right? Have you left that one intact or are you using that for your OS right now?

There is no such a flash drive. It won't boot at all without hard drives.


Top
 Profile  
 
PostPosted: Fri Oct 03, 2008 6:40 am 
Offline
Newbie

Joined: Fri Jun 27, 2008 11:27 am
Posts: 52
Location: Turku, Finland
ah, it's of course the hddrootfs.buffalo.updated.done file in /boot. silly me :oops:

I'm just confused. Then again, nothing new there :) Well I guess I'll get to play with that then when I get that ministation.

Oh, another thing (You'll probably see more of these too :) ). The main benefit of doing this is of course having a totally freed linkstation, but have you seen any performance increase on top of this? I currently use unfsd, and I'm not sure if it's the client or the linkstation that lags every once in a while. This causes "pausing" at times... kind of like a buffering pause, while watching streamed video from it. It's really annoying, and I was kind of hoping that freeing the linkstation would patch up this problem as well.

-NRG


Top
 Profile  
 
PostPosted: Fri Oct 03, 2008 6:47 am 
Offline
Regular Member
User avatar

Joined: Fri Jul 25, 2008 3:23 pm
Posts: 160
Location: Kobe, Japan
NRGizeR wrote:
I currently use unfsd, and I'm not sure if it's the client or the linkstation that lags every once in a while.
You will have in-kernel NFS server support, it should work better than userspace-based ufsd.

I've checked latest Genlink image yesterday, installs and works like a charm! ;)


Top
 Profile  
 
PostPosted: Sat Oct 04, 2008 6:39 am 
Offline
Newbie

Joined: Fri Jun 27, 2008 11:27 am
Posts: 52
Location: Turku, Finland
Good morning,

I'm backing up data right now, and it just crossed my mind: What is my failsafe method for this? i.e. If I can't get the new system to work, what do I need to backup now (and what do I need to do later) to get the current linkstation OS back? As I said before, I am not using, and don't intend to use RAID1 on the linkstation, so mirroring is not an option for backup right now.

Suggestions?

BR,
-NRG


Top
 Profile  
 
PostPosted: Sun Oct 05, 2008 7:10 am 
Offline
Newbie

Joined: Fri Jun 27, 2008 11:27 am
Posts: 52
Location: Turku, Finland
Hmmm... just started thinking about this "for real". Will this method work at all when I don't have my drives mirrored? I mean, I can't repartition anything right, because that means killng off the tools I need to actually install the new system :/ Am I missing something here?

The first idea that came to mind is to use a USB stick to backup the tools I need. Could this work?

[edit]
nm, sorted that out as well. Didn't know that you could have different RAID levels on different partitions on the same disk. (Although I should have guessed it was possible) The root partitions seem to always be RAID1, so it's only the data part of the disk that is RAID0. I'll try you instructions now, keep my fingers crossed and hope for the best :)

-NRG


Top
 Profile  
 
PostPosted: Sun Oct 05, 2008 8:08 am 
Offline
Newbie

Joined: Fri Jun 27, 2008 11:27 am
Posts: 52
Location: Turku, Finland
Play-by-play on my installation:

- problem 1: sfdisk doesn't seem to be installed by default. Solved by downloading/extracting http://buffalo.nas-central.org/download/LSPro_ARM9/Distributions/Genlink/Binaries/armv5tejl-softfloat-linux-gnueabi/util-linux-2.13.1.1.tbz2
[edit1]
- problem 2: sfdisk won't run because the RAID array is still active (can I safely remove the array at this point without breaking the data on the drives?)
- problem 3: MAKEDEV doesn't exist either... (where do I get this from?)

[edit2]
Think I'll have to stop here until I get this figured out and continue later on. I'm not familiar enough with these low level linux/RAID tools to know what I'm doing atm. Might be that I'm doing this in the wrong order somehow, so I think it might be best for me to just wait for the more in depth HOWTO. :(

Another thing came to mind, 5gb should be enough for genlink right? At least according to the HOWTO, it seems like I would be OK using that amount of space. Why not just use the current partitioning of the mini in that case? The current RAID setup for that partition is /dev/md1, that is /dev/sda2 and /dev/sdb2. Can't I just use these?

[edit3]
Of course, since I'm me, I can't let this stuff go, so I read everything again, and I guess I'm supposed to follow the GenLink instructions for installing the initrd first right? How will that behave when there is no system present in /dev/md3 at the time of boot then? Will it still work? I would have thought that I first partition/install the stuff that is needed, and only then try to boot the new kernel... but that apparently doesn't work properly... :)


-NRG


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 87 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

All times are UTC [ DST ]


Who is online

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