Re: doubt regarding partition table and bootloader

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

 



On Mon, Jun 28, 2010 at 3:40 AM, raja roy <raja.roy84@xxxxxxxxx> wrote:
> Hi All,
>       I was trying to understand the booting steps,
>
>  BIOS loads the first sector (MBR) of a bootable device(considering disk
> only) in RAM (0000:7c00)and then jumps to that addr to execute the primary
> boot loader which in turn loads the secondary boot loader(grub) pointed to
> by an active partition in the partition table.

Expanding it a little...

Under x86 Architecture, BIOS starts executing at fff0, that is
one paragraph less than 65535. Here its still in real mode. After
the BIOS does its 'stuff' , the last instruction executed by BIOS
is int 0x19 which causes it to jump to  7c00 where it starts executing
code.  This code is responsible for loading the operating system or
the kernel.

Now, the primary and the secondary boot-loader you mention
are the same. Grub in this case. Its only because there is just
500 bytes (taking away 55AA) to execute. This 500 bytes
is sometimes (most of the time actually) very less to put in
substantial amount of code to boot load any Kernel. Grub uses
this to jump to stage1.5 and then stage2 to completely load
any kernel.

>
>  If i m wrong above,please correct me.
>
>   Now my doubt is that-
>
> If the partition table has multiple active partitions(in case of multiple
> OS) , in that case, are those other partitions are read by the primary boot
> loader ,if yes then when??
>    how does the secondary boot loader(grub) come to know about the various
> active partitions in the disk (since it does not read the partition table in
> MBR)??
Grub (any modern bootloader)does not care about
active partitions. Once grub is installed you have to
register ( let grub know, if not done automatically)
where all your multiple OS are in the disk. It is not
true grub does not read partition table, once you do
something like (hd0,0) it know about first partition
'start / end ' by going through partition table.

There is also new version of grub. Which they say is very scriptable.
Not tried that though.

Thanks

>
> thanks
> Raja
>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux