2018-04-30

Slitaz -- bootx64.efi / grub-mkimage



bootx64.efi
grub-mkimage
Make a bootable image of GRUB.


 


root@slitaz:~# uname -a
Linux slitaz 4.16.0-slitaz #2 SMP Thu Apr 5 11:07:34 UTC 2018 x86_64 GNU/Linux
 
root@slitaz:~# grub-mkimage --help | egrep 'Make|DIR|output|FORMAT|x86_64'
Make a bootable image of GRUB.
  -d, --directory=DIR        use images and modules under DIR
  -o, --output=FILE          output a generated image to FILE [default=stdout]
  -O, --format=FORMAT        generate an image in FORMAT
                             i386-ieee1275, i386-qemu, x86_64-efi, i386-xen,
                             x86_64-xen, mipsel-yeeloong-flash,
  -p, --prefix=DIR           set prefix directory

root@slitaz:~# grub-mkimage -d /usr/lib/grub/x86_64-efi -o bootx64.efi -O x86_64-efi -p /boot/grub \
> ntfs hfs appleldr boot cat efi_gop efi_uga elf fat hfsplus \
> iso9660 linux keylayouts memdisk minicmd part_apple ext2 extcmd \
> xfs xnu part_bsd part_gpt search search_fs_file chain btrfs \
> loadbios loadenv lvm minix minix2 reiserfs memrw mmap msdospart \
> scsi loopback normal configfile gzio all_video efi_gop efi_uga \
> gfxterm gettext echo

root@slitaz:~# ls -l bootx64.efi
-rw-r--r-- 1 root root 905728 Apr 30 02:33 bootx64.efi

root@slitaz:~# file bootx64.efi
bootx64.efi: PE32+ executable (EFI application) x86-64 (stripped to external PDB), for MS Windows
root@slitaz:~#

----

grub2 - receipt

http://cook.slitaz.org/next64/grub2/receipt
    efi)
        export EFI_ARCH=i386
        ./configure \
            --with-platform=efi \
            --target=$EFI_ARCH \
            --program-prefix="" \
            $CONFIGURE_ARGS &&
        make clean &&
        make $MAKEFLAGS || return 1

        cd grub-core
        ../grub-mkimage \
            -d . \
            -o ../bootia32.efi \
            -O i386-efi \
            -p /boot/grub \
            ntfs hfs appleldr boot cat efi_gop efi_uga elf fat hfsplus \
            iso9660 linux keylayouts memdisk minicmd part_apple ext2 extcmd \
            xfs xnu part_bsd part_gpt search search_fs_file chain btrfs \
            loadbios loadenv lvm minix minix2 reiserfs memrw mmap msdospart \
            scsi loopback normal configfile gzio all_video efi_gop efi_uga \
            gfxterm gettext echo boot chain || return 1

            install -Dm644 $src/bootia32.efi $install/boot/efi/boot/bootia32.efi

Slitaz -- slitaz-next64-efi


slitaz-next64
Linux slitaz 4.16.0-slitaz







tux@slitaz:~$ uname -a
Linux slitaz 4.16.0-slitaz #2 SMP Thu Apr 5 11:07:34 UTC 2018 x86_64 GNU/Linux

tux@slitaz:~$ cat /proc/cmdline
BOOT_IMAGE=/boot/bzImage-4.16 root=/dev/null autologin

tux@slitaz:~$ check-uefi.sh
UEFI
 
tux@slitaz:~$ ls -l /sys/firmware/efi
total 0
-r--r--r--    1 root     root          4096 Apr 26 10:38 config_table
dr-xr-xr-x    2 root     root             0 Apr 26 10:38 efivars
drwxr-xr-x    3 root     root             0 Apr 26 10:38 esrt
-r--r--r--    1 root     root          4096 Apr 26 10:38 fw_platform_size
-r--r--r--    1 root     root          4096 Apr 26 10:38 fw_vendor
-r--r--r--    1 root     root          4096 Apr 26 10:38 runtime
-r--------    1 root     root          4096 Apr 26 10:38 systab
drwxr-xr-x   93 root     root             0 Apr 26 10:38 vars

tux@slitaz:~$ grep -i efi /var/log/dmesg.log
[ 0.000000] efi: EFI v2.31 by American Megatrends
[ 0.000000] efi: ESRT=0xd9f7d998 ACPI 2.0=0xd97c1000 ACPI=0xd97c1000 SMBIOS=0xf05b0 MPS=0xfd690
[ 0.000000] ACPI: UEFI 0x00000000D97DB868 000042 (v01 ALASKA A M I 01072009 00000000)
[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[ 0.039528] pci 0000:00:02.0: BAR 2: assigned to efifb
[ 0.050160] Registered efivars operations
[ 14.877870] efifb: probing for efifb
[ 14.877885] efifb: framebuffer at 0xe0000000, using 3072k, total 3072k
[ 14.877888] efifb: mode is 1024x768x32, linelength=4096, pages=1
[ 14.877890] efifb: scrolling: redraw
[ 14.877892] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[ 14.884753] fb0: EFI VGA frame buffer device
[ 15.904041] tsc: Refined TSC clocksource calibration: 3200.000 MHz
[ 16.535160] EFI Variables Facility v0.08 2004-May-17
[ 16.547340] pstore: Registered efi as persistent store backend
tux@slitaz:~$

----

slitaz-x86_64
slitaz-docker

Linux slitaz 3.16.36-slitaz64

tux@slitaz:~$ uname -a
Linux slitaz 3.16.36-slitaz64 #1 SMP Fri Oct 7 13:26:22 UTC 2016 x86_64 GNU/Linux

tux@slitaz:~$ cat /proc/cmdline
BOOT_IMAGE=(loop)/boot/bzImage64 iso_filename=/boot/slitaz-docker.iso root=/dev/null rw autologin noeject

tux@slitaz:~$ check-uefi.sh
UEFI
 
tux@slitaz:~$ ls -l /sys/firmware/efi
total 0
-r--r--r--    1 root     root          4096 Apr 26 13:05 config_table
dr-xr-xr-x    2 root     root             0 Apr 26 13:05 efivars
-r--r--r--    1 root     root          4096 Apr 26 13:05 fw_vendor
-r--r--r--    1 root     root          4096 Apr 26 13:05 runtime
drwxr-xr-x   11 root     root             0 Apr 26 13:05 runtime-map
-r--------    1 root     root          4096 Apr 26 13:05 systab
drwxr-xr-x   93 root     root             0 Apr 26 13:05 vars
tux@slitaz:~$
 

2018-04-29

Slitaz -- slitaz-next-efi


slitaz-next
slitaz-next-lxqt


Linux slitaz 4.9.30-slitaz

tux@slitaz:~$ uname -a
Linux slitaz 4.9.30-slitaz #2 SMP Fri Jun 16 13:58:14 Europe 2017 i686 GNU/Linux

tux@slitaz:~$ cat /proc/cmdline
BOOT_IMAGE=/boot/bzImage-4.9.30 rw root=/dev/null video=-32 autologin

tux@slitaz:~$ check-uefi.sh
UEFI

tux@slitaz:~$ ls -l /sys/firmware/efi
total 0
-r--r--r--    1 root     root          4096 Apr 26 14:08 config_table
dr-xr-xr-x    2 root     root             0 Apr 26 14:08 efivars
drwxr-xr-x    3 root     root             0 Apr 26 14:08 esrt
-r--r--r--    1 root     root          4096 Apr 26 14:08 fw_platform_size
-r--r--r--    1 root     root          4096 Apr 26 14:08 fw_vendor
-r--r--r--    1 root     root          4096 Apr 26 14:08 runtime
-r--------    1 root     root          4096 Apr 26 14:08 systab

tux@slitaz:~$ grep -i efi /var/log/dmesg.log
[ 0.000000] efi: EFI v2.31 by American Megatrends
[ 0.000000] efi: ESRT=0xd9f7d998 ACPI 2.0=0xd97c1000 ACPI=0xd97c1000 SMBIOS=0xf05b0 MPS=0xfd690
[ 0.000000] efi: No EFI runtime due to 32/64-bit mismatch with kernel
[ 0.000000] ACPI: UEFI 0x00000000D97DB868 000042 (v01 ALASKA A M I 01072009 00000000)
[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[ 0.000000] efi: Setup done, disabling due to 32/64-bit mismatch
[ 0.121609] Registered efivars operations
[ 0.123041] clocksource: Switched to clocksource refined-jiffies
[ 7.622075] efifb: probing for efifb
[ 7.622084] efifb: framebuffer at 0xe0000000, using 3072k, total 3072k
[ 7.622087] efifb: mode is 1024x768x32, linelength=4096, pages=1
[ 7.622089] efifb: scrolling: redraw
[ 7.622091] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[ 7.626392] fb0: EFI VGA frame buffer device
[ 8.671452] tsc: Refined TSC clocksource calibration: 3199.998 MHz
tux@slitaz:~$

Slitaz -- rolling-core-efi



slitaz-rolling-core
slitaz-rolling

Linux slitaz 3.16.55-slitaz

tux@slitaz:~$ uname -a
Linux slitaz 3.16.55-slitaz #4 SMP Tue Mar 27 13:38:39 CEST 2018 i686 GNU/Linux

tux@slitaz:~$ cat /proc/cmdline
BOOT_IMAGE=/boot/bzImage rw root=/dev/null video=-32 autologin

tux@slitaz:~$ check-uefi.sh
UEFI
 
tux@slitaz:~$ ls -l /sys/firmware/efi
total 0
-r--r--r--    1 root     root          4096 Apr 26 08:22 config_table
dr-xr-xr-x    2 root     root             0 Apr 26 08:22 efivars
-r--r--r--    1 root     root          4096 Apr 26 08:22 fw_vendor
-r--r--r--    1 root     root          4096 Apr 26 08:22 runtime
-r--------    1 root     root          4096 Apr 26 08:22 systab

tux@slitaz:~$ zcat /proc/config.gz | grep EFI
CONFIG_EFI_PARTITION=y
CONFIG_EFI=y
CONFIG_EFI_STUB=y
CONFIG_FB_EFI=y
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
# EFI (Extensible Firmware Interface) Support
CONFIG_EFI_VARS=m
CONFIG_EFI_RUNTIME_MAP=y
# CONFIG_CACHEFILES is not set
CONFIG_EFIVAR_FS=m
CONFIG_EARLY_PRINTK_EFI=y
tux@slitaz:~$

----

slitaz-rolling-core
Linux slitaz 3.2.98-slitaz


tux@slitaz:~$ uname -a
Linux slitaz 3.2.98-slitaz #4 SMP Tue Jan 16 15:44:20 CET 2018 i686 GNU/Linux

tux@slitaz:~$ cat /proc/cmdline
BOOT_IMAGE=(loop)/boot/bzImage isoloop=/boot/slitaz-rolling-core.iso root=/dev/null rw autologin noeject

tux@slitaz:~$ check-uefi.sh
BIOS

tux@slitaz:~$ ls -l /sys/firmware/efi
ls: /sys/firmware/efi: No such file or directory

tux@slitaz:~$ zcat /proc/config.gz | grep EFI
CONFIG_EFI=y
# CONFIG_FB_EFI is not set
CONFIG_EFI_VARS=m
CONFIG_EFI_PARTITION=y

tux@slitaz:~$ lsmod | grep efi
tux@slitaz:~$

2018-04-27

Slitaz -- check-uefi.sh


check-uefi.sh 
 

slitaz-rolling-core64

tux@slitaz:~$ uname -a
Linux slitaz 3.16.55-slitaz64 #2 SMP Tue Mar 27 13:04:08 CEST 2018 x86_64 GNU/Linux

tux@slitaz:~$ cat /proc/cmdline
BOOT_IMAGE=/boot/bzImage64 root=/dev/null video=-32 autologin

tux@slitaz:~$ check-uefi.sh
UEFI

tux@slitaz:~$ cat /usr/bin/check-uefi.sh
#!/bin/sh
[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS

tux@slitaz:~$ ls -l /sys/firmware/efi
total 0
-r--r--r--    1 root     root          4096 Apr 26 01:57 config_table
dr-xr-xr-x    2 root     root             0 Apr 26 01:57 efivars
-r--r--r--    1 root     root          4096 Apr 26 01:57 fw_vendor
-r--r--r--    1 root     root          4096 Apr 26 01:57 runtime
drwxr-xr-x   11 root     root             0 Apr 26 01:57 runtime-map
-r--------    1 root     root          4096 Apr 26 01:57 systab 
 

Slitaz -- UEFI



HOWTO create a SliTaz LiveUSB for 64bit UEFI computers
http://doc.slitaz.org/en:guides:uefi
3. Installing an UEFI boot loader
You have now to install a boot loader compatible with UEFI; unfortunately, the grub2-efi package in the SliTaz repository is only for 32bit computers.
A simple way consists of using the boot loader from another 64bit distro :-/. I used Ubuntu but it should exist within some other smaller ISOs.
compiled grub2( bootx64.efi) instead of another 64bit distro
It works for me.

# file bootx64.efi
bootx64.efi: PE32+ executable (EFI application) x86-64 (stripped to external PDB), for MS Windows
 
# unzip -l bootx64.efi.zip
Archive:  bootx64.efi.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
       46  04-28-2018 02:55   bootx64.efi.md5
   905728  04-25-2018 16:36   bootx64.efi
 --------                     -------
   905774                     2 files 
 
grub2-efi-2.02-x86_64.tazpkg
https://goo.gl/rG324b

grub-2.02-x86_64.tazpkg
https://goo.gl/G1D6eW

Attachments

bootx64.efi.zip (289.8 KB)
 

2018-04-19

virtualbox guest drivers


Guest drivers

https://www.virtualbox.org/wiki/LinuxAdditionsDebug

The vboxvideo graphics driver drives the guest video hardware emulation. It does not depend on other drivers, programs the emulated hardware directly and is not expected to be running on systems with X.Org servers older than and including 1.16, as they are not compatible with it and use special drivers, or on systems with Linux kernels older than version 3.11.