Answer to:Joseph Salisbury (jsalisbury)

Firstly I want to say thanks a lot!
Before I test the latest upstream kernel, I want to give more information about 
this problem
1) I was reading a web page: PC Repair and Maintenance: In-depth Look at Power 
Supply, that it was reading By Scott Mueller
Feb 28, 2003 (http://www.informit.com/articles/article.aspx?p=31105)
2) In the page 2, I found the following paragraph that describes the problem: 
If you find that a system consistently fails to boot up properly the first time 
you turn on the switch, but that it subsequently boots up if you press the 
reset or Ctrl+Alt+Delete warm boot command, you likely have a problem with the 
Power_Good timing. You should install a new, higher-quality power supply and 
see whether that solves the problem.
3) The unique difference is that I need to push reset button case not 
Ctrl+Alt+delete because keyboard is death
4) I changed the power supply for another with 650 W output
5) But the problem continues: startup+reset to keep the computer running
6) I was reading carefully the following paragraphs:
"The Power_Good Signal
In addition to supplying electrical power to run the system, the power supply 
also ensures that the system does not run unless the power supplied is 
sufficient to operate the system properly. In other words, the power supply 
actually prevents the computer from starting up or operating until all the 
power supply voltages are within the proper ranges.

The power supply completes internal checks and tests before allowing the
system to start. If the tests are successful, the power supply sends a
special signal to the motherboard, called Power_Good. This signal must
be continuously present for the system to run. Therefore, when the AC
voltage dips and the power supply cannot maintain outputs within
regulation tolerance, the Power_Good signal is withdrawn (goes low) and
forces the system to reset. The system will not restart until the
Power_Good signal returns.

The Power_Good signal (sometimes called Power_OK or PWR_OK) is a +5v
(nominal) active high signal (with variation from +2.4v through +6.0v
generally being considered acceptable) that is supplied to the
motherboard when the power supply has passed its internal self tests and
the output voltages have stabilized. This normally takes place anywhere
from 100ms to 500ms (0.1–0.5 seconds) after you turn on the power supply
switch. The power supply then sends the Power_Good signal to the
motherboard, where the processor timer chip that controls the reset line
to the processor receives it.

In the absence of Power_Good, the timer chip holds the reset line on the
processor, which prevents the system from running under bad or unstable
power conditions. When the timer chip receives the Power_Good signal, it
releases the reset, and the processor begins executing whatever code is
at address FFFF:0000 (usually the ROM BIOS).

If the power supply cannot maintain proper outputs (such as when a brownout 
occurs), the Power_Good signal is withdrawn, and the processor is automatically 
reset. When the power output returns to its proper levels, the power supply 
regenerates the Power_Good signal and the system again begins operation (as if 
you had just powered on). By withdrawing Power_Good before the output voltages 
fall out of regulation, the system never sees the bad power because it is 
stopped quickly (reset) rather than being allowed to operate using unstable or 
improper power levels, which can cause memory parity errors and other problems."
7) My motherboard is a GIGABYTE P35-DS3L and pin 8 of the main power connector 
receives Power Good signal
8) When power supply is ON, the following occurs: the main task performed by 
SMPS, is to inform about the good power supply. As I told if the voltage is 
more/ or is less, in both the conditions a computer cannot work. As soon as you 
supply power to the computer, the SMPS checks the voltage level's its providing 
to the motherboard. If the power signal level is perfect, then SMPS will send a 
POWER GOOD signal to the motherboard timer.On receiving this POWER GOOD signal 
from SMPS, the motherboard timer will stop sending reset signal to the CPU. 
Which means the power level is good and the computer can boot.
9) Bootstrapping: Something has to be programmed by default, so that the CPU 
knows where to search for instructions.
This is an address location in the ROM. This address location is almost always 
constant in X86 based computers. The address location is FFFF:0000h. This 
address location is the last region of the ROM. It only contains one 
instruction. The instruction is to jump to another memory address location. 
This JUMP command, will tell the location of the BIOS program in the ROM.
This is how the computer will come to know where the BIOS program is located.
9) The Role of BIOS in booting process: The word booting comes from another 
word called bootstrapping. The computer knows how to bring itself up, when you 
press the start button, because of the instructions that are fed to a program 
called as BIOS. BIOS stands for Basic Input Output System. The most important 
use of BIOS during the booting process is POST. POST stands for Power on Self 
Test. Its a series of tests conducted by the bios, which confirms the proper 
functioning of different hardware components attached to the computer. POST is 
very important thing to have before the Operating system is loaded. Just 
imagine if you have a faulty hard drive or faulty memory, sometimes these 
things can cause data loss. POST checks and confirms the integrity of the 
following hardware components.
Timer IC's
DMA controllers
CPU
Video ROM
 
A full POST check will confirm the integrity of the following devices as well.
Motherboard
Keyboard
Printer port
Hard Drive etc
 
If you are doing a warm start (which means you did a reset of a running 
machine, most of the times reset button is the small one near the power button 
on the CPU), a full POST check will not be conducted by the BIOS. However if 
you are doing a Cold Start, which means you have applied the power now, it will 
conduct a full POST. 
BIOS determines whether its a cold or warm start, by looking at a flag in a 
predefined memory location. Once the POST completes, the BIOS will inform you 
about any problems it found with the help of beep codes (through system 
speaker). Different number of beep codes have different meaning.
 
Once the POST check is completed successfully, BIOS will look CMOS settings to 
know what is the boot order. Boot order is nothing but a user defined order 
which tells where to look for the operating system. The order will be something 
like the below.
 
CD ROM 
HARD DISK (In my computer this is the first, an SSD disk)
USB
Floppy DISK

The above shown order means that the BIOS will look at CD ROM first to check 
whether an OS can be loaded from there, if it does not find a bootable disk in 
the CD ROM, it will look check whether a bootable OS is there in the hard disk, 
then USB and then Floppy disk. Let's assume that you don’t have a bootable CD 
in your CD ROM drive, then the BIOS will turn to HARD disk.
10) MBR and GRUB: Now as you don't have any bootable CD in your CD ROM Drive, 
the bios will look at the second device from the boot order settings. The 
second device is your Hard Disk.
 
BIOS is programmed to look at a permanent location on the hard disk to complete 
its task. This location is called a Boot sector. This is nothing but the first 
sector of your hard disk. This area is sometimes called as MBR (Master Boot 
Record). This is the location that contains the program that will help our 
computer to load the operating system. As soon as bios finds a valid MBR, it 
will load the entire content of MBR to RAM, and then further execution is done 
by the content of MBR.
 
This first sector of the hard disk is only of 512 bytes. Yeah its too small an 
area for an entire boot loader program to fit in. Hence most of the operating 
system store only the first stage of their boot loader program in here. Only 
the first 440 bytes from the total of 512 bytes is used by the first stage boot 
loader, the remaining part is used to store partition table information. As the 
title of this article says "Linux Booting process", we will be having grub 
stage one in the first 440 bytes of the MBR. I would suggest to read the below 
artcle to understand grub and its details.
 
First stage grub
Partition table information
Error messages
Magic Number
The fourth point is a Magic Number of 2 bytes. This magic number serves as a 
method of verification for the MBR. This 2 byte magic number will contain 
values that will be something like AA55. A different magic number indicates a 
corrupted MBR or invalid MBR. The primary job of the stage 1 bootloader is to 
load the second stage boot loader. The second stage boot loader is the stage 2 
grub, that actually does the job of loading the kernel and other initrd image 
files (we will come to that part in some time). GRUB (Grand Unified Boot 
Loader) is the combined name given to different stages of grub. Now there is a 
little surprise that am going to reveal. There are not two stages of grub. But 
there are three stages of grub in total. I will explain you the reason behind 
this. The three stages are mentioned below.

GRUB Stage 1
GRUB Stage 1.5
Grub Stage 2
Now from where does this stage 1.5 came. The hard disk sectors are counted form 
0 to the last sector. As explained previously the first sector (sector 0) 
contains the GRUB stage 1. Normally partititons will not start before sector 
63. So partitions will start form sector number 63. Hence we have sectors form 
1-63 free. This space is used for storing GRUB stage 1.5. This free space 
between MBR and the beginning of the partitions is called as MBR GAP.

Now you might think what is the requirement of an additional stage in
grub. If you are a linux guy, you might have already configured grub
configuration file. If you remember the configuration, it contains the
kernel file location and name, its partition. Now how will the grub
access those kernel files without the file system drivers?

Grub Stage 1.5 located in the MBR GAP (sector 1 to 63 before the
beginning of the first partition) basically contains the drivers for
reading file systems. So grub stage 1 will load grub stage 1.5 to the
RAM, and will pass the control to it.

Now grub stage 1.5 will load the file system drivers and once the file
system drivers are loaded, it can now access /boot/grub/grub.conf file
which contains other details about kernel path and initrd path etc.

Now this is the point where you are presented with a beautiful TUI
(Terminal user interface), where you can select your operating system
kernal and press enter to boot it.

11) Loading The kernel Image: Similar to GRUB, kernel is also loaded in stages. 
A linux kernel is responsible for handling Process management, Memory 
Management, Users, Inter process communication etc. I must say kernel is never 
used by a user. What the kernel does is to maintain a good environment for 
programs to run. Yeah we use kernel thrugh different programs. 
 
Kernel is a compressed image file. The location of this compressed kernel image 
is specified in the grub 2 configuration file. Its basically an executable 
bzImage file. Now you need to have a lot of drivers and modules to access 
underlying hardware and other stuff. For example, if you have RAID configured 
on your / partition how will you mount it without knowing the programs, or 
think how will you include a kernal module or how to remove a kernel module. 
All these things required different set of programs and code. Including all 
these codes inside the kernel will make it a larger file image.

But our kernel image file needs to be smaller, that's the reason its
compressed image file. So most of these drivers and tools along with a
small similar root file system feel is given by initrd. Initrd is
sometimes called as initial root file system. This is used by the kernel
before the real root file system is mounted.  Initrd is available in the
form of an image similar to the kernel image file. Let's see what's the
content of this initrd image file. You can find the initrd image file
and the kernel image file in the /boot directory.

Loading and unloading of kernel modules is done with the help of programs like 
insmod, and rmmod present in the initrd image.
Now as the kernel is loaded into the memory, the execution begins by checking 
the processor family and architecture. The kernel conducts a lot of hard ware 
specific operations and the first user space program it executes is /sbin/init.

As this is the first program executed by the kernel, it has got a
process id number of 1. The process id number 1 for init was not kept
intentionally, but it was  due to the fact that it is the first process
executed by the kernel. Now as soon as the kernel executes the init
process, it will look at the /etc/inittab configuration file to see the
default run level.

There are different run level's in linux.

Run-Level       Usage
0       System Halt/Shut Down
1       Single User Mode
2       Multiuser Mode Without Networking
3       Full Multiuser Mode
4       Unused
5       GUI/X11
6       Reboot
The /etc/inittab file contains the default run level like the one shown below.
Now that means, we have a run level 3 as the default run level. Once this is 
identified, then run level specific programs are started by the kernel. This is 
the reason you have the following directories.
The folders rc0.d, rc1.d, rc2.d etc contains run level specific programs that 
will be executed depending upon the default run level you have in your inittab 
configuration file. Once the kernel has started all programs in your desired 
run level directory. You will get a login screen to log inside your booted 
system.

THEN WHAT IS HAPPENING? Why computer works very well with warm start and
it fails at cold start?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1637031

Title:
  In cold startup there is dark/blank screen

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1637031/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to