Are CD Sectors the same as Disk Sectors?
Are CD Sectors the same as Disk Sectors?
Hi Guys, I am approaching my OS boot records slightly different.
Can someone tell me if the CD boots from sector 0.
And if so does someone have code in windows to write directly to the sectors?
Regards, Alistair
Can someone tell me if the CD boots from sector 0.
And if so does someone have code in windows to write directly to the sectors?
Regards, Alistair
Re: Are CD Sectors the same as Disk Sectors?
Thanks, a bit of a silly question. I will create another post with a better question.
Re: Are CD Sectors the same as Disk Sectors?
Somebody else has posted a very similar question to this. The answer is that CD sectors are 2048 bytes, and there is no boot sector. The job of the boot sector on a hard disk consists of not much more than getting a second stage loader into memory. In the case of CDs, that second stage loader is loaded directly by the BIOS. The structures which allow the BIOS to identify the file to load are a bit complicated to program yourself, and it is easier to use a utility program like mkisofs on Linux, or a (not free) program like Power ISO with Windows.
Re: Are CD Sectors the same as Disk Sectors?
Actually, there is boot sector for ISO-9660 file system no emulation mode in CD-ROM image. But it is not in the particular fixed location and you can't incorporate it to the image after its creation (at least this is not a simple task). The boot sector must be prepared in advance and put onto the image when you prepare image. Read ISO-9660 documentation and El Torito specifications.
Re: Are CD Sectors the same as Disk Sectors?
I have read the El Torito specification, and although the first 16 sectors of the ISO-9660 file system were in theory reserved for boot code, they have never been used for that purpose.Yoda wrote:Actually, there is boot sector for ISO-9660 file system no emulation mode in CD-ROM image. But it is not in the particular fixed location and you can't incorporate it to the image after its creation (at least this is not a simple task). The boot sector must be prepared in advance and put onto the image when you prepare image. Read ISO-9660 documentation and El Torito specifications.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Are CD Sectors the same as Disk Sectors?
They have, just not on x86. PA-RISC does it for example.and although the first 16 sectors of the ISO-9660 file system were in theory reserved for boot code, they have never been used for that purpose.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: Are CD Sectors the same as Disk Sectors?
Linux distributions have started abusing the reserved area at the start of an ISO-9660 filesystem to implement hybrid images that can be written to USB flash drives, I'm not sure of the details but the gist of it is a special MBR is stuffed in the first 512 bytes.. which either parses the ISO-9660 filesystem, or has a sector number hardcoded for the second stage bootloader.
It's annoying though because people have started assuming that any ISO image can be written to a USB flash drive and booted, which is obviously not true.
It's annoying though because people have started assuming that any ISO image can be written to a USB flash drive and booted, which is obviously not true.
Re: Are CD Sectors the same as Disk Sectors?
I can't remember what Apple uses the reserved sectors for, but it isn't boot code.Brynet-Inc wrote:Linux distributions have started abusing the reserved area at the start of an ISO-9660 filesystem to implement hybrid images that can be written to USB flash drives, I'm not sure of the details but the gist of it is a special MBR is stuffed in the first 512 bytes.. which either parses the ISO-9660 filesystem, or has a sector number hardcoded for the second stage bootloader.
It's annoying though because people have started assuming that any ISO image can be written to a USB flash drive and booted, which is obviously not true.
Re: Are CD Sectors the same as Disk Sectors?
We call it a first stage boot loader because usually it has small size (2-4 kb) and it is used to load second stage boot loader.Casm wrote:In the case of CDs, that second stage loader is loaded directly by the BIOS.
Usually it uses HFS+/ISO9660 hybrid. And if HFS wrapper was applied then boot blocks (1st kb) can contain boot code.I can't remember what Apple uses the reserved sectors for, but it isn't boot code.
If you have seen bad English in my words, tell me what's wrong, please.
Re: Are CD Sectors the same as Disk Sectors?
You can call it whatever you like, but it is not a boot sector. It is an ordinary file; albeit a hidden one - and you could make it the one and only stage if you wanted to.egos wrote:We call it a first stage boot loader because usually it has small size (2-4 kb) and it is used to load second stage boot loader.
Re: Are CD Sectors the same as Disk Sectors?
You are mistaken. Read the Spec. again.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
If you have seen bad English in my words, tell me what's wrong, please.
Re: Are CD Sectors the same as Disk Sectors?
"The El Torito specification allows for the loading of FFFF sectors"egos wrote:You are mistaken. Read the Spec. again.
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.
Re: Are CD Sectors the same as Disk Sectors?
All right, it is not one but a few sectors. Although, for example, MS can call 3-sector boot record a boot sector. We call ISO boot image (I mean boot record) a boot sector because our ISO boot loaders (and many others) occupy only one physical sector (4 emulated sectors). Anyway it is not a file. And I was saying about destination (first stage boot loader), not about location (boot sector).
If you have seen bad English in my words, tell me what's wrong, please.
Re: Are CD Sectors the same as Disk Sectors?
The Windows kernel is smaller than that.egos wrote:All right, it is not one but a few sectors.