Trouble installing SolydX-64 in UEFI-mode

Questions about SolydX and SolydK installation.
User avatar
ulusu
Posts: 82
Joined: 12 Nov 2013 23:06
Location: Dreiländereck (Germany, Luxemburg and France)

Re: Trouble installing SolydX-64 in UEFI-mode

Postby ulusu » 24 Jul 2014 07:37

At the 2nd try I've formatted an USB stick with fat32. Then after seeing a tutorial in Ubuntu forums I mounted the Solyd iso and copied the files to the USB stick.

Code: Select all

ulusu@pn-pc ~ $ sudo mkdir /mnt/iso -p
[sudo] password for ulusu: 
ulusu@pn-pc ~ $ sudo mount /home/ulusu/Downloads/solydk64_201407.iso /mnt/iso -o loop
[sudo] password for ulusu: 
mount: block device /home/ulusu/Downloads/solydk64_201407.iso is write-protected, mounting read-only
ulusu@pn-pc ~ $ sudo cp -rv /mnt/iso/. /media/ulusu/GPT/
ulusu@pn-pc ~ $ sudo umount /mnt/iso
After that I've added with Gparted the boot flag and the lba flag.

The boot process ended on the grub prompt :(

Then I compared both USB sticks that I've created. One with rufus and this last one. There I saw that rufus installs syslinux loader to the image. I'm going now to try that out as well.

Regards,
ulusu

Mac OS X Mavericks, Kubuntu 14.04 LTS, SolydK64_201407, Windows 7 Ultimate, Windows 8.1 pro

xcom
Posts: 36
Joined: 13 Jul 2014 15:56

Re: Trouble installing SolydX-64 in UEFI-mode

Postby xcom » 21 Aug 2014 04:52

I tried the stable version of 201407 and it worked without problems.
In Gparted choose >> Device -> Create Partition Table... -> GPT and created a 550MB Fat32 partition set the boot flag mounted it /boot/efi, and did the other partitions the normal way, and it booted in UEFI mode without having to do a Grub repair, but the installer is still buggy.

After that I spend a lot off time configuring stuff, so to keep it safe I thought about installing on a 64Gig usb pen a new Solyd to test things and try KDE or other distros,
I formatted the pen and did the partitions the same way I did in the SSD, the installation worked and it booted in UEFI and it worked fine.

But then it tried booting to my SSD and I got the Grub rescue prompt GRRRR!!! :evil:
Installing Solydx on the usb pen broke the SSD install! :(
The SSD was on sda and the pen was on sdc and in the installer I said to install Grub on sdc but it broke the Grub on sda that was working before...

So then I had to install Solydx on the SSD and do all the configuring again.

tacos40
Posts: 52
Joined: 14 Jul 2014 14:35
Location: Spain

Re: Trouble installing SolydX-64 in UEFI-mode

Postby tacos40 » 27 Aug 2014 22:33

Hello everybody,

I've been reading this wonderful thread among others in this forum and lots of pages about EFI, GPT, ESP, refind, rufus, debian, fedora, etc, etc to understand what is behind this and being able to install SolydX in "EFI mode".

I'm happy to say I've been able to create a successful step by step procedure to install SolydX 64 as EFI (ISO version 2014/05 !!) in my Laptop Dell Inspiron 17E (or similar name), with pre-installed Windows 8. :) :) :mrgreen: Needless to say I've been inspired by your stunning work and generosity to share knowledge in this troubleshooting thread . So, THANKS A LOT to all of you.

I'll drop tomorrow my step by step procedure so you and other people can grasp the keypoints and extrapolate for their respective cases (I hope so). And of course, to further improve / simplify the procedure.

Some details in advance:
- Dell Inspiron (intel i7) dual booting SolydX 64 and Windows 8 in GPT disk (UEFI booting)
- Tools: "refind" bootloader added in ESP partition (transitional tool, I can remove, dont need anymore)
- I've SAVED the terminal LOGS in 3 PHASES, so steps can be confirmed / reviewed

Some other details: Rufus didnt work for me; and neither refind usb image firt time (Rod Smith page), but the one in ZIP BIN

Keywords in advance: grub-efi YES, grub-pc NO, grubx64.efi in ESP partition MUST be exactly (md5sum) the "core.efi" file under /boot/grub/X86_64-efi/ or similar name.

Good night,

JC

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: Trouble installing SolydX-64 in UEFI-mode

Postby ScottQuier » 28 Aug 2014 00:24

Looking forward to the step by step!
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

tacos40
Posts: 52
Joined: 14 Jul 2014 14:35
Location: Spain

STEP by STEP installing SolydX-64 in UEFI-mode

Postby tacos40 » 30 Aug 2014 01:33

[SOLVED in my case]

Below you will find a "step by step" list of what I did to install SolydX-64 (2014/05) in a laptop
(Dell Inspiron 17R SE 7720) with pre-installed MS Windows 8; both OSs dual booting in "UEFI" mode.

I've enumerated the list for easier understanding of the whole idea. I'm NOT an expert, but you are
free to ask for further details and, of course, encouraged to *correct/simplify* this approach ;-)

Good to know 1-2-3 (shortened) but the real stuff begins at step 4 (more detail given :-) )

THANKS A LOT again for your work: wayne, xcom, ulusu... and other heroes behind the scenes ;-)

1. KNOW *WHAT WE WANT* = SOLYDX + UEFI

GOAL: "Install SolydX-64 in UEFI/GPT laptop/pc, for dual booting with pre-installed Window 7/8"

NOTE: If you have a legacy MBR / BIOS or you are free to DELETE all disk / reinstall from scratch
(MS Windows and/or Linux)... then is BETTER to use legacy / MBR and forget the UEFI/GPT world ;-)

2. KNOW *THE BASIC* = UEFI + GPT + ESP

2.a. GPT... is a partioning scheme (for disks). It's different and less known than... legacy MBR.
2.b. UEFI or EFI... is a hardware - OS interface (for booting). It's different from... legacy BIOS.
2.c. UEFI and GPT... are found together in modern hardware; e.g. laptops with MS Windows 8.
2.d. UEFI booting (not legacy BIOS)... is needed to install linux from ISO, to preserve MS Windows.

2.e. ESP is tipically the first partition (FAT32) in GPT hard disk: the "EFI System Partition".
2.f. ESP has folders/xxx.efi files to boot tools or OSs in other GPT partitions: Microsoft, Dell, etc.
2.g. ESP will have a specific folder for SolydX; another folder for "rEFInd" (bootmanager tool), etc.
2.h. Installing SolydX in UEFI/GPT means creating its folder in ESP, with suitable "grubx64.efi" inside.

TAKE NOTE OF THIS:

2.i. That "grubx64.efi" will be specific of YOUR system, as if pointing at YOUR partition ahead in disk!
2.j. SolydX OS will live in that partition ahead (mine is /dev/sda8). My ESP partition is /dev/sda1
2.k. SolydX OS (once installed in UEFI/GPT mode) will ALWAYS mount /dev/sda1 (ESP) under /boot/efi !!
2.l. ESP inside: /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi; /boot/efi/EFI/solydx/grubx64.efi, etc, etc.

3. KNOW UEFI IN *YOUR* SPECIFIC HARDWARE, TESTING CD's

3.a. How to enter setup [UEFI/BIOS, NVRAM/CMOS], pressing F2 or F12, etc, when booting your pc/laptop.
3.b. How setup allows you to choose "UEFI" booting mode, instead of "legacy BIOS" mode (or both).
3.c. How setup helps you locate ".efi" files in ESP, CDROM or USB for adding them as bootable in list.
3.d. How setup allows you to re-order list of bootable OSs/tools (.efi files), saving in NVRAM/CMOS, etc.

3.e. Example 1: You can easily add ".efi" file located in Fedora 20 or Mint 16 CD-Lives or REFIND USB stick.
3.f. You'd install Fedora or Mint in UEFI mode, locating .efi in CD, saving in NVRAM, etc and reboot!

3.g. Example 2: You CAN'T search .efi files in SolydX CD (2014/05 iso) from within setup. I don't know why!
3.g. Detail: There is really a .efi in SolydX CD, but UEFI rejects looking into this CD. Something lacking?
3.h. If you CAN'T add .efi, you CAN'T boot SolydX CD in UEFI mode; then you CAN'T install. WORKAROUND needed.

IMPORTANT:

3.i. MAKE A BACKUP of your ESP partition (at least)
My ESP (in /dev/sda1) is 500MB in size; I copied with Gparted to a USB disk outside.
I also saved other partitions and "Reserved" spaces but their importance is out of this topic.

3.f. ESP folders can be saved with simple copy as well. Remember is a FAT32 partition, simple one.
3.g. ESP, being FAT32: is case *insensitive* (so "Refind" folder would be same as "refind" for UEFI ;-) )


REAL STUFF BEGINS HERE:

4. GET *REFIND* TOOL (WORKAROUND)

4.a. Get it here: http://www.rodsbooks.com/refind/getting.html, option "binary zip file" (forget others)
4.b. Follow instructions in those Rod Smith pages to copy "refind" subdirectory in... your ESP partition!!

4.c. My case: I first booted SolydX linux in legacy BIOS mode!! just to "mount /dev/sda1 /boot/efi". THEN:
copied using File manager :-D (Thunar), leaving "refind" at same level of Microsoft folder (I left
only 64 bits files, removing 32 bit efi and drivers because they are not needed in my 64 bits Dell)

4.d. So you have an ESP partition enhanced with just one more folder... "refind" wonderful tool :-)
4.e. Reboot and press F2 or F12 or whatever key to enter SETUP, ensure UEFI mode is enabled again and...
locate/add (within your UEFI/BIOS setup) the new "refind.efi" in your ESP for saving in your NVRAM
as an additional EFI bootable tool. You can re-order list and put it first, booting before Windows.

THE MAGIC STARTS HERE:

4.f. Reboot again. This time REFIND should be booted instead of Windows. You SHOULD get a graphical UI,
because REFIND is a graphical (nice) Boot Manager... capable of FINDING (scanfor) whatever bootable OS
is in your ESP, CD-ROM, USB stick... AND, more importantly... booting it, being native EFI or not!!

4.g. If you insert SolydX CD-live there and REFIND reloads... REFIND will find SolydX and it will further
boot SolydX CD-live in *UEFI mode* (no remember exactly if using SolydX CD grubx64.efi file or not).
I think yes, I chose grubx64.efi in CD. Now wait to enter SolydX live ... :-) ...

5. VERIFY SOLYDX-64 (LIVE) IS IN... EFI MODE

5.a. Easy way: Can you go to /sys/firmware/efi/ ? YES = you are in EFI MODE (good) You'll see files inside.
5.b. If /sys/firmware/efi/ not preset, forget going forward an revise / repeat / refind booting .efi process.
5.c. [ROOT user]: cd /boot; mkdir efi; mount /dev/sda1 /boot/efi; see there ESP content just for fun. Then umount.

6. REMOVE GRUB-PC, *PURGE* THEN INSTALL GRUB-EFI

6.a. Remember: we are in SolydX CD-live right now, under EFI MODE.

6.b. [ROOT user]: cd /boot; ls efi* NOT FOUND. /dev/sda1 (ESP) is not mounted under /boot/efi in Live mode.
Explanation: I would have more peace of mind if finding this already mounted, but I DONT KNOW if it's
really necessary at this phase. I presume... NOT needed. So I left as it came: unmounted :-)

PHASE 1 STARTS HERE (JUST A MARK):

6.c. [ROOT user]: dpkg -l |grep grub

ii grub-common 2.00-22 amd64 GRand Unified Bootloader (common files)
ii grub-pc 2.00-22 amd64 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub-pc-bin 2.00-22 amd64 GRand Unified Bootloader, version 2 (PC/BIOS binaries)
ii grub2-common 2.00-22 amd64 GRand Unified Bootloader (common files for version 2)
ii solydx-grub2-theme 1.0.3 all Grub2 theme for SolydX

6.d. FIRST JUDGEMENT: grub-pc* is there in Solyd Live CD, instead of... grub-efi* (and efibootmanager)

Explanation: grub-pc* is for GRUB in legacy BIOS/MBR mode, no UEFI / GPT mode.
Hypothesis: if you try to install, probably something will end badly, or be unbootable later
Decision: Uninstall grub-pc and install grub-efi*. Maybe unnecessary at this "Live" phase, but I did:

6.e. WHAT I DID: removed / purged grub-pc* (PURGE is important)
THEN: installed grub-efi* from Internet connection (with apt-get) and
installed "efibootmanager" from CD-ROM ! (with dpkg -i)

[ROOT user]: apt-get remove --purge grub-pc*
You will be warned this will render system unbootable... but Who cares in CD-LIVE ? :-)
Go ahead.

6.c. VERIFY it's clean/purged
[ROOT user]: dpkg -l |grep grub
This output is GOOD :-) Watch there are only "ii" output and no ... grub-pc* ... at all:

ii grub-common 2.00-22 amd64 GRand Unified Bootloader (common files)
ii grub2-common 2.00-22 amd64 GRand Unified Bootloader (common files for version 2)
ii solydx-grub2-theme 1.0.3 all Grub2 theme for SolydX

IMPORTANT: next output would be BAD. Watch "rc" at the left. If that happens, repeat PURGE above:

ii grub-common 2.00-22 amd64 GRand Unified Bootloader (common files)
rc grub-pc 2.00-22 amd64 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub2-common 2.00-22 amd64 GRand Unified Bootloader (common files for version 2)
ii solydx-grub2-theme 1.0.3 all Grub2 theme for SolydX

6.d. Now we want "efibootmgr" ... not FOUND in Internet, but present offline in [SolydX 2014/05] CD, ok!!
Now we want "grub-efi* ... yes, FOUND in Internet (v2.0+).
IMPORTANT: grub v1.99 in this SolydX CD seems NOT to be convenient. DO NOT USE.

[ROOT user]: cd /lib/live/mount/medium/offline/; ls -ltr

-r--r--r-- 1 root root 475916 Jul 3 2013 grub-efi-amd64-bin_1.99-27+deb7u2_amd64.deb
-r--r--r-- 1 root root 45642 Jul 3 2013 grub-efi-amd64_1.99-27+deb7u2_amd64.deb
-r--r--r-- 1 root root 1104 Jul 3 2013 grub-efi_1.99-27+deb7u2_amd64.deb
-r--r--r-- 1 root root 37524 Jul 8 2013 efibootmgr_0.5.4-7_amd64.deb

[ROOT user]: dpkg -i efibootmgr_0.5.4-7_amd64.deb
[ROOT user]: apt-get install grub-efi
...

6.e. VERIFY it's clean/purged.
Watch below all is "ii" That's GOOD :-)
Watch below no grub-pc* Only grub-efi* GOOD again :-)

[ROOT user]: dpkg -l |grep -e grub -e efibootmgr

ii efibootmgr 0.5.4-7 amd64 Interact with the EFI Boot Manager
ii grub-common 2.00-22 amd64 GRand Unified Bootloader (common files)
ii grub-efi 2.00-22 amd64 GRand Unified Bootloader, version 2 (dummy package)
ii grub-efi-amd64 2.00-22 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
ii grub-efi-amd64-bin 2.00-22 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 binaries)
ii grub2-common 2.00-22 amd64 GRand Unified Bootloader (common files for version 2)
ii solydx-grub2-theme 1.0.3 all Grub2 theme for SolydX

PHASE 1 COMPLETED: Now, I have MORE peace of mind and prone to click icon "Install SolydX on Hard Drive"
Maybe this grub-* purging is NOT necessary. But I did it. and later I could manage
to FIX things in PHASE 2 and 3...

7. INSTALL SOLYDX ON HARD DRIVE

7.e. DONT WORRY: SolydX will recognize your ESP partition ( /dev/sda1 ) "mount as /boot/efi" or similar tag
7.f. Select your SWAP partition and / partition, at least.
In my case: /dev/sda7 = SWAP (4GB) /dev/sda8 = / (I assign 30 GB)
7.g. REST, as usual installation. I was confident .... intuition.
7.h. This is all automatic, SolydX CD-live installing in your HD, grub-installing, etc, etc.

PHASE 2 STARTS HERE (JUST ANOTHER MARK):

7.i. TRICK: Do NOT REBOOT inmediately upon finishing. I stayed at LIVE environment to SEE results, i.e.:

- mount and navigate /dev/sda1 (ESP); For example: see new "solydx folder" and grubx64.efi inside
- mount and navigate /dev/sda8 (SolydX OS) For example: see under /boot/grub, e.g. "grub.cfg", etc

- You are in CD-live, graphical environment, e.g. you can mount using Thunar File Manager ;-)
Let's assume you somehow do this:

[ROOT user]: blkid
[ROOT user]: mount |grep -e iso9660 -e sda1 -e sda8
...
[ROOT user]: mount /dev/sda1 /boot/efi
[ROOT user]: mount /dev/sda8 /media/solydxk/solydx64
[ROOT user]: ls /boot/efi/EFI/
Boot Dell Microsoft refind shellefi solydxk

[ROOT user]: ls -ltr solydxk/
total 912
-rwxr-xr-x 1 root root 933752 Aug 27 22:06 grubx64.efi

[ROOT user]: md5sum /boot/efi/EFI/solydxk/grubx64.efi
19954624052a28591450228d68b7c8c9 /boot/efi/EFI/solydxk/grubx64.efi

[ROOT user]: md5sum /lib/live/mount/medium/EFI/BOOT/grubx64.efi
19954624052a28591450228d68b7c8c9 /lib/live/mount/medium/EFI/BOOT/grubx64.efi

IMPORTANT:
## interesting, the very same one file "grubx64.efi" CD and ESP folder.
## This can not boot correctly later (cant see a pointer to /dev/sda8)

[ROOT user]: cd /media/solydxk/solydx64/boot/grub; ls -ltr ## correction made, ok
total 2564
-rw-r--r-- 1 root root 57 Jan 8 2013 device.map
-rw-r--r-- 1 root root 1024 Jan 8 2013 grubenv
-rw-r--r-- 1 root root 87 Nov 10 2013 load.cfg
drwxr-xr-x 2 root root 4096 Mar 29 20:49 locale
drwxr-xr-x 2 root root 4096 Mar 29 20:49 fonts
drwxr-xr-x 2 root root 12288 Mar 29 20:49 i386-pc
-rw-r--r-- 1 root root 2560080 Mar 29 20:49 unicode.pf2
-rwxr-xr-x 1 root root 19917 Apr 22 17:13 grubbg.png
-r--r--r-- 1 root root 5833 Aug 27 22:07 grub.cfg

IMPORTANT:
## Here we note there is NOT a subdirectory "X86_64-efi".
## In PHASE 3 it will be FIXED upon re-re-installing grub-efi*, etc
BACKUP...:

[ROOT user]: cp -p grub.cfg grub.cfg.BAK_original_by_SolydX
[ROOT user]: cat grub.cfg
...
...

7.j. I saved terminal LOG and preserve it for future reference ... ;-)

MY NOTES: I assume at this point "grub-install" wrote "grubx64.efi" in ESP, but a invalid one;
exactly the .efi file in SolydX CD: around 900KB

I assume "update-grub" wrote /boot/grub/grub.cfg , but likely a wrong / incomplete file.

I assume "efibootmgr" is the one responsible to write in UEFI NVRAM to tell UEFI, "hey!, you
have a new .efi entry in ESP for booting; save it in your OS bootable list".


8. REBOOT. STOP AT SETUP (F2 or F12) TO SEE NVRAM

8.a. I saw a NEW entry in bootloaders list (bootable OS saved in UEFI NVRAM) = "solydxk" :-)
8.b. I chose it , but it didn't boot directly, neither Refind but...

...THE MAGIC CONTINUES HERE:

8.c. THEN Reboot again and choose REFIND, the wonderful tool [bootmanager within your ESP]

8.d. Inside REFIND Graphica MENU, choose SolydX, but NOT via grubx64.efi (unbootable) but rather the
pseudo legacy one (identified thru vmlinuz images or so). Refind will BOOT it in UEFI mode for you..!!

PHASE 3 STARTS HERE (JUST ANOTHER MARK):

8.d. Now we have just entered in our recently installed SolydX graphical desktop (partition /dev/sda8),
not YET proud because we had to use a tool (REFIND), but confident to FIX whatever comes now...

IMPORTANT:

8.f. VERIFY if /dev/sda1 (ESP partition) is mounted automatically under /boot/efi:
Yes !! it's there...!! That's GOOD, a better SIGN you are in UEFI MODE and progressing:

[ROOT user]: mount |grep sda1
/dev/sda1 on /boot/efi type vfat (rw,relatime, ....)

8.g. VERIFY (again) how grub-pc* grub-efi* are conflicting there. Interesting. Watch non "ii" output below:
...kind of MIX-UP happened in the process: grub-pc* shouldn't be there. DON'T like seeing v1.99, etc

[ROOT user]: dpkg -l |grep -e grub -e efibootmgr

ii efibootmgr 0.5.4-7 amd64 Interact with the EFI Boot Manager
ii grub-common 2.00-22 amd64 GRand Unified Bootloader (common files)
iU grub-efi 1.99-27+deb7u2 amd64 GRand Unified Bootloader, version 2 (dummy package)
iU grub-efi-amd64 1.99-27+deb7u2 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
iU grub-efi-amd64-bin 1.99-27+deb7u2 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 binaries)
ic grub-pc 2.00-22 amd64 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub-pc-bin 2.00-22 amd64 GRand Unified Bootloader, version 2 (PC/BIOS binaries)
ii grub2-common 2.00-22 amd64 GRand Unified Bootloader (common files for version 2)
ii solydx-grub2-theme 1.0.3 all Grub2 theme for SolydX

8.h. Lets take other notes and FIX (PURGE) this GRUB thing:

[ROOT user]: cd /boot/grub/; ls -ltr
total 2572
-rw-r--r-- 1 root root 57 Jan 8 2013 device.map
-rw-r--r-- 1 root root 1024 Jan 8 2013 grubenv
-rw-r--r-- 1 root root 87 Nov 10 2013 load.cfg
drwxr-xr-x 2 root root 4096 Mar 29 21:49 locale
drwxr-xr-x 2 root root 4096 Mar 29 21:49 fonts
drwxr-xr-x 2 root root 12288 Mar 29 21:49 i386-pc
-rw-r--r-- 1 root root 2560080 Mar 29 21:49 unicode.pf2
-rwxr-xr-x 1 root root 19917 Apr 22 19:13 grubbg.png
-r--r--r-- 1 root root 5833 Aug 28 00:07 grub.cfg.BAK_original_by_SolydX
-r--r--r-- 1 root root 5833 Aug 28 00:07 grub.cfg
IMPORTANT:

## The following is the order of REMOVING I found successful, i.e.
## first remove wrong grub-efi* v1.99, then remove grub-pc* , then reinstall grub-efi* v2.0
## If warned about rendering an unbootable system... be brave and go ahead!
## Remember you had practice before doing similar task, under CD-Live environment ;-)

[ROOT user]: # apt-get remove --purge grub-efi*
[ROOT user]: # dpkg -l |grep grub

ii grub-common 2.00-22 amd64 GRand Unified Bootloader (common files)
ic grub-pc 2.00-22 amd64 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub-pc-bin 2.00-22 amd64 GRand Unified Bootloader, version 2 (PC/BIOS binaries)
ii grub2-common 2.00-22 amd64 GRand Unified Bootloader (common files for version 2)
ii solydx-grub2-theme 1.0.3 all Grub2 theme for SolydX

[ROOT user]: apt-get remove --purge grub-pc*
[ROOT user]: # dpkg -l |grep -e grub -e efiboo

ii efibootmgr 0.5.4-7 amd64 Interact with the EFI Boot Manager
ii grub-common 2.00-22 amd64 GRand Unified Bootloader (common files)
ii grub2-common 2.00-22 amd64 GRand Unified Bootloader (common files for version 2)
ii solydx-grub2-theme 1.0.3 all Grub2 theme for SolydX

8.i. Lets re-install grub-efi (from Internet, to get v2.0+)

[ROOT user]: apt-get install grub-efi
...
IMPORTANT:

## A lot of MAGIC occurs automatically here. I called this the PHOENIX BIRD revival, just for fun :-)
## "grub-efi" is rebuilding NOW all booting chain: UEFI/NVRAM --> EPS/grubx64.efi --> OS at /dev/sda8:

## grub-install... copies /boot/grub/X86_64-efi/core.efi (/boot/grub belongs to /dev/sda8)
to /boot/efi/EFI/solydxk/grubx64.efi (/boot/efi belongs to /dev/sda1 = ESP!)

## efibootmgr ... register this new "solydxk/grubx64.efi" in UEFI/NVRAM

## "update-grub" is not automatically called here (to rebuild /boot/grub/grub.cfg ...)
## I saved the LOG in this PHASE 3 as well. We can review if needed.

8.j. Lets see our precious and brand-new "grubx64.efi" (in /dev/sda1 = mounted EPS!)
Watch the new size: 130 KB, instead of 900KB of the generic "grubx64.efi" in SolydX64 CD

[ROOT user]: cd /boot/efi/EFI/solydxk/
[ROOT user]: ls -ltr
total 128
-rwxr-xr-x 1 root root 127488 Aug 28 01:08 grubx64.efi

[ROOT user]: cd /boot; ls -ltr

total 31716
drwxr-xr-x 4 root root 4096 Jan 1 1970 efi
-rw-r--r-- 1 root root 178944 Nov 13 2011 memtest86+_multiboot.bin
-rw-r--r-- 1 root root 176764 Nov 13 2011 memtest86+.bin
-rw-r--r-- 1 root root 2887760 Mar 5 14:40 vmlinuz-3.13-1-amd64
-rw-r--r-- 1 root root 2353612 Mar 5 14:46 System.map-3.13-1-amd64
-rw-r--r-- 1 root root 150718 Mar 5 14:46 config-3.13-1-amd64
drwxr-xr-x 3 root root 4096 Mar 29 21:56 extlinux
-rw-r--r-- 1 root root 26705665 May 2 12:18 initrd.img-3.13-1-amd64
drwxr-xr-x 6 root root 4096 Aug 28 01:08 grub

8.k. Lets see other specific detail under /boot/grub
A new directory is placed there: /boot/grub/x86_64-efi
There resides: "core.efi" , the very same 127488 bytes "grubx64.efi" file in EPS.

[ROOT user]: cd /boot/grub; ls -ltr

total 2572
-rw-r--r-- 1 root root 87 Nov 10 2013 load.cfg
drwxr-xr-x 2 root root 4096 Mar 29 21:49 fonts
drwxr-xr-x 2 root root 12288 Mar 29 21:49 i386-pc
-rwxr-xr-x 1 root root 19917 Apr 22 19:13 grubbg.png
-r--r--r-- 1 root root 5833 Aug 28 00:07 grub.cfg.BAK_original_by_SolydX
drwxr-xr-x 2 root root 4096 Aug 28 01:08 locale
-rw-r--r-- 1 root root 1024 Aug 28 01:08 grubenv
drwxr-xr-x 2 root root 12288 Aug 28 01:08 x86_64-efi
-rw-r--r-- 1 root root 2560080 Aug 28 01:08 unicode.pf2


8.l. This is the way of copying manually /boot/grub/X86_64-efi/core.efi again to your EPS partition.
Specifying "/dev/sda" is correct, though GRUB2 will really write in ESP partition (/dev/sda1)
Modern GRUB2 is smart enough in EFI environment, so it understands not to write fragile /dev/sda

[ROOT user]: grub-install /dev/sda

IMPORTANT (GPT in my laptop):

## /dev/sda starts at sector 0 (preserving MBR)
## /dev/sda1 starts at sector 2048 (1MiB)
## GPT partitions identification reside at the first sectors
( 16KB or 32KB, unsure) of that 0 - 2048 zone
## Legacy MBR would allocate those partitions identification entirely in 512 bytes (sector 0 = MBR)

## I was a bit afraid of "grub-pc*" writing in this 2048 zone. but nowadays, GRUB2 is smart a lot .

IMPORTANT:

8.m. Generate the "grub.cfg" file WELL for the first time (/boot/grub/grub.cfg)

[ROOT user]: update-grub

## Why "grub.cfg" is going to be generated correctly now? I assume because of this:

- Suitable v2.0+ grub-efi* packages are cleanly installed (ii)
- Not present at all grub-pc* packages
- /dev/sda1 (ESP) is mounted under /boot/efi so /boot/efi/EFI/Microsoft/*.efi files and other .efi
(own SolydX .efi, refind.efi, some shell.efi, etc, etc) are accessed "locally" to build OS list.
- /boot/grub/x86_64-efi/ directory is already there with all the pieces.

[ROOT user]: cp -p grub.cfg grub.cfg.NEW_upon_apt_grub_purge_THEN_grub-install_THEN_update-grub

IMPORTANT:

8.n. Identify your SPECIFIC "grubx64.efi" for later BACKUP some where (for example, in new REFIND usb stick?)

[ROOT user]: md5sum /boot/efi/EFI/solydxk/grubx64.efi
bf4fa5222a81e8ba88fc96ddcc68454a /boot/efi/EFI/solydxk/grubx64.efi
[ROOT user]: md5sum /boot/grub/x86_64-efi/core.efi
bf4fa5222a81e8ba88fc96ddcc68454a /boot/grub/x86_64-efi/core.efi

9. REBOOT AGAIN

9.a. "You can now reboot, and Grub should greet you" (https://wiki.debian.org/GrubEFIReinstall)

9.b. All EFI booting process is working properly now, so further configuration / personalization can be made.
E.g.: you can boot Windows directly or passing thru Grub or passing thru REFIND, etc, etc, just for fun

9.c. EXTRA CLEAN: Remove from your hard disk live-files left there by mistake
(if you dont do this, you wont be able to update; easy to find solution in SolydXK forum here (PURGE)

[ROOT user]: dpkg -l |grep live

ii liblivemedia33 2:2014.02.26-dmo1 amd64 multimedia RTSP streaming library
ii live-boot 3.0.1-1 all Live System Boot Scripts
ii live-boot-initramfs-tools 3.0.1-1 all Live System Boot Scripts (initramfs-tools backend)
ii live-config 3.0.23-1+deb8u1 all Live System Configuration Scripts
ii live-config-sysvinit 3.0.23-1+deb8u1 all Live System Configuration Scripts (sysvinit backend)
ii live-installer 2014.04.26 all Live Installer
ii live-installer-slideshow-solydx 1.0.4 all Live Installer slideshow for SolydX
ii live-tools 3.0.20-1 all Live System Support Scripts

[ROOT user]: apt-get purge ^live-

[ROOT user]: dpkg -l |grep live

ii liblivemedia33 2:2014.02.26-dmo1 amd64 multimedia RTSP streaming library

10. NEXT STEPS:

10.a. Know a bit REFIND tool and maybe the 2.0 EFI Shell for suffering a bit, just for fun ;-) :-D
I will make a USB refind version for BACKUP ESP and alternative booting.

http://www.rodsbooks.com/efi-bootloaders/refind.html

10.b. I assume this UEFI boot can be corrected in newer SolydX / Debian ISO or next year, at most.

Best regards,

tacos40

tacos40
Posts: 52
Joined: 14 Jul 2014 14:35
Location: Spain

SHORTER Step by Step installing SolydX-64 in UEFI-mode

Postby tacos40 » 31 Aug 2014 00:39

Looking back... the keypoints would be reduced to this short list ;-) =

a) Get REFIND, a tool to boot an OS when this OS can't boot by itself
b) When SolydX is in Live mode, ensure it's in EFI mode
c) Install SolydX in HD and reboot your new SolydX (in HD) ...thru REFIND
d) Verify you see folders under /boot/efi/ (ESP partition should be mounted there)
e) Remove/Purge grub-pc* verifying with dpkg -l (tip... ii )
f) Install efibootmgr from CD
g) Install grub-efi* V2.0+ from Internet; verify all grub* with dpkg -l
h) Verify presence of /boot/grub/x86_64-efi/core.efi
i) Verify presence of /boot/efi/EFI/solydxk/grubx64.efi
j) Verify this grubx64.efi is different from grubx64.efi in CD.
k) Verify md5sum of both .efi files are identical.
l) If any of these 4 last assertions is false, execute: grub-install /dev/sda
m) Verify again ...
n) Execute update-grub and verify /boot/grub/grub.cfg is there...!
o) Reboot and verify you can see solydxk option in UEFI/NVRAM bootable list.
p) "Good Luck"

tacos40
Posts: 52
Joined: 14 Jul 2014 14:35
Location: Spain

Re: Trouble installing SolydX-64 in UEFI-mode

Postby tacos40 » 04 Sep 2014 12:30

So far, so good. SolydX works perfectly under GPT/UEFI environment, update included, of course.
Moreover, making "booting backup" of this GPT/UEFI thing is easier to manage than legacy MBR/BIOS
(e.g. copying entire ESP partition to a replica in USB where rEFInd tool is included; handy).

Difficulty is crossing the bridge; once you are in the other side, things are seen "easier" .

Extra: As a curious thing... my Fedora 20 (in non-GPT environment) uses "grub-efi" (no grub-pc), and
I am a bit surprised about that; i.e. despite the fact disks are MBR partitioned (no GPT, no ESP, no BBP)
and Fedora is not booted in EFI mode (/sys/firmware/efi check or /boot/efi mount check... there is
only grub-efi* package present (efibootmanager included), instead of grub-pc* package.

User avatar
nullzero
Posts: 8
Joined: 17 May 2014 23:22
Location: Portugal
Contact:

Re: Trouble installing SolydX-64 in UEFI-mode

Postby nullzero » 19 Oct 2014 21:02

Followed Wayne's steps and finally I got SolydXK working on my laptop :D

Now to install it to my new minipc :D


Return to “Installation”

Who is online

Users browsing this forum: No registered users and 1 guest