Hacker News new | past | comments | ask | show | jobs | submit login

My boss told me about this on Friday. Looks cool. He's ordered the parts from E-bay. I have a Pi, and I'm using it to learn to teach breaking and fixing Debian.

(So far I've learned that ARMv7 is supported by debian armhf, and ARMv6 is the hardfloat support offered by the Pi. And that this difference is so important, that somewhere deep in the Perl modules of Debconf, is a breaking change that apt can't resolve for itself when you upgrade raspbian to plain debian armhf.)

Check out this coolness:

  pi@raspberrypi ~ $ /usr/share/debconf/frontend              
  Illegal instruction



I really was looking for help with this, I spent some time delving into the perl modules and tracing the errors, I came up onto some collection of Debconf modules that just did not seem to have a central "source" of the problem, just a lot of co-dependent requires and I could not trace back to find what needed repair.

It's somewhere there, in /usr/share/debconf/frontend. If I knew what package had problems, I could fix it with `dpkg` or even `ar -x`, since Apt-Get really wants Debconf and friends to work in order to do its job... but as-is, I can't even install any version of dash from the correct repositories without bombing out in post-install, and I feel really lucky to even have a shell to attempt a fix, at this point.

If anyone has a Pi and they're comfortable breaking it (to see for yourself, or to help me figure it out), change your apt-sources to like this:

  deb http://ftp.debian.org/debian wheezy main
If you are on raspbian and your arch is armhf, proceeding through `apt-get update && apt-get -uy dist-upgrade` will almost totally hose your system. Reboot, log in, have a keyboard and mouse for the next part.

Network/interfaces will be broken so you'll need those, because you just ruined /bin/ip, it will segfault. Keep a copy of the old iproute package from raspbian, or be sure you know how to use ifconfig and route to get back online so you can download another one, since dhclient will also be hosed. It either segfaults or depends on /bin/ip.)

The only way to come back from this I've found is re-flashing the original raspbian image. I can't do it because my SD card does not read in my laptop / I'm stubborn and convinced that it can still be fixed.

You will not be able to install any packages that have Debconf post-install hooks, b/c illegal instruction in perl, some depended module. That's the part I can't figure out.

A lot of other things will be broken until you revert libc6 and libstdc++6 to the version provided by raspbian. At this point,

  dpkg --get-selections|cut -f 1
and

  apt-get --reinstall install
are your best friends. But it won't fix everything. It needs Debconf to be intact for some things to complete.


I figured it out. I needed this to tip me off:

  dpkg --get-selections|cut -f 1|xargs sudo apt-get --reinstall install -ud 2>&1 \
  |grep 'it cannot be downloaded'|awk '{print $3}'
Some packages were not being downgraded because apt-get won't downgrade them without explicit directions on what version to download, even if it's the only version in pool for your target.

I needed either libalgorithm-diff-xs-perl, libpthread-stubs0, or libtext-charwidth-perl, and after that, only menu was the last remaining Segmentation fault. Extracting the package manually and replacing /usr/bin/update-menus enabled me to reinstall the remaining packages without errors from debconf and friends.

-- Sorry, spoiler, if anyone was following my awful example.

I definitely did not follow the shortest path thru this maze.


As far as I know, Debian armhf is compiled for ARMv7. This means that the compiled executables will sometimes use instructions that aren't implemented on older ARM cores. As the processor on RaspberryPi is ARMv6, don't expect to ever run the official Debian armhf. I think it is theoretically possible to compile for ARMv6 using hardfp, but at this point it seems unlikely distributions would put in the effort to improve FP performance on such old hardware.


I understand that now, but when you pull the trigger on dist-upgrade without that knowledge, you're going to want to revert it, and I needed to learn to read strace to figure it out.

I have put semi-instructions to go back in this thread, in case you want to try a foolish thing like I did.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: