How to install Linux on machines/mainboards with UEFI firmware

I wrote about installing Linux on machines/mainboards with UEFI firmware in http://wolfgang.lonien.de/2015/08/done-with-rebuilding-the-computer/). This is how I did it on my upgraded computer at home, where I dual boot Debian “Jessie” and Windows 10. And since a colleague at work had some trouble with a new Lenovo machine, here are some tips which might help:

1. Check your boot medium (more help in happyassassin and in reddit)

[de153403@oc0654677850 ~]$ sudo tail -f /var/log/messages

Nov 27 08:06:31 oc0654677850 kernel: usb 3-1: new high speed USB device number 2 using xhci_hcd
Nov 27 08:06:31 oc0654677850 kernel: usb 3-1: New USB device found, idVendor=058f, idProduct=6366
Nov 27 08:06:31 oc0654677850 kernel: usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 27 08:06:31 oc0654677850 kernel: usb 3-1: Product: Flash Card Reader/Writer
Nov 27 08:06:31 oc0654677850 kernel: usb 3-1: Manufacturer: Generic
Nov 27 08:06:31 oc0654677850 kernel: usb 3-1: SerialNumber: 058F63666438
Nov 27 08:06:31 oc0654677850 kernel: usb 3-1: configuration #1 chosen from 1 choice
Nov 27 08:06:32 oc0654677850 kernel: Initializing USB Mass Storage driver...
Nov 27 08:06:32 oc0654677850 kernel: scsi6 : SCSI emulation for USB Mass Storage devices
Nov 27 08:06:32 oc0654677850 kernel: usbcore: registered new interface driver usb-storage
Nov 27 08:06:32 oc0654677850 kernel: USB Mass Storage support registered.
Nov 27 08:06:33 oc0654677850 kernel: scsi 6:0:0:0: Direct-Access Multiple Card Reader 1.00 PQ: 0 ANSI: 0
Nov 27 08:06:33 oc0654677850 kernel: sd 6:0:0:0: Attached scsi generic sg2 type 0
Nov 27 08:06:33 oc0654677850 kernel: sd 6:0:0:0: [sdb] 61071360 512-byte logical blocks: (31.2 GB/29.1 GiB)
Nov 27 08:06:33 oc0654677850 kernel: sd 6:0:0:0: [sdb] Write Protect is off
Nov 27 08:06:33 oc0654677850 kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write through
Nov 27 08:06:33 oc0654677850 kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write through
Nov 27 08:06:33 oc0654677850 kernel: sdb: sdb1
Nov 27 08:06:33 oc0654677850 kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write through
Nov 27 08:06:33 oc0654677850 kernel: sd 6:0:0:0: [sdb] Attached SCSI removable disk
Nov 27 08:06:33 oc0654677850 kernel: ISOFS: Unable to identify CD-ROM format.

[de153403@oc0654677850 ~]$ sudo parted /dev/sdb
GNU Parted 2.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: Multiple Card Reader (scsi)
Disk /dev/sdb: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 31.3GB 31.3GB Microsoft Basic Data

(parted)

From the article on happyassassin:

“See that Partition table: msdos? This is an MBR/MS-DOS formatted disk. If it was GPT-formatted, that would say gpt. You can reformat the disk with the other type of partition table by doing mklabel gpt or mklabel msdos from within parted. This will destroy the contents of the disk.”

2. So make sure it’s a GPT drive, and copy over your Linux OS image, then boot/install.

I just read an article on ZDNet which reminded me of it. There are possibly many ways to do it, but the two links above helped me to successfully get both Windows (first), and Linux (second) onto that new SSD, and even if I should ever upgrade any of these again, they won’t overwrite each others MBR – because there isn’t one anymore.

Hope that helps anyone who wants/needs this information.

As always, thanks for reading.

P.S. – Update from Sunday, November 29th, 2015:

Debian developer Andreas Metzler just did the same, with one of the newest self-assembly projects of c’t magazine (Skylake generation CPU). He describes it on his blog. And the keyword for an UEFI boot medium is Rufus.