Martin Michlmayr
Martin Michlmayr

I'm a member of Debian, and I work for HP as an Open Source Community Expert. The opinions expressed here are mine.

Subscribe to the RSS feed of this journal.

Fixing your Debian NAS from within initramfs-tools

The following article was contributed by John Cass. Note that John's instructions will also work on other NAS machines running Debian, such as QNAP devices.

I had a problem upgrading my Debian kernel to 2.6.32 on the D-Link DNS-323. The upgrade looked like it worked but on reboot I had a hung machine. I tried taking the disk out, putting it in my main machine and remaking the links in /boot to the previous kernel and initrd.img but it turns out that on the DNS-323 both kernel and initrd are actually stored in flash memory (the /boot disk files are where they are built and a useful archive but are not used during the boot process).

So I was stuck, and had to make a serial cable in order to find out what was going on. The instructions here and here were very useful and the CA-42 clone cost me 4 GBP on eBay and arrived within a couple of days. A delicate bit of soldering (and installing ckermit on my main machine) and I had a serial connection - I could finally see what was was happening.

The upshot was, during the boot process the DNS-323 failed to mount my root partition. This was because the partition was formatted ext3 and the initrd.img had not included the ext3 module. It probably did this because I had deliberately forced mounting it as ext2 in the /etc/fstab (in an attempt to limit the write access to the disk, I want it to stay in standby for a long time but that's another post). (Remark by Martin: this is a known issue with initramfs-tools.)

Anyway, having seen this, Martin was able to guide me to getting it fixed:

And it should all be working!

Fri, 26 Mar 2010; 11:57 — debian/orion/d-link/dns-323permanent link