Backup, extract serial and remove/replace Windows

Maybe you have bought a "'puter", maybe even a mobile one, and most certainly they have force-sold you a operation system that fits the dull-wittedness of the world. But then somehow reason creeps back in and starts annoying you... and then you just cannot can't switch to linux.

So here you go:

  1. Spare you the hassle of talking to those "'puter"-guys at the local computer-discounter-monster-store in the case of warranty issues and backup the disk image of your freshly bought and so called self-enslavement operation system:
    • Plug a bootable USB stick and boot your favorite Linux.
    • Plug/mount/use the current USB stick to dd your drive:
      sudo dd if=[DEVICE_FILE] of=[BACKUP_FILE] bs=4M
  2. Get your Windows serial out[1] - remember what they say: "one mans trash..."
  3. Hopefully never: Restore the diskimage if you have a warranty case. Just repeat step one and swap if= and of= values.

And remember: always have a second device that runs SomaFMs Defcon Radio. 👍


[1]: sudo cat /sys/firmware/acpi/tables/MSDM

Proxy auto-configuration for Windows and Linux

Operation systems generally can digest and look for a PAC file (="proxy auto-config"). They look for it using WPAD (="web proxy auto-discovery protocol").

Windows 7 and 8 do that. Ubuntu can do that (can be activated within the Network settings). For Fedora and Korora it's the same.

The PAC file can look like this one which provides "PAC with network and domain whitelisting".

For WPAD to work automatically the file should be served using the the MIME type application/x-ns-proxy-autoconfig. Its location should be announced via DHCP and DNS.

The DNS should announce either an A record (="host record") or an CNAME for the domain name wpad which should resolv to the IP of the machine that serves the PAC file. All in all it should be possible to access it over port 80 using http://wpad.[local_domain]/proxy.pac.

Using DHCP the file can be made available using any address and port. On a Linux machine the responsible configuration file /etc/dhcp/dhcpd.conf could look like this:

option local-proxy-config code 252 = text;  
...
subnet 192.168.0.0 netmask 255.255.255.0 {  
  range 192.168.0.100 192.168.0.200;
  ...
  option local-proxy-config "http://www.example.org/proxy.pac";
}

References
- Web Proxy Autodiscovery Protocol (wikipedia.org)
- Configuring Web proxy clients... (technet.microsoft.com)