[ipxe-devel] [gPXE] gpxe on USB or HD

Robin Smidsrød robin at smidsrod.no
Wed Jun 19 09:58:06 UTC 2013

On 19.06.2013 02:23, Yadin Flammer wrote:
> No changes to code, I'm no programer.
> I have done:
> sudo dd if='/path/to/file/ipxe.usb' of=/dev/sdc
> When that failed I cd to the directory of the file and do:
> sudo dd if=ipxe.usb of=/dev/sdc
> Previously as mentioned I had been doing of=/dev/sdc1 but was told that
> was wrong.
> In all cases, there are no errors, it displays bytes in and out and
> transfer rate acting like it did something, but in no case does it
> actually do anything as the usb flash drive is unaltered every time.
> I obtained the device path with:
> sudo fdisk -l
> As mentioned I have also tried to dd the gpxe.usb file downloaded from
> the old site with the same results.
> Ubuntu 12.0.4 LTS fully updated as of today.

Okay, I'll show you what you can try to see if data is actually being
written to the disk. See this process:

$ dd if=/dev/urandom of=/tmp/dummy_disk bs=1MB count=32
32+0 records in
32+0 records out
32000000 bytes (32 MB) copied, 2.79843 s, 11.4 MB/s

$ ls -l /tmp/dummy_disk
-rw-rw-r-- 1 robin robin 32000000 Jun 19 11:45 /tmp/dummy_disk

$ dd if=ipxe.usb of=/tmp/dummy_disk
736+0 records in
736+0 records out
376832 bytes (377 kB) copied, 0.00371963 s, 101 MB/s

$ dd if=/tmp/dummy_disk of=/tmp/extracted_ipxe.usb count=$(wc -c
ipxe.usb | cut -d ' ' -f 1)
736+0 records in
736+0 records out
376832 bytes (377 kB) copied, 0.00308136 s, 122 MB/s

$ md5sum ipxe.usb /tmp/extracted_ipxe.usb
a4bb19f3b0346e9a36a3eec882fd5f0f  ipxe.usb
a4bb19f3b0346e9a36a3eec882fd5f0f  /tmp/extracted_ipxe.usb

I've used the path /tmp/dummy_disk instead of /dev/sdc, but you should
be able to use /dev/sdc instead. Can you verify that the md5sum of the
extracted data is the same as for ipxe.usb? If so, your USB stick is
working, but the computer you're trying to boot might have some issues
booting from it. I say again. The USB stick will NOT contain any kind of
valid filesystem you can verify, so don't even try. Using md5sum as
above is the only way to verify that the iPXE USB image was written to
the USB stick.

If the md5sum doesn't match you might have a defective or
write-protected USB stick.

I'd also suggest you use eject /dev/sdc before you pull the USB stick
out, to ensure data is flushed to the drive properly.

-- Robin

More information about the ipxe-devel mailing list