Jump to content

Recommended Posts

Posted

From what I understand, when a computer powers up, the instruction register (IR) is loaded with a predefined location, which contains the bootstrap loader. Its job is to load the OS kernel and transfer control to it.

 

1) Why is this a two-step process? Why isn't it possible to load the address of the OS into the IR directly?

 

2) In various articles I found, it is mentioned that the bootstrap loader fits in a single disk block. Why is this significant?

 

Thanks in advance.

Posted

1) Because you are bootstrapping and to skip the process would be sort of futile no? I may be misunderstanding the question.

 

2) This is more relevant to the master boot record which is a predefined size and is why it has to point the stack elsewhere. . . .

 

just a basic answer

 

Are you trying to bootstrap?

Posted (edited)

Bootloader and bootstrapping are terms more commonly associated in speak with loading of multiple OS at startup, even though technically as you say they are generally applicable, I just wanted to know where you were going with it. In the case of loading multiple OS' it allows you this ability to choose and then passes to the OS specific bootloader. The OS specific bootloader basically just loads the proper drivers to get started. Windows has a few bootsectors containing its OS specific loading sequence for security reasons, but essentially the OS specific loader is the OS so I'm not sure what you hope to derive from your question.

Edited by Xittenn
Posted

Bootloader and bootstrapping are terms more commonly associated in speak with loading of multiple OS at startup

 

Right, but my understanding was that the two-step process is necessary even if there's only one OS, that's why I haven't mentioned it.

 

 

Because the OS doesn't have an address until it's loaded into memory.

 

 

Right, the bootstrap loader has to load the OS from disk into memory. But isn't the bootstrap loader on disk as well?

 

From what I understand, the BIOS has a tiny program that loads the bootstrap loader into memory and transfers control to it. Then the bootstrap loader loads the OS. My question was why can't the BIOS program load the OS directly.

 

From reading some more, one reason might be that the BIOS program needs to be very small (to conserve ROM space?) - too small to contain all the instructions needed to load the OS, but big enough to load the bootstrap loader (which is much smaller than the OS - typically one disk sector).

 

Is this correct? Are there other reasons?

 

 

Thanks for the replies so far.

 

 

Posted

Right, but my understanding was that the two-step process is necessary even if there's only one OS, that's why I haven't mentioned it.

 

 

 

Yes, and as I said, in the case of single OS' the MBR bootstrap's the OS specific bootloader which is essentially an integral part of the OS. In essence you could say that one is not exclusive of the other. This will load the kernel, and so on. . . . honestly I can't get too specific because I haven't studied the process in detail. I am simply replying because sometimes no one else does, or it can take some time. Come back to the thread later if no one immediately answers your question, even if you found an answer yourself because often replies can give you extra insight.

 

Sorry I can't be of much more help than that! :D

Posted (edited)

Think of it this way. The bootstrap contains the very minimum of instructions the computer needs to get started. This does not include the OS. You might change the OS, but the bootstrap will remain the same. You cannot (or could not in my time, 1970's) change the bootstrapping procedure which contains very few instructions.

Edited by Joatmon
Posted

Why is this a two-step process? Why isn't it possible to load the address of the OS into the IR directly?

You can when the OS is made into the bios on the motherboard. See SplashtopOS. My ASUS netbook has this and my boottime to a browser window from power on is about 8 seconds. As an aside, when running splashtop I do not have access to my hard drive or other peripherals because the OS is scaled down to fit in the bios. It's great though when I hit a cafe and just want to hit the web for a few minutes.

Posted

I missed the part about the bios. The bootloader that you are referring to is the Master Boot Record (MBR) and is found on all bootable media. On a hard drive this points to the OS specific bootloader and has enough space to allow for a number of instructions. I highly recommend you look at what makes up the MBR and Extended Boot Record as these are relatively simple and as you say small as they are restricted to 512 bytes in the first sector of memory. When you install the OS the installation process inserts the address to which the MBR will point and this is to the OS specific bootloader or a bootstrap program that can point to other drives or allow for a choice between multiple OS. The reason there is an OS specific bootloader is because conditions must be established to load the kernel and OS specific drivers. Again the details of the last bit are unfamiliar to me as they change and specialize between operating systems and I am not an operating system programmer.

 

Think of it this way. The bootstrap contains the very minimum of instructions the computer needs to get started. This does not include the OS. You might change the OS, but the bootstrap will remain the same. You cannot (or could not in my time, 1970's) change the bootstrapping procedure which contains very few instructions.

 

You can edit the MBR with a hex editor, it's a fairly simple procedure if you have some familiarity with 'stuff.' The 70's BIOS may not have been editable unless of coarse it was an EPROM which was probably not the case, depending on the machine; embedded systems of the time may have employed EPROM's to maintain a level of flexibility.

 

You can when the OS is made into the bios on the motherboard. See SplashtopOS. My ASUS netbook has this and my boottime to a browser window from power on is about 8 seconds. As an aside, when running splashtop I do not have access to my hard drive or other peripherals because the OS is scaled down to fit in the bios. It's great though when I hit a cafe and just want to hit the web for a few minutes.

 

An SSD would make this rather unnecessary! My system--without an active MS-SQL Server--loads in probably under 3 seconds . . .. I'm sure you are already aware. :D

 

** place EBR in where appropriate

Posted

The 70's BIOS may not have been editable unless of coarse it was an EPROM which was probably not the case, depending on the machine; embedded systems of the time may have employed EPROM's to maintain a level of flexibility.

I modded some systems where we cut of some of the pins from the bios at the case to render it dead, soldered a socket on there piggyback and plugged in our own eprom. It was a popular mod on TV descramblers at one time when C band satellite dishes were common.

Posted (edited)

There seems to be some confusion between BIOS and The initial bootstrap. A lot of what happens as the computer runs up is loosely considered bootstrapping (IMO this is more properly known as booting) . However, IMO, What the bios does after the initial bootstrap has been loaded is more in the sense of loading and running programs. The following excerpt from the given link seems to support this idea ;-http://www.vnutz.com...ootstrap_loader In my day, with even a mainframe machine, the initial boot was sometimes just a single hard wired instruction which pointed you to a location and what was found was accepted as the first programmed instruction. What happened subsequently was up to software developers. What they arranged they would call booting this and booting that, not bootstrapping. I have to admit I may be 40 odd years out of date with how these matters are considered today. I was a hardware engineer - we often saw things differently to the software people!

post-68560-0-61641000-1329993852_thumb.jpg

Edited by Joatmon
Posted (edited)

The self sustaining process without external help can be interpreted as meaning if the operator has to input anything, or has the choice to change anything, then you are no longer bootstrapping although what the operator is doing may commonly be called booting. (IMO) ??

Edited by Joatmon
Posted (edited)

Bootstrap is a process to startup an OS, Bootstrap operates using BIOS

 

The Bootstrap works on BIOS to load the OS core, kernel, & user interface

 

With no bootstrap the OS can never startup, so if you lose the bootstrap, you have to re-install that OS,

 

even though your data and the OS data is still in the hard disk

 

It's like if the OS is a TV, that can only be operated using a Remote Controller which is the Bootstrap

 

So even if the TV is still there, it's useless in case you lost the Remote Controller

Edited by khaled
Posted

 

With no bootstrap the OS can never startup, so if you lose the bootstrap, you have to re-install that OS,

 

 

Not quite correct. If you lose the bootstrap you will not load the OS, but the OS doesn't need re-installing because it remains installed. It does need loading and to do that you need to repair the bootstrap.(IMO)

 

 

 

Posted

Bootstrap is the bios. you can fix the bios by interupting the boot process by pressing one of the function or tab keys. Which one varies with the different mother boards/bios chips. The bios can be flashed or reset manually (if you know what you are doing).

There are some bootstrap viruses that are particularly difficult to remove but not impossible.

Posted

Bootstrap is the bios. you can fix the bios by interupting the boot process by pressing one of the function or tab keys. Which one varies with the different mother boards/bios chips. The bios can be flashed or reset manually (if you know what you are doing).

There are some bootstrap viruses that are particularly difficult to remove but not impossible.

 

I think this is a common misconception that has become common "understanding". Bootstrapping and Booting have generally become accepted as the same thing but strictly speaking they are not. For my opinion see #14

 

 

Posted (edited)

Our discussion was about the Offline Bootstrap, which is a part of an installed OS

 

There is a different type known as Network Bootstrap, which is a Live System Core that is loaded from a server, to start up the device

 

the reason for that is because this OS doesn't operate any regular device, but actually it operates your thin-client, which in fact

 

works on a super computer (or Cluster) connected through network

 

this type is usually used with Terminals and Light-Clients, sometimes used for Super Computing gates, and Factories terminals

Edited by khaled
Posted

In the early days of computers there were really only two types of memory known as volatile and non-volatile. We would call volatile RAM today and non-volatile ROM. The contents of the volatile memory would, of course be lost when the computer powered down. The ROM consisted of disk drives, tape drives and other devices such as punch card readers. These contained all the programs, including BIOS that the computer would need to run. The BIOS would most likely be held on a disc. The problem is that when the computer was switched on it would not "know" how to do anything, including loading the BIOS. The problem was usually solved by hardwiring a very small program which would do just enough to start loading from any connected peripheral device, probably starting with the BIOS. This small program was known as the bootstrap. People would describe the loading of individual programs as booting the programs - hence booting and bootstrapping were two different things. Now the introduction of firmware meant that things like the BIOS could be held ready for immediate use on power up and the bootstrap could take you there automatically. Now, when does bootstrapping end and booting begin? That is a debatable point. I personally think that as soon as the sequence of events can be changed by human intervention then bootstrapping has finished and booting has started. " a self-sustaining process that proceeds without external help. "

Posted

Joatmon,

I would tend to agree except that as soon as the os is called the bootstrap is over. That is about the same time that a person can interfere with the process too so the difference may just be semantics. The OS typically looks for errors or missing hardware and then looks for keystrikes and checks memory and other periferals. It is the OS that lets you interupt the boot process and get into the BIOS setup routine - I think....??

Paul

Posted

It is the OS that lets you interupt the boot process and get into the BIOS setup routine - I think....??

Paul

No, it is the BIOS that does that. Once the BIOS hands over control to the OS then it is too late to enter the BIOS setup routine.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.