Are CD Sectors the same as Disk Sectors?

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.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: Are CD Sectors the same as Disk Sectors?

Post by Owen »

What the El-Torito specification says you can do, and what BIOSes actually let you do... have never been exactly aligned.

Assume that unless it's no emulation mode and 1 sector long, it is going to explode horribly.

Disturbingly often you'll be right.
Casm
Member
Member
Posts: 221
Joined: Sun Oct 17, 2010 2:21 pm
Location: United Kingdom

Re: Are CD Sectors the same as Disk Sectors?

Post by Casm »

Owen wrote:What the El-Torito specification says you can do, and what BIOSes actually let you do... have never been exactly aligned.

Assume that unless it's no emulation mode and 1 sector long, it is going to explode horribly.

Disturbingly often you'll be right.
My loader is no emulation mode, but it is certainly more than one sector long. I would be fairly well pissed off if it didn't load on other computers.
tsdnz
Member
Member
Posts: 333
Joined: Sun Jun 16, 2013 4:09 am

Re: Are CD Sectors the same as Disk Sectors?

Post by tsdnz »

Hi guys, all good points.

Can we branch into this question.

How do I get my bootloader, which will contain my my OS into the CD so it will load upon boot.
The bootloader could be as large as 32k.
Using Windows.

Or should I just keep them as separate files??

Alistair,
egos
Member
Member
Posts: 612
Joined: Fri Nov 16, 2007 1:59 pm

Re: Are CD Sectors the same as Disk Sectors?

Post by egos »

The better way is to use separate files/areas. I use following boot order for CD/DVD: stage 1 -> [stage 2 ->] kernel.
If you have seen bad English in my words, tell me what's wrong, please.
Mikemk
Member
Member
Posts: 409
Joined: Sat Oct 22, 2011 12:27 pm

Re: Are CD Sectors the same as Disk Sectors?

Post by Mikemk »

Casm wrote:
egos wrote:All right, it is not one but a few sectors.
The Windows kernel is smaller than that.
I think most are
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
User avatar
Yoda
Member
Member
Posts: 255
Joined: Tue Mar 09, 2010 8:57 am
Location: Moscow, Russia

Re: Are CD Sectors the same as Disk Sectors?

Post by Yoda »

Casm wrote:You can call it whatever you like, but it is not a boot sector. It is an ordinary file; albeit a hidden one...
That is not a boot sector. It is a complete program - larger than MS-DOS programs used to be. Since all files on a CD are contiguous, it doesn't even have that to make it different.
The same way you can argue that the bunch of sectors located somewhere in a data area (may be in FAT16 file system), but not covered by existing file is just a hidden file. You are totally wrong! This is NOT a file since it doesn't need to be presented in ISO file structure (although may be if you want). But if you are worried about the number of physical sectors in it, then call it boot record. It will be correct term.
Yet Other Developer of Architecture.
OS Boot Tools.
Russian national OSDev forum.
Post Reply