LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Hardware (http://www.linuxquestions.org/questions/forumdisplay.php?f=18)
-   -   Linux BIOS flashing (http://www.linuxquestions.org/questions/showthread.php?t=4175446591)

yun 01-21-2013 09:55 AM

Linux BIOS flashing
 
Hi all,

I am new with the Linux + BIOS.

I am currently trying to search a way to flash my BIOS through Linux command line and found flashrom from coreboot. I am not too sure that the flashrom is actually working.

I got it flash successfully + verified successfully but, after reboot, nothing were changed & BIOS image verfication now failed to match the BIOS image I flash earlier.

Who has experience with this?

Please advice.

Thanks,
SY

H_TeXMeX_H 01-21-2013 02:24 PM

I recommend flashing the BIOS from a DOS boot disk like freedos. Or, even better, some mobos have a BIOS flashing app integrated into the BIOS itself, so check the manual.

Always be aware that a bad BIOS flash will brick your system, and it may be permanent.

yun 01-21-2013 08:38 PM

Hmm... The only choice I have now is that, either from Linux command line or throught ethernet so that I can make the process automated.

I am not sure if I can automated the process with the freedos. As I know that with feedos, we need extra USB, boot to the DOS and start the thing.

Any recommandation?

I cannot find anything about that in the manual.

H_TeXMeX_H 01-22-2013 04:06 AM

The only way to do it from the CLI is to use flashrom/coreboot like you did. However, you said it didn't work. Make sure to check the version of the BIOS in the BIOS options screen to be sure it didn't work.

TobiSGD 01-22-2013 07:19 AM

(free)DOS has automation capabilities, called batch scripts. It is no problem at all to automate the process of BIOS flashing using DOS, you don't need USB for that and it can be done over PXE booting.

yun 01-22-2013 10:15 PM

Quote:

Originally Posted by H_TeXMeX_H (Post 4875249)
The only way to do it from the CLI is to use flashrom/coreboot like you did. However, you said it didn't work. Make sure to check the version of the BIOS in the BIOS options screen to be sure it didn't work.

I cannot check the BIOS version - because it is actually same version (I intend to reset the BIOS to the optimal version because the CPU supplier did not reset the BIOS to optimal version when they ship unit) but, some setting in the BIOS were changed (like USB configuration were changed from High Speed to Full Speed) and an image of the flashrom were created with flashrom - r /root/bios.ROM

After that, I wrie this created image to a unit with the HighSpeed BIOS setting to check out if the setting were changing - unfortunately not.

Thanks.

yun 01-23-2013 01:46 PM

I am in big confusion now. Who can tell me what is BIOS software, where it stored? and where is BIOS setting and where it stored?

What is flashrom doing actually? it is flashing the BIOS software or the setting?

Thanks in advance for explaining.

H_TeXMeX_H 01-23-2013 01:55 PM

BIOS is system firmware stored on a ROM somewhere on the mobo. The BIOS settings are stored on a CMOS, also on the mobo, and powered by the CMOS battery.

Flashrom is flashing the BIOS to the ROM. It is flashing BIOS firmware.

You can set the BIOS settings by holding a certain key when the system POSTs, usually F2 or Delete, check the manual. Then you can see all the settings, set them, and save them or discard them.

TobiSGD 01-23-2013 03:23 PM

If you need a tool to deploy custom default settings on mainboards you can contact the mainboard manufacturer, they usually have tools that they hand out which will enable you to do that. I know that at least from ASUS, but I am not quite sure you only get those tools if you are an ASUS partner or if any OEM can get those.

jefro 01-23-2013 09:37 PM

Does flashrom support pages describe this exact chip as working?

When you boot to bios, do you see a choice to load all default settings? I am pretty sure that is what you will get when you reflash it, not any of your changes.

yun 01-25-2013 05:54 AM

Hi guys,

Thank you for explaining. I think the flashrom did flashed the BIOS ROM.

But, I think I am wronged here. I should not flash the ROM but, I want to have the BIOS setting programmed.

There surely have the default setting in the BIOS page but I need a method to set this through Linux command instead. Any comment for this?

By the way, it is quite odd that I cannot reset the BIOS to default with removing the RTC battery - is this caused by a different chip used to keep the BIOS setting?

Thanks,
SY

H_TeXMeX_H 01-25-2013 06:59 AM

I don't know of any way to set the BIOS settings from the Linux CLI.

I recommend looking into what TobiSGD said about the settings deployment.

You should be able to reset the BIOS settings from within the BIOS settings menu. The settings will also reset (along with the time) if you remove the CMOS battery and all other power sources for a while (minutes to hours). This is not recommended tho, because it will reset the time and you have to go inside the case, just the use the BIOS settings menu.

Ser Olmy 01-25-2013 09:22 AM

Quote:

Originally Posted by yun (Post 4877258)
I should not flash the ROM but, I want to have the BIOS setting programmed.

There surely have the default setting in the BIOS page but I need a method to set this through Linux command instead. Any comment for this?

Way back in the day, I wrote a short program to save and restore CMOS BIOS settings. Originally, all settings were stored in a 128- or 256-byte area in the timer chip which could (and still can) be accessed through I/O ports 0x70 (index) and 0x71 (data). If I remember correctly, one has to skip the first few bytes as they are actually the system hardware clock.

Utilities capable of saving and restoring timer chip CMOS RAM exists, and if the relevant BIOS setting happens to be stored in this area, you could use such a program to change that setting. However, as motherboards got increasingly more complex, BIOS manufacturers ran out of space in this small area and started using an area of the flash chip to store BIOS settings.

So with most recent motherboards you need to do perform a motherboard/flash chip specific erase and rewrite to change BIOS settings, which also explains this:
Quote:

Originally Posted by yun (Post 4877258)
By the way, it is quite odd that I cannot reset the BIOS to default with removing the RTC battery - is this caused by a different chip used to keep the BIOS setting?


jefro 01-25-2013 05:17 PM

What does the manual say for resetting bios to default? Most newer systems use a full power off jumper to reset numbers.

yun 02-13-2013 06:55 PM

It did not says anything about the power off jumper - nothing on the manual except resetting the setting from the bios page - load optimal setting or load failsafe setting


All times are GMT -5. The time now is 08:10 PM.