The following is mainly to remind myself how I got my system reinstalled, and for the use of anyone else in a similar situation.
I managed to corrupt either the master boot record or the partition table of the hard drive on my crappy old Winbook (400 Mhz, 128 MB RAM). And I don’t have a permanent, wired internet connection, only a shared wireless connection. So how to get my laptop back?
Luckily, I had some Debian CDs from a couple of years ago, so I was able to reinstall a more-or-less functional Linux system. But ndiswrapper, the module that allows you to use Windows drivers for wireless cards, wasn’t included. Better yet, there isn’t a binary package for the ndiswrapper module. So you have to apt-get ndiswrapper-source and ndiswrapper-utils, then compile the ndiswrapper module. But how to get them without having the wireless access in the first place?
The steps involved turned out to be:
- Install base system from CDs.
apt-get install module-assistant build-essential kernel-headers-`uname -r`apt-get install bsdgames(so I could play mille bornes while waiting for the install to finish)apt-get install x-window-system icewm(latter is a light, fast, intuitive window manager, also see fluxbox)apt-get install dillo mozilla-firefox(two browsers, one minimal, one javascript-enabled)apt-get install wireless-tools- download ndiswrapper-source and ndiswrapper utils from internetworked computer, transfer via thumb drive to Winbook
dpkg -i ndiswrapper-source*.debdpkg -i ndiswrapper-utils*.debThese last two packages are interdependent. But I couldn’t install them simultaneously using apt-get, because the packages in the APT database are from the CDs, which didn’t have the ndiswrapper packages.apt-get -f install– forced the two ndiswrapper packages, already unpacked by dpkg, to configure. That could possibly have been problematic, but it seems I was lucky.- module-assistant — used the UI to choose the steps to build and install the ndiswrapper module.
After successfully building and installing the module, I installed the driver with
ndiswrapper -i <path to win driver>/mrv8335.inf
then
modprobe ndiswrapper
and the wireless card lit up (only necessary the first time. Module-assistant adds the necessary line to /etc/modules, so the module is automatically loaded at startup).
After that:
iwconfig wlan0 essid "ACCESS POINT"
dhclient wlan0
and I was connected to the internet.