old MirOS News

FOSS hosting by
HostEurope Logo

old MirOS News

⚠ This page contains old, outdated, obsolete, … historic or WIP content! No warranties e.g. for correctness!

All 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Cool i386 bootloader changes

2008-12-28 by tg@

The second-stage boot(8/i386) loader has gained several interesting new features:

  • When called as DOS .com program, it defaults to DL=80h because no actual drive is passed from the BIOS
  • When named boot.com it can be run as SYSLINUX (ISOLINUX, PXELINUX, EXTLINUX) module and boot any OpenBSD/i386 and MirBSD/i386 kernels from local filesystems supported
  • In addition to 4.2FFS and ISO 9660, the code to support the FAT12, FAT16, and FAT28 filesystems works and is enabled now, for both booting and the “ls” command
  • If a hard disc has no type 27h partition, the disklabel is searched using the superfloppy approach (i.e., LBA sector #1)
  • If no disklabel can be found, one is spoofed with a somewhat reasonable ‘c’ slice, the four MBR primary partitions as slices ‘d’, ‘e’, ‘f’ and ‘g’, and an ‘a’ slice spanning either the partition passed from DS:SI via SYSLINUX, the first non-empty MBR partition, or the entire disc
  • The new command “cat” allows you to display files from within the bootloader, lest they be accessible
  • The new command “machine label [hd0a]” dumps the disklabel
  • You can place more than one command on the same input line, because ‘`’ now acts the same as ‘\n’ in the command parser; this is useful for instance if the serial console is not accessible from the boot loader, but required for the kernel, and using a boot.cfg is no option

The /usr/mdec/mbrldr, /usr/mdec/mbrmgr and the MBR built in fdisk(8/i386) have been upgraded to pass the partition data in DS:SI (or junk if reading from FDD or whole HDD)

*smile* Now we just need to make our bootloader multiboot-compliant…

MirBSD Logo