You may want to select a [http://www.debian.org/mirror/list mirror nearby yourself] for faster downloads.

You may want to select a [http://www.debian.org/mirror/list mirror nearby yourself] for faster downloads.

−

When you see ''I: Base system installed successfully.'' the roots FS is almost ready.

+

This takes some time. When you see ''I: Base system installed successfully.'' the roots FS is almost ready.

== Personalize the deboostrap ==

== Personalize the deboostrap ==

Line 151:

Line 154:

cd debian-squeeze

cd debian-squeeze

tar --numeric-owner -p -czf ../hddrootfs.buffalo.updated *

tar --numeric-owner -p -czf ../hddrootfs.buffalo.updated *

+

cd ..

−

=== Prepare an imitrd image ===

+

=== Prepare an initrd image ===

If you are going to set up a raid, you need to build an [[Initrd for Raid-Boot]].

If you are going to set up a raid, you need to build an [[Initrd for Raid-Boot]].

−

If you are not going to use an Raid: Download empty initrd from [http://tyche.pu-toyama.ac.jp/~a-urasim/lsxhl/data/initrd.buffalo].

+

If you are not going to use an Raid: Download empty initrd from [http://tyche.pu-toyama.ac.jp/~a-urasim/lsxhl/data/initrd.buffalo]. If you do not trust an external source like this you may either a) follow the instructions in [[Initrd for Raid-Boot]] (but leave teh content away) or b) check the content of this one as shown [[#Personalize_the_deboostrap|above]].

wget http://tyche.pu-toyama.ac.jp/~a-urasim/lsxhl/data/initrd.buffalo

wget http://tyche.pu-toyama.ac.jp/~a-urasim/lsxhl/data/initrd.buffalo

Yes, an empty initrd is okay: When the kernel boots up, it will just find nothing to do in the initrd and continue booting from the harddisk. The boot device is defined by the uboot bootloader image.

Yes, an empty initrd is okay: When the kernel boots up, it will just find nothing to do in the initrd and continue booting from the harddisk. The boot device is defined by the uboot bootloader image.

Line 163:

Line 167:

== Perform the Update ==

== Perform the Update ==

+

+

<span style="color:red">'''Warning 1:'''</span> This will delete '''all''' data on the root partition, including all ''/etc'' and ''/root''. If you have valuable data there, put it on another computer first.

+

+

<span style="color:red">'''Warning 2:'''</span> While this should ''only'' delete the root partition, make a backup of your data first.

Credits

What will you get?

You will not have to open your box (at least not unless you make a fatal mistake)!
You will have a Debian Squeeze userland and the stock Buffalo kernel of your already installed firmware.
So it is not a full replacement of Buffalos firmware, but mostly. ;-)
To have a "complete" Debian Squeeze installation one would need to replace the kernel also. But user benoqkuke hasn't managed to build his own kernel (newer than 2.6.31) yet. So stay tuned, if you want to have a more recent kernel also.

What you need beforehand

You have to be able to use the root account on the NAS.
You can follow Open Stock Firmware LS-VL or use [2] CHL-v2/XHL 1.xx Mod 1 firmware to do that.

Debootstrap

You need to install debootstrap.
To be able to do this, you need to download the package.

TIP

It doesn't really matter which directory you're in for this step. There is no harm in being in /root, which is where you'll be anyway by default once you log on as root.

Prepare an initrd image

If you are not going to use an Raid: Download empty initrd from [3]. If you do not trust an external source like this you may either a) follow the instructions in Initrd for Raid-Boot (but leave teh content away) or b) check the content of this one as shown above.

Yes, an empty initrd is okay: When the kernel boots up, it will just find nothing to do in the initrd and continue booting from the harddisk. The boot device is defined by the uboot bootloader image.

In both cased, put the intrd.buffallo into the current directory.

Perform the Update

Warning 1: This will delete all data on the root partition, including all /etc and /root. If you have valuable data there, put it on another computer first.

Warning 2: While this should only delete the root partition, make a backup of your data first.

Installmethod 1: Copy file to /boot

As Analysis of the ARM9 boot process shows, it's absolutely okay to simply copy the required files into /boot and reboot. Running LSUpdater in the end does the same, but using LSUdater is more cumbersome.

Still on your LS, working directory is where you've put hddrootfs.buffalo.updatedintrd.buffallo

You may want to make an (additional) backup of the original files. The update/boot process will create a copy, too, but will happily overwrite any existing. So it's better to have a reliable copy.