Category:LS-WTGL/R1/Restoring from empty disks

From NAS-Central Buffalo - The Linkstation Wiki

Revision as of 03:24, 16 January 2013 by Sgielen(Talk | contribs)(I just got a Buffalo LinkStation Pro Duo from a friend without any disks in it. I installed a single 1TB disk in it, but quickly found out it wouldn't boot as the OS is installed on the disk. However,)

I just got a Buffalo LinkStation Pro Duo from a friend without any disks in it. I installed a single 1TB disk in it, but quickly found out it wouldn't boot as the OS is installed on the disk. However, after a few hours of work, I got it running like a normal LinkStation from scratch. For future reference, I'm writing down here how I did it.

Turn on the LinkStation

Make sure it's connected via ethernet directly to the Windows machine and the Mac. If the Windows machine is a VM, you can bridge its interface to the wired interface of the Mac and just connect it with the LinkStation over a single ethernet cable.

The LinkStation won't come up (as it's broken), so press the FUNC button on the back a few times until the power LED comes on. It will request TFTP boot files from the Windows machine:

Put the unzipped files along with uImage.buffalo on a usb stick (in my case, in the /nas dir) and connect it. Then mount it:

mkdir /usb

mount /dev/sdb1 /usb -t vfat

cd /usb/nas

cp initrd.buffalo uImage.buffalo /boot

tar xvzf hddrootfs.buffalo.updated -C /rootfs

Make any changes you want to the root filesystem

change /rootfs/etc/melco/diskinfo to remove the disk2 line, and change "raid0" to "raid1"

Reboot

Reboot the linkstation. It will fail to come up. Press the button at the back twice to get it back into recovery mode. It will boot from TFTP again, and get an IP address from DHCP. However, now that we do have the mdX devices, the machine will come up as an installed LinkStation. But we're not done yet. Things are still missing, but at least the auto-updater can now fix things itself.

Re-flash firmware

Take the LSUpdater.exe from the firmware update and run it on Windows. It will detect a running device and if you click "Update", it will start the upgrade process. If that doesn't work, re-activate telnet (using the acp_commander), and make sure the boot partition is mounted using "mount /dev/md0 /boot".

Once the firmware updater is done, you can turn off the tftpd and dhcpd; the machine will come up autonomously as a fully installed Buffalo LinkStation.