3 ms·
This particular tiny-floppy-bootloader project is a fork from the "main" tiny-linux-bootloader: https://github.com/owenson/tiny-linux-bootloader https://github
by jaclaz 4y ago
This particular tiny-floppy-bootloader project is a fork from the "main" tiny-linux-bootloader:
https://github.com/owenson/tiny-linux-bootloader https://github.com/owenson/tiny-linux-bootloader
BUT intended for a floppy (which has NOT a MBR, nor any partition), the description of the original, makes sense (as it is aimed to a partitioned device and optional filesystems can exist in the partitioned space after the kernel+initrd), in this fork, the Author maintains parts of the original description that make no sense on a floppy (which again is NOT partitioned and has NOT a MBR), hence it is confusing.
BTW in a 1.44 or 1.722 floppy - even if partitioned - there won't be much space left after the kernel + initrd anyway.
- peter_d_sherman 4y ago'MBR' -- is just a fancy name for the first 512 bytes (a.k.a. "The Boot Block") on any device, floppy or hard drive or USB drive -- IF, if and only if specific parts of the data in those 512 bytes -- are of the necessary format to "mark" that data (to BIOS, since BIOS is the ultimate arbiter as what it will accept as a MBR/Boot Block) as being a legitimate MBR/Boot Block. https://thestarman.pcministry.com/asm/mbr/STDMBR.htm https://thestarman.pcministry.com/asm/mbr/STDMBR.htm >"The first 139 bytes (00h through 8Ah) of the 512-byte sector are executable code, and the next 80 bytes (8Bh through DAh) contain error messages. The last 66 bytes of the sector contain the 64-byte Partition Table (1BEh through 1FDh); data in the Table area will depend upon the size, structure and file systems on each hard disk. The sector ends with the Word-sized signature ID of AA55h (often called the sector's Magic number" Now, that's a "standard" MBR. That MBR -- defines DOS/BIOS compatible partition tables. A partition table is just an information structure -- this information structure in its simplest form gives (at a minimum!) -- the block on the disk where a given partition starts, and a given partition ends. You can think of any partition on any disk as a "range of blocks". So, maybe you have something where blocks 10 - 1000000 are partition 1, and blocks 1000001 - 2000000 are partition 2. Block 1 is the boot sector AND also an MBR if it contains the necessary data to be one, as explained above. Blocks 2-9 can contain additional bootstrap code. In the MBR scheme, the "range of blocks" that constitutes any given partition -- is defined inside of the MBR (>"The last 66 bytes of the sector contain the 64-byte Partition Table (1BEh through 1FDh...") -- but if we're not dealing with MBR's but merely "plain vanilla" boot blocks -- the definition for partitions no longer needs to be there -- it could be somewhere else on the disk (in the case of a GUID Partition Table (GPT)) -- or it could be defined inside of the assembly/binary boot code of the boot block -- in other words, "load blocks from 2-1000" (or whatever) -- into memory. (blocks 2-1000 are the next "partition" in a manner of speaking -- because they contain the next data to be loaded!) Admittedly all of this is confusing! <g> You are correct that on a floppy there wouldn't be much space left after the kernel + initrd anyway. Also, now that I think about it -- I agree with you that using Syslinux or LILO would probably be easier for most people (much easier!), than using custom code, but the thing is, once we go to Syslinux, LILO or Grub -- now we're in a realm of many more lines of code -- which could be more confusing to people that really want to understand what's going on "under the hood" -- but on the flip side, someone using them would get much more convenience and "ease of use"... so you're right(!) -- but there may also be proverbial "dragons" (of complexity!) with Syslinux/LILO/Grub!