Re: Boot-up Questions-I.
From: Kasper Dupont (kasperd_at_daimi.au.dk)
Date: 12/09/04
- Next message: Kasper Dupont: "Re: 2.4.16 panic"
- Previous message: Kasper Dupont: "Re: create process?"
- In reply to: Uday Mullangi: "Boot-up Questions-I."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 09 Dec 2004 13:03:18 +0100
Uday Mullangi wrote:
>
> Hi,
> 1. What is the typical memory layout used for the bzImage ?
A bit complicated, and I don't know all the details. The first 512 bytes
is a boot record. Prior to 2.6 this could actually be used to load the
kernel from a floppy, that is no longer supported. The image also contains
some decompression code, and finally a compressed image (I think it is
really just a gzip file).
> 2. At what point does the BIOS access the harddisk to get the compressed
> image ?
When the bootloader asks the BIOS to read specific sectors
from the harddisk.
> 3. Which BIOS call(interrupt) is used to get the compressed image from the
> disk
0x13
> and at which location is that image stored?
Depends on the image, zImage and bzImage are loaded on
different addresses.
> 4. Bootloader code starts from 0x7c00.
The boot sector is loaded to that address. The boot sector
decides where the next stage is loaded.
> There is something called kernel bootsector
Obsolete.
> and kernel setup.
AFAIR that is the user mode code used to read various
informations from the BIOS and prepare a nice block with
all the informations, the kernel needs.
> How is it different form bootloader?
The kernel boot sector used to be a primitive bootloader.
> 5. When the kernel uncompresses the image, the uncompressed image will be
> stored at 0x100000. Is that correct?
I think it is.
> 6. In order to uncompress the image, either the bootloader should have this
> facility or it should use the BIOS call which does that job. I believe this
> is usually done using the BIOS call. Which interrupt number is used for this
> purpose?
No, the decompression code is part of the kernel image.
> 7.Before the uncompressed image starts executed, the file system should be
> created. Is that correct?
No.
> Or..Whats the procedure?
The kernel image contains a field specifying which root
device to use (and a few other informations). Unless
overriden by the bootloader, the kernel is going to use
that driver to access the root file system. There are
two ways in which the boot loader can change the root
device, either change that field, or specify another
device in the parameter string.
The boot loader can also load an initial ramdisk to some
address in extended memory, and tell the kernel where to
find it.
When the kernel boots, it will look for this (optionally
compressed) ram disk image. And it will use the driver
in the kernel to access the file systems. You need the
appropriate block device driver and file system driver
in the kernel to successfully boot the system.
-- Kasper Dupont
- Next message: Kasper Dupont: "Re: 2.4.16 panic"
- Previous message: Kasper Dupont: "Re: create process?"
- In reply to: Uday Mullangi: "Boot-up Questions-I."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|