writing a bootstrap file to a usb stick

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
overburn
Member
Member
Posts: 50
Joined: Sun Feb 22, 2009 9:15 am

writing a bootstrap file to a usb stick

Post by overburn »

Ok , i have a bin file that's

Code: Select all

[16 BIT]

jmp $

times 512-($-$$)-2 db 0
dw 0AA55h
and i want to write it to a usb stick.

the only problem is that rawrite works only for floppys , and partcopy doesn't want to write to the drive ... (windows doesn't let it)

anyone know how i can solve this?
thank you in advance :)

edit:
i tried
partcopy bootsec.bin 0 200 -aG
(g is the usb stick drive letter) and i get an error
then i tried
partcopy bootsec.bin 0 200 -h1 but it can't find it.

i'm n00b at this so please help :)
One Tequila, Two Tequila, Three Tequila, Floor!
JohnnyTheDon
Member
Member
Posts: 524
Joined: Sun Nov 09, 2008 2:55 am
Location: Pennsylvania, USA

Re: writing a bootstrap file to a usb stick

Post by JohnnyTheDon »

User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: writing a bootstrap file to a usb stick

Post by Dex »

There are one or two things that link did not mention, eg: the way the bios see the usb fob, some see it as a hdd others as a floppy.
You need to find out what your bios see it as, so you can use the right image etc.
Plue your fob into your PC and reboot goto the bios and see boot order, see if it come up with usb hdd or usb floppy, most now a day see it as a hdd.
If it's a hdd you need to change the MBR on the fob as well as put the image on. if its a floppy you need to just place the floppy image on the fob overwriting the MBR (note: the fob will show up as the size of the floppy image, but a quick format will get it back)

Here is how to do it for DexOS http://dex4u.com/USBboot.htm

but it should work ok with any OS.
PS: I coded a window program to auto do it, but lack of time means it need finishing. 90% done :( .
User avatar
overburn
Member
Member
Posts: 50
Joined: Sun Feb 22, 2009 9:15 am

Re: writing a bootstrap file to a usb stick

Post by overburn »

yeah ... bummer... i can't get the motherboard to boot from usb...
any ideas on how i burn it to cd? :D
One Tequila, Two Tequila, Three Tequila, Floor!
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: writing a bootstrap file to a usb stick

Post by Dex »

Yes, make a bootable floppy image (if you have no floppy, there are programs on the net, search for "virtal floppy" ), make the image the same as if you are making a normal floppy image (eg: int 13h to load sector off a: drive.
Then use your CD burn software to make a bootable cd.
Eg: click on the "make bootable" icon, then it will ask for a Image, point it to the floppy image, then it will add two bin file to the project.
click burn and thats it.
If your burn software does not have this option than down load a free one that does off the net.
User avatar
overburn
Member
Member
Posts: 50
Joined: Sun Feb 22, 2009 9:15 am

Re: writing a bootstrap file to a usb stick

Post by overburn »

hmm tried with nero and magiciso and neither worked.. i thought it was an image problem
eh well thx for the tip :)
One Tequila, Two Tequila, Three Tequila, Floor!
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: writing a bootstrap file to a usb stick

Post by Dex »

Just in case, you did set your BIOS to boot cd, before hdd ?.
You could try using the bootable ISO from my OS, as that user's this method, to see if it works, to find the problem.
Also a RW-CD works just the same as a R-CD, so use them in case you run out of R-CD and end up with costers
User avatar
kmtdk
Member
Member
Posts: 263
Joined: Sat May 17, 2008 4:05 am
Location: Cyperspace, Denmark
Contact:

Re: writing a bootstrap file to a usb stick

Post by kmtdk »

a Greate program /(free) to burn botable cds is "CD burner XP" .
and RW / R does not matter ( but as dex said, juse RW, othervise you will end up using a lot of cds)


KMT dk
well, what to say, to much to do in too little space.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
Post Reply