[SOLVED] Cannot install Snakeoil on UEFI-only NUC
#1
Hi there,

I am interested in Snakeoil and have purchased an Intel NUC7CJYH with a fanless chasis to try it. This NUC doesn't only legacy BIOS boot so UEFI is my only choice. I tried both burning the Snakeoil ISO image to CD-ROM and creating a bootable USB using Rufus. CD-ROM could boot up and I could start the installation. For USB, it always stops at grub-rescue and I had to issue the following commands to make it proceed to boot:

set prefix=(hd,msdos1)/boot/grub
set root=(hd0,1)
insmod normal
normal

For both cases, I could install to my SSD without problems. However, when booting from SSD, the following error is displayed:

error: kernel doesn't support EFI handover.
Loading initial ramdisk ...
alloc magic is broken at....

I have tried replacing other Snakeoil kernels in the USB and performed the installation again, the result is the same. I have also tried installing the SSD on another NUC supporting legacy boot, and then moved it to the UEFI NUC and used Boot Repair as suggested in another thread. No luck so far. Searching on the web suggested that the following flag should  be set when building the kernel:

CONFIG_EFI_STUB=y

Any chance that a kernel can be built to support the UEFI boot? Many Thanks.

SK
 Go to solution Reply

#2
UEFI boot works here but I had to boot Win 7 and clear all partitions prior to installing.
You want a cleared drive formatted to Fat32 or Ext4...
Reboot and install works as expected.  :-)
Reply

#3
(08-Aug-2020, 02:30 PM)Bromf Wrote: UEFI boot works here but I had to boot Win 7 and clear all partitions prior to installing.
You want a cleared drive formatted to Fat32 or Ext4...
Reboot and install works as expected.  :-)

I always select the option of "Erase the whole drive and install Ubuntu"....
Reply

#4
(08-Aug-2020, 04:41 PM)scskam Wrote:
(08-Aug-2020, 02:30 PM)Bromf Wrote: UEFI boot works here but I had to boot Win 7 and clear all partitions prior to installing.
You want a cleared drive formatted to Fat32 or Ext4...
Reboot and install works as expected.  :-)

I always select the option of "Erase the whole drive and install Ubuntu"....

Yes..I did that over and over again on a thin client with UEFI and Snakeoil install failed every time.
Finally I installed Win7 and at the drive allocation prompt I deleted all partitions (including the reserved and UEFI boot) then rebooted and was able to install Snakeoil.
Reply

#5
(08-Aug-2020, 04:50 PM)Bromf Wrote:
(08-Aug-2020, 04:41 PM)scskam Wrote:
(08-Aug-2020, 02:30 PM)Bromf Wrote: UEFI boot works here but I had to boot Win 7 and clear all partitions prior to installing.
You want a cleared drive formatted to Fat32 or Ext4...
Reboot and install works as expected.  :-)

I always select the option of "Erase the whole drive and install Ubuntu"....

Yes..I did that over and over again on a thin client with UEFI and Snakeoil install failed every time.
Finally I installed Win7 and at the drive allocation prompt I deleted all partitions (including the reserved and UEFI boot) then rebooted and was able to install Snakeoil.

Hi Bromf,

Thanks for your reply. To ensure the partitions and their contents are right, I first installed stock Ubuntu on the SSD, then resized the partition to free up some space for installing Snakeoil OS alongside with the stock Ubuntu. I can choose inside grub to boot stock Ubuntu (which boots up ok) or Snakeoil OS. The same error message displayed when Snakeoil kernel boots up. So the problem is the Snakeoil kernel not built with UEFI fully turned on. 

As said, there are suggestions that the following flag should be turned on when building the kernel:

CONFIG_EFI_STUB = y

I just checked the config file released with one of the customized Snakeoil kernels, this flag was not set while other EFI flags are set:

CONFIG_EFI_PARTITION=y
.
.
CONFIG_EFI=y
# CONFIG_EFI_STUB is not set
.
.

Hopefully the UEFI support can be improved by adding this flag back. Many thanks.

SK
Reply

#6
Check your BIOS and look for anything that says "Compatibility Support Module", can you turn on legacy support mode?

Technically, the problem with the ISO is it will not boot in a EFI environment, but the OS itself should be fine (as long as your computer works with unsigned boot). After the install, start a command shell, and try this and see if it works?

1. After install, start a command shell.
2. Changeroot to remount the install edition as your root. I can't remember offhand what the path is, but you can find it in df or mount, then run chroot
Code:
chroot /path/to/your/install/partition
3. Run the following commands and see what happens:
Code:
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck grub-mkconfig -o /boot/grub/grub.cfg
Snakeoil Operating System - Music, your way!
Reply

#7
(10-Aug-2020, 07:58 AM)agent_kith Wrote: Check your BIOS and look for anything that says "Compatibility Support Module", can you turn on legacy support mode?

Technically, the problem with the ISO is it will not boot in a EFI environment, but the OS itself should be fine (as long as your computer works with unsigned boot). After the install, start a command shell, and try this and see if it works?

1. After install, start a command shell.
2. Changeroot to remount the install edition as your root. I can't remember offhand what the path is, but you can find it in df or mount, then run chroot
Code:
chroot /path/to/your/install/partition
3. Run the following commands and see what happens:
Code:
[code]
[code]
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck grub-mkconfig -o /boot/grub/grub.cfg
Thanks agent-kith. There is no legacy boot support nor CSM smode in the bios. I have disabled secure boot and S3 related settings, the UEFI boot cannot be turned off and no legacy boot available in the BIOS menu.

The Snakeoil automatically rebooted after installation so I had to change to seed file on the USB to disable reboot. The partition in of the newly installed OS is /target.

Here is the output when I issued the suggested commands. Many thanks.

SK

[/code]
snakeoil@snakeoil:/$ df
Filesystem     1K-blocks    Used Available Use% Mounted on
udev             7977460       0   7977460   0% /dev
tmpfs            1597148   10800   1586348   1% /run
/dev/sdb1       30026752  411776  29614976   2% /cdrom
/dev/loop0        375808  375808         0 100% /rofs
/cow             7985724  231052   7754672   3% /
tmpfs            7985724       0   7985724   0% /dev/shm
tmpfs               5120       4      5116   1% /run/lock
tmpfs            7985724       0   7985724   0% /sys/fs/cgroup
tmpfs            7985724      28   7985696   1% /tmp
/dev/sda2       98647660 1916784  91696792   3% /target
/dev/sda1         523248    8596    514652   2% /target/boot/efi
snakeoil@snakeoil:/$ chroot /target/boot/efi
chroot: cannot change root directory to '/target/boot/efi': Permission denied

snakeoil@snakeoil:/$ sudo chroot /target
root@snakeoil:/# sudo grub -mkconfig -o /boot/grub/grub.cfg
sudo: unable to resolve host snakeoil: Connection timed out
sudo: grub: command not found

root@snakeoil:/# grub
The program 'grub' is currently not installed. You can install it by typing:
apt install grub
root@snakeoil:/# apt install grub
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 grub : Depends: libc6-i386 (>= 2.15) but it is not going to be installed
        Conflicts: grub-efi-amd64
        Conflicts: grub-efi-amd64:i386
 grub-efi : Depends: grub-efi-amd64 (= 2.02~beta2-9ubuntu1.12)
 grub-efi-amd64 : Conflicts: grub but 0.97-29ubuntu68 is to be installed
 grub2-common : Breaks: grub (< 0.97-54) but 0.97-29ubuntu68 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@snakeoil:/# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  dmeventd dmraid gir1.2-javascriptcoregtk-4.0 gir1.2-soup-2.4 gir1.2-vte-2.91
  gir1.2-webkit2-4.0 kpartx kpartx-boot laptop-detect libdevmapper-event1.02.1
  libdmraid1.0.0.rc16 libiw30 liblvm2cmd2.02 libparted-fs-resize0 libreadline5
  libtimezonemap-data libvte-2.91-0 libvte-2.91-common lzma
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  grub-efi
The following packages will be upgraded:
  grub-efi
1 upgraded, 0 newly installed, 0 to remove and 358 not upgraded.
1 not fully installed or removed.
Need to get 2,544 B of archives.
After this operation, 16.4 kB disk space will be freed.
Do you want to continue? [Y/n] y
0% [Connecting to hk.archive.ubuntu.com]
0% [Connecting to hk.archive.ubuntu.com]
Err:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 grub-efi amd64 2.02~beta2-36ubuntu3.27
  Temporary failure resolving 'hk.archive.ubuntu.com'
Err:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 grub-efi 4 2.02~beta2-36ubuntu3.27
  Temporary failure resolving 'hk.archive.ubuntu.com'
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/m..._amd64.deb  Temporary failure resolving 'hk.archive.uu.com'

E: Unable to fetch some archives, maybe run apt-get update or try with --fixsing?

root@snakeoil:/# sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo: unable to resolve host snakeoil: Connection timed out
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
root@snakeoil:/# 



[/quote]
Reply

#8
Almost certain you don't need to install grub_efi... Because Ubuntu will detect your system is using EFI and install the correct bootloader.

Correct to chroot to /target. That's the correct directory.

Once you've done that, can u run
Code:
sudo mount /dev

and then run this command again (ignore grub-mkconfig for now):
Code:
sudo grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck grub-mkconfig -o /boot/grub/grub.cfg
Snakeoil Operating System - Music, your way!
Reply

#9
(10-Aug-2020, 03:17 PM)agent_kith Wrote: Almost certain you don't need to install grub_efi... Because Ubuntu will detect your system is using EFI and install the correct bootloader.

Correct to chroot to /target. That's the correct directory.

Once you've done that, can u run
Code:
sudo mount /dev

and then run this command again (ignore grub-mkconfig for now):
Code:
sudo grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck grub-mkconfig -o /boot/grub/grub.cfg

Hi there,

Here is the command I issued and the output:

snakeoil@snakeoil:/$ sudo chroot /target mount /dev 
mount: can't find /dev in /etc/fstab
snakeoil@snakeoil:/$ 

Content of /target/etc/fstab:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=6bf65c47-9647-4cec-95e2-a768d459f544 /               ext4    errors=remount
-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=D721-9A00  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/sda3 during installation
UUID=bf78d7ab-0034-4ee9-8cf6-a4decad376a6 none            swap    sw            
  0       0

Thanks for your help.

SK
Reply

#10
Hmm.

After you have chroot to /target. Try and run this:
Code:
mount udev -t devtmpfs /dev

Make sure your snakeoil partition is at / before you run the above command, and also grub-install.

Still waiting for my network card to get here.. Once it's here it will be easier for me to work out EFI issues. Having said that, all my computers have CSM so I'm not too hopeful.. At least then I can properly start work on getting the new ISO out. Hopefully the latest Ubuntu will have better EFI support. It's been almost 3 months I think.. Almost takes a season for my network card to get here, and I'm not even sure if it's a legit NIC or not. Sad
Snakeoil Operating System - Music, your way!
Reply



Bookmarks

Possibly Related Threads…
Thread Author Replies Views Last Post
  Snakeoil and DNS davem 0 241 23-May-2024, 08:47 AM
Last Post: davem
  Fail to install myMPD sjtuross 9 703 03-Mar-2024, 08:45 PM
Last Post: hkphantomgtr
  snakeoil always refuse connecting from vnc viewer clark8888 2 806 15-Oct-2023, 10:37 AM
Last Post: clark8888
  Rpi4+AlloDigiOne sig. Snakeoil os installation problem Luke 38 13 3,281 06-Sep-2023, 07:36 AM
Last Post: agent_kith
  Install not working Pi2Design Mercury V2 Snoopy8 1 521 01-Aug-2023, 10:03 AM
Last Post: agent_kith



Users browsing this thread:
2 Guest(s)

[-]
Our Sponsors

[-]
Welcome
You have to register before you can post on our site.

Username/Email:


Password:





[-]
Latest Threads
Installation of SnakeOil OS 1.3.0 on RPi...
Last Post: miksi
Today 02:14 AM
» Replies: 14
» Views: 612
Dropping Measurements, Hello High-End.
Last Post: uglymusic
18-Dec-2024 12:02 AM
» Replies: 20
» Views: 713
CA Server issues
Last Post: Peter_F
16-Dec-2024 06:36 PM
» Replies: 13
» Views: 226
install Snakeoil on Audio Alchemy DMP-1 ...
Last Post: uglymusic
08-Dec-2024 08:48 PM
» Replies: 2
» Views: 214
Announcing Snakeoil Measurements 1.3.0
Last Post: hkphantomgtr
03-Dec-2024 09:55 PM
» Replies: 105
» Views: 12042
Howto setup resampling in Logitech Media...
Last Post: Coacharnold
18-Nov-2024 12:06 AM
» Replies: 7
» Views: 6002
Very happy to have Sankeoil......! mpd w...
Last Post: run51
24-Oct-2024 05:35 AM
» Replies: 9
» Views: 1806
SO no soundcard detected - RPI Pi4 snake...
Last Post: run51
21-Oct-2024 10:55 PM
» Replies: 4
» Views: 192
download
Last Post: Snoopy8
19-Oct-2024 05:52 AM
» Replies: 1
» Views: 181
Full proces to instal snakeiol 100% work...
Last Post: audioluthier
11-Oct-2024 02:32 AM
» Replies: 9
» Views: 516

[-]
SnakeoilOS Mission Statement

Our mission is to create a free to use computer OS that is easy to install, intuitive to operate and play music that will connect and engage with you emotionally.

SnakeoilOS gives you the freedom to spend more time on listening, enjoying and exploring music. Wasting time on computers is now a thing of the past! Everything is constantly evolving/improving. Please check back often for updates.

If you like this project, do show your support with a small token donation. All donations collected will be used to run this website, and for purchasing new equipment for the project.


Powered By MyBB, © 2002-2024. Theme © Melroy van den Berg.