Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Installing on LFS



On Tue, Nov 17, 2015 at 11:13:27AM +0100, Wolfgang Solfrank wrote:
> 
> Some minor corrections:
> 
> You are mixing up the MBR code and the partition boot (PBR) code
> a bit.  The BIOS reads the first sector of the device and simply
> jumps to that code.  (Well, some BIOSs try to do something else
> with the data from this first sector like determining the disk
> geometry, but for now we can ignore this.)
> 
> Assuming MBR partitions, this first sector holds a partition table
> of at most 4 partitions.  Depending on what code was installed there,
> it may or may not present a boot menu, where you can select the
> partition to boot, or boot a preselected partition (the so
> called active one.)  Booting from a partition in this context
> means to read the first sector of that partition and jumping to
> that code.  That code is then responsible for booting the OS
> installed on that partition.

I'll add the first sector of the partition has to be wriiten
to the same address as the bios wrote the first sector of the
disk. This means that the mbr code had to copy itself somewhere
else.

> In the NetBSD case it reads in the rest of the first 8k of the
> partition (i.e. it reads 15 additional sectors.)  Whether or not
> bootxx_<fstype> understands the filesystem depends.  If it does
> not, the sectors containing /boot are patched into the code
> in these first 8k by installboot.  On i386/amd64 most of these
> files do understand the filesystem; that's why you need different
> code depending on the filesystem.

I think all the i386/amd64 bootxx code understand the fs layout.
This allows the /boot program it loads (which then loafs the kernel)
can be updated after the bootstrap is installed.
This is almost certainly needed for lfs because the cleaner might
move /boot to different sectors.

	David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index