flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > How to transfer a bootable image to the USB flash drive |
Author |
|
Mike Gonta 06 Jan 2011, 23:24
On Windows, the easiest way is with the free USB Image Tool.
Another excellent free Windows tool is HxD - Hexeditor with which you can raw "copy and paste" the image file to the USB drive. For advanced users dd for Windows (also available for Linux). It is important to transfer the image to the physical drive and not the volume drive letter. If the flash drive is partitioned the volume will not start at LBA 0. Code: C:\dd --list rawwrite dd for windows version 0.6beta3. Written by John Newbigin <jn@it.swin.edu.au> This program is covered by terms of the GPL Version 2. Win32 Available Volume Information \\.\Volume{e3462114-b73a-11de-b06d-806d6172696f}\ link to \\?\Device\HarddiskVolume1 fixed media Mounted on \\.\c: \\.\Volume{35217742-b73c-11de-97ae-806d6172696f}\ link to \\?\Device\CdRom0 CD-ROM Mounted on \\.\d: \\.\Volume{35217743-b73c-11de-97ae-806d6172696f}\ link to \\?\Device\Floppy0 removeable media Mounted on \\.\a: \\.\Volume{39050e5c-fd25-11df-9239-0050ba5ccaa9}\ link to \\?\Device\Harddisk1\DP(1)0-0+3 removeable media Mounted on \\.\e: NT Block Device Objects \\?\Device\CdRom0 size is 2147483647 bytes \\?\Device\Floppy0 \\?\Device\Harddisk0\Partition0 link to \\?\Device\Harddisk0\DR0 Fixed hard disk media. Block size = 512 size is 32044482560 bytes \\?\Device\Harddisk0\Partition1 link to \\?\Device\HarddiskVolume1 \\?\Device\Harddisk1\Partition0 link to \\?\Device\Harddisk1\DR2 Removable media other than floppy. Block size = 512 size is 8409579520 bytes \\?\Device\Harddisk1\Partition1 link to \\?\Device\Harddisk1\DP(1)0-0+3 Removable media other than floppy. Block size = 512 size is 8409579520 bytes Virtual input devices /dev/zero (null data) /dev/random (pseudo-random data) - (standard input) Virtual output devices - (standard output) /dev/null (discard the data) In this example, there is one physical hard drive installed, drive C: which is physical disk 0, so the the flash drive will be physical disk 1. Code: \\?\Device\Harddisk1\Partition0 link to \\?\Device\Harddisk1\DR2 Removable media other than floppy. Block size = 512 size is 8409579520 bytes Code: set disk = dd --filter=removable if=your.img of=\\?\Device\Harddisk%disk%\Partition0 Code: set disk = 1 web site for more details. If for example, the one physical hard drive installed has only one partition - drive C:, and you have one CD/DVD installed - drive D:, then the flash drive will be drive E:. After transferring the image, remove and re-insert the flash drive so that Windows will recognize the new file system on the flash drive. Last edited by Mike Gonta on 08 Jan 2011, 16:22; edited 1 time in total |
|||
06 Jan 2011, 23:24 |
|
Dex4u 07 Jan 2011, 15:55
I coded a window program to do this (only tested in xp), its written in fasm.
Let me know if anyone want to take a look. |
|||
07 Jan 2011, 15:55 |
|
Dex4u 08 Jan 2011, 16:42
Coty wrote:
Sure, but remember its only my second win32 asm program, so it not very good code. Also you need to know if your usb boot supports floppy or hdd emulation or both. The floppy emulation turns your usb fob in to a 1.44 mb size, but a format will restore, the original size. As for hdd, the usb fobs need to be fat16 formated, this is for safety, you can change this. It should work ok by puting a floppy img and hdd boot sector into the folder FddHddImages Note: the hdd boot sector needs to be for fat16 or 32 depending on how you formated the fob. Any ? just ask. Last edited by Dex4u on 14 Jan 2011, 15:21; edited 1 time in total |
|||
08 Jan 2011, 16:42 |
|
Coty 08 Jan 2011, 17:35
Cool thanks, I'll open it up and play with it, I'd like to make a small simple GUI for it, (im all about interfaces being simple.). Thanks again!
|
|||
08 Jan 2011, 17:35 |
|
Mike Gonta 09 Jan 2011, 14:30
Dex4u wrote: As for hdd, the usb fobs need to be fat16 formated, this is for safety, you can change this. Code: Fat16ErrorMes db 'Error!, For safety, the removable ',13 db 'drive needs to be formated FAT16. ',13 db 'Please read the ReadMe file for the',13 db 'best tool to use, as XP does not ',13 db 'format it right,Then try again. ',0 HDD FAT16 format does not require MBR. Usb HDD emulation works fine with FAT12 and is the universal USB booting format, see USB Booting Secrets. |
|||
09 Jan 2011, 14:30 |
|
Dex4u 09 Jan 2011, 17:05
I do not see your point ?.
Why would anyone want at best a 2.88Mb hdd emulation, if the fob is 1 GB ? |
|||
09 Jan 2011, 17:05 |
|
neville 14 Jan 2011, 02:50
Thanks Mike
I found USBIT works well, but it seems to write the bootsector directly to absolute sector 0, whether the device is partitioned or not i.e. it does not recognise logical sectors. I also tried the portable version of HxDen, but it refused to write to my pendrive even when I ran the program as administrator in Windoze Vista However HxDen does give the option of absolute (physical) and logical sectors. I found it useful for checking what USBIT does. I haven't tried dd yet. Syntax looks a bit daunting! _________________ FAMOS - the first memory operating system |
|||
14 Jan 2011, 02:50 |
|
Mike Gonta 14 Jan 2011, 11:23
Hi neville,
neville wrote: I found USBIT works well, but it seems to write the bootsector directly to absolute sector 0, whether the device is partitioned or not i.e. it does not recognise logical sectors. neville wrote: I also tried the portable version of HxDen, but it refused to write to my pendrive even when I ran the program as administrator in Windoze Vista neville wrote: I haven't tried dd yet. Syntax looks a bit daunting! |
|||
14 Jan 2011, 11:23 |
|
neville 14 Jan 2011, 23:18
Yes Mike G, Vista is a real pain
_________________ FAMOS - the first memory operating system |
|||
14 Jan 2011, 23:18 |
|
steve6375 30 Jan 2011, 10:22
My utility RMPrepUSB can write an image to any position on a USB drive from Win7 (GUI based, or use RMPartUSB for command line utility).
_________________ Try RMPrepUSB for all your bootable USB formatting needs. |
|||
30 Jan 2011, 10:22 |
|
Dex4u 30 Jan 2011, 15:40
That's a very useful app steve6375, also theres a lot of good info on your site, thanks.
|
|||
30 Jan 2011, 15:40 |
|
b1528932 30 Jan 2011, 19:56
correct me if im wrong, but shouldnt this 'dd' use \\?\globalroot\ prefix?
|
|||
30 Jan 2011, 19:56 |
|
steve6375 30 Jan 2011, 23:47
If you want to write to the physical device (starting at LBA0/MBR) then use something like
of=\\?\Device\Harddisk1\DR2 (taken from --list example above). |
|||
30 Jan 2011, 23:47 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.