back to article How to survive a UEFI BOOT-OF-DEATH on Samsung laptops

Former Red Hatter Matthew Garrett, who cleared Linux's name when the open-source kernel appeared to cause shiny new Samsung laptops to destroy themselves, has offered a survival guide to avoid similar catastrophes. Nebula programmer Garrett this week warned that Samsung laptops may brick themselves if the computer's UEFI …

COMMENTS

This topic is closed for new posts.
  1. jb99

    Is there no way to reset the firmware?

    Is there no way to reset the firmware if this happens?

    I mean using even using a hardware JTAG interface to rewrite the firmware or something?

    Or is it just scrap?

    1. James O'Brien
      Paris Hilton

      Re: Is there no way to reset the firmware?

      From what I have been reading on this it sounds more like they have the replace the board because the CMOS gets boinked. Yes I know its UEFI but it does seem that theres either a flaw in the coding for this or something Samsung introduced. My guess its a mix of both due to Samsung is always finding new things to do all the time to stay bleeding edge. I may have missed it but I cant wait to see what the ultimate fallout from this is.

      Could be wrong on my guess but something tells me Im probably on the right track

      1. James O'Brien
        WTF?

        Re: Myself to El Reg

        Seriously guys why is it that we cannot edit our posts unless we are gold. How the bloody hell could it be abused or whatever?

        1. Vic

          Re: Myself to El Reg

          > why is it that we cannot edit our posts unless we are gold.

          You don't need a gold badge to edit posts. I don't have one...

          Vic.

  2. Joerg
    FAIL

    What a mess manufacturers have done with UEFI...

    They don't follow the UEFI specifications. They let the firmware do crazy data rewrites in a nonsense fashion.

    UEFI clearly has some serious design issues itself BUT manufacturers engineers and programmers nowadays seem a bunch of novice college students if not little kids.

    Where are the real BIOS programmers ? They fired all of them with the economic crisis because they were too expensive ?

    The IT sector is collapsing fast.. more and more dumb people promoting themselves as computer wizards and actually knowing very little if any at all.

    1. BikNorton

      Re: What a mess manufacturers have done with UEFI...

      Firmware has always been garbage.

      1. Anonymous Coward
        Anonymous Coward

        Re: What a mess manufacturers have done with UEFI...

        It has since device stopped shipping software in non-writeable storage, ie. ROMs.

        As soon as you could update firmware yourself the quality plummeted as software companies knew that they could fix it later.

        1. P. Lee
          Headmaster

          Re: What a mess manufacturers have done with UEFI...

          Which is why you have a tiny rom which can do recovery like the (old?) cisco boxes where you could upload a new ios via kermit over a serial terminal connection.

          I guess these days it would be "boot from USB" rather than onboard flash.

          Icon: Lessons not learnt.

    2. Roland6 Silver badge

      Re: Where are the real BIOS programmers ?

      Good question, as I don't remember there being problems with the original PC BIOS, nor with the various revisions and enhancements over the years, until UEFI...

      1. Anonymous Coward
        Anonymous Coward

        Re: Where are the real BIOS programmers ?

        But that was not because these problems did not exist. It was for two reasons:

        One, manufacturers bend over whatever is necessary to run Windows, so they never released anything that could remotely causes Windows any kind of trouble. Since a lot of releases ago, Windows basically ignores the BIOS after the first stage of booting, that is, takes over HW management on its own. And with the relatively slow pace of Windows releases, it was also relatively easy to make sure the machine booted.

        Bear in mind that the BIOS from the original PC was cloned with a clean room implementation back in the days of PC compatibles fighting with IBM, but for a long, long time, standards were defined by the PC BIOS implementation.

        That was if you lived in Windows land. In Linux land, kernel writers have always struggled with odd BIOSes, building compatibility tables with board IDs and all sorts of hacks, all because BIOSes were not that careful with complying with their specifications since Windows was not going to use them anyway.

        The second reason is that not until long ago, the people that had to deal with those BIOS problems were a small minority of Linux users. Then Apple switched to Intel. And Google started to sell the Chromebook. And suddenly, it was not just Windows using the BIOS and finding what the Linux kernel developers had suffered during all that time. That's what created UEFI.

        So now instead of having weird BIOS doing whatever they want -nobody can ask you to follow a standard when there isnt's one- but instead we have a weird UEFI implementations ignoring the standard.

      2. Dr Trevor Marshall
        Unhappy

        Re: Where are the real BIOS programmers ?

        Kelly Smith, who wrote the early Tandon clone-BIOS, and worked on Phoenix BIOS, died several years ago.

        Not many of my old friends have survived the decades.. and the new generation of software programmers tend to work in a team... not as loners, solely responsible for whether their BIOS worked, or not...

      3. Steve Knox
        Mushroom

        Re: Where are the real BIOS programmers ?

        @Roland6

        You've never used any of the more "creative" Award BIOSes, then -- or AMI's graphical abomination, then, I take it.

        1. Roland6 Silver badge

          Re: Where are the real BIOS programmers ?

          >You've never used any of the more "creative" Award BIOSes, then -- or AMI's graphical abomination, then, I take it.

          During some projects in the 80's and early 90's I had to get close to the BIOS for a couple of projects (OS's: DOS, Windows, OS/2, Novell Netware, SCO Unix, SunOS 386) but yes generally I just used a variety of PC's. But whilst I was aware of some compatibility issues and problems requiring BIOS revisions, I'm not aware of any problems in the same category as the Samsung UEFI brick the machine bug.

          Given the nature of my work, yes it is unlikely that I used some of the more "creative" BIOSes, but then I didn't take much notice of the source of the BIOS in PC's from the variety of PC vendors targeting the business market who's systems I used.

        2. James O'Brien
          Paris Hilton

          Re: Oh common Steve

          How can you hate a BIOS which will allow you to surf youtube and farcebook without booting windows? Well mainly farcebook. Or how about how pretty they look and the ability to change the boot picture to whatever you want? Actually changed it on a friends laptop to a rather interesting picture of two guys.....the giggles the whole group of us gave him everytime he booted it up made me cry with laughter. Finally gave him a hint on how to fix it. Ahh i miss hanging out with those guys but sadly with two slipped disks in my back now I cant work, stand, sit, lay down or sleep very well anymore. God I hate having this issue at 31....

      4. Tom 35

        I don't remember there being problems with the original PC BIOS

        If you bought a Dell or HP and never added anything to it maybe.

        Something like an ASUS motherboard BIOS would be FULL of problems for the first few versions, but even a Dell Optiplex 960 had a Display port that didn't work. With version 06 Bios it would work if you plugged in the monitor after Windows booted, it was not until version 08 of the bios that it would boot with a Display Port and VGA monitor plugged in.

  3. Frederic Bloggs
    Alien

    Samsung S3 Android Hack

    Any similarities between these UEFI problems (plus any more that no-one has found yet) and the recent revelations that Samsung's Android "customisations" have security openings the size of regular barn doors are completely coincidental.

    Honest.

  4. Anonymous Coward
    Anonymous Coward

    Apple seem to manage ok

    Can't recall any issues on Macs which have been using UEFI since 2006.

    I guess shamsung copied it wrong ;)

    trololololol

    1. Anonymous Coward
      Anonymous Coward

      @AC 11:48GMT - Re: Apple seem to manage ok

      It's rather because Apple manufacture and sell their software on their hardware, perhaps ? Besides that, Apple developers are way more talented at software than those of Phoenix & Pals don't you think ?

      1. JaimieV

        Re: @AC 11:48GMT - Apple seem to manage ok

        Apple's EFI is barebones - good at local and network (inc wifi) bootups and handling fully encrypted boot volumes, but very little more. Nothing like a full UEFI - although you can install a third party one if you wish.

  5. InsaneLampshade
    Facepalm

    Isn't a kernel patch kinda backwards?

    Shouldn't Samsung be fixing their dodgy UEFI implementation instead? If the kernel gets patched to work around the issue doesn't that send a signal to Samsung that what they've done is ok and that the onus is on the software not to break the machine?

    And if there's a way to do it on windows, how long before there's a virus out in the wild that exploits this?

    Do Samsung care, have they even acknowledged the issue?

  6. Nigel 11
    IT Angle

    The really important question

    What do Samsung do when someone returns a bricked laptop (a) in and (b) out of warranty?

    You can tell the manufaturers you want to do business with from the ones you don't, by how they handle a problem such as this one. You don't want to be told to <go away>, and to have to sue your supplier for supplying goods that were not fit for purpose. Which defition this bug amply fulfills: the machine claimed to offer UEFUI boot, but broke the specification in a way that causes catastrophic failure.

    I'm asking, not suggesting anything. I really don't know.

    1. Anonymous Coward
      Anonymous Coward

      Re: The really important question

      Unfortunately, if the machine was sold with Windows pre-installed, then Samsung supplied "goods that were fit for purpose". That you choose to use them for a different purpose isn't Samsung's _legal_ responsibility, though it's obviously in their best interest to resolve the issue.

      There's no question that Samsung is responsible for the bug, but it's not so clear that they are (legally) responsible if your actions actually trigger the problem.

      1. Anonymous Coward
        Anonymous Coward

        @AC 18:57GMT - Re: The really important question

        You heard that you can do that from pre-installed Windows too.

        Unless Samsung expressly warned you not to read/write at some specified memory locations, then you used the machine for the right purpose. That will be no cookie for you!

      2. Anonymous Coward
        Windows

        Re: The really important question

        In the UK, that's a manufacturing defect and gives you 6 years from DOP to claim...

        Just like the NVidia chip fiasco...

  7. Neil Barnes Silver badge

    Colour me old fashioned

    but is there really a need for a bios that does anything more than listen to the keyboard, wake up the screen, and read the first 128 bytes from the boot device?

    1. Anonymous Coward
      Anonymous Coward

      Short answer?

      No.

      1. Anonymous Coward
        Anonymous Coward

        Re: Short answer?

        Short reply: Oh look, the short answer was by someone who doesn't know the first thing about how a computer boots.

      2. Anonymous Coward
        Anonymous Coward

        @AC 12:37GMT - Re: Short answer?

        You're wrong, it also has to run secure boot to prevent anything other than Windows8 to boot. You clearly don't know how important it is.

    2. Anonymous Coward
      Anonymous Coward

      Re: Colour me old fashioned

      Not at all - but now it's a Bluetooth keyboard, one of two video ports (attached to different chips), and a USB boot device.

    3. Christian Berger

      It actually does way more already

      Outside of the user accessible modes of the CPU the BIOS also loads the "service mode" which contains parts for emulating legacy devices for USB, so your operating system without USB support can still use your USB keyboard and mouse. There are lots of things that work that way.

      In principle a "smarter BIOS" might be good. For example OpenFirmware can do some useful things like architecture independent device drivers (stored as Forth source code on the ROM of the device).

      The main problems with UEFI are that it doesn't have the flexibility of OpenFirmware and that it's a huge mess about the same size of the Linux kernel. (without device drivers in both cases)

  8. Crisp

    What happened to the good old days?

    When you could just pop the lithium battery out, short a couple of pins on the mother board and Bob's your mothers brother.

    1. Neil Barnes Silver badge

      Re: What happened to the good old days?

      Damned if I know. I do know that in the experimentation of getting Linux onto a dual-drive Acer laptop recently, I removed the original windows drive to discover that Linux had (reasonably sensibly) re-used the existing Windows EFI partition, so it wouldn't boot; just the usual bios warning.

      Reinserting the drive allowed me to boot into Linux (which was what I wanted) but the F2 to see the bios options hasn't been seen since...

      1. Anonymous Coward
        Anonymous Coward

        @Neil Barnes - Re: What happened to the good old days?

        This is because the low IQ, marginal competence UEFI programmers make assumptions on the OS that will be running on top of it, instead of just providing a reliable, standards compliant interface that would allow OS to handle the rest. UEFI is a serious matter but unfortunately it is being left to the same bunch of sub-brilliant programmers who have gave us wave after wave of half arsed BIOS implementations.

        1. RW
          Facepalm

          On the evils of "making assumptions":

          That phrase actually means "I just guessed."

          One of my co-workers, before I retired, regularly messed up his programming. When asked "why did you do that?" while looking at some egregiously bad code, his reply was often "I assumed (such and such)."

          Of course, his assumptions were usually wrong.

          In fact, whenever he hit a tough bit of code to write, he'd often take the lazy way out and "assume" that nobody ever made a mistake, that you didn't need to be wary of user input errors, and other variations on avoiding hard thinking or, horror of horrors, going and asking somebody who knew what they were doing.

          1. Jason Bloomberg Silver badge

            Re: On the evils of "making assumptions":

            "I assumed (such and such)."

            Which if I recall past reports was the case here. The events which filled the UEFI with 'crash data' or whatever, which then caused it to fail to boot, was brought about by a driver poking about in memory to try to figure what hardware was out there. Done on the assumption this was okay and would have no bad consequences.

            The UEFI should not have been affected, the failing is ultimately in Samsung's camp, but it was this 'reckless poking' which provoked the UEFI to be filled and then crash and burn.

            1. Anonymous Coward
              Anonymous Coward

              @Jason Bloomberg Bronze - Re: On the evils of "making assumptions":

              Agree with you except for the word reckless here. There is nothing reckless in allowing code to read and write to memory locations, after all this is how computers work and yes, it is a normal assumption to believe the UEFI code has been written by sane, competent programmers.

  9. Anonymous Coward
    Anonymous Coward

    The brick factory....

    Still no news from Samsung?

    I can't even figure out where I might find a BIOS update on their site let alone if there is one that fixes this nonsense.

    I know I'll not buy any more Samsung kit.

    1. Annihilator
      Coat

      Re: The brick factory....

      You won't find a BIOS update on their site that would fix this. It would be a UEFI update :-D

  10. Anonymous Coward
    Anonymous Coward

    "Garrett was able to demonstrate an application on Windows could wreck a machine."

    Yooowwwch!!

    That's bad. And funny, too, since I do distinctly recall lots of people saying "Linux shouldn't brick the machine", and "Serves you right for running that OS"... or posts to that effect.

    Now the truth is out, and it's buggy firmware after all. More to the point, the buggy firmware can be triggered from within the machine's native OS.

    Not designed to run Linux you say? If this is the metric people measure that criteria by, then it's clearly not designed to run Windows either.

    1. Nigel 11

      Re: "Garrett was able to demonstrate an application on Windows could wreck a machine."

      Not designed to run Linux you say? If this is the metric people measure that criteria by, then it's clearly not designed to run Windows either.

      And right now, somewhere in North Korea ....

    2. Anonymous Coward
      Anonymous Coward

      Re: "Garrett was able to demonstrate an application on Windows could wreck a machine."

      > More to the point, the buggy firmware can be triggered from within the machine's native OS.

      STOP PRESS, shock, horror, the native OS can write to memory.

      Sure the memory happens to be a peripheral, but I mean I don't honest get why people are making such a big deal of the OS which is running. It's just a memory address ...

      1. Anonymous Coward
        Anonymous Coward

        @Pete H - Re: "Garrett was able to demonstrate an application on Windows could wreck a machine."

        This time it was not the Linux people who started this skirmish about the superior OS.

        Now that we have proof that you can do that from Windows too, it's just like you say a memory address and we should not make such a big deal of the OS that is running.

        1. Anonymous Coward
          Anonymous Coward

          Re: @Pete H - "Garrett was able to demonstrate an application on Windows could wreck a machine."

          AC 18:41 - Yeah. 'cos if the problem had been seen in Windows first Linux users wouldn't have been gloating. Just as they never have in the past. Too bad you whine when the tables are turned. If you can't take it, grow up and don't dish it out. And don't forget that achieving this effect from a custom app written for Windows isn't the same as the kernel driver doing it after an oops without the user telling it to. Does Windows do it? Dunno. Do you?

          1. Annihilator
            Stop

            Re: @Pete H - "Garrett was able to demonstrate an application on Windows could wreck a machine."

            "Yeah. 'cos if the problem had been seen in Windows first Linux users wouldn't have been gloating."

            Not to get into a game of who started what, but the entire blame and cause of the incident was Samsung and their bodged implementation of UEFI. This was patently clear to anyone reading the original article and yet it invited claims of "ooh, Linux is crap!" for spurious reasons.

            This was never a Linux thing, and the only people who thought otherwise were ardent Windows fans.

            1. Anonymous Coward
              Anonymous Coward

              @Annihilator

              "Not to get into a game of who started what, but the entire blame and cause of the incident was Samsung and their bodged implementation of UEFI."

              I'll agree with that. So far so good.

              "This was patently clear to anyone reading the original article and yet it invited claims of "ooh, Linux is crap!" for spurious reasons."

              Actually, it wasn't spurious given the info in the article. Even the update on the article states,

              "It's now thought the boot-time crash is linked to the Samsung UEFI firmware and its interaction with the kernel's Samsung laptop driver and efivars module."

              All Windows have done is crow the same way Linux fans do in the reverse situation. My beef is that Linux fans can't take it, that's all.

              "This was never a Linux thing, and the only people who thought otherwise were ardent Windows fans."

              Until someone's PC is bricked out of the blue by another OS - well, yes it is. If I wanted to be fanboyish about it I could argue that Garrett has found a flaw which could do the same in Windows but hasn't, written something to make it happen and compared apples to oranges so he can say Windows might do it as well. Then the Linux club misinterprets it, wilfully or otherwise. Application != OS, after all. I'm not denying it's Samsung's fault, just wishing for a bit more maturity from people who are always first to point the finger when something blows up under Windows. But then I'm also wishing for a bazillion pounds.

              1. Annihilator
                Thumb Down

                Re: @Annihilator

                AC with the long response - it was clear it was a Samsung problem. For *any* hardware to irrevocably brick itself due to the software running on it is a faulty bit of hardware, regardless of what the trigger point was.

                My point is that if this were a laptop that bricked while running Windows, the story wouldn't even mention the OS. Even if it did, it would take a special kind of leap to blame Windows.

          2. Anonymous Coward
            Anonymous Coward

            @AC 19:20GMT - Re: @Pete H - "Garrett was able to demonstrate ...

            You have the answer, Windows does it too. Why is this upsetting you ?

            1. Anonymous Coward
              Anonymous Coward

              @AC 19:57

              Read what I said again. Then read my response to Annihilator. Several times if need be.

  11. Stevie

    Well, someone has to say it

    Thanks, Matthew, for all the hard work and getting the real story on this Ju-Ju Flop situation.

  12. Christian Berger

    Nobody was blaming Linux

    Only some bad Reg Authors did. It was clear from the first day that this was a serious EFI problem.

    1. Anonymous Coward
      Anonymous Coward

      Re: Nobody was blaming Linux @Christian Berger

      Bit disingenuous. From the first day it was obviously the interaction between Samsung's EFI implementation and Linux. People should be more careful about their usage of "first day" and "original article." As a fan, have you tested OpenFirmware on the same hardware/disitribution combo? People who have working PCs might like to know of an alternative?

  13. Herby

    What to do???

    Me? I'd go into a local retailer and arrange to brick every Samsung piece of kit I could find (handy little USB key in pocket). Wonderful demonstration it might be. The store puts a new one on display and in 5 hours, it too doesn't work. Maybe a big retail chain could make the proper complaint.

    If it were only that easy!

    Look, if Microsoft had its way, the BIOS would keep saying "Must...only...boot...Windows", which is what UEFI is all about anyway.

    Gone are the days when you would dial the IPL device into the console and let it rip. It was much easier then, and you could even boot from Mag tape, or (showing my age) Punch cards.

    1. Anonymous Coward
      Anonymous Coward

      Re: What to do??? @Herby

      Going by the suggestion, I'd guess your age is 14. Looking up old stuff doesn't fool anyone.

  14. Anonymous Coward
    Happy

    because they had a second chance

    it got broken because deep in someone's psyche, the fact registered that this was writable storage and could be updated.

    i suspect that if the samsung's head of dev had been told, "this code will be immutably burnt into the next 4 million chips", and not "this chip is like a flash drive", quality might have been higher. Hardware companies tend to focus quite well when the prospect of a mass recall is on the cards.

    "The effects of safe-guards on software quality" - there are a good few PhD theses in that topic, from psychology to CompSci.

  15. 6 inches long, handle.

    Down vote fiesta!! :)

    "...was able to demonstrate that even an application running on Microsoft Windows could wreck a machine.

    When the Linux kernel triggers an exception (such as a hardware driver poking the wrong bit of memory),..."

    That probably validates Andrew Tanenbaum then?

  16. shaunhw
    FAIL

    Crash dump Disk file anyone ?

    They should have written the crash data to the UEFI FAT32 disk boot partition not the NV-Ram. Using NV-Ram is simply dumb and NOT what it is for.

    1. Anonymous Coward
      Boffin

      Re: Crash dump Disk file anyone ?

      And supposing the crash was due to a bug in the VFS or block device layer? You propose to use aforementioned VFS and block device layers to try and record a dump caused by a bug in the VFS or block device layers.

      Yep, that'll work nicely … if your aim is to generate recursive loops.

      NV-RAM isn't the best place, no, and it should not be a default, but rather something you turn on if you get problems. Provided data doesn't get corrupted by storing it there, it shouldn't brick the device either.

This topic is closed for new posts.

Other stories you might like