no.top.p
...@gmail.com wrote:
> Correct my assumptions -- please.
I will do my best.
> The BIOS [memory] [can in modern PC's] detect the set of potentially
> bootable devices [like `fdisk -l`] and allow the user to select one as
> 'the boot device'.
fdisk -l lists all your partitions, your BIOS will boot from a disk, not a
partition.
> Then <the instruction pointer is directed to> the beginning of THIS boot
> device [in old systems it was fixed at hda].
Yes, I suppose that is kind of how it is working.
> The executable code [before the up-to-four partition entries] in the MBR
> [1st 512B sector] of the boot-device
The MBR contains both executable code and the partition table.
> does: <find the FIRST bootable partition and 'continue' from there>,
> which is the 'boot-partition' of the boot-device.
That is the way a Microsoft MBR works, it continues from the active
primary partition. Other bootloaders like lilo and grub might not care
about partitions.
> SO does that mean that if your 'factory setup PC' has root = hda3 and
> you use `cfdisk` to set hda2 as bootable, then with hda2 a non-bootable
> eg. pure data, you've LOST booting ability? !!
I am not very familiar with grub, but lilo will not care about which
primary partition is marked as active (bootable). Lilo will be pointed to
the kernel and it might give the root partition as an argument to the
kernel.
I have some vauge memory of some computer which refused to boot unless
some primary partition were set as active even though I was using lilo.
But I don't remember for sure if lilo then was booting Windows or if it
was some bios limitation.
> OK I already see, confusion: can the boot-partition differ from the root [the
> partition which holds /] ?
Yes, it is possible to create a directory /boot and that directory might
have its own partition. Once this could be necessary to make sure that the
kernel was placed at the beginning of the disk.
> Of course; else there'd be no need to specify
> both. But what happens if /etc/ [for lilo] or /boot [for grub] and on
> different partitons than "/", which apparently is allowed? Is it
> allowed?
I can't talk for grub, but lilo allows you to have /boot on a separate
partition. In fact, lilo allows you to have your kernel in any directory
of your choise. Just make sure that your lilo.conf has that directory,
something like this:
image = /my/odd/place/for/a/kernel/vmlinuz
Nor does lilo care about if /etc is on a partition of its own. However you
might be able to boot your kernel with /etc on its own partition, but init
will not be able to mount partitions if it can't read /etc/fstab and run
scripts in /etc/rc.d. During the boot process init will start by reading
/etc/inittab.
> So the sequence is:
> -> boot-device eg. sdb -> boot-partition eg. sdb2
It is possible to place lilo into a partition instead of MBR. With such a
configuration it is also possible to use a Microsoft MBR to boot Linux.
> So with lilo: can the user edit the kernel path-name in /etc/lilo.conf
> and NOT 'run lilo' if 'boot' & 'root' are not to be changed?
If you make any changes to lilo.conf you will have to run lilo. You will
also have to run lilo if you repalce your kernel even if the new kernel
has the same name and path as before.
regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc351(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost