Moving a Linux installation to a bigger drive

7 02 2008

I recently wanted to move my Gentoo installation from one notebook HDD to another, a bigger one. Moving the data over the network was fairly easy: Boot up two laptops with live CDs, in my case I happened to have two Ubuntu 7.10 CDs flying around, then start up netcat as root on one of them and using it on the other to copy the data:
nc -l -p 3333 > /dev/hdX on the receiving part and dd if=/dev/hdX | nc -q1 <target IP> 3333 on the sending one. You can use any other port, 3333 was the example that I used, and remember to replace hdX with your actual device. Alternatively, and a lot easier, is to use a mobile HD case to connect one of the drives to an USB port and then do the same as above without using netcat. If you do it this way, with dd, then you will retain everything, including the MBR so even your boot manager will be preserved. The next thing is to resize (expand) your data partition so that it can grow to make use of the additional storage space on your drive.

At first I tried using Partition Magic and similar tools from Acronis, which were always helping me out during my Windows days. Granted, the software was already a little dated, but the ext3 partitions wouldn’t have been any trouble for them. But nada, Partition Magic refused to do anything as it reported that the disk geometry of the target drive didn’t match the physical disk geometry present, which could lead to data loss and corruption. I was afraid that this was a real problem that was induced through my transfer solution, but it actually reported the same on the original drive as well. I popped in the Ubuntu live CDs again and was delighted to see that the Partition Manager parted had no trouble to fulfill the task, and with the graphical version GParted which can be accessed through System > Administration > Partition Editor, you have a nice GUI which is reminiscent of Partition Magic itself. The Qt version QtParted strangely wasn’t able to do this task, so give the Gnome version a try if you run into trouble.
GParted in action





How to get meaningful backtraces

1 11 2007

The Gentoo people have a very good guide online which explains how to get meaningful backtraces in Gentoo and gives a general introduction to gdb, the GNU debugger, too. In case one of your applications continues to crash and you want to submit a helpful bug report, take a look at the guide to find out how you can contribute a backtrace with your report.





Synchronizing the clock with network time

5 10 2007

My system time on the notebook always seems to be a little behind, so /etc/conf.d/net now takes care that it gets synchronized with internet time servers when connected:

postup() {
	if (route -n | grep "^0.0.0.0.*"$IFACE"$" > /dev/null) then
		einfo "(Re)connected to the internet, synchronising system clock ..."
		/etc/init.d/ntpd restart &
	fi
	return 0
}




Linux kernel release changes

22 09 2007

The Linux Kernel Newbies Wiki has a comprehensible list of kernel changes. With this you’ll be able to follow the development without the need to monitor the Linux Kernel Mailing List.





My KDM login theme

31 08 2007

After I installed my system from scratch again, I wanted a nicer login screen. I looked around KDE-Look.org for a theme that I could use. After some experiments, I settled for making a theme of my own.

I started off with the Kubuntu Edgy UserList theme and Gentoo-ified it. Then I replaced the background graphic with my favorite wallpaper. This is the result:

KDM login theme Splash loading screen

To install the same theme for yourself: Read the rest of this entry »





My customized boot splash

30 08 2007

Having switched to genkernel, for better or for worse, I wanted to use gensplash to have a boot splash and some framebuffer background graphic. Looking at KDE-Look.org, I settled for Gentoo-Blue, but I didn’t like the console background graphic, so I created my own from the Go Gentoo Go Bootsplash. This is the result:
Framebuffer console background

To get the same framebuffer background: Read the rest of this entry »





Troubleshooting a DRI setup

29 08 2007

I can’t stress this enough: If you need to get DRI to work on your system because it suddenly miraculously doesn’t want to work anymore, then your very first step should be to closely follow the DriTroubleshooting page on the DRI Wiki. Check your /var/log/messages and dmesg or Xorg.0.log respectively Xorg.1.log to look for errors and follow that guide. I don’t remember what exactly my problem was anymore, but that guide helped me to get hardware acceleration back for my system! :)





Reinstalling Gentoo

26 08 2007

My beloved Thinkpad R51 broke down and forced me to get a replacement. Since I didn’t want to invest too much time to get a working system back at that time, since I had work to do, I ordered the same model again via eBay. After completing said work and a vacation, I wanted to try and reinstall my Gentoo system from scratch, since I now had a second hard disc for this anyway. This was mainly to see if I really can set up the system on my own (the first time I received guidance), and if it had gotten any easier since I first installed it. Read the rest of this entry »





Fixing a broken /var/lib/dpkg/available

7 10 2006

I just installed Debian on a box again, and even before finishing the installation I was confronted with a defect /var/lib/dpkg/available file, which seemed to be truncated. Most of the items in base-config didn’t work because of this. I fixed it by doing a

dpkg --clear-avail
dselect update





System update for the Thinkpad

2 06 2006

It was rather painless to upgrade to kernel 2.6.15 (now I even learned to use module-rebuild after compiling and building the kernel modules) and to KDE 3.5, after it left the experimental ~x86 status. Now I’m trying to get the last things working on my Thinkpad R51 that I didn’t dare to touch yet.
Read the rest of this entry »