LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-21-2013, 08:55 AM   #1
yun
LQ Newbie
 
Registered: Jan 2013
Posts: 11

Rep: Reputation: Disabled
Question 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
 
Old 01-21-2013, 01:24 PM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 01-21-2013, 07:38 PM   #3
yun
LQ Newbie
 
Registered: Jan 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-22-2013, 03:06 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 01-22-2013, 06:19 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
(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.
 
Old 01-22-2013, 09:15 PM   #6
yun
LQ Newbie
 
Registered: Jan 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
Question

Quote:
Originally Posted by H_TeXMeX_H View Post
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.
 
Old 01-23-2013, 12:46 PM   #7
yun
LQ Newbie
 
Registered: Jan 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-23-2013, 12:55 PM   #8
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 01-23-2013, 02:23 PM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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.
 
Old 01-23-2013, 08:37 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
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.
 
Old 01-25-2013, 04:54 AM   #11
yun
LQ Newbie
 
Registered: Jan 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
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
 
Old 01-25-2013, 05:59 AM   #12
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 01-25-2013, 08:22 AM   #13
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,344

Rep: Reputation: Disabled
Quote:
Originally Posted by yun View Post
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 View Post
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?
 
1 members found this post helpful.
Old 01-25-2013, 04:17 PM   #14
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
What does the manual say for resetting bios to default? Most newer systems use a full power off jumper to reset numbers.
 
Old 02-13-2013, 05:55 PM   #15
yun
LQ Newbie
 
Registered: Jan 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Alienware M14x BIOS linux-based flashing utility corp769 Linux - Hardware 22 10-06-2011 10:41 AM
LXer: BIOS flashing for Linux users now in the wild LXer Syndicated Linux News 0 02-06-2010 07:00 PM
LXer: Flashrom brings seamless BIOS flashing to Linux PCs LXer Syndicated Linux News 1 06-04-2009 03:50 PM
LXer: Flashing Your BIOS From The Linux Desktop LXer Syndicated Linux News 1 05-05-2009 04:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration