Boot EFI stopped working in a removable external HDD on Mac mini

It seems that it broke the grub, in reference to https://classicarchived.forum.manjaro.org/index.php?topic=29151.0:

The sudo blkid:

/dev/sdc1: UUID="8AA6-986B" TYPE="vfat" PARTUUID="2f0c8eb3-8ad5-4ef0-86e3-798143b8dd4e"
/dev/sdc2: UUID="1a9ae34a-453b-40ba-843a-201a7911cc49" TYPE="swap" PARTUUID="4abe231a-ebfa-4cdc-82dc-3f94167e99e2"
/dev/sdc3: UUID="d3b51cb0-3d23-4827-8074-930b75264081" TYPE="ext4" PARTUUID="3f4a6849-f78f-46ad-9958-e519808e2e9b"

Short list:

sudo cat /boot/grub/grub.cfg | grep -i resume
        linux   /boot/vmlinuz-4.19-x86_64 root=UUID=d3b51cb0-3d23-4827-8074-930b75264081 rw  quiet resume=UUID=1a9ae34a-453b-40ba-843a-201a7911cc49
                linux   /boot/vmlinuz-4.19-x86_64 root=UUID=d3b51cb0-3d23-4827-8074-930b75264081 rw  quiet resume=UUID=1a9ae34a-453b-40ba-843a-201a7911cc49
                linux   /boot/vmlinuz-4.19-x86_64 root=UUID=d3b51cb0-3d23-4827-8074-930b75264081 rw  quiet resume=UUID=1a9ae34a-453b-40ba-843a-201a7911cc49

Or full:


### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

set menu_color_normal=light-gray/black
set menu_color_highlight=green/black

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd1,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275/          (null)/sas/disk@0,gpt3' --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  d3b51cb0-3d23-4827-8074-930b75264081
else
  search --no-floppy --fs-uuid --set=root d3b51cb0-3d23-4827-8074-930b75264081
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_GB
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_gpt
insmod ext2
set root='hd1,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275/          (null)/sas/disk@0,gpt3' --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  d3b51cb0-3d23-4827-8074-930b75264081
else
  search --no-floppy --fs-uuid --set=root d3b51cb0-3d23-4827-8074-930b75264081
fi
insmod png
background_image -m stretch /usr/share/grub/background.png
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Manjaro Linux' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-d3b51cb0-3d23-4827-8074-930b75264081' {
	savedefault
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd1,gpt3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275/          (null)/sas/disk@0,gpt3' --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  d3b51cb0-3d23-4827-8074-930b75264081
	else
	  search --no-floppy --fs-uuid --set=root d3b51cb0-3d23-4827-8074-930b75264081
	fi
	echo	'Loading Linux 4.19rc6.1004.gbefad94-1-MANJARO x64 ...'
	linux	/boot/vmlinuz-4.19-x86_64 root=UUID=d3b51cb0-3d23-4827-8074-930b75264081 rw  quiet resume=UUID=1a9ae34a-453b-40ba-843a-201a7911cc49
	echo	'Loading initial ramdisk ...'
	initrd	/boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-4.19-x86_64.img
}
submenu 'Advanced options for Manjaro Linux' $menuentry_id_option 'gnulinux-advanced-d3b51cb0-3d23-4827-8074-930b75264081' {
	menuentry 'Manjaro Linux (Kernel: 4.19rc6.1004.gbefad94-1-MANJARO x64)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19rc6.1004.gbefad94-1-MANJARO x64-advanced-d3b51cb0-3d23-4827-8074-930b75264081' {
	savedefault
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275/          (null)/sas/disk@0,gpt3' --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  d3b51cb0-3d23-4827-8074-930b75264081
		else
		  search --no-floppy --fs-uuid --set=root d3b51cb0-3d23-4827-8074-930b75264081
		fi
		echo	'Loading Linux 4.19rc6.1004.gbefad94-1-MANJARO x64 ...'
		linux	/boot/vmlinuz-4.19-x86_64 root=UUID=d3b51cb0-3d23-4827-8074-930b75264081 rw  quiet resume=UUID=1a9ae34a-453b-40ba-843a-201a7911cc49
		echo	'Loading initial ramdisk ...'
		initrd	/boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-4.19-x86_64.img
	}
	menuentry 'Manjaro Linux (Kernel: 4.19rc6.1004.gbefad94-1-MANJARO x64 - fallback initramfs)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19rc6.1004.gbefad94-1-MANJARO x64-fallback-d3b51cb0-3d23-4827-8074-930b75264081' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275/          (null)/sas/disk@0,gpt3' --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  d3b51cb0-3d23-4827-8074-930b75264081
		else
		  search --no-floppy --fs-uuid --set=root d3b51cb0-3d23-4827-8074-930b75264081
		fi
		echo	'Loading Linux 4.19rc6.1004.gbefad94-1-MANJARO x64 ...'
		linux	/boot/vmlinuz-4.19-x86_64 root=UUID=d3b51cb0-3d23-4827-8074-930b75264081 rw  quiet resume=UUID=1a9ae34a-453b-40ba-843a-201a7911cc49
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initramfs-4.19-x86_64-fallback.img
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/60_memtest86+ ###
if [ "${grub_platform}" == "pc" ]; then
    menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
        search --fs-uuid --no-floppy --set=root --hint-ieee1275='ieee1275/          (null)/sas/disk@0,gpt3' --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  d3b51cb0-3d23-4827-8074-930b75264081
        linux16 /boot/memtest86+/memtest.bin 
    }
fi
### END /etc/grub.d/60_memtest86+ ###

There are two issues related to it at Manjaro, maybe @SpiritOfTux and @Chrysostomus know.

I tried to follow the instruction from the topics UUID not found after todays update and Error: Manjaro error hibernation device not found on boot, but unsuccessful.

Unfortunately I learned the commands that I have learned from UUID not found after todays update and I ruined my boot and my grub. I copied the boot and etc folder that I backed up. It stopped working. I have to reinstall.

Ah, it is my 8th time that I have to format Linux.

What should I do when I intend to update or upgrade for not ruining the bootloader? Is the command sudo pacman -Syyu dangerous?

No, but the following are:

  • not updating
  • partial updates
  • interrupted updates

I don't think you need to reinstall manjaro, just reinstall grub.

If you are afraid of updates, you could use btrfs+timeshift so you can easily return to previous functioning state when something goes wrong.

Ah, yes, @Chrysostomus, good news, as you have said, I do not need to reinstall because...

I have discovered what caused to ruin the boot and grub. It was Krusader which did not complete the copy of backed-up folders boot and etc and left everything empty files. Krusader did not tell when the copy is complete. Instead of Krusader, I used Deepin File Manager as sudo and copied the backed-up and the folders returned to the normal. I rebooted and it worked, but I am still in the rootfs (same no UUIDs found, hibernation error, blabla) as upward.

We can now creturn to the issues of no UUIDs and of hibernation error.

I will avoid Krusader.

Let's have your "sudo parted -l" one more time. All disks, all output.

If it is from a mac-mini, say so.
If it is from another system, say so.
Whatever, all disks. All output from each.

Do mot mix gpt with msdos
Do not mix uefi and bios-legacy.
If you take the external disk and put it into another with another mode (msdos or uefi or...) you are also asking for trouble.

You have too many messed up things besides above.

Swap
if your swap defined by your fstab of your external is in an internal disk
How is it going to work if you put into another system without that internal disk anymore?
Remove all swap in your fstab first. Remove 'resume' in mkinitcpio.conf and 'mkinitcpio -P' and resume=UUID in /etc/default/grub and 'update-grub'
After that, we'll handle swap. Make everything work fine first without your swap getting in the way.
And no other fstab entry that refer to any internal disk partition.
If your swap is that of that external disk, then it is okay.

If you mix mados and gpt, you will need to reinstall
If you mix uefi and bios-legacy, you will need to reinstall.
If this external disk is set up in (properly) in a system of say gpt/uefi,
Do not put it in another system of msdos/bios-legacy
And never ever update it in that separate system. which is different from the set up system.

You are just doing too many things and you are confusing everyone with output from another system. Whenever you output, say it is from mac-mini or from another system,.

Without solving one thing, do not try to bring up another problem.
So fix in from say mac-mini and then we'll fix another system later. Okay?

Reminder....
First. No fstab entries of any internal disk partition.
Then Remove swap. mkinitcpio and grub. (IF swap is that of internal disk)
Then only this system. No other system.
sudo parted -l
findmnt
efibootmgr

1 Like

OK, as you have suggested, do you mean better I boot from Live Media on Mac mini? Installed originally from my Mac mini since last week. I use my external HD only mostly on Mac mini and almost never on my laptop.

Can you boot up your Manjaro (in the external disk) at all from the mac-mini?
And I don't mean livecd.

Boot up this way.

Do you know whether it is install as uefi or as bios-legacy?
Boot up the same way.

And I need from the booted up OS (not livecd)


efibootmgr -v
sudo parted -l
sudo blkid
findmnt -s
findmnt /boot/efi

All disks all output do not omit anything.
If erro message print.
If no message, sa so.
Need all output,.
do not stop at any command. continue.
Everything.

grub > echo $grub_platform
efi

I boot up in uefi.

If I run configfile /boot/grub/grub.cfg, I will be booted into rootfs like up.

Like what? up? What's up?
Ok, most likely you cannot boot up.
Then still at grub prompt

grub> search.file /etc/manjaro-release  root
grub> probe -u $root --set=abc
grub> ls ($root)/boot/

What is kernel and intramfs? 4.14?
Then use 4.14, otherwise change below to what you have.. (like 4.19 or 4.18 or...)
continue..

grub> linux /boot/vmlinuz-4.14-x86_64 root=UUID=$abc rw
grub> initrd /boot/initramfs-4.14-x86_64.img
grub> boot


Boot to OS and print out terminal output.

[edit] - you don't even have a working grub.cfg.

1 Like
grub> ls ($root)/boot/
efi/ memtest86+/ grub/ intel-ucode.img amd-ucode.img initramfs-4.19-x86_64.img vmlinuz-4.19-x86-64.img initramfs-4.19-x86_64-fallback.img linux419-x86_64.kver

It is 4.19. OK, let me run these commands...

Unfortunately I am still in the rootfs, but the errors are different:

ERROR: resume: no device specified for hibernation
Waiting 10 seconds for device /dev/disk/by-uuid/d3b51cb0-3d23-4827-8074-930b75264081...
ERROR: device 'UUID=d3b51cb0-3d23-4827-8074-930b75264081' not found. SKipping fsck. 
:: mounting 'UUID=d3b51cb0-3d23-4827-8074-930b75264081' on real root
mount: /new_root: can’t find UUID=d3b51cb0-3d23-4827-8074-930b75264081.

Try again from the begiining. You've done something wrong?
Start livecd, at grub menu press 'c'

grub> search.file /etc/manjaro-release

What do you get 2 output?
Then choose the one of the external disk.
(but why do you have 2 output? do you have 2 manjaro's? tell us. NOW!)

grub> set root=(hdx,y)

verify with first line below kernels are there.

grub> ls ($root)/boot/
grub> grub> probe -u $root --set=abc
grub> linux /boot/vmlinuz-4.19-x86_64 root=UUID=$abc rw
grub> initrd /boot/initramfs-4.19-x86_64.img
grub> boot

1 Like

No, I did not, I was too careful to type slowly and avoided the misspellings.

I started from Live Media and I ran this command:

grub> search.file /etc/manjaro-release
error: no such device

My external HD has only one Manjaro.

Yesterday I have made an update, using ```sudo pacman -Syyu`.

Then I will start again from the begiining to make sure I did not do something wrong

No. Stop.
It won't work.
You are patching something that will still fail.
As said right from the begfinning and I had repeated 3 times.

Reinstall. fstab uuid will keep changing.
I'll explain next post for you yourself to check again. Just for you to understand.

1 Like

This post will show what why your system won;'t work.
And please, do not put this in another system and show some output.
Always in the min mac ffrom now onwards.
If you want to put it in another system later on when you had reinstalled and working fine. Tell us it is in anohter system and we'll go from there. Meantime. Always in mac-mini.

Okay? Promxe? Nah.. that's too condescending. ringt.

######################################################
Boot up livecd in mac-mini with the external connected.

At livecd terminal, print out

efibootmgr -v
sudo parted -l
sudo blkid

Reminder: all disk, all commands, no omission. all output. blah blah blah.

Now, go to file manager of livecd and get into the partition of the external manjaro OS.
PRINT out
/etc/fstab

######################################################

Next action, reinstall. swap and all partitions in external disk only.

1 Like
  • efibootmgr -v
efibootmgr -v
BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0002,0080,0001,0000
Boot0000* ubuntu        HD(1,GPT,2b51e9de-db7c-473e-9238-db0d2691cb4c,0x28,0x64000)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* deepin        HD(1,GPT,2b51e9de-db7c-473e-9238-db0d2691cb4c,0x28,0x64000)/File(\EFI\deepin\shimx64.efi)
Boot0002* Manjaro       HD(1,GPT,2f0c8eb3-8ad5-4ef0-86e3-798143b8dd4e,0x800,0x96800)/File(\EFI\Manjaro\grubx64.efi)
Boot0080* Mac OS X      PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,0,0)/HD(2,GPT,822f779b-012e-4aa9-9596-75ebfedddec9,0x64028,0x3a1ec0c0)
Boot0081* Mac OS X      PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,0,0)/HD(2,GPT,822f779b-012e-4aa9-9596-75ebfedddec9,0x64028,0x3a1ec0c0)
Boot0082*       PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,0,0)/HD(2,GPT,0d3bd842-ba9a-442d-a33b-4f70567f7dcf,0x64028,0x3a1ec0c0)
BootFFFF*       PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,0,0)/HD(2,GPT,000072ce-62da-0000-532e-0000b35c0000,0x64028,0x3a1ec0c0)/File(\System\Library\CoreServices\boot.efi)
  • sudo parted -l
sudo parted -l
Model: ATA Hitachi HTS54755 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name                  Flags
 1      20.5kB  210MB  210MB  fat32        EFI System Partition  boot, esp
 2      210MB   499GB  499GB  hfs+
 3      499GB   500GB  650MB  hfs+


Model: SanDisk Cruzer Blade (scsi)
Disk /dev/sdb: 4005MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      32.8kB  2122MB  2122MB  primary               boot
 2      2122MB  2127MB  4194kB  primary               esp


Model:  Mass Storage Device (scsi)
Disk /dev/sdc: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  317MB   316MB   fat32                 msftdata
 2      317MB   8338MB  8022MB  linux-swap(v1)
 3      8338MB  500GB   492GB   ext4
  • sudo blkid
udo blkid
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/sda1: LABEL="EFI" UUID="67E3-17ED" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="2b51e9de-db7c-473e-9238-db0d2691cb4c"
/dev/sda2: UUID="0ad0d00c-4782-3d2c-a629-5acbd1792bc1" LABEL="High Sierra" TYPE="hfsplus" PARTUUID="822f779b-012e-4aa9-9596-75ebfedddec9"
/dev/sda3: UUID="01cb061d-937b-3aba-943c-0ba15f417b93" LABEL="Recovery HD" TYPE="hfsplus" PARTUUID="4cf1744f-ccc4-4df8-b7c0-71560b6792a4"
/dev/sdb1: UUID="2018-09-08-09-10-02-00" LABEL="MJR180BE" TYPE="iso9660"
/dev/sdb2: SEC_TYPE="msdos" LABEL="MISO_EFI" UUID="053D-0742" TYPE="vfat"
/dev/sdc1: UUID="8AA6-986B" TYPE="vfat" PARTUUID="2f0c8eb3-8ad5-4ef0-86e3-798143b8dd4e"
/dev/sdc2: UUID="1a9ae34a-453b-40ba-843a-201a7911cc49" TYPE="swap" PARTUUID="4abe231a-ebfa-4cdc-82dc-3f94167e99e2"
/dev/sdc3: UUID="d3b51cb0-3d23-4827-8074-930b75264081" TYPE="ext4" PARTUUID="3f4a6849-f78f-46ad-9958-e519808e2e9b"
  • /etc/fstab:
# <file system>                               <mount point>  <type>  <options>  <dump>  <pass>
UUID=8AA6-986B                                /boot/efi      vfat    defaults,noatime 0 2
UUID=1a9ae34a-453b-40ba-843a-201a7911cc49     swap           swap    defaults,noatime 0 2
UUID=d3b51cb0-3d23-4827-8074-930b75264081     /              ext4    defaults,noatime 0 1

Okay. Got it.

Still at livecd OS.
Now, lets, do a few things first.

  1. fsck root partition of external OS.
    Check again with 'sudo blkid' where partition is of uuid 'd3b51cb0-3d23-4827-8074-930b75264081'
  2. If it is still shown as /dev/sdc3, (otherwise change to correct one)
    sudo fsck /dev/sdc3
  3. sudo parted /dev/sdc set 1 boot on

ps: let us know if fsck has errors.

Then boot up installed OS (sdc3) again.
Restart computer with live media.
Do not boot up OS.
At install menu, go to grub prompt.


grub> insmod ext2
grub> search.file /etc/manjaro-release  
grub> search.file /etc/manjaro-release  root
grub> probe -u $root --set=abc
grub> linux /boot/vmlinuz-4.19-x86_64 root=UUID=$abc rw
grub> initrd /boot/initramfs-4.19-x86_64.img
grub> boot


When booted to external disk installed OS (/dev/sdc3)
At terminal...

sudo grub-install --removable
1 Like
/dev/sdc3: UUID="d3b51cb0-3d23-4827-8074-930b75264081" TYPE="ext4" PARTUUID="3f4a6849-f78f-46ad-9958-e519808e2e9b"

Is it still correct?


[quote="gusbemacbe, post:38, topic:59612"]
Is it still correct?
[/quote]

Yes, it is still sdc3. Continue.
I (will) added what to do when booted. in edit. Not new post

Do both external HD and USB drive (Live Media) need to be plugged at the same time?

Forum kindly sponsored by