Page 1 of 1
How to read the USB flash disk in protect mode?
Posted: Sun May 26, 2013 3:22 am
by zeven
I want to run my OS from in my USB flash disk.It has been successfully booted and go to the Kernel code.Now it's in protect mode(x86) and how can I read the USB disk?Have I to write a USB driver?I would not like to change the CPU's mode...
Also,I try to read it like ATA disk (through the I/O port 0x1F0--0x1F7) but failed.
friends help me...
Re: How to read the USB flash disk in protect mode?
Posted: Sun May 26, 2013 4:04 am
by Combuster
Two sensible options, really.
1:
write a USB driver
2:
Just load whatever you might care for from the USB stick into memory using the BIOS before actually launching your kernel, so you don't need a driver later. Ramdisks work pretty much the same way.
Re: How to read the USB flash disk in protect mode?
Posted: Fri Jun 07, 2013 4:42 am
by osdog
Combuster wrote:1:
write a USB driver
You can try
http://www.amazon.com/gp/product/1468151983
Re: How to read the USB flash disk in protect mode?
Posted: Fri Jun 07, 2013 5:08 am
by sortie
That book looks pretty ideal for hobby osdev work.
Re: How to read the USB flash disk in protect mode?
Posted: Fri Jun 07, 2013 7:49 am
by IanSeyler
The author reviewed his own book and only gave it 4/5
Seriously though, has anyone read this book? Is it a good resource?
Re: How to read the USB flash disk in protect mode?
Posted: Fri Jun 07, 2013 1:00 pm
by DavidCooper
I downloaded the Kindle version a week or two ago when it first came out (I couldn't afford to take a punt on the paper version before that, but I should have known to trust Mike Gonta when he recommended it here a year and a half ago). I've been reading through it repeatedly ever since then, and it certainly does make it all look possible, although there are still more than a few gaps left in my understanding. I reckon it could be the book that saves the hobby OS when EFI takes over, so it's probably an essential purchace, and it does a lot more than it says on the tin. Five stars from me.
I wouldn't want to work with it on a Kindle though - best to download the free program Kindle for PC (from Amazon) to read it on a computer so that you can navigate and scroll through it efficiently, or ideally get a paper version of the book.
As for the author reviewing his own book at Amazon, that was a clear mistake born out of modesty - his rating's the lowest one it's likely to get.