Announcement

Collapse
No announcement yet.

Flashing Your BIOS From The Linux Desktop

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by planckscnst View Post
    It didn't work. I can't boot; I just get an incorrect beep code. Resetting the CMOS didn't work either. I'm pretty much screwed.
    That's bad.
    You could look in your boards manual and look if it's got an option to emergency-restore your bios from a floppy or usb-stick.

    Comment


    • #32
      I tried an earlier version of Flashrom when I needed to update the bios on my ABIT UL8. I had some hardware problems earlier and wanted to see if a newer bios would work better but all non-linux would involve even more hardware surgery. I looked around for a linux version of some of windows-based bios-flashers but was a bit surprised when flashrom package in my distro(Debian).
      I was a bit sceptical at first about really using it to flash my mb bios but flashrom worked perfectly. Of course that didn't magically repair my broken graphics card, my overrated excuse for a power supply or my light-duty-only motherboard but with some fresh components that motherboard has been running that new bios for quite some time now.

      Much easier to use flashrom then to transfer files to a windows/dos partition or media and try and get a working boot media.

      Comment


      • #33
        Originally posted by Saiot View Post
        what does "cross-flashing" and "hot-flashing" means?
        Cross-flashing: Using the "wrong" bios file to flash your mb because you hope it will work better. Perhaps you want to use the bios from a higher quality mb with similar chipset as your mb because the other bios have better options available (Better memorysupport, more overclocking options etc.)Sometime this can actually work.
        On the other hand I have a really nice dead motherboard collecting dust in my cellar thanks to cross-flashing.

        Hot-flashing: Hehe.. this can sound a bit edgy or crazy.
        You start up the computer, load up the bios flasher, then you physically remove the bios chip from it's socket and replace it with an new chip WITH the computer still running. Then you just press Y or something similar in the bios flasher to reprogram the new chip.
        Of course if your chip is soldered directly onto the motherboard you can't perform this stunt... unless you're good enough with a soldering iron to replace the soldered chip with a socket instead. (Only for the truly crazy and gifted)

        Hot-swapping sounds crazily dangerous but as long as you don't break anything while removing the chips, cause electro-static shock or short circuit something it does actually work as long. Just don't drop anything like a screwdriver or a bios chip on the motherboard that is live and running. Also you have to make sure that the bios chips are compatible as the come in different shapes, use different voltages and can store different amounts of code.

        The reason that hot-swapping, or bios reprogramming in general, does work is that early in the startup procedure the bios code is copied from the slow ROM memory to much faster RAM, which we have more then enough of anyway. So when we're flashing the bios eprom we're flashing something that is only read a couple of times at startup. That is also why it is vital that you don't reboot if something went wrong during the flashing process. Try flashing a second time, or if that doesn't work go back to the original bios before rebooting.


        Note that you combine cross- and hot-flashing, that's how I rescued my old Asus A7V motherboard which had been permanently dead for a couple of years. I used some old P2 mb I had. First I removed the p2 mb chip, then put it back only gently so it would be easier and quicker to remove while hot-swapping. I removed the A7V chip too. Then I started the p2, loaded up dos and the bios flasher (aflash I think) with the a7v bios. I gently and quickly removed the p2 chip, put in the a7v chip and pressed Y or something to start the reprogramming. After that I shut everything down, put the chips back where they belonged, and then I started up both motherboards. I almost wept of joy when the A7V successfully booted for the first time in years.
        Last edited by a7v-user; 05-06-2009, 03:42 PM.

        Comment


        • #34
          @ a7v-user
          thanks a lot, hoping to never need them
          (sorry 4 bad english)

          Comment


          • #35
            Thanks for the explanation, was wondering about cross-flashing myself.

            BTW I believe the bios-copied-to-ram doesn't happen on all motherboards, because on one the flasher app froze on the second I removed the old chip (in a menu). On a retry, this time before launching the app, FreeDOS froze, I guess because they both would use bios calls to read the file from the floppy.
            And this wouldn't happen if the calls were in ram..

            Comment


            • #36
              Originally posted by curaga View Post
              Thanks for the explanation, was wondering about cross-flashing myself.

              BTW I believe the bios-copied-to-ram doesn't happen on all motherboards, because on one the flasher app froze on the second I removed the old chip (in a menu). On a retry, this time before launching the app, FreeDOS froze, I guess because they both would use bios calls to read the file from the floppy.
              And this wouldn't happen if the calls were in ram..
              Hmm.. I think you're right.
              So then this would be another reason why it would be safer to flash from linux or some other OS that doesn't use bios calls and hopefully have some mechanism in place to prevent bios calls from being made.

              Comment


              • #37
                you can not prevent bios calls. Again:
                SMM

                look into it. The HARDWARE does SMM calls into bios - and no matter what the OS can not prevent it. Heck, it can't even see them! You enabled dos support for usb? SMM. Keyboard? SMM. Overheat protection? SMM - and some other workarounds.

                Comment


                • #38
                  SMM's heat protection is crap/evil, a crashing CPU can't be used for SMM since all SMM processing is done on a CPU..

                  flashrom is mostly safe, as safe as a FreeDOS disk or in-BIOS flasher.

                  Comment


                  • #39
                    audiohacked, don't ridicule yourself. SMM is the way it is done. Today. And the overheat protection starts way before the CPU crashes. And overheat is not the only thing. KEyboard, even timers are done by smm mode+bios

                    Proof?
                    follow this thread:
                    http://marc.info/?l=linux-rt-users&m...1464907765&w=2
                    http://marc.info/?l=linux-rt-users&m...4504611486&w=2
                    http://marc.info/?l=linux-rt-users&m...7647503473&w=2

                    or search lkml archives for 'smm'

                    Comment


                    • #40
                      "about the smm stuff: SMM is only needed if the hardware is crap or the BIOS is crap or the OS is crap. With AMD hardware, a decent BIOS (or coreboot) and Linux, you don't need SMM. If there is some SMM active, complain to your vendor." ~ coreboot dev

                      "And if SMM is used for overheat protection, the BIOS writer needs to get his brain replaced. By definition, a crashing CPU will cause SMM overheat protection to fail." ~ coreboot dev

                      Good Hardware will have will have a dedicated chip, or the processor's internals will have the hardware for Thermal Protection. The proper way to do thermal protection, is in pure hardware.
                      Last edited by audiohacked; 05-10-2009, 04:23 AM.

                      Comment


                      • #41
                        you didn't even read the links. Did you?

                        Comment


                        • #42
                          Originally posted by energyman View Post
                          you didn't even read the links. Did you?
                          I did. One RTAI is not a good reference, and the P4 needs a ton of thermal protection because it will literaly burn/melt itself. Other processors from both Intel and AMD use a hardware limit to keep the processor from killing itself, the software limit (SMM) is used to down/up clock the CPU to further control Thermals. SMM is a bad idea still because you can disable it, or it can fail to run. You should know that software can not be trusted, and can/will fail without reason.

                          Laptops use an Embedded Controller for various functions in addition to replacing the SMM Thermal Protection with a hardware-based Thermal Controller.

                          PS. I do hardware design and work on Coreboot, so I actually understand how and what goes on with hardware and Firmware.

                          Comment


                          • #43
                            Originally posted by audiohacked View Post
                            Other processors from both Intel and AMD use a hardware limit to keep the processor from killing itself, the software limit (SMM) is used to down/up clock the CPU to further control Thermals.
                            Not all AMD procs had such thermal protection either. It wasn't until later Athlon XP revisions that (barton core IIRC) that you finally couldn't burn up a CPU in seconds with a misplaced heatsink.

                            Comment


                            • #44
                              Originally posted by deanjo View Post
                              Not all AMD procs had such thermal protection either. It wasn't until later Athlon XP revisions that (barton core IIRC) that you finally couldn't burn up a CPU in seconds with a misplaced heatsink.
                              Yes, at that time it was common practice to include a thermal diode in IC's and Intel's P2/Celeron and AMD's Athlon XP/MP started to include a thermal diode and fuse.

                              Comment


                              • #45
                                Originally posted by bridgman View Post
                                Hmm. I'm not a big fan of flashing your BIOS while an operating system is running on top of it either. If you have any kind of power management running chances are pretty good that there are occasional calls into the BIOS happening... and if one of those calls happens while the BIOS ROM is blank, that would be a problem.

                                I wouldn't flash the BIOS under any OS unless I already had a recovery plan - either a disk or a shadow BIOS stored in the flash.
                                BS.

                                The bios image in the flash is read out at boot, parts of it are executed in situ, parts of it are copied/extracted to ram and then executed, and the parts that are needed later are kept around in C,D,E and F segments, with the necessary hooks installed in the interrupt vectors and the EBDA. So whatever you need at runtime no longer depends on the contents of the flashchip.

                                Stop spreading useless FUD about real free software.

                                Backup plan when it fails under linux: make sure you don't reboot or power-off and contact the developers right away (on irc or on email).

                                If you do mess up and have a socketed bios, you can find someone to flash your bios for you or you can buy a new pre-flashed chip off of ebay for an arm and a leg.

                                It is clear where you stand against BIOSes and all that surrounds them, and it is clear why. Equally it is clear where i stand, and why i stand there: because i have been dealing with them all my time as a free software developer and only found them to be: buggy/hard to fix, and forcing solutions which are not as good as they can be, which are full of workarounds. Don't dare claim anything else.

                                Comment

                                Working...
                                X