October 2008 Archives

QR Code?

| | Comments (0)
Just stumbled across an interesting documentary about the QR Code phenomenon in Japan. QR codes are simple two-dimensional bar codes capable of storing up to ~4000 characters of information. They typically look something like this:

madness_qr.pngMaybe you've seen them already. In Japan you can find them on buildings, billboards, magazine ads, product packages, etc. They're basically everywhere. In order to decode QR codes, you just take a picture with your cell phone. The (hopefully installed) QR code reader then decodes it and brings up the information. QR code readers are available for quite a lot of mobile phones already.  If you want to, you can even generate your own QR codes.


P2V using Mondo Rescue

| | Comments (0)

Over the last few weeks, I've been exploring ways to convert physical Debian Linux boxes into virtual machines. VMWare has a tool for doing P2V conversions, however, as far as I can tell, it only supports Windows physical machines. Not good. Any alternatives? Uhmm, how about Mondo Rescue?

Mondo Rescue is a disaster recovery software developed by Hugo Rabson for GNU/Linux. It allows one to effortlessly backup and interactively restore Linux systems. And what is most interestingly, it allows you to backup to a variety of media like CD-R, DVD and NFS shares.

So with Mondo Rescue, a Debian Etch box with two IDE disks (/dev/hda, /dev/hdc), Linux software raid (/dev/md0) and VMWare the process eventually goes like this:

  • install Mondo Rescue onto the system you want to convert
  • stop all problematic services (eg. databases, ...)
  • make sure the following linux kernel modules are loaded
mptspi mptscsih mptbase scsi_transport_spi scsi_mod sd_mod pcnet32
  • run "mondoarchive" and let it create a set of ISO images
  • boot the new VM with the first ISO image
  • at the bootprompt, type "interactive" to get started
  • since the device names have changed, mondo will complain about fstab, fix it (eg. repartition /dev/sda)
  • continue restoring all data
  • intitialize boot loader, set boot device to /dev/sda
  • edit grub.conf, update the line starting with "#kopt=root=...", set the boot device to /dev/sda1; also remove kernel options for serial console redirections
  • when mondo finishes, DO NOT REBOOT!
  • remount your disks (eg. mount /dev/sda1 /mnt, mount /dev/sda2 /mnt/usr and so on)
  • chroot into /mnt
  • edit /etc/mtab, fix the devices names to match the new installation
  • edit /boot/grub/devices.map (eg. echo "(hd0) /dev/sda" > /boot/grub/devices.map)
  • create a device node for sda (eg. mknod /dev/sda b 8 0)
  • run update-grub and also grub-install hd0
  • delete /etc/udev/rules.d/z25_persistent-net rule
  • exit, umount & reboot

If all went well, your virtual machine should now successfuly boot. Yay, Mondo Rescue!

January 2010

Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

Archives