HOW TO install Ubuntu 14.04 LTS server in IBM System x3500 M4 Type 7383

With UEFI and without wasting one month of your life.

This is just a short guide in case it is of some aid to avoid your suffering with uefi.

My machine was an IBM System x3500 M4 Type 7383. 16GB RAM memory and 2 HDD (500 TB) each and 4 CPUS with 4 cores.

The HDD come with GPT ( not MBR) format.

I configured both in RAID 1 by hardware. Using the firmware of the machine.

NOTE:
In the process I regret to have done such RAID but afterwards was impossible to undo the RAID since the HDD were not found by ubuntu ( seemed like the HDD controlers were not working well).
So in the end I left the RAID 1 on.

PROCESS:

STEP 1

I downloaded a LIVE iso of UBUNTU desktop 64 bits and made a bootable USB.(LIVE-ISO)
I downloaded an iso image of UBUNTU 14.04 server LTS 64 bits and made a bootable USB. (SERVER-ISO)

STEP 2

The firmware of the IBM allows BIOS legacy ( that is to start as the old BIOS firmaware) but anyway it seems to start always in UEFI mode.
In the firmware ( pressing F1) I add the USB as a new bootable device and changed the order to be the first place to check.
I started installing the SERVER-ISO, with this structure:


SIZE (aprox)

TYPE

Partition /MOUNT

BOOTABLE

250 MB

FAT32

Sda1 / efi (say explicitely it is UEFI partition)

Yes

100 GB

Ext4

Sda2 / raiz (/)

No

200GB

Ext4

Sda3 / srv

No

190GB

EXT4

Sda4 / home

No

Rest

Swap

Sda5/swap

NO



During installation it said that GRUB2 cannot be install. Anyway I proceeded until it finished. Obviously it did not start.
Then the nightmare began, but the solution seems to be the following.

STEP 3

Restart the computer with the LIVE-ISO.

Install boot-repair here.
Fix the keyboard to spanish : $ sudo dpkg-reconfigure keyboard-configuration
Boot-repair does not work strait ahead but the next steps are necessary.



STEP 4

The efi partitition where the new stuff about efi is installed is in sda1.
The root filesystem is in sda2.
In the filesystem of the USB-LIVE the HDD root was mounted in /media/ubuntu/raiz ( because I gave that label to the root / partition).
Now it is turn to make everybody aware of each other.

$ sudo mkdir /media/efi

$ sudo mount -t vfat /dev/sda1 /media/efi ( this mounts the efi partition in /media/efi of the USB filesystem)

$ sudo mount –rbind /dev /media/ubuntu/raiz/dev (mirror the /dev of the USB to the one of the HDD)(if you did not label the root, then it would appears as /media/ubuntu/dev )
$ sudo mount –rbind /proc /media/ubuntu/raiz/proc
$ sudo mount –rbind /sys /media/ubuntu/raiz/sys

Finally I said the HDD filesystem where the efi partition was placed

$ sudo mount –rbind /media/efi /media/ubuntu/raiz/boot/efi

STEP 5

Now it is time to run boot-repair: BUT

* look into advanced settings
* uncheck secure-boot
* mark upgrade GRUB to the last version
* mark /boot/efi in sda1 ( my case),.... and the other partition is / (root)



When running boot-repair asks you to open a terminal an execute certain commands. After that execution then proceed with boot-repair.
It will ask twice. Follow all the steps and it will end (hopefully) successfully.

Here you will find the log of the successfull bott-repair result.

boot-repair output