Showing posts with label Samsung. Show all posts
Showing posts with label Samsung. Show all posts

Saturday, 1 June 2013

Installing Linux on Samsung Laptops

I'd had enough of waiting for Samsung to comment on their laptop bricking fiasco. As you may recall from my earlier post, Samsung support had set out to obtain some information with good intentions, but ultimately could tell me nothing other than what I interpreted as Samsung refusing to honour their own warranty terms. I wasn't impressed.

Elsewhere in the ether of the Internet, I could see little sign of progress. In general, people are still waiting for Samsung to issue a statement. Perhaps one of their subsequent BIOS updates has already resolved the issue? They're not saying.

Having owned this Samsung NP350V5C-A0EUK laptop for 6 months now, I feel as though I've waited long enough. Now's time to bite the bullet and install Linux, regardless of the risks.

Needless to say, I can't be held responsible for any problems resulting from anyone choosing to follow the following instructions.

Due Diligence

Torvalds did pull a patch written by Matthew Garrett, which limits the amount of data written to UEFI storage, thus preventing (or at least reducing the likelihood) of the issue manifesting. To maximise my chances of success, I intended to install a distro of Linux which included this patch in its installation media.

To this end, I sought a recently released distro. An obvious candidate was Ubuntu 13.04, having being released just a month or so ago. According to the release notes, the installation media comes with Ubuntu kernel 3.8.0-19.29 based on Linux 3.8.8 (I also confirmed this on this directly on the installation media ubuntu-13.04-desktop-amd64.iso).

By comparing drivers/firmware/efivars.c in the diff with that in Matthew's patch, it was clear that the 13.04 installation media does indeed contain the patch - it's as safe as it's presently possible to get.

The other obvious thing to check was that my laptop's BIOS was up-to-date with the included SW Update application. It was.

Preparation

Frankly, there isn't much else to check. Ubuntu provides some general UEFI installation advice, but there isn't much new there.

I was going to leave things moreorless as they were out of the box - UEFI enabled, SecureBoot enabled - and set up a dual-boot with Windows 8. I would leave partitioning to be handled within Ubuntu's installer (you occasionally hear of concerns regarding shrinking Win 8 partitions using Linux tools without taking additional steps before the event - I didn't think such concerns were founded).

Installation

I used Startup Disk Creator on Ubuntu to create a bootable USB drive from ubuntu-13.04-desktop-amd64.iso. Then I booted it via Samsung's BIOS (entered using F2) via the "Boot Override" section in its "Exit" tab.

I chose to select "download updates whilst installing" to capture any further updates at the earliest opportunity which might possibly impact the stability of the UEFI (not that I thought there were any; but, caution never hurt). This had the effect of upgrading the kernel from 3.8.0-19 to 3.8.0-23 during the installation process.

Since I was essentially testing a default installation on Samsung UEFI laptops, I refrained from my usual custom partitioning and chose "Install Ubuntu alongside Windows 8", which I would imagine is the more commonplace installation choice. That also had the added benefit of saving me from accustomizing myself with the nightmare that is an OEM's Win 8 default partitioning scheme.

Post-Installation

Rebooting... worked. I was presented with a GRUB boot menu. Choosing Ubuntu booted into 13.04 successfully.
  • Graphically, Unity was working perfectly with the Intel HD4000
  • Win 8 partitions could be accessed with one click
  • Wireless was up - the network password had been remembered from when I entered it during the installation process
  • The battery meter was fine
  • Bluetooth was working
  • Suspend on lid close/restore on lid open was fine
Next up, booting back into Win 8. Choosing Windows 8 (loader) from the GRUB menu resulted in:

error: can't find command 'drivemap'.
error: invalid EFI file path.

Press any key to continue...

Booting to "Windows Boot Manager" via the BIOS' Boot Override menu didn't work either - it presented a Windows "your system has encountered an error" screen briefly, before rebooting. This wasn't good.

I continued booting to "Windows Boot Manager" via the BIOS. On the third attempt, Win 8's Automatic Repair (quite a nice feature, Microsoft - well done) kicked in and automatically started the boot repair process. No user input was required. It spent about 60 seconds "repairing", after which it rebooted.

"Windows Boot Manager" via the BIOS then succeeded - Win 8 was alive again.

As for the Windows 8 (loader) entry in the GRUB menu; this is just going to need some tweaking of the GRUB menuentry (some ideas can be found here). I did get it working directly via GRUB; I'll make the changes to the grub config later on.

Update:

Just comment out most of the grub menuentry for Windows 8; leave the second search line (search --fs-uuid --no-floppy --set=root <the_ID>) and replace the chainloader line with chainloader (${root})/EFI/Boot/bootx64.efi. Hopefully GRUB will have this remedied soon.

Conclusion

It worked close to flawlessly for me.

Whether that's because Samsung has fixed the issue in a BIOS update, or because of Matthew's kernel patch, or perhaps my particular laptop's firmware isn't affected, or just down to luck (and it might fail later on), I'm not sure. I certainly can't say it will work for you. All I can say is that, so far, it's worked for me.

If you do fancy installing Linux on your Samsung laptop, I'd advise a path similar to the one I've documented here. It's quick, easy, and intuitive - it is basically aligned with the default installation recommendations for 13.04 on UEFI.

So, the situation is looking promising. The real travesty is Samsung's continued, and continuing, blithely indifferent attitude towards Linux users. This appears to be a critical firmware bug which results in complete hardware failure. Failing to provide a fix in a timely manner, failing to provide updates to end-users, and refusing to fix machines which fail under warranty; that is not a consumer-friendly approach. Given that Samsung is now king of kings among Android mobile device manufacturers, their attitude is hard to understand, and even harder to accept.

Monday, 29 April 2013

Samsung Laptops Still Can't Run Linux


Those keeping themselves apprised of Linux news will be aware of a particularly nasty issue that reared its head earlier this year. It was discovered that installing Linux could end up bricking some Samsung laptops.

Subsequently, Matthew Garrett discovered that it wasn't just Linux; Windows could also brick these laptops (although it seemed not to do so naturally).

So it came to be understood that the problem was a bug in Samsung's UEFI firmware, and might be something akin to a buffer overflow.

Linus et al were quick off the mark, removing the samsung-laptop kernel driver, which seemed most capable of triggering the bug. Of course, the new kernel version takes time to work its way into the distro's installation discs, but I would imagine it exists in Ubuntu 13.04 now.

Whether this change removes all possible triggers is another question. Nobody seems to know for sure. There are rumours that bricked systems may be recoverable by clearing the CMOS. But who really wants to risk it?

Like many people, I have a Samsung laptop on which I intend to install Linux, and had been following developments with interest. I kept expecting a BIOS update to emerge, yet nothing appeared forthcoming.

The end user community was still waiting; the Launchpad bug report was still open, and Ask Ubuntu's various questions were still open issues.

So, last month, having waited quite some time already, I sent Samsung support an email requesting a status update. Their response noted:

A BIOS update has been released for most systems that are effected by this problem. To see if there is a BIOS update this can be checked automatically by a program called SW Updater available on the support page (link below):
http://www.samsung.com/uk/support/model/NP350V5C-A0EUK-downloads?downloadName=FM

At that time (25th March), there was no BIOS update available, but a couple of weeks later BIOS update P08ABE became available in SW updater.

There was no description and no changelog. Furthermore, there was no information available about it anywhere online. Was this the update allured to in Samsung support's email?

I upgraded anyway, but without any confirmation that this fixed the problem, I turned to support a second time, requesting some more information on P08ABE. Their response was courteously worded, but wasn't what many of us was hoping to hear:
I am sorry that this information is not more readily available. I understand this is frustrating if you have been waiting to add Linux to
your machine.


Technical Support are only here for hardware faults and as such we only have access to the same information as that which is released to the public. As such I have no further information for you at this time.

I have approached Samsung regarding the issues surrounding the loading of Linux and the official response received was that we do not support the operating system. 


As such I am unable to help with the matter and can only advise that any problem caused by changes to the OEM operating system will not be repaired under warranty.
 

If there is anything else we can help with, please let us know.
I do appreciate support's frankness; when you're the bearer of bad news, it's often easier to try to gloss over things than it is to lay out the facts clearly and plainly.

To summarise:
  • No update for the public as of yet, and no timeframe at present
  • It's not yet known whether BIOS update P08ABE fixes the UEFI issue
  • Any problems caused by their serious firmware bug under Linux "will not be repaired under warranty" (although I'm not certain that's in keeping with their warranty policy)
Frankly, I did expect more from Samsung; I expected dev & test prioritisation, an unprompted flow of information to end users with an indication of a timescale, and an immediate acceptance that any firmware bugs would be covered by the warranty.

However, at this stage, things are still in flux; we'll have to wait to see where the pieces come to rest. The hope is just that they do so sooner rather than later.

Update: The support contact I'm in dialogue with (a most friendly and amiable chap) has offered to look into the P08ABE BIOS update. Hopefully I'll have some more information soon. I suspect that P08ABE won't be the fix we're waiting for, but it will be nice to have that clarity.

Update 2: Support has informed me that they are unable to provide any information about P08ABE.