Proper Punishment

If only I had a chalkboard and compliant users...


dd gotcha on openSUSE 10.3 - solved!

Among other things, I'm responsible for a few kiosk workstations, which needed some attention. They had been running openSUSE Linux 10.1, with KDE 3.5, using KDE's Kiosktool to lock things down, but since I'm moving to Gnome, I thought I should bring them along. So I grabbed one machine, and installed openSUSE 10.3, and started to learn:
Kiosk Linux: Ubuntu was an extremely helpful document.

The last stumbling block was some leftover cruft in /tmp, so I added a line to the user-home-fixer-upper script to clear anything from /tmp related to the kioskuser, and viola, a relatively un-muckable desktop.

So I put the machine back out, and let it marinate in user sauce for a week, and the only thing that had changed was the volume (I'll figure that out eventually). So I called it good, and created an image of the drive to copy to the other systems:
  • I plugged in my handy USB drive (labeled Phasmatis ex Machina, from the tool I used before dd ) and did "dd if=/dev/sda ibs=4096 conv=noerror | gzip > kioskimage.dd.gz", then unplugged it (I love that I can do that on a live system).
  • I booted the next system with a rescue cd, plugged in Phasmatis and "gunzip -c driveimage.dd.gz | dd of=/dev/sda". Reboot, done... or so I thought.
Although grub came up fine, and via the rescue system all was good, the system wouldn't boot.
"Waiting for device /dev/disk/by-id/scsi-SATA_ST340015A_5LA83RY9-part2 to appear: .............. Could not find"
After a bit of stumbling around with Google, and the help of countd on #opensuse at freenode, I nailed down the problem:
  • /boot/grub/menu.lst was using the drive-id instead of the old-school partition device (/dev/sda).
  • ditto for /etc/fstab .
So I changed those files to use /dev/sdaN instead of /dev/disk/by-id/....partN and bam; a working copy.

Thanks to opengecko for his excellent post, which summarizes my path to clonedom.