Quantcast
Channel: [ N O C T E R N I T Y ] » Technology
Viewing all articles
Browse latest Browse all 18

Installing Debian GNU/Linux on a LaCie NAS

$
0
0

Since I recently set up Azathoth's 6th revision, I had the old LaCie NAS on a shelf, completely useless. I had to do something with it; however, the system which comes pre-installed on that thing is definitely not too customisable beyond the basics, so I decided to try and install Debian GNU/Linux on it.

The NAS, with its cover removed

One important thing about this old NAS - it uses an Intel EM7210 motherboard, with an Intel 80219 CPU. As it happens, that board is more or less supported by Debian.

The NAS's EM-7210 motherboard

However, it is necessary to access the system's RedBoot bootloader, which is only possible using a serial cable whose connector is directly on the motherboard.

IDC10 serial connector on the motherboard

Building the cable

The serial cable that allows access to the system's console needs to be plugged on an IDC10 connector. While it might have been possible to use the connector from an old PC along with a null-modem cable, I no longer possess either of these items, so I built my own cable. This is what you need to connect:

Female DE9 Female IDC10
2 5
3 3
5 9

And if you need a picture for the IDC10 side (I had to look it up, so I might not be the only one in this case):

Pins on the motherboard's IDC10 connector

I hadn't done any soldering for 16 years, so I was a little anxious about that. As it turns out, soldering was the easy part; the wires I used were apparently a little too big for my IDC10 connector, and I broke it. I had to rip connectors from an unused audio front panel and solder them to my wires instead. In addition, since none of my computers here have RS232 interfaces, I had to use an USB<->RS232 adapter.

I should really be ashamed

Minicom settings

The next step was to connect to the NAS's console using Minicom (any serial terminal would do, but I'm used to this one). The settings that need to be used are:

  • transfer rate: 115200 bps
  • data bits: 8
  • parity: none
  • stop bits: 1

It is also important to make sure that both hardware and software flow control are turned off.

 Booting the Debian installer

Obviously, the next thing to do is to try and start the Debian installer.

In order to do that, it is necessary to boot into the NAS's bootloader, which can be achieved by pressing Ctrl+C in the console before the bootloader's script starts executing (you need to be rather quick, as you only have one second to do so). This leads you to a command prompt.

You will also need to download kernel and RAM disk images for the architecture. Both images can be found on Debian's server (you need to download zImage and initrd.gz).

Once you are ready to proceed, you will need to upload the images to the NAS through the serial cable. Start by telling the bootloader that you want to load the RAM disk image:

load -v -r -b 0x1800000 -m ymodem ramdisk.gz

The bootloader will then expect you to send it the RAM disk's data (the initrd.gz file mentioned above) using YMODEM. In Minicom, that can be done by pressing Ctrl+A followed by S, then selecting "ymodem" in the list, and finally selecting the file to send.

(Wait. Wait some more. Wait even more.)

When that transfer has been completed, you will also need to send it the kernel image by typing

load -v -r -b 0x1008000 -m ymodem zImage

and then sending the zImage file.

(Wait. Wait some more. Wait even more.)

Once both files have been uploaded, you are ready to start the installer. The following command will do just that:

exec -c "console=ttyS0,115200 rw root=/dev/ram mem=256M@0xa0000000" -r 0x01800000
Completing the installation

I've skipped the part about installing Debian, because that's pretty much the usual process. However, there's one additional operation to perform once the installer is done running, as the system will not boot without that. You need to edit the boot script.

In order to do that, when the installer reboots, enter the bootloader by pressing Ctrl+C, then enter the following command:

fconfig boot_script_data

The prompt will change to >> to indicate that you are editing the configuration. You need to set the boot script to this:

fis load -b 0x01800000 ramdisk.gz
fis load -b 0x01008000 zImage
exec -c "console=ttyS0,115200 rw root=/dev/ram mem=256M@0xa0000000" -r 0x01800000

Don't forget to exit the boot script editor by finishing with an empty line. RedBoot will ask you to confirm the changes then write the configuration to flash memory.

A few notes
  1. I initially removed the HDDs from the box while trying to boot it in order to avoid unnecessary power cycles. However, if you try to insert them while the Debian installer is running, they will not be detected, and you will end up having to reboot anyway.
  2. Setting up the partitions takes an awful lot of time, and so does RAID array resynchronisation if that's what you want to use.

Viewing all articles
Browse latest Browse all 18

Trending Articles