Posts in category linux

Router gone bad, Open Source It!

I'm not sure why but home routers seem to have a finite lifetime before they start misbehaving in strange ways. Last week mine started acting up, in a way I've never seen before, one in which power cycling seems to have no effect.

What was it doing? It decided I wasn't allowed to view websites or any other type of connection to one very specific subnet - which is where my servers happen to live. The rest of Internet worked as usual.

After, a couple of days of trying to figure out where the problem was I did narrow it down to my home router by plugging my laptop into the Internet service directly - which worked.

Part 2: Now that I knew it was the router and had some traceroutes handy, my best guess was that my computer was sending the request but the data was never coming back from the server, browser gave messages like server took too long to return request. Notice how it didn't say it couldn't find the server. Traceroutes no matter how many hops (should have been 16) keep going with * * * which made me think and endless loop was somewhere.

Fingers started to point to the built in  SPI Firewall.

So I tried turning off SPI, NAT filtering...upgrade the router firmware, reset the settings...nothing. (Maybe I need to try the mythical 30-30-30 method to flush the nvram).

Plan B Giving up on the router I went to my spare router. Hooked it all up, got connected, turned on the firewall and wham no Internet at all and reverting the settings didn't fix it.

Good news is I had intentionally bought 2 routers that shipped or were capable of running Linux based open source firmware. (Netgear WGR614Gv8, Asus WL520gu) So began the night of researching how to flash an open source firmware onto a router.

Solution: After reading many pages, and some 20-100 step processes I found a nifty 3 step that worked great the first time.  Flashing an Asus wl520gu in 3 steps with Tomato (I actually used  Tomato-usb)

Note: this method will probably work with  DD-WRT or  OpenWrt too but I didn't try it.

Un-doing the partition mess from a dual boot

More and more, when I make a dual boot system it turns out that 6 months to a year down the line the windows partition just isn't needed anymore. But now you've got 10GB+ of disk just sitting out at the front of the drive.

Over the holiday I tackled a shuffling of partitions and here's the important tips I picked up.

  1. Copy your important data to another drive (an external usb is great)
  2. Using the Ubuntu disk tools like gparted blank the space where you want to move stuff to.
  3. Using the  Clonezilla live disc (and either partimage or  partclone [the new variant that handles ext4]) clone your / partition over to the new space.
  4. Relabel the UUID of this new partition, otherwise it will be identical to the UUID of the original and the bootloader will quasi load both
      uuidgen
      tune2fs /dev/hdaX -U numbergeneratedbyuuidgen
    

5.Edit your grub config to boot the new drive. If you reboot into Ubuntu running the update-grub will find it.

  1. Once you're sure you can boot the relocated / you can add the empty space onto your /home (I always recommend separate / and /home partitions)

Things I also recommend:

  1. Converting ext3 to ext4
  2. Creating a Private directory for storing encrypted stuff.