Hi, all!
It´s a pleasure to be in here again, could anyone help me about that doubt? I don´t know how USB Works,
like, how to put my os on it ? its works like floppy disk emulator? I´m trying to find out some docs but I have a poor english, and I can´t find out!.
could anyone helps me ? could be anyting,
thanks a lot,
Doubt - USB PENDRIVE
-
- Member
- Posts: 5588
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Doubt - USB PENDRIVE
If sector 0 does not have a valid partition table, it will work like a floppy disk.digo_rp wrote:its works like floppy disk emulator?
- DavidCooper
- Member
- Posts: 1150
- Joined: Wed Oct 27, 2010 4:53 pm
- Location: Scotland
Re: Doubt - USB PENDRIVE
If you want to boot from a USB pendrive (flashdrive), don't waste time trying to pretend it's a floppy disk. Treat it as a hard drive and put MBR code into sector 0, but keep the original partition table that the manufacturer put at the top of that sector. You will need to rewrite some of your code so that it can load using LBA sector numbers instead of CHS, but it's worth the effort. A modified version of your original bootsector will then become a VBR which will sit at the start of a partition, and the MBR code will load this sector in and hand over control to it so that the VBR can boot your OS. Start your research here: http://wiki.osdev.org/MBR.
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c
MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming