[syslinux] Support for 4kb disks

Frediano Ziglio frediano.ziglio at citrix.com
Mon Jul 30 05:14:11 PDT 2012


On Wed, 2012-07-18 at 18:59 -0700, H. Peter Anvin wrote:
> On 07/17/2012 01:37 AM, Frediano Ziglio wrote:
> >
> > It's a physical machine with a beta firmware on it. I wrote a small
> > program to read/write two sectors and I can confirm that each sector is
> > 4kb.
> >
> 
> Support for non-512-byte logical sectors is sparse since such support in 
> actual systems is scant to nonexistent.  Most of the pieces are there 
> but as you have noticed there are bits still missing.
> 
> 	-hpa
> 

I finally got a repro using Qemu and patched SeaBIOS (just changed the
check in src/blockcmd.c for DISK_SECTOR_SIZE adding 4096).

After some though I think there are 2 way to make it work:
1- patch extlinux installer in order to detect and use sector > 512
2- make extlinux code assume that sectors specified are 512 but handle
case where BIOS use bigger sizes

1 make simpler extlinux code (probably code is already there) but it
could be a problem if a user wants to switch the disk from 512 to 4096
(this can happen changing jumpers on disk or firmware on some disk
controller).

2 however require more code on extlinux (it's hard to make it works only
using 512 bytes).

I'd vote for 2 and I think there are some options to avoid the 512 bytes
problems:
- as sectors are bigger mbr code load more code, ext2/3/4 let us 1024
bytes so we can use entire 1kb, just check on first 512 bytes we can use
entire kb
- remove old floppy and no int13x code and use only int13x.

In this case I would vote for first.

Any suggestion?

Regards
  Frediano





More information about the Syslinux mailing list