Can you check the health of boot and grub of my external HDD plugged on my Mac mini before I do something stupid?

Hello @gohlip, @petsam and all!

I am afraid of getting stuck into the rootfs when I shut down or reboot into Manjaro, reboot into macOS and unplug my external HDD, and I always run the sudo pacman -Syyu daily.

  1. I reinstalled from scratch, using Manjaro 17.1.2.
  2. I ran the sudo grub-install --removable --recheckand then ran the sudo pacman -Syyu
  3. I followed the instructions from [Testing Update] 2018-10-08 - Upstream Updates and from Updated Manjaro thinks it's hibernated and missing.

Here are all the commands:

$ 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:  Mass Storage Device (scsi)
Disk /dev/sdb: 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  438GB   429GB   ext4
 4      438GB   500GB   62.3GB  ext4

$ sudo blkid
/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="6C38-1532" TYPE="vfat" PARTUUID="7ce26d75-daa5-439b-bb63-46b5c71fdf29"
/dev/sdb2: UUID="397a66af-5f80-4c81-9167-46949d22d10d" TYPE="swap" PARTUUID="6cd86873-620e-48a8-a740-06b0e015389e"
/dev/sdb3: UUID="8f89c1cd-1f62-4539-b3c0-71a85928e969" TYPE="ext4" PARTUUID="cb0febd8-9b3b-4a0f-94e2-84f83ee51832"
/dev/sdb4: UUID="aae7f601-f76a-48d3-a28a-984435822849" TYPE="ext4" PARTUUID="3a637095-e22e-4025-b30a-4de240ba2504"

$ efibootmgr
BootCurrent: 0002
Timeout: 5 seconds
BootOrder: 0002,0080,0001,0000
Boot0000* ubuntu
Boot0001* deepin
Boot0002* Manjaro
Boot0080* Mac OS X
Boot0081* Mac OS X
Boot0082* 
BootFFFF* 

$findmnt -s
TARGET    SOURCE                                    FSTYPE OPTIONS
/boot/efi UUID=6C38-1532                            vfat   defaults,noatime
swap      UUID=397a66af-5f80-4c81-9167-46949d22d10d swap   defaults,noatime
/         UUID=8f89c1cd-1f62-4539-b3c0-71a85928e969 ext4   defaults,noatime
/home     UUID=aae7f601-f76a-48d3-a28a-984435822849 ext4   defaults,noatime

$cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.14-x86_64 root=UUID=8f89c1cd-1f62-4539-b3c0-71a85928e969 rw quiet resume=UUID=397a66af-5f80-4c81-9167-46949d22d10d

I had said several times never to unplug your external disk (which is the installed Manjaro disk sdb).
Why do you do this when I told you several times not to unplug this external disk.
You can only unplug it when we fix everything and tested that it works without unplugging it.

If you unplug it when it is not done, or worse connect it to another system, I cannot proceed anymore. Please understand that it is important. And you will need to follow the steps and not to take short cuts.

Look at this first post. Read it until you understand.

More clarifications for you.
o Connect the external (sdb) and the install media usb into your mac-mini.
o Start up computer and boot up the install media usb in uefi mode.
Do not boot up to live OS, but press ‘c’ at the menu and we’ll get to the grub prompt (grub>).
o At grub prompt…

grub> search.file /etc/manjaro-release  root
grub> configfile /boot/grub/grub.cfg

o When booted up to Manjaro installed OS (at sdb3)

sudo grub-install 
sudo update-grub

Then continue with…

findmnt /

If out put contains “/dev/sdc3” Note it down as sdc
If out put contains “/dev/sdb3” Note it down as sdb
If out put contains “/dev/sdd3” Note it down as sdd

Now based on what you get from above, do the second command below based on that.

sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi
sudo efibootmgr -c -d /dev/sdc -p 1 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi"

Note this above is for output of sdc

If output is sdb3. the second command will be…

sudo efibootmgr -c -d /dev/sdb -p 1 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi"

If the output is sdd3, the second command will be

sudo efibootmgr -c -d /dev/sdd -p 1 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi"

Shut down computer.
Remove install media usb.
Do not remove external disk (manjaro drive) at all.

Start up computer.
Do you boot up to Manjaro?

Tell us. There’s more to be done.
Repeat do not ever remove external Manjaro disk at all, from this point onwards.

Boot up several times to Manjaro.
Does it boot each time?

Repeat. Never remove manjaro drive.

If it works well, I’ll follow up with a simple procedure to allow you to remove and plug in that external disk and boot up from it.
Meantime do not unplug manjaro drive.

Hope this is very very clear.

ps: if you find my instructions condescending, let me know.
I’ll avoid replying to you.

3 Likes

Hello @gohlip!

It works perfectly now. I booted three times and it booted up normally.

You can proceed now.

Good! Now, do not unplug external manjaro drive yet.
Let us know what is output from manjaro terminal what is

efibootmgr
efibootmgr -v

Another important thing.
Do you know what is the boot-set-up key for mac-mini.
In pc, it is normally (F8 ~ F12, some is ‘esc’ key).
I don’t know what it is in Mac-mini, Is that the ‘c’ key?
You have booted up usb install media device before. So you should know what this boot-up key is.
Tell us. And tell us what appears when you use this boot-up key.
Don’t forget you have both internal and external (manjaro) drive on. And you have removed the usb install media.

I’ll explain again. If you want to have the external drive unplugged once in a while, you will have to use a command for it. But … having done this, you may need to use this boot-set-up key always to boot into manjaro. Hope this is very clear and that you understand this. If you are very sure you do not want to remove this external drive at all, then I suggest you leave it as it is and never unplug the external drive.

So please confirm you want to remove the external drive once in a while (and maybe try on other system) or please confirm you do not want to ever remove this drive.

Confirm also you have mac OS working fine. What is it? 10.xx?

Summary
o output from terminal
o boot-setup key
o confirm you want removable
o confirm mac OS working fine

1 Like

Hi,

$ efibootmgr
BootCurrent: 0003
Timeout: 5 seconds
BootOrder: 0003,0002,0080,0001,0000
Boot0000* ubuntu
Boot0001* deepin
Boot0002* Manjaro
Boot0003* manjaro
Boot0080* Mac OS X
Boot0081* Mac OS X
Boot0082* 
BootFFFF* 
$ efibootmgr -v
BootCurrent: 0003
Timeout: 5 seconds
BootOrder: 0003,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,7ce26d75-daa5-439b-bb63-46b5c71fdf29,0x800,0x96800)/File(\EFI\Manjaro\grubx64.efi)
Boot0003* manjaro       HD(1,GPT,7ce26d75-daa5-439b-bb63-46b5c71fdf29,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)

Apple computers and PCs are very different in keys. The boot-set-up key in Apple computers, it is option (⌥). You can read the article: https://en.wikipedia.org/wiki/Option_key (go to "Start-up"from Miscellaneous).

When I press ⌥ button, the boot-set-up lists the boot partitions, you can see like (Taken from Google Images):

I want to unplug because I want to copy the files (images, files, videos, etc.) from my laptop to my external HD. But I also want to plug my external HD into my Mac mini too.

It is macOS HIgh Sierra 10.13.6.

Good. Looks like you know your stuff. It’s much more reassuring (for me :smile:) to proceed.
After doing the simple command, at the boot-up key (⌥) you will get a picture of an external drive and use that to boot Manjaro.

With the external and internal still connected, boot to manjaro and at terminal, do

sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck --debug --removable

Shut down. Reboot with external still plugged in. Do you still need (⌥) key?
No, probably.
Shutdown. Remove external drive. Boot up without external drive. Boots okay to mac OS?
No? Then use (⌥) key to select Mac OS. Boots okay?

Now connect back external drive. Boots to mac OS?
Now use (⌥) key. Can you boot to manjaro on external drive?

If all good, let us know.

Now, if/when you plug in the external drive to another system and if you are having problems, start a new topic for it. I may not be able to help as it may be a graphic problem. But test that it can boot to prompt by putting a ‘3’ (no apostrophes) in the linux line and removing ‘quiet’ and ‘splash’ in that linux line.

But if it works fine in another system, please tell us in this topic itself.

Good luck. Take care.

1 Like

Here is the file grub debug.txt.

It is all good and everything works.

  • If Manjaro is plugged, Manjaro is booted up automatically without needing to press ⌥.
  • If Manjaro is plugged, if I want to boot up into macOS, I need to press ⌥.
  • If Manjaro is unplugged, macOS is booted up automatically.
  • If Manjaro is plugged again, Manjaro is automatically booted up without needing to press ⌥.

Eveything works.

Good to hear.
Hope you have success when you plug into another system.
Take care.

4 Likes

*** DO NOT BLESS ANY OS X , you will loose all other boot system different than os X system***
*** Same if you Reset Pram or change battery for your motherboard ***

Sorry, but what is “to bless” and “reset pram”?

bless os x : set volume boot for os X
reset pram : https://support.apple.com/en-us/HT204063 ( also all volumes boots os x are reset )

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.