Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
(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.
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.
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.
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.
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.
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?
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.
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
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?
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.