GNOME Bugzilla – Bug 665001
Windows XP express installation is broken
Last modified: 2016-03-31 13:56:07 UTC
If you choose express installation for windows XP, the VM will be created nicely and launched but windows XP's setup doesn't seem to like the unattended file we provide it. The setup gives a cryptic error somewhere at the very beginning.
Created attachment 202340 [details] Screenshot of the issue
Copying my reply to a message list answer here: Fortunately, I know what this might be, since the first windows guest I've tried my initial unattended install code is windows XP 2 years ago and I've hit this issue. What most likely is going on here is a slight mismatch on the floppy image size used to hold the unattended install file. If I recall correctly, I was trying to provide 1.44 M to dd at the time to create the floppy. Then we switched to qemu-img and 1440k as the size, so the idea of creating a floppy that Windows XP will like (and so all the other OS) is: c_cmd = '%s create -f raw %s 1440k' % (qemu_img_binary, path) utils.run(c_cmd, verbose=DEBUG) f_cmd = 'mkfs.msdos -s 1 %s' % path utils.run(f_cmd, verbose=DEBUG) m_cmd = 'mount -o loop,rw %s %s' % (path, self.mount) This is from https://github.com/autotest/autotest/blob/master/client/virt/tests/unattended_install.py I have a class there that prepares the file like this, copies the unattended file to the mount point [1], and then we're done, unmount the path. There we have a ready floppy image that Windows XP will happily accept. I was looking over and over unattended-installer.vala and what is going on on your floppy creation code: private async void create_floppy_image (Cancellable? cancellable) throws GLib.Error { var floppy_file = File.new_for_path (floppy_path); var template_path = get_unattended_dir ("floppy.img"); var template_file = File.new_for_path (template_path); debug ("Creating floppy image for unattended installation at '%s'..", floppy_path); yield template_file.copy_async (floppy_file, 0, Priority.DEFAULT, cancellable); debug ("Floppy image for unattended installation created at '%s'", floppy_path); created_floppy = true; } Analyzing the floppy file [lmr@freedom data]$ file floppy.img floppy.img: x86 boot sector, mkdosfs boot message display, code offset 0x3c, OEM-ID " mkdosfs", sectors/cluster 4, root entries 512, sectors 4096 (volumes <=32 MB) , Media descriptor 0xf8, sectors/FAT 3, heads 64, serial number 0x46d6dab4, label: " ", FAT (12 bit) [lmr@freedom data]$ du -sh floppy.img 20K floppy.img This certainly doesn't look like a well formed floppy, at least for Windows XP standards. I see that you copy the unattended file using mcopy debug ("Copying unattended file '%s' into floppy drive/image '%s'", unattended_dest_name, floppy_path); // FIXME: Perhaps we should use libarchive for this? string[] argv = { "mcopy", "-i", floppy_path, unattended_tmp_path, "::" + unattended_dest_name }; yield exec (argv, cancellable); So, although this seems fine at a first look, it's not good enough for WinXP standards Perhaps you guys are open to a more traditional approach like the one we use on our unattended code?
Created attachment 202601 [details] [review] Regenerate floppy image using qemu-img Regerated using following commands: * qemu-img create -f raw floppy.img 1440k * mkfs.msdos -s 1 floppy.img With this fix, express install works for Windows XP now. \o/
Acked-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Attachment 202601 [details] pushed as 721c6fa - Regenerate floppy image using qemu-img