[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: regenerating /boot/efi/debian/

     I took a quick look at the super_grub2_disk_hybrid_2.02s5.iso and super_grub2_disk_x86_64_efi_2.02s5.iso burned on a USB key with Etcher on OS X. In neither case is the resulting usb key seen in the option-key boot selector on boot. This is most certainly due to the absence of three essential things.

1) an HFS partion for /boot/efi
2) a fake mach_kernel and a real /boot/efi/System/Library/CoreServices/SystemVersion.plist
3) a /boot/efi/System/Library/CoreServices/boot.efi file which has been 'blessed' with the hfs-bless linux utility for HFS volumes

If you look in /System/Library/CoreServices on any Mac's boot volume, you will find those three files (mach_kernel, SystemVersion.plist and boot.efi) which are how the EFI boot selector on a Mac decides if a device has a bootable system partition or not.
ps I'll tinker late today with trying to recruit your iso image to produce these required files.

Note that when I insert the usb key into a booted Ubuntu x86_64 volume, the automounter fails work the error...

Unable to mount ISOIMAGE
Error mounting /dev/sdb1 at /media/howarth/ISOIMAGE: Command line `mount -t "iso9660" -o "uhelper=udisk2,nodev,nosuid,gid=1000,icharset=utf8,mode=04000,dmode=0500"
"/dev/sdb1" "/media/howarth/ISOIMAGE" exited with non-zero exit status 32:mount:
wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error

In some cases useful info can be found in syslog - try dmseg|tail or so.

That shows

[  309.428891] GPT:22283 != 3788799
[  309.428892] GPT: Use GNU Parted to correct GPT errors.
[  309.428927]  sdb: sdb1 sdb2 sdb3
[  309.441202] sd 6:0:0:0: [sdb] Attached SCSI removable disk
[  309.674305] hfsplus: invalid secondary volume header
[  309.674307] hfsplus: unable to find HFS+ superblock
[  309.684681] isofs_fill_super: bread failed, dev=sdb1, iso_blknum=35, block=70
[  648.763225] perf: interrupt took too long (2584 > 2500), lowering kernel.perf_event_max_sample_rate to 77250
[  668.970945] perf: interrupt took too long (3242 > 3230), lowering kernel.perf_event_max_sample_rate to 61500
[  705.008510] perf: interrupt took too long (4068 > 4052), lowering kernel.perf_event_max_sample_rate to 49000


On Thu, Dec 15, 2016 at 6:26 AM, adrian15 <adrian15sgd@gmail.com> wrote:
I CC my answer to debian-efi because I'm also interested on knowing how portable are the Debian installation disk EFI files and Debian installed on a hard disk EFI files. In such a way that portable means just replacing them in other Live CDS, i.e. Ubuntu installation disks.

1) You should use DD to put Super Grub2 Disk into your USB (Warns deletes all the content of the device).

It works as a live cd . Stop asking me how to install it. You can ask me how to put it into a USB though. It does not make sense to install it in a normal hard disk because it's a boot-only system for emergency situations.

You should download an old version which has i386-efi on its filename (as I more or less introduced in my first email)

I'm not sure just replacing EFI file in a USB device with Ubuntu installation in a filesystem which you can edit would actually work.

I'm not sure if an ISO or USB image in order to load EFI files it saves somewhere the number of blocks to load it. Maybe EFI system is smart enough to read from the filesystem.

Anyways it might be that the EFI file has something hardcoded inside of it that makes it to work inside an installed system which it's not going to work for a installation system.

If it works you should be able to use the EFI files from the /boot/efi/EFI/debian directory to do the swap. (Replace Ubuntu file contents per one of those file contents)

You can do 2)b) with Super Grub2 Disk files instead of Debian ones which might work or not. I'm not sure. Once you put SG2D into a USB it should let mount it and search the files inside it. Or you can put it into a ISO or... mount loop the ISO and find the files there.


El 15/12/16 a las 02:02, Jack Howarth escribió:
     I'll definitely give SuperGrub a go this weekend on a spare USB
hard drive I have laying around. However, it will take me a few days to
work through the documentation to see how I should use it. In
particular, I was considering trying another installation of Ubuntu
16.10 x86_64 Linux from my MacPro 3,1 and then see if replacing the
stock grub2 with SupreGrub will allow the USB drive to boot on the
EFI-32 firmware of my MacBook Pro 2,1. Do I need to install SuperGrub
with any special options invoked or will it automatically preconfigure
for booting from either EFI-32 or EFI-64 firmware?

On Wed, Dec 14, 2016 at 6:22 PM, adrian15 <adrian15sgd@gmail.com
<mailto:adrian15sgd@gmail.com>> wrote:

    El 13/12/16 a las 09:50, Jack Howarth escribió:

               During my struggles to get a bootable linux installed on a
        MacBook Pro 2,1 which has EFI-32 firmware, I discover that the
        debian-8.6.0-amd64-i386-netinst.iso multi-arch installer was the
        Linux distribution capable of achieving this. However I wanted
        to use
        the Unity Deskttop on Ubuntu 16.10 so I switched the
        /etc/apt/sources.list over to their copy to reinstall that distro.
        This, however left me with, the following critical piece for the
        Debian Jessie installation.


        Am I correct to assume that the command to regenerate these under
        Ubuntu 16.10 amd64 would actually be...

        sudo grub-install --target i386-efi --boot-directory=/boot
        --efi-directory=/boot/efi --bootloader-id="${lsb_release -ds)"

        and for the amd64 kernel to still run should I just have
        grub-efi-ia32-bin installed or does grub-efi-ia32 also have be
        installed as well?

    In your situation I would install:


    accept that it's going to remove (probably) grub-efi-amd64 and
    grub-efi-am64-bin .

    And then install the new grub with just:

    sudo grub-install # Grub should autodetect EFI and install there.

    If your system has the EFI partition mounted in /boot/efi you should
    be fine.

    I'm still interested in your feedback trying Super Grub2 Disk which
    I have discussed with you in a private email.

    If you do enough tests who knows if you might finish convincing me
    on building a refactored Ubuntu installation disk which boots from
    EFI-32 thanks to Super Grub2 Disk (or Grub2 technically speaking,
    but it's easier for me if I put everything in there).


    Support free software. Donate to Super Grub Disk. Apoya el software
    libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/

Support free software. Donate to Super Grub Disk. Apoya el software libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/

Reply to: