LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to create an iso image of xp drive with dd (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-create-an-iso-image-of-xp-drive-with-dd-931146/)

abc151 02-24-2012 09:42 PM

how to create an iso image of xp drive with dd
 
hi all;
I am new to linux. I want to learn how to use the dd command to create a iso image of my xp drive. so I can put it in vbox without reinstall from the beginning. Is it possible? and what is the cmd ?
I have read the how to dd and try it out, but it is not working.

thank you in advance.

abc151

jschiwal 02-24-2012 11:09 PM

Virtual box images may be different than an image of a partition.
Also, an ISO image is an image of an ISO-9660 filesystem for a disc. I'd recommend calling it an image and using a .img extension to avoid confusion.

You need to first determine which filesystem contains XP. You can run "sudo /sbin/fdisk -l" to list the partitions. You might be able to tell from the size, or maybe you only have one partition on that disk. If not you can check with "sudo file -s <device>".

Suppose WinXP is on /dev/sda2, and you have an external drive mounted on /mnt/ that has enough space for the image.
sudo dd if=/dev/sda2 of=/mnt/xp.img bs=1M

The input is /dev/sda2, the device node for the filesystem. The output is /mnt/xp.img, a file on the external drive. (note: you can't use a fat32 filesystem. Files can't be over 2GB.) bs is the blocksize. I just made up 1M. Another value may work faster.

Another program you could use is dd_rescue. It is used to create images of partitions when there is a problem reading some sectors on the drive. If there are no problems, the process goes quickly. If there are, the program drops down the block size and retries. I found this method to be very fast for creating an image file.
sudo dd /dev/sda2 /mnt/xp.img

abc151 02-27-2012 07:26 PM

thank you very much for your reply, It is helpful i will give it a try.

thank again.

ongte 02-27-2012 07:56 PM

As I understand if you wish to convert something to VDI or VMDK (Virtual Disk) formats, the source image must be a whole hard drive, not just a partition.

Check out the VBox Wiki Windows Migration page: https://www.virtualbox.org/wiki/Migrate_Windows

jefro 02-27-2012 08:42 PM

You are mixing up words a bit.

You can use dd to some file of the entire drive like dd if=/dev/sda of=/media/usbdrive/image.raw

That will create a raw image of your drive. You can then use qemu to boot to it if you want. The first issue is that the hal will be off and you will need to fix it.

If you want the correct MS way you create a ntbackup with system state then install a copy of xp in the vm then apply restore and you should have a complete os running.

There are many P2V apps to that correct hal in the process.

abc151 02-29-2012 08:23 PM

hi all;

thank you very much for your help. I appreciated very much if you could help me for the current problem first :)
I used my desktop pc running fedora 14 to dd my xp drive (hooked up ext. usb) as suggested, and save it in /media.
everything seem to be ok. turn off pc and restart next day. It wont boot up and I get this error message
"configuration default for Gnome power manager have not been installed.".
I googled the error message. I used live cd to remove the image file successfully.
restart. no go, same message plus one new one
" usr/libexec/gconfig-sanity-check-2 exited with status 256"

help help help !!!

jefro 03-01-2012 03:27 PM

Boot to live cd maybe and see the condition of the drive. dd is a very dangerous tool.

abc151 03-02-2012 08:37 PM

the drive is ok. i can log in ctrl+alt+f2 and see all files and directory. But there are more errors. something like permission help setuid is not correct..

I dont have problem to reinstall it. but I would like to solve it.
if it happen again then i know how to fix it.


All times are GMT -5. The time now is 06:47 PM.