I just did a very stupid thing. I am trying to add another IDE disk to erie one of my home servers. So I plug it into the secondary IDE channel with the jumper set to master. I boot into Debian and run cfdisk /dev/hdc create a single partition, then I create the filesystem using mke2fs -j -c /dev/hdc1 and go away while it does all that. Easy so far!
I come back later as see that its all done. So I just want to mount it and see if all is OK. So I do a mkdir /var/backup then mount -t ext3 /dev/hda3 /var/backup, I then cd /var/backup and ls I see a load of directories but think I must have used this disk before and so say ho hum and do a rm -rf ./.*
Spot the mistake? I didn’t till half-way through the rm and did a panicked ctrl-c. I repeat I am very stupid.
I am blaming it on the paint fumes as we are decorating at the moment.
Still, look on the bright side, /dev/hda3 was only the /usr filesystem, and I didn’t lose anything in /home. So I am going to find a live CD and use that to copy /home elsewhere. I think I will then install Debian Etch on that machine as I want to submit some bugs to the Debian BTS and the testing distro should give me plenty to go at.