Skip to content

Preparing Device for Debian Install

mholl1983 edited this page Mar 27, 2022 · 27 revisions

Notes Before Beginning

  • This process replaces Buffalo's Linux-based firmware with Debian Linux.
  • The firmware being replace is stored on the disk(s). This process does not make any changes to the device itself: the hardware, boot loader, etc. are not changed in any way.
  • The install can be performed without losing the data on the device but it is recommended that you backup any data before beginning.
  • It is vital that /boot is set up properly, otherwise the device will not boot properly after the install. The easiest way to ensure /boot is set up correctly is to re-use the one created by the stock firmware.
  • Read the device specific notes page for information specific to certain devices.
  • If something goes wrong during the install (such as a power outage or improper /boot configuration) the device can be left in an unbootable state which may require recovering via connecting the drive to a PC or using TFTP.

Download Installer Files for the Device

The installer files are organized by Debian version and architecture. My goal is to provide support for the current Stable and Oldstable releases where possible. The files from older versions may still be available but won't be updated/supported.

For more information about the individual Debian versions see: https://www.debian.org/releases/

For LS200, LS400, TS1000 and TS3000 devices the installer files are found in the installer-images/armhf-devices.

For older devices (Terastation II, Terastation III, TS-XEL, etc) the installer files are found in the installer-images/armel-devices.

Rename the files to the appropriate filenames. For most devices this is uImage.buffalo and initrd.buffalo. For the TS-XEL it is uImage-88f6281.buffalo and initrd.buffalo.

Prepare the Device for the Install

Option 1: Load onto Device Running the Stock Firmware

This option involves replacing the stock firmware's boot files with the installer files. It assumes you already have the stock firmware installed on your device. You can find information about installing it if you don't already, here: https://buffalonas.miraheze.org/wiki/Restoring_Stock_Firmware_without_TFTP

The main advantages of this approach are:

  • Does not require disassembly of device or removal of drives
  • Does not require connecting disks to another system
  • Requires less knowledge of partitioning, formatting and software raid

The steps are:

  1. Obtain a copy of acp_commander.jar from https://github.com/1000001101000/acp-commander

  2. copy the installer files and acp_commander.jar to the same directory.

  3. Use acp-commander to find the device's IP address if needed.

    java -jar acp_commander.jar -f

  4. Use acp_commander to transfer the boot files to the device:

java -jar acp_commander.jar -t <device ip address> -pw <your admin password> -xfer initrd.buffalo -xferto /boot/
java -jar acp_commander.jar -t <device ip address> -pw <your admin password> -xfer uImage.buffalo -xferto /boot/
  1. Use acp_commander.jar to reboot the device

java -jar acp_commander.jar -t <device ip address> -pw <your admin password> -c reboot

The file transfer function of acp_commander hasn't been tested with all models yet. If it doesn't work you can try using python's http server to serve the files to the device following this example: Example:-Loading-installer-files-using-stock-firmware

NOTE: If you run the above command and your device is not found on the network, you may need to temporarily disable your firewall.

Option 2: Load files onto device manually

If you do not plan to re-use the partitions and raid arrays provided by the stock firmware you will need to create a suitable boot volume. This must meet the following requirements.

  • Must be on a disk with a GPT or MBR (sometimes called 'msdos') partition table

  • Must be either the first partition or a raid1 array made up of only first partitions

  • If the volume is a raid1 array it must use metadata version 0.90

  • Must be formatted as EXT3 or EXT2 (Use EXT3)

  • The Inode size for /boot must be set to 128 for Orion/MV78100 Devices (TS2PRO, Terastation III, Linkstation PRO (LS-GL) etc.

    mkfs.ext3 -I 128 /dev/sdx1

  • Must be relatively small (1G is fine for most devices, the LS-GL and LS-WTGL work with 768MB)

Once the boot volume has been created, mount it and copy the boot files for the device (initrd.buffalo and uImage.buffalo or uImage-88f6281.buffalo) to the root directory. Examples will eventually be posted on a separate examples section.

Once the installer files are in place, reboot your device to start the installer.

Option 3: Boot into the installer via TFTP

Most if not all of these devices are configured to boot over TFTP You can also load the boot files via TFTP. The procedure for getting these devices to boot via TFTP varies a bit from device to device. I've linked to a decent article over at https://buffalonas.miraheze.org/wiki/Restoring_Stock_Firmware_via_TFTP