flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Load OS from usb drive? |
Author |
|
edfed 02 Feb 2010, 16:53
under win98, just use int13h as for Hard drives.
but there i a little problem, the CHS from windows98 and the one from BIOS is not alwas the same on USB pens. on my PC, the chs difference starts at 18__kb approximatelly. then, i cannot play with files over 18_kB (for the moment), maybe LBA addressing can solve it easy. |
|||
02 Feb 2010, 16:53 |
|
smiddy 02 Feb 2010, 19:14
Can you provide information on the system that you intend to use to create the boot disk? That will help in defining your needs a little better.
I am about to start down this journey myself, BTW. I intend to use WinImage to create the image, and use Bochs to insure the MBR, and VBR are setup correctly, then I am going to start using it as my platform tester. I think the most generic sense is treat the USB drive as any other HDD, making certain your BIOS supports booting from it, and direct accessing it, without a USB driver, per se. |
|||
02 Feb 2010, 19:14 |
|
zhak 02 Feb 2010, 19:40
i did some trick that is fine for me. all my project (source, tools, etc.) is on a usb memory stick. i compile a HDD image each time i compile my OS source code. when i need to run it under bochs, i just boot from that image. i've also installed grub on my usb memory stick and configured it to boot from the HDD image. so i can boot my OS on a physical PC. sometimes i run it under VMWare, and i just configure it to use the whole disk as hdd and choose my usb stick. so, using grub i can load my OS on any environment. it's pretty convenient
|
|||
02 Feb 2010, 19:40 |
|
Dex4u 02 Feb 2010, 22:09
I writen a fasm win32 program to add boot sector to usb drive for both floppy and hdd emulation.
I can post the code, if i can find. You can try the program here: http://www.dex4u.com/USBboot.htm |
|||
02 Feb 2010, 22:09 |
|
smiddy 03 Feb 2010, 18:21
Thanks Dex! A quick look-see it appears to be 16 bit FAT, yes? Have you done anything with 32 bit FAT?
|
|||
03 Feb 2010, 18:21 |
|
Dex4u 04 Feb 2010, 10:58
It was just a safety thing, i thought that if you had to format the drive fat16 first, i could test for that, as well as that its a usb drive.
I did not want to nuke there usb external hard drive, if they press yes to the wrong drive letter. So you can just mod the code to write to fat32 too or even fat64. It would be a case of moding the one line of code. I will PM you a link to the code and remember i program in windows very little. [EDIT] I have PM you. |
|||
04 Feb 2010, 10:58 |
|
booter 04 Feb 2010, 18:28
rhyno_dagreat wrote: I have a USB flash drive, and I'd like to put a homemade OS on it. How could I make it bootable/store data in the first sector and everything? Use Int 13 function 42h to read your OS by absolute LBA address to make it BIOS independent. In fact, you should update MBR with the new LBA address each time you write your OS to the USB, or better do it once and then update the OS image file without moving it. |
|||
04 Feb 2010, 18:28 |
|
smiddy 04 Feb 2010, 19:29
Thanks Dex...
I saw that there was some 64 bit FAT verbiage on the net, but I haven't looked at it with any critical eyes yet. I did see it wasn't supported by Microsoft, but then again, that is no big deal either. I was hoping to save me some coding time. I am refreshing my memory on FAT entirely and will be coding my own versions eventually. I'm nearly done setting up my test environment, this code will help in that vain. -smiddy |
|||
04 Feb 2010, 19:29 |
|
rhyno_dagreat 07 Feb 2010, 16:19
Sorry for the late reply - I'm using a msi E7235 laptop with a Intel Core 2 Duo 2.0GHz processor in it.
Can I just use WinImage to write the binary file to the USB directly as if I were to do it to a floppy disk, or because it's different hardware I need to do something entirely? |
|||
07 Feb 2010, 16:19 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.