On Thu, Jun 29, 2000 at 04:20:49PM -0700, Farshad Abasi wrote:
>
> But what am I doing when I type "kernel root=/dev/hda3" ?? Am I not
> telling it to load the Kernel on /dev/hda3??? Or does it go ahead and
> load the Kernel off the CD? Why can't I use the CD to get me to the boot
> prompt and then use the Kernel on the HD??
>
> Help!
>
> -farshad
>
When you pass the "root=/dev/hda3" argument to the kernel, you're telling
the kernel where the ROOT FILESYSTEM is. You're forgetting that the kernel
*IS* the Operating System itself. It already knows where it is, because
it's already running. The reason you can't "use the CD to get to the boot
prompt and then use the Kernel on the HD" is that the BIOS of the IBM PC
itself doesn't work that way. The boot code (in this case, the Linux
kernel) can't be located past the 1024th cylinder of a drive, otherwise the
BIOS won't be able to see it and run it. Programs like the new version of
LILO can work around that, though. Until now, though, the rule has been
to keep your bootable partitions under the 1024th cylinder. That's changed
now, which I find sad because it takes the challenge out of things.
Here's a general summary of what happens when you start your PC that should
help you understand a bit better.
1. Power is applied to the motherboard.
2. The CPU wakes up and does a power-on self test of essential system
components.
3. The CPU runs the boot-up routines in the system's BIOS.
4. The system BIOS looks to see what device it's supposed to boot from.
In this case, let's say it's set to boot from the hard drive.
5. The BIOS passes control to the MASTER BOOT RECORD of the first hard
drive. This is an area at the front of your hard drive that (hopefully)
contains code for booting the system. Generally, this area contains
the default MBR code (go to step 6), but it can also (although it's a bad
idea) be overwritten directly by boot loaders like CHOS or LILO (go to
step 7)
6. The Master Boot Record checks the PARTITION TABLE to see which partition
is marked as ACTIVE (or BOOTABLE). The master boot record code then
passes control to the BOOT SECTOR of that partition. This is where LILO
or CHOS or whatever other bootloader you use should reside. Note, however,
that this will only work if the active partition is a primary partition on
the first hard drive, so if this isn't the case for someone, he will have to
install CHOS or LILO to the MBR. Either from this step or the previous,
the boot loader has now been envoked. Go to step 7.
7. The boot loader (residing either in the master boot record [bad] or
in the boot sectors of one of the primary partitions of the first drives
[good]) now has control. In the case of something like LILO, it can
offer the user some kind of menu or choice system. But that's unimportant.
What it eventually does (in the case of the Linux kernel) is pass control
to a machine-code program somewhere on the hard drive, such as the Linux
kernel, which does the rest.
Remember, these boot loaders CAN NOT SEE INSIDE ANY KIND OF FILESYSTEM.
They have to be SMALL to fit where they need to fit, meaning there's no
room for filesystem drivers. They have to know the exact physical
location on the drive of the program they need to run (such as the Linux
kernel). This is why you can't just boot from the CD and tell it where
the kernel is: even if the boot loader on the CD *DID* allow something
like that, you'd have to know the exact physical location on the drive
where the kernel is, because the boot loader can't understand "high level"
stuff like filesystems and paths and filenames.
MS-DOS (which servers as a sort ot bootloader for Windows) stores its boot
code in an invisible part of the DOS partition before the actual filesystem
begins, so you don't have to worry about it ever moving around. WIth
Linux however, the boot code (the kernel itself) is an actual file inside
the filesystem. This can be dangerous: if that file ever moves, the
boot loader won't know how to boot, because the boot code won't be where
it thinks it is! This is why, whenever you do ANY of the following things:
1. Install a new kernel.
2. Move your kernel.
3. Defragment your Linux filesystem. (not important to do, anyway)
4. Move, resize, or alter your Linux partition.
5. Breathe heavily on your kernel.
you MUST re-run your bootloader installer program (such as CHOS or LILO)
to reinstall a new bootloader with updated information about where
the new kernel is.
Got it?
Peace.
--
Craig McPherson
Baptist Student Union
I.T. Department
[EMAIL PROTECTED]
_______________________________________________
Stormlinux-users-list mailing list
[EMAIL PROTECTED]
http://www.stormix.com/community/lists/listinfo/stormlinux-users-list