Michal Soltys
2008-Oct-22 21:34 UTC
[syslinux] Question about .bs and .bss style bootsectors.
Hello Recently I've been happily experimenting with syslinux, replacing grub and my old bootmanager. All works beautifully, but I have one question - in case of .bss bootsectors - what exactly and under what circumstances is patched in ? With syslinux used as main bootmanager - bootsectors from xp64, xp32 and [pre-syslinux] msdos 7.1 (98se) work perfectly fine when chainloaded natively as .bs (and dos also as .bss). PS. By the way - there's another "trick" to make dos (at least microsoft versions) to boot from another harddisk - if you set actual physical drive number in its bootsector and as active flag on the respective disk (e.g. 81h instead of 80h). This way there's no need for drive swapping code.
H. Peter Anvin
2008-Oct-22 23:02 UTC
[syslinux] Question about .bs and .bss style bootsectors.
Michal Soltys wrote:> > By the way - there's another "trick" to make dos (at least microsoft > versions) to boot from another harddisk - if you set actual physical > drive number in its bootsector and as active flag on the respective disk > (e.g. 81h instead of 80h). This way there's no need for drive swapping code. >Interesting, although I much would like to avoid writing to a disk whenever possible. On the other hand, perhaps one can just load the bootsector and patch the drive number in the boot sector in memory; that is very easy to do and would be a nice option. I'll probably cook up a patch for that just because it's so easy. -hpa
H. Peter Anvin
2008-Oct-22 23:06 UTC
[syslinux] Question about .bs and .bss style bootsectors.
Michal Soltys wrote:> Hello > > Recently I've been happily experimenting with syslinux, replacing grub > and my old bootmanager. All works beautifully, but I have one question - > in case of .bss bootsectors - what exactly and under what circumstances > is patched in ? >What is patched in is the FAT superblock from the Syslinux system volume, starting at byte 11. However, I did just notice a dangerous thing: I always copy the number of bytes appropriate for FAT32, which is larger than for FAT12/16. I will fix that :) .bss is obviously only supported when booting from a FAT filesystem. -hpa
Sergey Vlasov
2008-Oct-24 19:13 UTC
[syslinux] Question about .bs and .bss style bootsectors.
On Wed, Oct 22, 2008 at 11:34:36PM +0200, Michal Soltys wrote:> With syslinux used as main bootmanager - bootsectors from xp64, xp32 and > [pre-syslinux] msdos 7.1 (98se) work perfectly fine when chainloaded > natively as .bs (and dos also as .bss).They should work if you obtain the .bs files by installing the corresponding systems using their tools, and then copying the working bootsector from the same partition; in this case the copied bootsector already has the proper FAT superblock data inside.> By the way - there's another "trick" to make dos (at least microsoft > versions) to boot from another harddisk - if you set actual physical > drive number in its bootsector and as active flag on the respective disk > (e.g. 81h instead of 80h). This way there's no need for drive swapping code.Unfortunately, at least current Linux kernels reject such partition tables: if the active flag for any partition is neither 0 nor 0x80, the partition table is considered broken and ignored completely. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: <http://www.zytor.com/pipermail/syslinux/attachments/20081024/f9321712/attachment.sig>