ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Installing and Using Arch Linux (2013-05 - 2013-07) on Thinkpads / Ideapads

(1/1)

ewemoa:
TLDR; Recommendations

See below for background, but the gist of this post is -- If you are interested in installing and using Arch Linux as a host OS on Lenovo hardware with UEFI as of this writing (2013 July):


* Don't be surprised if there is trouble getting it to work
* Consider using older installation media if the newest doesn't work (went back as far as 201304 for E130 installation)
* Consider using more than one boot loader for insurance (e.g. rEFInd and GRUB)
* Consider USB memory with UEFI Shell
* Look for and consider trying additional kernel command line parameters (noapic made it possible to boot E130 via UEFI)
* Consider keeping a second boot device / partition with a working configuration that can be tested when there is a kernel update
* Consider examining Arch Linux online docs and their forum for hints
* Read Arch News especially before upgrading / updating
If you would like a trial-by-fire way of learning about UEFI, trying to get a certain subset of recent Lenovo hardware working with Arch Linux might not be a bad choice.   If you're "unlucky" though, certain bugs may get fixed soon and much of what's in this post will be worth far less.   So hurry if you want to learn about UEFI the hard way ;)


The Long Version

Have been using Arch Linux as a base for developing and trying out new software.  Been finding it quite nice for this purpose as there are many programs that are packaged (either officially or in AUR) and for what isn't, it has been relatively straight-forward to do so (far easier to do than put together a .deb for example).

My initial experience with it was as a guest OS via VirtualBox and that worked out quite well so once I felt comfortable enough with it decided to try to get it working as a host OS.

Installation on an IdeaPad Z580 went ok (though as a newbie to UEFI there was a bit to pick up).  For some time things were relatively smooth, but then one day the machine seemed to get struck with:

  Kernel 3.7 doesn't boot using EFI Stub

The short of it is that the machine will not complete booting with certain kernels if using certain boot loader combinations.  My impression is that there's some poor interaction between some of Lenovo's UEFI implementations and the Linux kernel's EFISTUB functionality.  IIUC, there is a participant of the aforementioned thread working with a kernel dev to get to the bottom of things.

In the mean time, after downgrading to an appropriate earlier kernel, installed a second boot loader (was using rEFInd with the kernel's EFISTUB but added GRUB) and this made it possible to boot kernels which wouldn't boot with my original set up.  Booting via GRUB (configured to use UEFI) is successful so that's one work-around...Hopefully there will be some better resolution before too long.

On a related note, had the occasion to attempt installation on a Thinkpad Edge E130 and this turned out to be a bit tricky.  Since the Z580 installation, the installation media has been updated a few times and didn't have success with the three that I tried (201305, 201306, and 201307).  After upgrading the BIOS (2.51 -> 2.52) performed most of the installation steps using the 201304 installation media.  The boot loader steps didn't work fully (but got rEFInd and GRUB files in place and tweaked) as the machine wouldn't boot the installation media using UEFI.  A ciruitous work-around (boot with UEFI shell -> start GRUB -> via its rescue mode start kernel with additional parameter noapic) got the machine booted up via UEFI and this made it possible to complete the boot loader installations.

So it's possible to get Arch Linux up and running via UEFI with some Lenovo hardware, but it may requires some extra steps.

ewemoa:
As an experiment, prepared an installation of Arch that can be used both as a Host and Guest OS using VirtualBox with UEFI + rEFInd.  Tested with some success on Z580 and might do so on E130.  Perhaps a bit dangerous, but potentially convenient -- though maintaining the settings may be more trouble than this is worth...

Adapted the instructions at:

  VirtualBox Arch Linux Guest On Physical Drive

Some differences include:


* Did not specify partitions using UUIDs
* Did not use GRUB -- used rEFInd instead
* Set up rEFInd as bootloader basically as described here to work-around the flakiness of VirtualBox's UEFI NVRAM support
* MODULES and HOOKS in mkinitcpio-vbox.conf differed from instructions:
  MODULES="ahci pata_acpi ata_piix"
  HOOKS="base udev autodetect modconf block filesystems keyboard fsck"
* Added additional line for booting via VirtualBox to /boot/refind_linux.conf to specify alternate initrd

* Performed instructions in "Setting up VirtualBox to boot Arch Linux from the Physical Drive" section via an Administrative prompt
* Start VirtualBox as an Administrator
IIUC, as a side "benefit", this set-up does not appear to require mucking around with UEFI boot entries -- convenient if swapping in a different model HDD / SSD with the same set-up (e.g. a backup).

ewemoa:
Tested with some success on Z580 and might do so on E130.
-ewemoa (August 14, 2013, 08:20 AM)
--- End quote ---

Seems to work for the E130 as well.

At the moment, to keep the arrangement up-to-date, need to at least:

Remember to copy refind_x64.efi as bootx64.efi in to the appropriate EFI directory (boot, not refind) <- when refind is updated
Regenerate the vbox initramfs file <- when the linux kernel is updated

Now if there were a good way to make it hard to accidentally choose the wrong boot entry in refind...

Navigation

[0] Message Index

Go to full version