onsdag 7 maj 2014

I Stand Humbly Corrected...

So, I've been dabbing with trying to boot a set of "XYZ" recovery DVDs in a VirtualBox guest, to see if I can get a virtual factory reset running.

The first problem I ran into is that it seems that my USB-hub cannot support both the external USB-harddrive the virtual host resides on and the USB DVD reader at the same time - and, of course, I have too little space left on my internal drive and too few USB ports to have them directly attached (well, I could direct attach one with the inconvenience of unplugging the external mouse and keyboard, but we can't have that, can we?).

Thus, I needed to convert the 4.2 GB DVD to an ISO-image - but both Copy Disk in Brasero and old, honsest dd only gave me a 120 MB small image - probably the actual boot image on the DVD or something, while mkisofs gave me a full 4.2 GB image but a non-bootable one. How annoying!

By despair (or to be systematical), I also tried a tip I had up to that point considered too naive and fault-prone: to just cat the DVD-reader device to a file (i.e., 'cat /dev/sr0 > /tmp/recovery1.iso') and do you know what? It worked! VirtualBox booted the virtual host right of it and let me choose to do a factory reset (It is currently at 65%, so I don't know if it ultimately will work yet.)

Who would have thought that simple cat would be so true to the underlying bit device that it rendered the copied image as such a perfect copy? I am sure that given the right options to mkisofs, I could get the image bootable (it has a ton of different options to set this-and-that type of bootable disk to boot from a certain file, but I would rather not have to learn how to analyse the configuration of the DVD at hand enough to be able to pick all the right mkisofs options to make a one-to-one copy of it. Shouldn't mkisofs really be able to do that itself?

1 kommentar: