LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-24-2012, 10:42 PM   #1
abc151
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Rep: Reputation: 0
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
 
Old 02-25-2012, 12:09 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
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
 
1 members found this post helpful.
Old 02-27-2012, 08:26 PM   #3
abc151
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Original Poster
Rep: Reputation: 0
thank you very much for your reply, It is helpful i will give it a try.

thank again.
 
Old 02-27-2012, 08:56 PM   #4
ongte
Member
 
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mageia, CentOS, Ubuntu
Posts: 468

Rep: Reputation: 72
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
 
Old 02-27-2012, 09:42 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
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.
 
1 members found this post helpful.
Old 02-29-2012, 09:23 PM   #6
abc151
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Original Poster
Rep: Reputation: 0
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 !!!
 
Old 03-01-2012, 04:27 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
Boot to live cd maybe and see the condition of the drive. dd is a very dangerous tool.
 
Old 03-02-2012, 09:37 PM   #8
abc151
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
create new ISO image from existing One krax Slackware - Installation 6 12-15-2011 10:16 AM
create an iso image bino25 Linux - Software 7 05-04-2011 03:22 PM
How to create an ISO image from a CD? crisostomo_enrico Solaris / OpenSolaris 4 04-01-2008 05:33 PM
Proper way to create an ISO image dwhitney67 Linux - Software 3 09-30-2007 01:37 PM
Create an .iso image bentman78 Linux - Software 9 07-02-2004 06:22 AM


All times are GMT -5. The time now is 04:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration