Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.os.development > #8217
| From | "James Harris" <james.harris.1@gmail.com> |
|---|---|
| Newsgroups | alt.os.development |
| Subject | Re: BIOS limits on CD boot ? |
| Date | 2015-06-20 09:07 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <mm36sr$v7a$1@dont-email.me> (permalink) |
| References | <mm0vas$t3l$1@speranza.aioe.org> <mm14if$89b$1@dont-email.me> <mm1i9d$f8r$1@speranza.aioe.org> |
"wolfgang kern" <nowhere@never.at> wrote in message
news:mm1i9d$f8r$1@speranza.aioe.org...
>
> James Harris replied:
>
>>> Let's assume a bootable OS on an ISO 9660 conform CD/DVD.
>>> How many bytes can the BIOS load from such media ?
>
>> I take it you are thinking to have an optical disc boot sector and
>> use it to load code from further on in the disc. Which BIOS function
>> were you thinking of using and were you thinking to use emulation
>> (floppy or hard disk) or native mode?
>
> I thought about reads by INT13 without any emulation.
I wondered *which* int 0x13 services you would use but on further
reading that may not be necessary.
How big a file do you want to boot? Depending on the answer it looks as
though you have two options:
1. If the file you want to load is up to about 600k you may be able to
have the BIOS read-in all of it for you! Effectively BIOS will boot that
whole file just as it would normally boot a 512 byte boot sector. (At
least that's how things seem. I have not tested it yet.)
2. If you want to read more than 600k you will have to have the BIOS
boot one file and then in the code in that file you will have to load
whatever else you need, using int 0x13 calls to read the rest.
I'll assume below that you want to use option 1.
>> Int 0x13-42, if supported by all BIOSes you want to run on, looks as
>> though it could read as far as you could want into the optical disc
>> though I am not sure whether or how it would cope with 2k sectors if
>> you used native mode rather than an emulation.
>
> I may rely on 2K sectors, but would the BIOS understand the
> LBA-numbers ?
From what I have read it seems that for optical discs (ODs) BIOS will
use 512-byte virtual sectors and that you should read them in groups of
4 (to make the real 2048-byte OD sector sizes) so I guess that LBAs will
be in terms of 512-byte sectors too.
>>> As I figured some time ago, INT13_42 can't load above 1.MB, but if
>>> the BIOS can load 500K to 0x08000... that would be enough for me yet
>>> and it could save me from temporary installing my CD-reader for the
>>> boot.
>
>> A small point but I think the 2k boot record gets loaded to 0x7c00
>> (meaning it would end at 0x83ff) so you wouldn't be able to read the
>> rest of your code to 0x8000. Info from the first of these useful
>> links.
>
> wouldn't the BIOS only load the first 512 bytes to 07c00 ?
No, I don't think so. From one of Ben's comments and from what I have
been reading it seems you can set up the OD so that the BIOS will boot a
single file up to about 600k.
To do that (untested) create an image with
mkisofs -r -J -c boot.catalog \
-b FILE_TO_BOOT -no-emul-boot \
-o /tmp/kesys1.iso FOLDER
In that command, FOLDER is where you have put the files and directories
that you want to go on the OD and FILE_TO_BOOT is the file in that
folder which you want the BIOS to boot for you. By default it will start
loading it at 0x7c00 (aka 31k). If it is 600k long it will end at 631k
which should be soon enough not to run into the EBDA, which I why I
suggested about 600k could be loaded by the BIOS.
If you want to add other boot images just add further -b lines to the
above command. I read that the whole file will be loaded by default but
if you wish to you can specify how much of that file you want the BIOS
to boot using the switch -boot-load-size followed by the number of
virtual (i.e. 512 byte) sectors you want it to load, preferably a
multiple of 4 to make up a whole number of real 2048-byte sectors.
I don't have mkisofs on my Linux system but I do have genisoimage. It
seems to take the same switches so the command would be identical apart
from the name.
The -r option says to include Rock Ridge naming so that you are not
limited to 8.3 upper case names, and that all files are to be
world-readable.
The -J says to include Joliet names which Windows and Linux can read.
You might or might not want that.
The -c says, I think, that a boot catalogue should be created and gives
it a name.
The -o says where to put the output ISO image file.
This is all on Unix (specifically Linux). If you want to create the
image under Windows I wish you well. ;-)
>> http://wiki.osdev.org/El-Torito
>> http://wiki.osdev.org/ISO_9660
>> http://wiki.osdev.org/Bootable_CD
>
> Thanks, I copied and read this. But I cant/wont use GRUB or similar.
No need to use grub. Whichever path you take you can boot your own code.
...
>>> So I ask here before I burn several CDs to check if this work.
>
>> I haven't tried it but it looks as though you could boot from an
>> optical-disc *image* using an emulator. For example, Oracle
>> VirtualBox has a boot-from-cd-image option. That would save you
>> burning throuh multiple CDs. :-)
>
> Not sure yet if this emulation is something I could do myself.
>
> I can't use anything from third parties inbetween powerup and CD-boot
> because my clients wont pay me for the work of others.
No need. I meant that if you have a machine with Windows or Linux on it
you can use an emulator on that machine to boot a virtual computer from
an image of an OD. If you had generated the file above you would tell
the emulator that /tmp/kesys1.iso was an OD image and that it was
bootable. The emulator's BIOS should then boot from it as if it was a
real OD.
Once you have the OD image working the way you want you can burn it to a
real OD and check that it works on real hardware.
James
Back to alt.os.development | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
BIOS limits on CD boot ? "wolfgang kern" <nowhere@never.at> - 2015-06-19 13:44 +0200
Re: BIOS limits on CD boot ? "James Harris" <james.harris.1@gmail.com> - 2015-06-19 14:15 +0100
Re: BIOS limits on CD boot ? "wolfgang kern" <nowhere@never.at> - 2015-06-19 19:07 +0200
Re: BIOS limits on CD boot ? Melzzzzz <mel@zzzzz.com> - 2015-06-19 19:22 +0200
Re: BIOS limits on CD boot ? "wolfgang kern" <nowhere@never.at> - 2015-06-20 08:50 +0200
Re: BIOS limits on CD boot ? "James Harris" <james.harris.1@gmail.com> - 2015-06-20 09:07 +0100
Re: BIOS limits on CD boot ? "James Harris" <james.harris.1@gmail.com> - 2015-06-20 15:43 +0100
Re: BIOS limits on CD boot ? "wolfgang kern" <nowhere@never.at> - 2015-06-21 06:10 +0200
Re: BIOS limits on CD boot ? "James Harris" <james.harris.1@gmail.com> - 2015-06-21 18:13 +0100
Re: BIOS limits on CD boot ? "wolfgang kern" <nowhere@never.at> - 2015-06-22 09:55 +0200
Re: BIOS limits on CD boot ? "James Harris" <james.harris.1@gmail.com> - 2015-06-22 12:04 +0100
Re: BIOS limits on CD boot ? "wolfgang kern" <nowhere@never.at> - 2015-06-30 20:03 +0200
Re: BIOS limits on CD boot ? "James Harris" <james.harris.1@gmail.com> - 2015-07-01 11:19 +0100
Re: BIOS limits on CD boot ? "Benjamin David Lunt" <zfysz@fysnet.net> - 2015-06-19 10:56 -0700
Re: BIOS limits on CD boot ? "wolfgang kern" <nowhere@never.at> - 2015-06-20 08:55 +0200
Re: BIOS limits on CD boot ? "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-06-19 18:15 -0400
Re: BIOS limits on CD boot ? "wolfgang kern" <nowhere@never.at> - 2015-06-20 09:18 +0200
Re: BIOS limits on CD boot ? "Benjamin David Lunt" <zfysz@fysnet.net> - 2015-06-20 07:43 -0700
Re: BIOS limits on CD boot ? "wolfgang kern" <nowhere@never.at> - 2015-06-21 16:04 +0200
Re: BIOS limits on CD boot ? "James Harris" <james.harris.1@gmail.com> - 2015-06-22 12:13 +0100
csiph-web