Comment 69 for bug 658865

Revision history for this message
Jasper van der Bent (jasper-vander-bent) wrote :

Dear all, I have been reading this post and have been struggling with it for both Ubuntu and Linux Mint USB installations (my computer is so new, it doesn't have a disc nor ethernet port anymore).
Unfortunately the resolution mentioned above didn't work our form e, but after some hours of booting and testing, I found this which proofed to be a robust and working resolution.

Hope you enjoy using your system of choice in UEFI mode while installing from USB.

As for the credit part, please note that none of the below is my intellectual property, I just found a way to use Google in a smart way and combine several resolutions into one that is working for me, using mainly the following websites:

https://wiki.debian.org/InstallingDebianOn/Thinkpad/X1%20Carbon%204thGen%20PCIe_SSD/jessie

http://unix.stackexchange.com/questions/280440/grub-and-lilo-both-fail-to-install-to-nvme-hard-disk-when-installing-debian

http://www.rojtberg.net/1032/converting-a-ubuntu-and-windows-dual-boot-installation-to-uefi/

Basically, what you do is :

 - start the Ubuntu/Mint installer in BIOS mode
 - at the partition choise: "something else" / "manually"
 - create the 3 partitions to use in the final UEFI mode (1x EFI 512MB, 1x ext4, 1x SWAP)
 - set the GRUB partition to /dev/nvme0n1 (or /dev/sda, or ...)
 - install the Ubuntu/Mint as a normal BIOS install
 - Once installed, reboot to test the BIOS mode installed correctly
 - shutdown your BIOS based system

and then make the switch from BIOS mode to UEFI mode

 - Boot the LIVE INSTALLATION image again in UEFI mode
 - Enter chroot and update Grub

sudo mount /dev/nvme0n1p2 /mnt
sudo mount /dev/nvme0n1p1 /mnt/boot/efi
sudo mount -o bind /dev /mnt/dev
sudo mount -o bind /sys /mnt/sys
sudo mount -t proc /proc /mnt/proc
sudo cp /proc/mounts /mnt/etc/mtab
sudo cp /etc/resolv.conf /mnt/etc/resolv.conf
sudo chroot /mnt

sudo aptitude update
sudo aptitude install grub-efi-amd64
sudo update-grub
sudo grub-install --target=x86_64-efi /dev/nvme0n1
sudo update-grub
reboot

Et voila .. your system will boot in UEFI mode - with just a few minutes of additional installation effort.

P.s. one of the articles also mentiones the following necessary commands - but to be honoust, the system works fine for me without ;-)

Once the installation completes, boot into the system.

$ sudo nano /etc/initramfs-tools/modules # add the following line
nvme

sudo update-initramfs -u

sudo nano /etc/default/grub # modify the following lines
GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset"
GRUB_CMDLINE_LINUX="intel_pstate=no_hwp"

sudo update-grub
reboot