Category Archives: admin

Using dd to rescue data from failing drive

So, you’ve ignored those SMART errors for a while now, haven’t you. Now you realize that there might actually be something going wrong with your hard drive. You try to naively copy data off, but it fails. But, no worries, there is an option to dd that can help you get most of the data off:

dd if=/dev/sdc of=/home/me/sdc.dd conv=noerror,sync

or, if using lvm

dd if=/dev/vg0/failing-lvm of=/dev/vg0/new-lvm conv=noerror,sync

The conv options specify that dd should ignore read errors, and to synchronize the read position with the write position when those errors occur. The file sdd.dd or new lvm volume could now be mounted:

mount -o loop -t ntfs /home/me/sdd.dd /mnt/old

Hopefully you can recover (most of) the files now.

Local / domain-specific DNS resolvers on Mac OS X

Got VMs? Have local servers at home? Connecting to a VPN? Want to do ALL at the same time and still be able to use typical DNS name resolution to reach the local domain hosts and your VMs? Doing this from a Mac?

To solve the problem of having different, local-only DNS/resolver lookups on Mac, e.g. for a set of local VMs for experimentation, you could encode the hosts into the /etc/hosts file, but you could also run a local instance of dnsmasq. But then how do you tell your Mac to get addresses from that local server or any other (local network) server.


, January 17, 2017. Category: admin, dns, macOS. Tagged: , .

SSH Key Auth on Dell PowerConnect Switches

Today, I tried to setup ssh public keys on our Dell PowerConnect Switches, figuring that good key authentication should be more secure and easier than simple password auth, right? Clearly someone is in the camp of “fallor ergo sum” on this one, and I suppose it might be me.