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

Yes, because my laptop has Manjaro, what is ideal to repair my external HD. On my Mac mini, I have to use US drive with Manjaro ISO. But on my laptop, it works after and mounting /dev/sdc1 to /boot/efi and running sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck --removable.

In spite of it, I rebooted the external HDD in both laptop and Mac Mini, and the grub failed, saying it did not find the HDD whose UUID is 642981a5-725a-49bb-8e3a-5f2b48a7a7d7 and also said it is an unkwnon filesystem.

$ cat /run/media/gusbemacbe/4d7c5e3e-66b1-4be8-b3bc-919137c788ff/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>
UUID=8cc42c67-e60e-4375-90cf-f2d9e218961f swap           swap    defaults,noatime 0 2
UUID=4d7c5e3e-66b1-4be8-b3bc-919137c788ff /              ext4    defaults,noatime 0 1

It seems the boot and the UUID 642981a5-725a-49bb-8e3a-5f2b48a7a7d7 are not listed in this fstab.

To avoid misunderstanding, the installation needs to be UEFI, not the disk. The disk should be GPT.
Even if the disk is GPT, the installation may be MSDOS. As the error says, it looks for msdos something. AFAIK it shouldn't in a UEFI installation.

Sorry for my confusion! My HDD used to be GPT before the reinstallation. But checking by sudo parted -l, it is still GPT. Maybe MSDOS must have been broken.

Still misunderstanding.
For UEFI install, disk needs to be gpt, not msdos, so it's fine. You have to confirm your installed Manjaro for 2nd time was again UEFI.

Good!

Now, as said, I'm going to ignore Mac Mini first. Let's get one problem sorted, (I also think the mac mini will sort itself, barring graphic compatibilities, but never mind, we'll ignore mac mini, at least for my sake, thanks).

Now do this (remember just at the labtop only), and please do all the verification steps.

When booted up to Manjaro at the external....
WAIT!!
What?? What are....
4d7c5e3e-66b1-4be8-b3bc-919137c788ff
642981a5-725a-49bb-8e3a-5f2b48a7a7d7

I think they are not external disk manjaro partitions!
And your fstab is that of other internal OS fstab.

Where are they what are they ??
Where are they listed in your blikd?
Which post?

And if so, I see another unrelated problem with your internal OS fstab. It list swap of the external. How to boot this if external is cnot connected?

And to help confirm petsam uefi booting, at external Mnjaro OS, type efibootmgr.

Its very late here and I had a full day outside. But we should solve one problem at a time.

But I have to sleep now.

2 Likes

It is the UUID name of my external HDD.

See in the end.

On my Mac mini, you can see the list in partedand blkid from other topic:

On my laptop:

  • sudo parted -l:
Model: ATA Hitachi HTS72323 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  320GB  320GB  primary  ext4


Model: ATA Samsung SSD 860 (scsi)
Disk /dev/sdb: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size    Type     File system     Flags
 1      1049kB  241GB  241GB   primary  ext4            boot
 2      241GB   250GB  9449MB  primary  linux-swap(v1)


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      17.4kB  316MB   316MB   fat32                 boot, esp
 2      316MB   8316MB  8001MB  linux-swap(v1)
 3      8316MB  500GB   492GB   ext4

And the /etc/fstab of my laptop:

UUID=642981a5-725a-49bb-8e3a-5f2b48a7a7d7        /                               ext4    defaults,noatime 0 1
UUID=974e8eac-e079-4c5d-9070-ba700e92031b       swap                             swap    defaults,noatime 0 2
tmpfs                                           /tmp                             tmpfs   defaults,noatime,mode=1777 0 0
UUID=9c23cf11-86c3-4819-b351-a7058b0eac0d       /data/Gustavo                    ext4    defaults,noatime 0 2

It seems that 642981a5-725a-49bb-8e3a-5f2b48a7a7d7 belongs my laptop's SSD. It is why my external HDD does not recognise my laptop's SSD on my Mac mini. I have to remove this UUID from my external HDD, but I do not know how.

I think I have to copy the old fstab from other topic to my external HDD's fstab

  • efibootmgr
sudo efibootmgr
[sudo] password for gusbemacbe: 
EFI variables are not supported on this system.

Typing from bed now.
But petsam is right all along.
And since he's a polite person, I'll say for him :grinning:
It's quite messed up.
You have gpt with bios-legacy on your external and miss-mashing up everything.

You just cannot grub-install with any commands without remessing it up again.

Suggest you reinstall.
And petsam can take you through it.
He doesn't need sleep.:grin:

But again, remind you I will stay out on Mac mini.
Sorry about that.

Good luck.

1 Like

OK, thank you for your help and your patience!

Good sleep!

1 Like

It worked now. I had to reinstall from Mac mini and not from laptop or from virtual machine, so it would set correctly the fstab, recognising the Mac mini and the Mac mini's EFI.

Hello @gohlip and chaírete @AgentS ,

Last week I installed from Mac mini and it worked everything and perfectly until today that I updated and it broke the fstab and does not recognise anymore two devices.

I do not want to reinstall or format, because I have formatted Linux 7 times.

After avoiding all those dangerous commands, I will avoid updating and upgrading.

Here is the original fstab that I have backed up. The new fstab is still the same:

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

The last two UUIDs are not anymore recognised and I am stucked in the rootfs. It is the Mass Generic Storage, a removable HDD.

If you want to see full error, here is:

ERROR: resume: hibernation device 'UUID=1a9ae34a-453b-40ba-843a-201a7911cc49' not found
ERROR: device 'UUID=d3b51cb0-3d23-4827-8074-930b75264081' not found. SKipping fsck. 
mount: /new_root: can't find UUID=d3b51cb0-3d23-4827-8074-930b75264081.

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.

Forum kindly sponsored by