Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have FreeBSD installation image for an USB memory stick, Windows 7 x64 desktop and server hardware nearby. And no CD drive at all for years.

Under Windows XP x86 you can use many solutions such as dd(Cygwin), dd(native), flashnul and many others (see links below). But they are not work under Windows 7 x64 with administrative rights. See official info from MS for information about this

Possible solutions:

  1. In BSD/Solaris/Mac OS X/Linux this is dd(1). I have no BSD/Linux/etc
  2. UNetBootin. MemStick with Linux works but doesn't with FreeBSD. I have no success with it from Windows XP too.
  3. Use Acronis/Daemon Tools/Nero/UltraISO and etc. - it may be works but they are
    1. I have to buy most of them
    2. They leave to much garbage, so I prefer better solution.
  4. Install Linux — it's not good practice to do double work.
  5. Buy CD Drive — only for one installation?
  6. Boot from PXE/TFTP — There's lack of NFS server from which I can mount root.
  7. Buy Windows 2008 which has NFS server and can be used to mount root in FreeBSD Boot process — only for one installation?
  8. Install virtual machine such as VirtualBox, install FreeBSD here and write image to flash drive. VirtualBox have very bad USB support.
  9. Buy virtual machine which works good with USB and you able to write image to flash drive under this — only for one installation?
  10. Write my own program.

So, which software can I use to do this task?

PS: If you use Linux, want to write flash image under Windows XP x86 (I don't know why this software is broken, may be because x64 platform)

Please, look here, this is not question I ask: How do I place a bootable ISO on an USB drive?

Edit: With latest Cygwin version which are "compatible with Window Vista/7" I always get following with unmounted drive (my system drive is PhysicalDrive2):

C:\Windows\system32>dd if=//./PhysicalDrive0 of=C:/mbr count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.003 seconds, 171 kB/s

C:\Windows\system32>dd if=c:/mbr of=//./PhysicalDrive0 count=1
dd: opening `//./PhysicalDrive0': Invalid argument
share|improve this question
    
Which ones did you try? –  slhck Oct 23 '11 at 20:13
    
dd, unetbootin. I haven't (and don't want to) try daemon tools, nero, acronis, etc - they spams into system a lot and I'll have to to cleanup it after. –  Eir Nym Oct 23 '11 at 20:58
    
what kind og image? .img or .iso? –  Journeyman Geek Oct 23 '11 at 22:50
    
I have both, but prefer to able to write any .img –  Eir Nym Oct 23 '11 at 22:50
    
Have you read how to place bootable iso on a flash drive? If so, please edit your question to explain what didn't work from that post, and I'll reopen your question. Otherwise, it's a duplicate. –  nhinkle Oct 23 '11 at 23:40
show 2 more comments

5 Answers

dd, what else.

dd if=foo.img of=\\.\F:

There's also flashnul:

flashnul F: -L foo.img
share|improve this answer
    
it is outdated. It doesn't work in Windows 7 x64. Last update was at 2005-01-27 20:32-0800 –  Eir Nym Oct 23 '11 at 20:14
    
Please explain "doesn't work". It does not use any features that could have been removed or changed. It does, however, need elevation ("Run as Administrator"). –  grawity Oct 23 '11 at 20:18
    
I've runned cmd under administrator, surely. This utilities don't want to write any data. I've do all as listed with no success. I've seen many good utilities which works fine in Windows XP and don't in Windows 7. Disk subsystem is one of part of incompatibility between W7 x64 and WXP x32. –  Eir Nym Oct 23 '11 at 20:21
    
Also I need to write everything include MBR –  Eir Nym Oct 23 '11 at 20:24
    
For example, I need write working FreeBSD release. Linux can be written with sourceforge.net/projects/unetbootin but BSD not. –  Eir Nym Oct 23 '11 at 20:31
show 2 more comments

It hasn't been updated in a while, but usb-imagewriter does just what you need, and definately works with .img files, and nearly any OS image i've tried (and many alternative OSes recommend it)

share|improve this answer
add comment

Try WINDOWS 7 USB/DVD DOWNLOAD TOOL As Eir Nym stated, this installs microsoft's bootloader, which you can user for any windows iso (I've used it to install windows 8) For general purpose loader use unetbootin

share|improve this answer
    
it is one of tools you can use to install Windows 7. But I need low-level disk access such as dd(1). For example of image file you can use file filled with zero or random bytes to remove any data you have on USB. –  Eir Nym Oct 23 '11 at 20:54
    
+1 for digging up that link. Microsoft kept it hidden for a while. –  AndrejaKo Oct 23 '11 at 21:35
    
@Eir Nym Did you try the utility? It's supposed to be able to copy correctly image to a flash drive including any special quirks. –  AndrejaKo Oct 23 '11 at 21:36
    
Only with NT boot loader. I need BSD boot loader. –  Eir Nym Oct 23 '11 at 21:37
add comment

Cool. What an easy question.

Here is the solution: http://unetbootin.sourceforge.net/

And it works. Believe me.

share|improve this answer
    
I hate Unetbootin because not every "bootable" flash drive I'll get, will boot. –  Eir Nym Oct 23 '11 at 22:43
    
@EirNym This depends on the machine your are trying to boot from. And not on machine you are building the flash drive. –  mailq Oct 23 '11 at 22:46
    
Are you sure? On which things does it depends? I've tried these images with very different netbooks, laptops and PCs. from different manufactures. –  Eir Nym Oct 23 '11 at 22:54
    
ah, Linux will boot almost always, BSD not. –  Eir Nym Oct 23 '11 at 22:55
    
BIOS implementation, version, manufacturer; flash drive size, manufacturer; machine age, manufacturer –  mailq Oct 23 '11 at 22:58
add comment

In Cygwin version 6 and above the dd command to write an ISO has changed:

dd if=path-to-file.iso of=/dev/sdx

where sdx is one of the drives:

cat /proc/partitions

For example, to write a FreeBSD img file onto a USB memory stick:

$ cat /proc/partitions
major minor  #blocks  name

    8     0  78150744 sda
    8     1    102400 sda1
    8     2  51096576 sda2
    (...)
    8    48 976762584 sdd
    8    49 295185408 sdd1
    8    50 681573376 sdd2
    8    64   8093696 sde
    8    65   8093680 sde1

$ dd if=/cygdrive/l/FreeBSD-9.1-RELEASE-amd64-memstick.img of=/dev/sde bs=10240 conv=sync

Also see https://wiki.archlinux.org/index.php/USB_Installation_Media for alternative methods.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.