New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi Image | UEFI compatible x86_64 image #1171

Closed
Fourdee opened this Issue Oct 4, 2017 · 42 comments

Comments

@Fourdee
Owner

Fourdee commented Oct 4, 2017

Beta:

#1171 (comment)


https://twitter.com/DietPi_/status/915396664013312000

Our current Native PC image is MBR based and relies on CSM mode for UEFI. CSM not available on some devices.

@Fourdee Fourdee added this to the v157 milestone Oct 4, 2017

@Fourdee Fourdee self-assigned this Oct 4, 2017

Fourdee referenced this issue Oct 8, 2017

v157
Changes for:
#1169
#1168

+ Fix missing FuguHub entry after merge conflict
+ FuguHub Output file to target directory, instead of "cd". So we stay
in $HOME directory at all times during software installs.
+ Disable FuguHub for ARMv8 (not functional with binaries)
+ Disable Docker for ARMv8 (not supported by installer
https://get.docker.com/)
+ Enable Docker for x86_64
+ Docker, use global $FP in /lib/systemd/system/docker.service sed
replace
@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee Oct 8, 2017

Owner

Z83:
image

Owner

Fourdee commented Oct 8, 2017

Z83:
image

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee Oct 13, 2017

Owner

Method 1: Install any Debian OS onto device, then run DietPi PREP:


Method 2: UEFI beta x86_64 image:

Step 1: Download Rufus and DietPi

Step 2: Use Rufus to write the ISO | @sal666 Clonezilla installer

  • Run Rufus
  • Under Partition scheme, select GPT partition scheme for UEFI
  • Select the DietPi .iso image
  • Click start to write the DietPi image

Step 3: Install DietPi image onto device

  • Power on the device with USB pen drive attached
  • Enter BIOS and select USB pen drive as the 1st boot device, then save and exit BIOS.
    -- Select "Install DietPi mmcblk0" (if you have an onboard EMMC chip)
    -- Select "Install DietPi sda" (to install on the 1st HDD as detected by BIOS/clonezilla, unfortunately, we have no way of providing this info on screen, use with caution)
    -- Please note, this will overwrite and replace any OS installed on the target device.
  • Once completed, the system will power off.
  • Unplug the USB drive, and power on system.
Owner

Fourdee commented Oct 13, 2017

Method 1: Install any Debian OS onto device, then run DietPi PREP:


Method 2: UEFI beta x86_64 image:

Step 1: Download Rufus and DietPi

Step 2: Use Rufus to write the ISO | @sal666 Clonezilla installer

  • Run Rufus
  • Under Partition scheme, select GPT partition scheme for UEFI
  • Select the DietPi .iso image
  • Click start to write the DietPi image

Step 3: Install DietPi image onto device

  • Power on the device with USB pen drive attached
  • Enter BIOS and select USB pen drive as the 1st boot device, then save and exit BIOS.
    -- Select "Install DietPi mmcblk0" (if you have an onboard EMMC chip)
    -- Select "Install DietPi sda" (to install on the 1st HDD as detected by BIOS/clonezilla, unfortunately, we have no way of providing this info on screen, use with caution)
    -- Please note, this will overwrite and replace any OS installed on the target device.
  • Once completed, the system will power off.
  • Unplug the USB drive, and power on system.

@Fourdee Fourdee modified the milestones: v157, v158 Oct 19, 2017

@Fourdee Fourdee modified the milestones: v158, v159 Nov 12, 2017

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee Nov 13, 2017

Owner

Rufus install process confirmed working by one of our users:
http://dietpi.com/phpbb/viewtopic.php?f=12&t=2452&p=9514#p9501


Outstanding issues:

  • User reports no audio on device.
  • Implement GPU driver install?
Owner

Fourdee commented Nov 13, 2017

Rufus install process confirmed working by one of our users:
http://dietpi.com/phpbb/viewtopic.php?f=12&t=2452&p=9514#p9501


Outstanding issues:

  • User reports no audio on device.
  • Implement GPU driver install?

@Fourdee Fourdee modified the milestones: v159, v160 Dec 10, 2017

@georgecarstoiu

This comment has been minimized.

Show comment
Hide comment
@georgecarstoiu

georgecarstoiu Dec 22, 2017

Tried installing it on an Intel NUC NUC6CAYH - no emmc, just one normal ssd.

Followed the steps described above, but it didn't work. Was unable to install it in the end. Still would be nice to have a normal ISO.

georgecarstoiu commented Dec 22, 2017

Tried installing it on an Intel NUC NUC6CAYH - no emmc, just one normal ssd.

Followed the steps described above, but it didn't work. Was unable to install it in the end. Still would be nice to have a normal ISO.

@nwcatalyst

This comment has been minimized.

Show comment
Hide comment
@nwcatalyst

nwcatalyst Jan 11, 2018

Tried on NUC NUC6CAYS (with 32GB eMMC) and the install process did not work the first time (odd error about not being able to find mmcblk0 though it had just returned messages saying it was located...

Tried again immediately and it seemed to work.

I did see a bunch of I/O errors for the eMMC during install, which was a major reason I came to dietpi from trying to run Mint on it. I will get it up and running and report back if I am having the same issues.

Thanks for all the efforts...

Would love to have audio support.

EDIT***

The system is also crashing the eMMC - causing it to revert to read only after bunch of I/O errors on the eMMC.

nwcatalyst commented Jan 11, 2018

Tried on NUC NUC6CAYS (with 32GB eMMC) and the install process did not work the first time (odd error about not being able to find mmcblk0 though it had just returned messages saying it was located...

Tried again immediately and it seemed to work.

I did see a bunch of I/O errors for the eMMC during install, which was a major reason I came to dietpi from trying to run Mint on it. I will get it up and running and report back if I am having the same issues.

Thanks for all the efforts...

Would love to have audio support.

EDIT***

The system is also crashing the eMMC - causing it to revert to read only after bunch of I/O errors on the eMMC.

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee Jan 11, 2018

Owner

@nwcatalyst

Thanks for testing 👍

This may be a hardware/EMMC issue (may also be related to discard fstab disabled in v6.0). Do you experience EMMC I/O errors with other OS?

It may also be worth trying our new PREP system, requires a debian installation on EMMC:
#1285

Owner

Fourdee commented Jan 11, 2018

@nwcatalyst

Thanks for testing 👍

This may be a hardware/EMMC issue (may also be related to discard fstab disabled in v6.0). Do you experience EMMC I/O errors with other OS?

It may also be worth trying our new PREP system, requires a debian installation on EMMC:
#1285

@nwcatalyst

This comment has been minimized.

Show comment
Hide comment
@nwcatalyst

nwcatalyst Jan 11, 2018

nwcatalyst commented Jan 11, 2018

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee Jan 21, 2018

Owner

Notes to prep:

  • Run prep, install both microcodes (intel/amd)
  • LXDE live, resize partition + zerofree
  • Clonezilla
Owner

Fourdee commented Jan 21, 2018

Notes to prep:

  • Run prep, install both microcodes (intel/amd)
  • LXDE live, resize partition + zerofree
  • Clonezilla

Fourdee added a commit that referenced this issue Jan 21, 2018

v6.0
+ Native PC (EFI): is now an ISO, with clonezilla bundled. Simplifies
installation via Rufus write:
#1171 (comment)

@Fourdee Fourdee referenced this issue Jan 21, 2018

Closed

v6.0 | Recreate all images #1385

23 of 23 tasks complete
@MichaIng

This comment has been minimized.

Show comment
Hide comment
@MichaIng

MichaIng Jan 23, 2018

Collaborator

v6.0 EFI image for testing is there btw: http://dietpi.com/downloads/images/

@Fourdee
Is it wanted that this is in releases instead of testing?

Collaborator

MichaIng commented Jan 23, 2018

v6.0 EFI image for testing is there btw: http://dietpi.com/downloads/images/

@Fourdee
Is it wanted that this is in releases instead of testing?

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee Jan 23, 2018

Owner

@MichaIng

Is it wanted that this is in releases instead of testing?

Yep tested it personally and ready for use (- any patching during v6.0 update), however, dietpi.com links are not updated yet (still using old <v159 image). I'll do the dietpi.com links prior to v6.0 completion.

Links to v6.0 image, as above, its fine.

Owner

Fourdee commented Jan 23, 2018

@MichaIng

Is it wanted that this is in releases instead of testing?

Yep tested it personally and ready for use (- any patching during v6.0 update), however, dietpi.com links are not updated yet (still using old <v159 image). I'll do the dietpi.com links prior to v6.0 completion.

Links to v6.0 image, as above, its fine.

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee Jan 28, 2018

Owner

Marking as completed, image is now available, and, PREP method also:
#1171 (comment)

Owner

Fourdee commented Jan 28, 2018

Marking as completed, image is now available, and, PREP method also:
#1171 (comment)

@Fourdee Fourdee closed this Jan 28, 2018

@Fourdee Fourdee referenced this issue Jan 28, 2018

Merged

v6.0 #1426

Fourdee added a commit that referenced this issue Jan 28, 2018

Merge pull request #1426 from Fourdee/testing
**v6.0** (previously v160)
(28/01/18)

**Important Information:**
**All DietPi images have been re-created. Existing installations (v159 or lower), can no longer be updated, or supported. To continue support, users must install the latest v6.0 image.**
 - #1385
 - All images are now Debian Stretch (excluding Odroid's)
 - ARMbian based images are now mainline kernel 4.13+.
 - Native PC (EFI): is now an ISO, with clonezilla bundled. Simplifies installation via Rufus write: #1171 (comment)
 - If you are happy with your existing installation of v159 (or lower), you are not required to install the v6.0 image, however, we cannot continue to provide support for v159 (or lower) installations.

**Minor notes:**
The XMAS tree has now been taken down, stored away on github history for next year. Hope you all had a good one :D

**Changes / Improvements / Optimizations:**

General | DietPi RPi kernel, now reverted to stock RPi kernel: #1378

General | We have completed much needed backbone work for DietPi, which will allow for improved expansion in source code. This includes the use of dietpi-globals.

DietPi-Globals | New script which optimizes most used DietPi commands and vars, throughout our scripts. Also exported to bash session, please type 'G_' then press 'TAB' to see a full list of options: #1311

General | FHS compliance completed. /etc/dietpi has moved to /var/lib/dietpi. RAMlog store has moved to /var/tmp/dietpi: #1297 (comment)

General | We have refreshed our terminal messages look & feel, oriented on RPi boot messages, and with process animation: #1377

General | wget: Now set to prefer IPv4 by default (generally faster, can be changed by 'CONFIG_PREFER_IPVERSION' in dietpi.txt): #1285 (comment)

General | APT: Now set to force IPv4 by default (generally faster, can be changed by 'CONFIG_PREFER_IPVERSION' in dietpi.txt): #1285 (comment)

General | SparkySBC: CPU gov default changed to Performance, reports of increased stability.

General | Swapfile generation is now completed during 1st run of dietpi-software (previously boot stage): #1270 (comment)

General | DietPi-Funtime: Removed from DietPi. Although it looked pretty, it did absolutely nothing (except slow down a program)

DietPi-Automation | All dietpi.txt entries have been renamed and cleaned up.

DietPi-Automation | dietpi.txt: CONFIG_NTP_MODE will now be applied during 1st run of device: #1379

DietPi-Boot | Improved the method of initial FS_partition and FS_expansion during 1st run, via systemD services. 'fs_force_resize=' in dietpi.txt is no longer supported: #1285 (comment)

DietPi-Banner | IP: Will now also list the active network adapter used (eg: eth0/wlan0)

DietPi-Config | Dion Audio LOCO V1/V2: Soundcards added for RPi.

DietPi-Config | Locale: en_GB.UTF-8 is now automatically installed, alongside user selected choice. Required for DietPi scripts to function.

DietPi-Drive_Manager | Added support for exFAT, many thanks @MichaIng : #1312

DietPi-Globals | Global variables and functions are now exported during login. Please see the sourcecode for more information: #1311

DietPi-Set_Hardware | Sparky SBC: enable aotg.aotg1_speed compatibility setting for USB 1.1, when USB-DAC configured: #1301

DietPi-Set_Software | "pool" directive is now used for NTPD: #1404

DietPi-Software | NAA Daemon: Updated to latest (3.5.2-36). Existing installs will be patched automatically: #1305

DietPi-Software | PHP-FPM: Increased from "$CPU_CORES_TOTAL" to "pm.max_children = $(( $CPU_CORES_TOTAL * 3 ))". This should avoid failed forking of PHP-FPM processes/requests : #1298

DietPi-Software | ownCloud/Nextcloud: Added option to choose data directory via dietpi.txt pre installation: #1314 (comment)

DietPi-Software | ownCloud/Nextcloud: Switch to pretty URLs (without "index.php") on Apache

DietPi-Software | ownCloud/Nextcloud: Automated backup restoring on install and creation und uninstall to ownCloud/Nextcloud data directory

DietPi-Software | ownCloud: Switch to non-package/archive installation. This allows usage of preferred web based updater.

DietPi-Software | Nextcloud: Resolved OPcache admin panel warnings now also on Lighttpd

DietPi-Software | UrBackup: Installation updated to latest version 2.1.20. For new installations only: #1335

DietPi-Software | NodeRed: Corrected user which nodered runs under, now runs as its own user, created during install: #1294 (comment)

DietPi-Software | SqueezeBox/LMS (Stretch): Installation resolved: #1124

DietPi-Software | MySQL: Completely remove MySQL from DietPi in favour of MariaDB: #1397

DietPi-Software | Ampache: MySQL DB and configs have been updated (adds correct userdata folder for music by default): #1420

run_ntpd | Added support for systemd-timesyncd completion/detection: #1379

**Bug Fixes:**

General | Fixed two systemd error messages during shutdown and boot: #1330

DietPi-Automation | Resolved an issue where AUTO_SETUP_TIMEZONE was not being applied correctly, thanks @k-plan: #1285 (comment)

DietPi-Automation | dietpi.txt: CONFIG_NTP_MIRROR will now be applied to systemd-timesyncd configuration: #1379

DietPi-Config | Resolved an issue with WiFi Country code, failing to set on some devices: #838

DietPi-Config | Resolved an issue where disabling IPv6 didn't have an effect on AMD64 devices: #1343 (comment)

DietPi-Services | dietpi-wifi-monitor: Is no longer controlled, to prevent WiFi drop during software installs/updates etc: #1288 (comment)

DietPi-Software | General: MySQL using software titles now have their own database user, instead of accessing as "root": #1397 (comment)

DietPi-Software | qBittorrent: Resolved an issue with inability to log into web interface: #1366

DietPi-Software | Resolved an issue where our custom LD_LIBRARY_PATH would cause APT failures. LD_LIBRARY_PATH has now been reverted, apologies if this effected your system: #1329

DietPi-Software | Resolved an issue where APT installations would fail if services were masked. All known 

DietPi software services, will be enabled/unmasked, before installation: #1320

DietPi-Software | WiFi Hotspot (Stretch): Resolved an issue where hostapd would fail to run due to missing libssl1.0.0 lib, not available in repos: #1299

DietPi-Software | Shairport-sync (Stretch): Resolved an issue where this would fail to install, due to pre-req URLS becomming invalid: #1303

DietPi-Software | Plex Media Server: Resolved uninstall to include /var/lib/plexmediaserver in removal (which is not completed via apt purge).

DietPi-Software | MariaDB: Resolved an issue where MariaDB would fail to uninstall correctly: #1280

DietPi-Software | Aira2 (Stretch): Resolved installation, now used APT installation: #1310

DietPi-Software | Mosquitto: Resolved various issues with failed install, due to Mosq repo not being maintained (deb's missing from repo header list, requires non-stretch available packages). deb's are now hosted on dietpi.com: #1306

DietPi-Software | ownCloud/Nextcloud: Fixed an installation issue on Jessie with MariaDB: #1319

DietPi-Software | Google AIY: Updated install to gitbranch=voicekit. Many thanks to @mpember for the heads up: #1065 (comment)

DietPi-Software | OpenJDK: Replaces OracleJDK: #1401

DietPi-Update | dietpi.txt is now checked for missing entries, and, will now be patched during the update: #1292 (comment)

Sparky SBC | Kernel updated, which resolves issues with HQPlayer playback: https://www.computeraudiophile.com/forums/topic/32132-allo-sparky-usbridge/?do=findComment&comment=753100

**Allo Web Interface v5:**

Sparky SBC: Matrix Audio X-SPDIF 2, native DSD is now added to kernel, many thanks @sudeep: sparkysbc/Linux#3
@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee Apr 5, 2018

Owner

@tomillr

Could it be that there's a difference between the Atom and Apollo Lake-based CPUs?

Yep, appears to be an issue with either the CPU and/or device (or BIOS limitation) itself. Modifications are required:
http://rglinuxtech.com/?p=2021

I did look at the bios settings, and there would appear to be a solution, as there is an option for ‘Legacy’ boot instead of UEFI. I tried this, and it made no difference – all you see is a blank screen, with a small flickering cursor in the top left corner..


notes:

https://wiki.debian.org/UEFI#Support_for_mixed-mode_systems:_64-bit_system_with_32-bit_UEFI

grub-efi-ia32
Owner

Fourdee commented Apr 5, 2018

@tomillr

Could it be that there's a difference between the Atom and Apollo Lake-based CPUs?

Yep, appears to be an issue with either the CPU and/or device (or BIOS limitation) itself. Modifications are required:
http://rglinuxtech.com/?p=2021

I did look at the bios settings, and there would appear to be a solution, as there is an option for ‘Legacy’ boot instead of UEFI. I tried this, and it made no difference – all you see is a blank screen, with a small flickering cursor in the top left corner..


notes:

https://wiki.debian.org/UEFI#Support_for_mixed-mode_systems:_64-bit_system_with_32-bit_UEFI

grub-efi-ia32
@tomillr

This comment has been minimized.

Show comment
Hide comment
@tomillr

tomillr Apr 6, 2018

Sounds like exactly the same behavior on my system.

Using the 'isorespin.sh' script I'm able to get an Ubuntu iso to boot properly on the Apollo Lake system. The process the author uses is also described on the website. LINK

Any chance of getting this fixed somehow? Maybe it's possible to adopt the method linked above to work with Debian and hence RetroPie?

tomillr commented Apr 6, 2018

Sounds like exactly the same behavior on my system.

Using the 'isorespin.sh' script I'm able to get an Ubuntu iso to boot properly on the Apollo Lake system. The process the author uses is also described on the website. LINK

Any chance of getting this fixed somehow? Maybe it's possible to adopt the method linked above to work with Debian and hence RetroPie?

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee Apr 7, 2018

Owner

@tomillr

Seems the AP34 BIOS is 32bit, hence the need for all these software changes.

Unable to find a 64bit BIOS update from beelink.

Any chance of getting this fixed somehow?

Unfortunately, Its not something I can start at the moment, and, I also lack the device for testing. The only thing I can suggest is to also try contacting Beelink for a 64bit BIOS update.

Owner

Fourdee commented Apr 7, 2018

@tomillr

Seems the AP34 BIOS is 32bit, hence the need for all these software changes.

Unable to find a 64bit BIOS update from beelink.

Any chance of getting this fixed somehow?

Unfortunately, Its not something I can start at the moment, and, I also lack the device for testing. The only thing I can suggest is to also try contacting Beelink for a 64bit BIOS update.

@tomillr

This comment has been minimized.

Show comment
Hide comment
@tomillr

tomillr Apr 8, 2018

Already tried to convince Beelink a couple of times but it doesn't seem like they are interested in support their devices.

How about a donation of 100 bucks so that you can get your hands on an Apollo Lake device?

tomillr commented Apr 8, 2018

Already tried to convince Beelink a couple of times but it doesn't seem like they are interested in support their devices.

How about a donation of 100 bucks so that you can get your hands on an Apollo Lake device?

@emms007

This comment has been minimized.

Show comment
Hide comment
@emms007

emms007 Apr 17, 2018

Thanks Method#2 works fine with UP-BOARD.

RUFUS creation of GPT is very import, just flashing the ISO will not work. Performing similar steps on linux can be done by extrapolating this guide: https://tqdev.com/2016-creating-bootable-windows-10-usb-ubuntu

emms007 commented Apr 17, 2018

Thanks Method#2 works fine with UP-BOARD.

RUFUS creation of GPT is very import, just flashing the ISO will not work. Performing similar steps on linux can be done by extrapolating this guide: https://tqdev.com/2016-creating-bootable-windows-10-usb-ubuntu

@tomillr

This comment has been minimized.

Show comment
Hide comment
@tomillr

tomillr Apr 19, 2018

Won't work on my system.

However, the rescue disk from AltLinux boots right away. Maybe it is possible to take a look at how they handle boot and apply this to the x86 build of DietPi? Looks like there image can boot on pretty much everything...

tomillr commented Apr 19, 2018

Won't work on my system.

However, the rescue disk from AltLinux boots right away. Maybe it is possible to take a look at how they handle boot and apply this to the x86 build of DietPi? Looks like there image can boot on pretty much everything...

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee Apr 20, 2018

Owner

@tomillr

Debian Jessie (8.0) was the first Linux distribution to include full support for mixed-mode UEFI installation on these machines. The multi-arch installation media (available in netinst and DVD form) include the UEFI boot loaders necessary for both i386 and amd64

By selecting "64-bit install" from the initial boot menu, debian-installer will install a 64-bit (amd64) version of Debian. The system will automatically detect that the underlying UEFI firmware is 32-bit and will install the appropriate version of grub-efi to work with it.

Does a box standard Debian install provide the same boot issue? Reading the above, it should detect efi32 and install/configure for it automatically.

If it does function, should just be a case of us checking for efi32 in our PREP script.

Owner

Fourdee commented Apr 20, 2018

@tomillr

Debian Jessie (8.0) was the first Linux distribution to include full support for mixed-mode UEFI installation on these machines. The multi-arch installation media (available in netinst and DVD form) include the UEFI boot loaders necessary for both i386 and amd64

By selecting "64-bit install" from the initial boot menu, debian-installer will install a 64-bit (amd64) version of Debian. The system will automatically detect that the underlying UEFI firmware is 32-bit and will install the appropriate version of grub-efi to work with it.

Does a box standard Debian install provide the same boot issue? Reading the above, it should detect efi32 and install/configure for it automatically.

If it does function, should just be a case of us checking for efi32 in our PREP script.

@tomillr

This comment has been minimized.

Show comment
Hide comment
@tomillr

tomillr Apr 20, 2018

Yes, the standard Debian multiarch distro with UEFI support for mixed mode systems has the same issue.

With AltLinux or the "respun" Ubuntu images from Linuxium I can just flash the iso to a usb strick with Etcher and boot right of the stick without any problems.

tomillr commented Apr 20, 2018

Yes, the standard Debian multiarch distro with UEFI support for mixed mode systems has the same issue.

With AltLinux or the "respun" Ubuntu images from Linuxium I can just flash the iso to a usb strick with Etcher and boot right of the stick without any problems.

@tomillr

This comment has been minimized.

Show comment
Hide comment
@tomillr

tomillr Apr 20, 2018

This script can be used to make Ubuntu boot on either Intel Atom or Apollo Lake system:
https://drive.google.com/file/d/0B99O3A0dDe67S053UE8zN3NwM2c/edit

Looks like it's using GRUB_EFI_IA32 and applying a custom set of values to get Linux to boot.

tomillr commented Apr 20, 2018

This script can be used to make Ubuntu boot on either Intel Atom or Apollo Lake system:
https://drive.google.com/file/d/0B99O3A0dDe67S053UE8zN3NwM2c/edit

Looks like it's using GRUB_EFI_IA32 and applying a custom set of values to get Linux to boot.

@tomillr

This comment has been minimized.

Show comment
Hide comment
@tomillr

tomillr Apr 24, 2018

Is there a way to change the boot loader the DietPi install medium uses to the rEFInd Boot Manager?

While GRUB won't boot, I can use the rEFInd boot manager just fine on my Apollo Lake mini pc.

EDIT: I've also tried to just install regular Debian as a base. Unfortunately, this also doesn't work:

The system just freezes instantly to a non-blinking cursor the second I select the usb drive holding the Debian install media from the UEFI boot menu.

I've already tried both the regular Debian )debian-9.4.0-amd64-netinst.iso) as well as the multi-arch (debian-9.4.0-amd64-i386-netinst.iso) images.

The iso were copied to a usb stick using Rufus (Fat32/GPT/4096 Bytes/iso & dd image modes). But I also gave Unetbootin and Etcher a try.

Also, I can boot the Debian installer from the very same usb stick on my Mac and NUC without any issues.

tomillr commented Apr 24, 2018

Is there a way to change the boot loader the DietPi install medium uses to the rEFInd Boot Manager?

While GRUB won't boot, I can use the rEFInd boot manager just fine on my Apollo Lake mini pc.

EDIT: I've also tried to just install regular Debian as a base. Unfortunately, this also doesn't work:

The system just freezes instantly to a non-blinking cursor the second I select the usb drive holding the Debian install media from the UEFI boot menu.

I've already tried both the regular Debian )debian-9.4.0-amd64-netinst.iso) as well as the multi-arch (debian-9.4.0-amd64-i386-netinst.iso) images.

The iso were copied to a usb stick using Rufus (Fat32/GPT/4096 Bytes/iso & dd image modes). But I also gave Unetbootin and Etcher a try.

Also, I can boot the Debian installer from the very same usb stick on my Mac and NUC without any issues.

@MichaIng

This comment has been minimized.

Show comment
Hide comment
@MichaIng

MichaIng Apr 24, 2018

Collaborator

@tomillr
Hmm, so far within our code (not just preparation script), we assume grub being installed on x86_64 systems. Using a different bootloader will lead to unexpected errors when using dietpi-config and other scripts.
Beside that, it would be not too hard to just ignore bootloader (not install any) by commenting/removing the following lines: https://github.com/Fourdee/DietPi/blob/master/PREP_SYSTEM_FOR_DIETPI.sh#L708-L718

Did you try to manually apt install grub-efi-amd64 or if I understood right, that you need 32bit efi grub-efi-ia32 after gotten Linux/Debian run different method? Of course full rootfs/bootfs backup should be done before, if it breaks 😀.
Second try to flash the Debian installer iso via Rufus as MBR for BIOS, to let it install Debian with BIOS as well. Finally for my impression there is no real argument that marks BIOS as no-go in most cases.
€: Ah on the other hand, dd image should be right in every case and GPT/MBR should be decidable when formatting the system drive during installation (?).

For now I think it should be easier to find fixes with grub on troubling machines, than implementing a new x86 bootloader with all the additional checks and code adjustments that going along with this.

But these are rough thoughts, as I did not read deeper into the details of Apollo Lake mini pc. Let me do that tomorrow, than I hopefully have a clearer image of what can be possible 😉.

Collaborator

MichaIng commented Apr 24, 2018

@tomillr
Hmm, so far within our code (not just preparation script), we assume grub being installed on x86_64 systems. Using a different bootloader will lead to unexpected errors when using dietpi-config and other scripts.
Beside that, it would be not too hard to just ignore bootloader (not install any) by commenting/removing the following lines: https://github.com/Fourdee/DietPi/blob/master/PREP_SYSTEM_FOR_DIETPI.sh#L708-L718

Did you try to manually apt install grub-efi-amd64 or if I understood right, that you need 32bit efi grub-efi-ia32 after gotten Linux/Debian run different method? Of course full rootfs/bootfs backup should be done before, if it breaks 😀.
Second try to flash the Debian installer iso via Rufus as MBR for BIOS, to let it install Debian with BIOS as well. Finally for my impression there is no real argument that marks BIOS as no-go in most cases.
€: Ah on the other hand, dd image should be right in every case and GPT/MBR should be decidable when formatting the system drive during installation (?).

For now I think it should be easier to find fixes with grub on troubling machines, than implementing a new x86 bootloader with all the additional checks and code adjustments that going along with this.

But these are rough thoughts, as I did not read deeper into the details of Apollo Lake mini pc. Let me do that tomorrow, than I hopefully have a clearer image of what can be possible 😉.

@tomillr

This comment has been minimized.

Show comment
Hide comment
@tomillr

tomillr Apr 25, 2018

we assume grub being installed on x86_64 systems.

As far as I was able to glean from the documentation over at Linuxium's blog, Apollo Lake chips can run a 64bit OS (like the preinstalled Windows 10) but the UEFI implementation is somehow still 32bit.

try to flash the Debian installer iso via Rufus as MBR for BIOS, to let it install Debian with BIOS as well. Finally for my impression there is no real argument that marks BIOS as no-go in most cases.

I've already tried using MBR with Rufus. Unfortunately, the legacy bios option is not available on this system. So I don't really have the option to use anything but UEFI to boot.

tomillr commented Apr 25, 2018

we assume grub being installed on x86_64 systems.

As far as I was able to glean from the documentation over at Linuxium's blog, Apollo Lake chips can run a 64bit OS (like the preinstalled Windows 10) but the UEFI implementation is somehow still 32bit.

try to flash the Debian installer iso via Rufus as MBR for BIOS, to let it install Debian with BIOS as well. Finally for my impression there is no real argument that marks BIOS as no-go in most cases.

I've already tried using MBR with Rufus. Unfortunately, the legacy bios option is not available on this system. So I don't really have the option to use anything but UEFI to boot.

@tomillr

This comment has been minimized.

Show comment
Hide comment
@tomillr

tomillr May 2, 2018

Anything I can do to provide some more data?

tomillr commented May 2, 2018

Anything I can do to provide some more data?

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 5, 2018

Owner

@tomillr

To implement to support for this, i need to obtain a device with 32bit UEFI BIOS with no CSM/legacy support. I've looked at the AP34:
https://www.gearbest.com/tv-box-mini-pc/pp_617335.html?wid=1433363

£111 + delivery + import tax
Probably looking at £150~ to cover it.

Unless I can get a device to test locally, we are basically going in here blind. I'll need the device to implement, however, its not something we have the funds for currently.

Owner

Fourdee commented May 5, 2018

@tomillr

To implement to support for this, i need to obtain a device with 32bit UEFI BIOS with no CSM/legacy support. I've looked at the AP34:
https://www.gearbest.com/tv-box-mini-pc/pp_617335.html?wid=1433363

£111 + delivery + import tax
Probably looking at £150~ to cover it.

Unless I can get a device to test locally, we are basically going in here blind. I'll need the device to implement, however, its not something we have the funds for currently.

@MichaIng

This comment has been minimized.

Show comment
Hide comment
@MichaIng

MichaIng May 11, 2018

Collaborator

@Fourdee
Is there some technical/design reason why EFI/GPT images can't just be created and flashed via rufus "DD image" like MBR/BIOS images, ready to run?

Collaborator

MichaIng commented May 11, 2018

@Fourdee
Is there some technical/design reason why EFI/GPT images can't just be created and flashed via rufus "DD image" like MBR/BIOS images, ready to run?

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 11, 2018

Owner

@MichaIng

Is there some technical/design reason why EFI/GPT images can't just be created and flashed via rufus "DD image" like MBR/BIOS images, ready to run?

I'am not 100% clued up on UEFI, however, I believe we cant simply DD write the image, as the UEFI bios does not register it as a UEFI device.

Best guess: Clonezilla enables the UEFI bios to see the new UEFI device. I believe it generates a unique UEFI code on the system, which changes on each UEFI device. Although I could be wrong.

Either way, Rufus is required to create a UEFI capable boot device.

Owner

Fourdee commented May 11, 2018

@MichaIng

Is there some technical/design reason why EFI/GPT images can't just be created and flashed via rufus "DD image" like MBR/BIOS images, ready to run?

I'am not 100% clued up on UEFI, however, I believe we cant simply DD write the image, as the UEFI bios does not register it as a UEFI device.

Best guess: Clonezilla enables the UEFI bios to see the new UEFI device. I believe it generates a unique UEFI code on the system, which changes on each UEFI device. Although I could be wrong.

Either way, Rufus is required to create a UEFI capable boot device.

@sal666

This comment has been minimized.

Show comment
Hide comment
@sal666

sal666 May 24, 2018

Unfortunately, GRUB is not able to boot Apollo Lake devices.
isorespin's author Ian Morrison (AKA Linuxium), explains it well here.
In a nutshell, we need to replace GRUB with rEFInd, both in the installation pen drive and in the target device.

To prepare an installation pen drive with rEFInd follow these steps:

  1. Create DietPi's installation pen drive. Use 'Method 2' described above, steps 1&2.

  2. Install rEFInd to the pen drive (in a Linux machine and assuming it's mounted as /dev/sdb1):

sudo umount /dev/sdb*
wget "https://sourceforge.net/projects/refind/files/0.11.2/refind-bin-0.11.2.zip"
7z x refind-bin-0.11.2.zip
sudo refind-bin-0.11.2/refind-install --usedefault /dev/sdb1  # After execution /dev/sdb1 will remain mounted at /tmp/refind_install
mv refind-bin-0.11.2 /tmp/refind_install                      # move to the pen drive so we can install it later on the target device
  1. Configure rEFInd
    • Extract this zip to /tmp/refind_install/EFI/boot:
      extrafiles.zip
    • GRUB and its config files can also be removed from the pen drive.
    • Eject pen drive.

Then Install DietPi onto target device:

  • Boot device with pen drive (on one of my test devices sometimes rEFInd reads a ghost keypress and runs the first boot option. In that case quickly press Ctrl+Alt+Del to reboot and try again).
  • Install DietPi.
    dietpi-apollo
  • Once completed, the system will power off.

To install rEFInd onto target device:

  • Boot again with pen drive and select "Boot Clonezilla live".
  • At the first menu, select "Enter_shell" and execute these commands:
  sudo su
  PART1=mmcblk0p1   # DietPi's first partition (usually mmcblk0p1, mmcblk1p1 or sda1)
  /lib/live/mount/medium/refind-bin-0.11.2/refind-install --usedefault /dev/$PART1
  rm -rf /tmp/refind_install/EFI/arch_grub    # not needed (maybe DietPi team can verify), and rEFInd would show it as a second boot option
  umount /tmp/refind_install
  poweroff
  • Extract pen drive and boot DietPi.
  • If your device is not booting into rEFInd then boot to EFI settings and reset to default settings. That will reset EFI's NVRAM entries, as explained here.
  • Log in as root and run these commands to get rid of GRUB:
  # Block grub and lilo packages, as they can interfere with rEFInd
  printf "Package: grub*:* lilo*:*\nPin: release *\nPin-Priority: -1\n" > /etc/apt/preferences
  apt purge grub*   # uninstall grub
  apt autoremove   # uninstall grub dependencies. 'efibootmgr' will be uninstalled. It's not needed, but we can install it again if we want to.

Hope it helps you all ;)

UPDATE:
I've just realized that Clonezilla is able to ask the user to select the target device when restoring an image. This way we don't need one boot option for every possible target disk (mmcblk0, mmcblk1, sda,...). I've updated the rEFInd's config file in extrafiles.zip accordingly.
Same thing can be done in the original -GRUB based- UEFI installer. In grub.cfg, the reserved word 'ask_user' can be used instead of the device name: grub.zip

sal666 commented May 24, 2018

Unfortunately, GRUB is not able to boot Apollo Lake devices.
isorespin's author Ian Morrison (AKA Linuxium), explains it well here.
In a nutshell, we need to replace GRUB with rEFInd, both in the installation pen drive and in the target device.

To prepare an installation pen drive with rEFInd follow these steps:

  1. Create DietPi's installation pen drive. Use 'Method 2' described above, steps 1&2.

  2. Install rEFInd to the pen drive (in a Linux machine and assuming it's mounted as /dev/sdb1):

sudo umount /dev/sdb*
wget "https://sourceforge.net/projects/refind/files/0.11.2/refind-bin-0.11.2.zip"
7z x refind-bin-0.11.2.zip
sudo refind-bin-0.11.2/refind-install --usedefault /dev/sdb1  # After execution /dev/sdb1 will remain mounted at /tmp/refind_install
mv refind-bin-0.11.2 /tmp/refind_install                      # move to the pen drive so we can install it later on the target device
  1. Configure rEFInd
    • Extract this zip to /tmp/refind_install/EFI/boot:
      extrafiles.zip
    • GRUB and its config files can also be removed from the pen drive.
    • Eject pen drive.

Then Install DietPi onto target device:

  • Boot device with pen drive (on one of my test devices sometimes rEFInd reads a ghost keypress and runs the first boot option. In that case quickly press Ctrl+Alt+Del to reboot and try again).
  • Install DietPi.
    dietpi-apollo
  • Once completed, the system will power off.

To install rEFInd onto target device:

  • Boot again with pen drive and select "Boot Clonezilla live".
  • At the first menu, select "Enter_shell" and execute these commands:
  sudo su
  PART1=mmcblk0p1   # DietPi's first partition (usually mmcblk0p1, mmcblk1p1 or sda1)
  /lib/live/mount/medium/refind-bin-0.11.2/refind-install --usedefault /dev/$PART1
  rm -rf /tmp/refind_install/EFI/arch_grub    # not needed (maybe DietPi team can verify), and rEFInd would show it as a second boot option
  umount /tmp/refind_install
  poweroff
  • Extract pen drive and boot DietPi.
  • If your device is not booting into rEFInd then boot to EFI settings and reset to default settings. That will reset EFI's NVRAM entries, as explained here.
  • Log in as root and run these commands to get rid of GRUB:
  # Block grub and lilo packages, as they can interfere with rEFInd
  printf "Package: grub*:* lilo*:*\nPin: release *\nPin-Priority: -1\n" > /etc/apt/preferences
  apt purge grub*   # uninstall grub
  apt autoremove   # uninstall grub dependencies. 'efibootmgr' will be uninstalled. It's not needed, but we can install it again if we want to.

Hope it helps you all ;)

UPDATE:
I've just realized that Clonezilla is able to ask the user to select the target device when restoring an image. This way we don't need one boot option for every possible target disk (mmcblk0, mmcblk1, sda,...). I've updated the rEFInd's config file in extrafiles.zip accordingly.
Same thing can be done in the original -GRUB based- UEFI installer. In grub.cfg, the reserved word 'ask_user' can be used instead of the device name: grub.zip

@tomillr

This comment has been minimized.

Show comment
Hide comment
@tomillr

tomillr Jun 3, 2018

sal666, thanks for the nice instruction.

I've tried to follow your procedure using an Ubuntu 18.04 live version but have run in to a couple of issues:

7zip is apparently not part of the regular Ubuntu distro and I wasn't able to apt-get it either. That's why I had to manually extract the refind-bin-0.11.2.zip.

I've also copied your files from the extrafiles.zip manually to /dev/sdb1/EFI/boot.

I was able to successfully boot rEFInd from the usb stick and start the the DietPi installer. Unfortunately, the installer halted with with a couple of error messages.

20180603_133735

Any idea what might have gone wrong here?

EDIT: Also, how to do properly get rid of GRUB. Do you just have to delete grub.cfg in /EFI/boot and /boot/grub? Or are there additional files that need to go?

tomillr commented Jun 3, 2018

sal666, thanks for the nice instruction.

I've tried to follow your procedure using an Ubuntu 18.04 live version but have run in to a couple of issues:

7zip is apparently not part of the regular Ubuntu distro and I wasn't able to apt-get it either. That's why I had to manually extract the refind-bin-0.11.2.zip.

I've also copied your files from the extrafiles.zip manually to /dev/sdb1/EFI/boot.

I was able to successfully boot rEFInd from the usb stick and start the the DietPi installer. Unfortunately, the installer halted with with a couple of error messages.

20180603_133735

Any idea what might have gone wrong here?

EDIT: Also, how to do properly get rid of GRUB. Do you just have to delete grub.cfg in /EFI/boot and /boot/grub? Or are there additional files that need to go?

@MichaIng

This comment has been minimized.

Show comment
Hide comment
@MichaIng

MichaIng Jun 3, 2018

Collaborator

@tomillr
Hmm apt install 7zip-full does not work?? On 17.10 at least it worked.
Otherwise since it's zip, unzip refind-bin-0.11.2.zip should do the same.

The screen does not show direct DietPi-PREP error messages. At what install stage this showed up exactly? €: Ah I guess this is before DietPi-PREP even started. Seems the it could not be identified successfully as bootable live system. But sorry this is absolutely not my profession 😉.

Collaborator

MichaIng commented Jun 3, 2018

@tomillr
Hmm apt install 7zip-full does not work?? On 17.10 at least it worked.
Otherwise since it's zip, unzip refind-bin-0.11.2.zip should do the same.

The screen does not show direct DietPi-PREP error messages. At what install stage this showed up exactly? €: Ah I guess this is before DietPi-PREP even started. Seems the it could not be identified successfully as bootable live system. But sorry this is absolutely not my profession 😉.

@tomillr

This comment has been minimized.

Show comment
Hide comment
@tomillr

tomillr Jun 3, 2018

The screen does not show direct DietPi-PREP error messages. At what install stage this showed up exactly?

After selecting the "Install DietPi" entry from the rEFInd boot menu the screen goes black and starts vmlinuz with a long list of loading parameters. Right after that the screen refreshes and lists the error message seen on the attached photo above.

Here's what the used usb stick looks like at the moment:

root
efi_boot

tomillr commented Jun 3, 2018

The screen does not show direct DietPi-PREP error messages. At what install stage this showed up exactly?

After selecting the "Install DietPi" entry from the rEFInd boot menu the screen goes black and starts vmlinuz with a long list of loading parameters. Right after that the screen refreshes and lists the error message seen on the attached photo above.

Here's what the used usb stick looks like at the moment:

root
efi_boot

@sal666

This comment has been minimized.

Show comment
Hide comment
@sal666

sal666 Jun 4, 2018

Current DietPi installer is based on Clonezilla Live, which is based on Debian.
I've prepared a new installer based on Clonezilla Live alternative, which is based on Ubuntu.
Can you test it?
Just delete all content from your pen drive (it must still be formated with GPT+FAT) and then extract there this zip. rEFInd is already installed so you can proceed directly to DietPi installation. Then install rEFInd to the target device as explained above.

sal666 commented Jun 4, 2018

Current DietPi installer is based on Clonezilla Live, which is based on Debian.
I've prepared a new installer based on Clonezilla Live alternative, which is based on Ubuntu.
Can you test it?
Just delete all content from your pen drive (it must still be formated with GPT+FAT) and then extract there this zip. rEFInd is already installed so you can proceed directly to DietPi installation. Then install rEFInd to the target device as explained above.

@sal666

This comment has been minimized.

Show comment
Hide comment
@sal666

sal666 Jun 4, 2018

On the other hand, mce errors are caused by faulty hardware, so not sure if this will help.
http://www.advancedclustering.com/act_kb/what-are-machine-check-exceptions-or-mce/
http://mcelog.org/manpage.html

sal666 commented Jun 4, 2018

On the other hand, mce errors are caused by faulty hardware, so not sure if this will help.
http://www.advancedclustering.com/act_kb/what-are-machine-check-exceptions-or-mce/
http://mcelog.org/manpage.html

@tomillr

This comment has been minimized.

Show comment
Hide comment
@tomillr

tomillr Jun 4, 2018

That version won't start either. But I'm getting a new error message alongside the one pictured above which says that the EFI table couldn't be read.

Going to try again and make a new screenshot tomorrow.

Regarding the possible faulty hardware: I've been able to run Windows 10 and Ubuntu on the device without any errors pointing to a hardware defect.

tomillr commented Jun 4, 2018

That version won't start either. But I'm getting a new error message alongside the one pictured above which says that the EFI table couldn't be read.

Going to try again and make a new screenshot tomorrow.

Regarding the possible faulty hardware: I've been able to run Windows 10 and Ubuntu on the device without any errors pointing to a hardware defect.

@DarrenRainey

This comment has been minimized.

Show comment
Hide comment
@DarrenRainey

DarrenRainey Jun 9, 2018

Any chance of getting a 32bit version for older devices.

DarrenRainey commented Jun 9, 2018

Any chance of getting a 32bit version for older devices.

@sal666

This comment has been minimized.

Show comment
Hide comment
@sal666

sal666 Jun 11, 2018

@tomillr What device are you using? Please, post make and model. Are you sure it's capable of booting 64bit OS's?

sal666 commented Jun 11, 2018

@tomillr What device are you using? Please, post make and model. Are you sure it's capable of booting 64bit OS's?

@leviticus1

This comment has been minimized.

Show comment
Hide comment
@leviticus1

leviticus1 Jul 20, 2018

i ve flashed dietpi img/iso im a noob and there is no gui no cusror nothing, etcher confirns success but nothing can anyone help me get this sorted thanks any advice will do i know how to use the terminal ect

leviticus1 commented Jul 20, 2018

i ve flashed dietpi img/iso im a noob and there is no gui no cusror nothing, etcher confirns success but nothing can anyone help me get this sorted thanks any advice will do i know how to use the terminal ect

@leviticus1

This comment has been minimized.

Show comment
Hide comment
@leviticus1

leviticus1 Jul 20, 2018

a fat arse pi needs compiling

leviticus1 commented Jul 20, 2018

a fat arse pi needs compiling

@tomillr

This comment has been minimized.

Show comment
Hide comment
@tomillr

tomillr Aug 5, 2018

@tomillr What device are you using? Please, post make and model. Are you sure it's capable of booting 64bit

I'm using a Beelink AP34 which comes pre-installed with a x64 version of Windows 10.

I'd really love to turn this nice machine into a NAS/Plex Media Server with Diet Pi because during idle on the Windows 10 desktop it draws below 3W. That's perfect for a 24/7 home user like me.

tomillr commented Aug 5, 2018

@tomillr What device are you using? Please, post make and model. Are you sure it's capable of booting 64bit

I'm using a Beelink AP34 which comes pre-installed with a x64 version of Windows 10.

I'd really love to turn this nice machine into a NAS/Plex Media Server with Diet Pi because during idle on the Windows 10 desktop it draws below 3W. That's perfect for a 24/7 home user like me.

@Kung-Foo-Kamel

This comment has been minimized.

Show comment
Hide comment
@Kung-Foo-Kamel

Kung-Foo-Kamel Sep 23, 2018

In case anyone needs the info, this works perfectly on a Beelink BT3 with 64bit UEFI Bios, Specs:

CPU: Atom z8300
Ram: 2GB DDR3
eMMC: 32GB

Network performance: Windows 10 = 49Mbs - Dietpi = 117Mbs

Kung-Foo-Kamel commented Sep 23, 2018

In case anyone needs the info, this works perfectly on a Beelink BT3 with 64bit UEFI Bios, Specs:

CPU: Atom z8300
Ram: 2GB DDR3
eMMC: 32GB

Network performance: Windows 10 = 49Mbs - Dietpi = 117Mbs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment