0

How to make an exact copy of Windows XP bootable cd using dd command in linux to an usb flash drive so to be able to use the flash drive to install XP in a netbook.

22
  • Did you know about Rufus? If you have access to a Windows machine with a CD drive, it is difficult to make easier!
    – AntoineL
    Commented Mar 12, 2018 at 19:25
  • I won't present this as an answer, since I have not tested it with Windows XP. However, I know this procedure works with Windows 7, 10, and Server 2012. intowindows.com/install-windows-10-from-usb-drive Commented Mar 12, 2018 at 21:06
  • @AntoineL: i didn't know about Rufus, i heard about Winsetupfrom USB but it containes trojans but the issue is i'm obliged to work in linux.
    – P. Kod
    Commented Mar 12, 2018 at 23:49
  • @Charles Burge: i previously tried this method but making the flash disk partition active doesn't work for XP but i didn't tried to edit the mbr with the command Bootsect /nt52 that make XP disk partition bootable.
    – P. Kod
    Commented Mar 12, 2018 at 23:54
  • 1
    @AntoineL I solved this issue, it's better not to copy I386 in C: drive, i have run winnt32 from the flash disk directly using this command: F:\I386\winnt32.exe /makelocalsource /noreboot /syspart:C: /tempdrive:C: where F: is Flash disk letter and C: is the primary active partition in the hard disk. On reboot WinXP started but i encountered blue screen cause of Sata drivers. Now i consider first part of my thread solved, back to my dd command how can i copy C: files with dd and then in future restore WinXP using dd ? this seems easier than applying WinXP iso to hard disk.
    – P. Kod
    Commented Mar 15, 2018 at 21:01

3 Answers 3

1

You don't. Not with dd.

Some linux distributions have special hybrid isos that are sufficiently valid as both a bootable cd and a bootable disk so you can copy one to the other and use the same image, but cd and flash stick booting protocols are different and incompatible. I think flash drives boot similarly to hard drives and floppy discs, at least in the BIOS (non-efi) versions.

I think I have seen software that can convert XP installation cd to a usb stick, but it needs to do non-trivial alterations.

Maybe Rufus would work, as @AntoineL commented.

Also, relevant answer from sidebar: Installing Windows XP from USB pen drive.

Edit: If you don't have a Windows host, you could try wine, maybe with some fiddling to access the drive properly. Or a windows OS on VirtualBox, if you have the RAM for it. You can use windows from the installation CD, download freely virtual images available images from Microsoft or many other options.

3
  • I don't know much about booting so i thought cd and flash drive booting protocols are the same, i am not sure if it is possible to make the pc think the usb drive is a sort of cd i mean the flash will mimic a cd filesystem, is this possible ?
    – P. Kod
    Commented Mar 13, 2018 at 0:18
  • @P.Kod A flash can have a cd filesystem (though Windows might not accept it), but the method of hardware access and the boot process is quite different. You need different drivers, probably bootloader and configuration.
    – Ivan
    Commented Mar 13, 2018 at 10:04
  • I used Rufus as AntoineL suggested but it didn't work, i don't know why because in the link you posted they say Rufus can create windows Xp installer, i used a 4GB flash disk and Windows bootable image ISO.
    – P. Kod
    Commented Mar 13, 2018 at 18:17
0

AFAIK Windows cannot be copied this way. It needs some special treatment and I haven't found any programs (half a year ago) on Linux that are able to do so.

dd command will run succesfully but you won't be able to install any Windows from that flash drive. Your safest bet is doing it on Windows.

1
  • You are right 'dd' run successfully but the flash drive can't boot even if it contains the same exact copy of the disc, i don't know how to modify usb mbr in linux to make it boot windows XP.
    – P. Kod
    Commented Mar 13, 2018 at 0:03
0

I solved my problem, i created a winpe flash drive and copied into it the I386 folder from the windows XP cd which contains the sata drivers, if your copy of XP doesn't contain Sata drivers you can add them by using nlite (use an old version because they are virus-free).

When you boot WinPE, browse to the I386 folder and run the winnt32.exe by typing this command

F:\I386\winnt32.exe /makelocalsource /noreboot /syspart:C: /tempdrive:C: 

where F: is Flash disk letter and C: is the primary active partition, make sure you previously formatted and made the C: partition active using the command diskpart.

If you want to install windows XP by using the linux command dd the only way you can achieve this is by installing windows XP in a small disk and image that disk with dd, now with that image you can, every time you wish, apply it to your hardware and extend it to the full disk space, see here how to extend volumes KB325590

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .