iPXE discussion forum

Full Version: sanboot and bootsector
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi There,

I have no pb sanbooting a disk image file with a partition boot sector offset = 63 sectors (32256 bytes).
Command is : sanboot --drive 0x80 ${boot-url}/_images/xp.img .

However, when partition offset is 2048 (1048576 bytes), it wont boot. (sanboot error 1d0c6139).
That same image boots fine via other means (iscsi, aoe, boot from disk, etc) so I know the image is fine.

Moreover, when sniffing packets, I notice than ipxe/sanboot first pushes a HTTP HEAD request at 32768 bytes (=64 sectors).
I have the feeling that this is a mistake.
Immediately after, I see another HTTP HEAD at 0 bytes, which I guess is to read the MBR.
And finally right after, I see a HTTP HEAD at 32256 bytes (my partition offset) and then the boot start.

So I have 2 questions :

-is not there a mistake in sanboot+http since first HTTP HEAD goes to 32768?
I would recommend to look by default at 32256.

-is it possible to boot disk images with a partition offset at 1048576 (default with latest windows versions) ?

Note that at this stage, the content of my disk image is not relevant.
It is a plain disk image file with a MBR and one partition with a BS.

Thanks !

Erwan
(2013-10-13 11:20)erwan.l Wrote: [ -> ]-is not there a mistake in sanboot+http since first HTTP HEAD goes to 32768?
I would recommend to look by default at 32256.

This isn't a mistake. The code in int13.c will look at offset 32768 for an ISO9660 primary volume descriptor, to find out if the SAN-booted device is a CD-ROM image.

The fact that you see a read from offset 32256 indicates that the MBR code is executing correctly and attempting to read from the correct partition offset.

Quote:-is it possible to boot disk images with a partition offset at 1048576 (default with latest windows versions) ?

Yes, there should be no problem with that.

The error you are experiencing (http://ipxe.org/1d0c6139) indicates that your web server is returning some kind of error status code which iPXE doesn't know how to handle. Could you check your web server logs (or enable DEBUG=httpcore) to find out what status is being returned?

Michael
Ok got it !
So it first checks offset 32768 for an iso volume descriptor, if not found goes back to offset 0 to read the mbr and from there gathers what ever offset it needs to jump to (usually 32256 or 1048576 for latest windows disks).

I was wondering where the code was : will look at int13.c with interest !

I'll check my web server to check the error codes.

Thanks for your support !
Reference URL's