December 2012
Succesful attempt to upgrade a LinkSys NSLU2 running Debian Lenny (through Squeeze) to Wheezy.
A friend has a LinkSys NSLU2, and it runs Debian. He wants it to run backups of his home server, but lacks the time to figure out how to do it right.
I connect the disk, the network cable, and the power. Then I power up the Slug, but not the disk. After a bit of flickering from the leds on the front, the Ethernet led stays on, but the rest is off. And no activity on my network.
Then I power up the disk, and there is some more flicker. Then the device asks my DHCP server for an IP number (and gets one).
From this I conclude that the OS is on the external disk.
There is an SSH server running on the Slug, but it doesn't let me in. My friend left no accounts, so I must assume I'm locked out. And I certainly have no root access.
So I power the Slug down, and connect its external disk to my PC.
I mount the root partition, edit my own account into /etc/passwd
, /etc/shadow
, /etc/group
(just copy the relevant lines from another machine).
Preparing for the upgrade, I also comment out all lines in etc/apt/sources.list
, and create etc/apt/sources.list.d/squeeze.list
and etc/apt/sources.list.d/wheezy
(note: no extension on the latter) using the sources.list generator.
For good measure, I also create etc/apt/apt.conf.d/80version
containing:
APT::Default-Release "squeeze";
Then I unmount, power down the disk, connect it to the Slug, and power up both disk and Slug. Now I can ssh into it, and I have root too. I create my homedir, had forgotten that.
apprentice@slug:~$ apt-get update
apprentice@slug:~$ apt-get dist-upgrade -dy
apprentice@slug:~$ apt-get dist-upgrade
This takes a while.
Configuring sysv-rc
fails:
Unable to migrate to dependency-based boot system │
│ │
│ Tests have determined that problems in the boot system exist which prevent migration to dependency-based boot sequencing: │
│ │
│ insserv: warning: script 'K05zleds' missing LSB tags and overrides, insserv: warning: script 'S01leds_startup' missing LSB tags and overrides, insserv: warning: │
│ script 'S99rmrecovery' missing LSB tags and overrides, insserv: warning: script 'S10nslu2-rtc' missing LSB tags and overrides, insserv: warning: script 'zleds' │
│ missing LSB tags and overrides, insserv: warning: script 'rmrecovery' missing LSB tags and overrides, insserv: warning: script 'nslu2-rtc' missing LSB tags and │
│ overrides, insserv: warning: script 'leds_startup' missing LSB tags and overrides, , package apache2.2-common removed but not purged, package exim4-base removed │
│ but not purged │
│ │
│ If the reported problem is a local modification, it needs to be fixed manually. If it's a bug in the package, it should be reported to the BTS and fixed in the │
│ package. See http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot for more information about how to fix the problems preventing migration. │
│ │
│ To reattempt the migration process after the problems have been fixed, run "dpkg-reconfigure sysv-rc".
For an always-on single-CPU system like the Slug, there isn't much gain in dependency-based boot anyway. So I leave things as they are.
The process update-apt-xapian-index
keeps running after upgrade, and brings the load to 4.
I kill the process and remove the package.
It shouldn't IMHO run on such modest hardware.
I also do an apt-get autoremove.
This is even more uneventful:
apprentice@slug:~$ mv /etc/apt/sources.list.d/wheezy /etc/apt/sources.list.d/wheezy.list
apprentice@slug:~$ sed -i 's/squeeze/wheezy/' ../apt.conf.d/80version
apprentice@slug:~$ apt-get update
apprentice@slug:~$ apt-get dist-upgrade -dy
apprentice@slug:~$ apt-get dist-upgrade
But it does again take a long time. Reboot gets us a happy Wheezy.