HowTo: Fix a missing eth0 adapter after moving Ubuntu Server from one box to another.
Scenario: You have a box running Ubuntu Server. Something happens to the box and you decide to move the hard-drive to another physical machine to get the server back up and running. The hardware is identical on the other machine, so there shouldn’t be any issues at all, right?
The machine starts up fine, but when you try and hit the network, you can’t. Closer inspection using the ifconfig command reveals that there is no “eth0″ adapter configured. Why?
Here’s how to fix it.
HowTo: Restore the Windows Master Boot Record (without using a Windows CD) using Ubuntu Karmic.
You know how it is – you take a client’s Windows based machine, do a dual-boot installation of Ubuntu (which replaces the Windows Master Boot Record, or MBR, with GRUB and sets up an option to boot Ubuntu or Windows) so the client can evaluate Ubuntu, but then later on for whatever reason, Ubuntu is no longer wanted. It’s removed and you need to restore the system’s ability to natively boot Windows directly without a GRUB menu.
You’re probably thinking “why the hell would anyone want to do that?!”… well, the fact of the matter is you sometimes come across a client who is just too mind-set and refuses to use anything but Windows, so yes – sometimes you need to restore the Windows MBR, but how do you do that when you don’t have a Windows CD handy?
Well, here’s how to do it using nothing but an Ubuntu 9.10 Karmic LiveCD.
HowTo: Reclaim reserved disk space on non-system drives taken by the Ext3 filesystem.
I made a rather alarming discovery today, quite by accident.
Like most people, I use an external hard-drive to backup data to, or to shift things around if I’m low on space on my PC’s internal drive. Well, today that external drive reported that it was full. Damn.
So I fire up Ubuntu’s Disk Usage Analyser, aka Boabab, to find out what’s consuming the most space. I use a 1TB external drive and it’s formatted total is about 916GB, which is about right, however Boabab reported that the total consumption of data on the drive only added up to about 860GB – wtf? Even Nautilus’s Volume Properties window was reporting that the drive still had 50GB-odd free, so why is the system telling me it’s full?
I use Ext3 on my drives and, being a journalled filesystem, some space on the drive is reserved to record these journals among other functions which is expected, but 50GB worth? I did some research and found out that the Ext3 filesystem reserves 5% of disk space by default for itself! In this day and age of large drives, that’s a huge chunk of lost space!!
Thankfully there is a way to tell Linux not to reserve so much space. Read on…
HowTo: Image your hard-drive for transfer or backup using dd
Imaging, also known as Ghosting in the Windows world, is the act of creating a sector-by-sector copy of a hard-drive and saving it to a file, or transferring it to another hard-drive. Such uses for imaging include:
- Backup to an image file
- Clone to another hard-drive (eg: building multiple identical workstations) either directly or via an image file
- Data recovery (it’s safer and easier to examine an image file than risk further damage to the hard-drive itself)
Linux has a neat little command that can do this for us called simply “dd”. It is completely filesystem independent, so you can backup any hard-drive regardless of whether it was Linux formatted, Mac formatted or Windows formatted. It copies the drive bit by bit, sector by sector, not file by file.

