You are not logged in.

#1 2020-03-11 01:58:14

Hisbaan
Member
Registered: 2020-03-11
Posts: 8
Website

Broken MacOS with Arch (attempt at dualboot)

Hi All,

So I'm not quite sure how this happened but here's the rundown:

For my second arch install I decided to install arch on a separate partition on my macbook, leaving the macos partition intact. I got through everything following https://wiki.archlinux.org/index.php/Ma … ng_systems and I eventually got to the bootloader section. I performed all the steps and when I went to reboot, the only thing I see in the bootlader is "arch 2.04". When I boot into it, all I get is a grub screen and exiting that brings up an icon that is a file with a ? in it.

I ran "fdisk -l"

and it turns out that I somehow messed up the formatting so my arch install drive is formatted as "Apple APFS". I was going to go back onto that with the install media and change my bootloader settings and reverse all the changes but I can't because of the formatting.

I've tried googling around and I wasn't able to find anything related.

Does anyone have anything that could help?

Offline

#2 2020-03-11 08:57:33

Wild Penguin
Member
Registered: 2015-03-19
Posts: 406

Re: Broken MacOS with Arch (attempt at dualboot)

So, you've messed up something but don't post the information what you have messed up?

Post at least the output of "fdisk -l" here. More better: output of "lsblk" and "blkid". It is impossible to install OS X onto APFS, so there must be some mixup with the partitions you've made. Also, post a bit more information about the Macbook; which model it is specifically? It probably doesn't matter that much since anything even remotely modern is using UEFI.

Also, you should really summarize what you have actually done. Linking to the Wiki is not enough information, as immediately there are alternatives the user needs to make decisions in there (even in the link you've posted).

If you want to revert your chances, you need to uninstall the bootloader ([EDIT:] you mentioned grub), and then all that is left to do is to delete the partition you created with Disk Utility from OS X. That's all!

In case you have installed some bootloader which is now default, you should be able to boot into OS X by holding Option key while booting (this should always bring up the boot menu, with recovery options etc.).

Last edited by Wild Penguin (2020-03-11 09:10:58)

Offline

#3 2020-03-17 03:02:29

Hisbaan
Member
Registered: 2020-03-11
Posts: 8
Website

Re: Broken MacOS with Arch (attempt at dualboot)

Hi, sorry for the hiatus.

I managed to mostly fix everything reinstalling arch and using systemd as my bootloader instead as that was what was recommended by the wiki. I am able to use arch as normal but I still can't boot into macOS. My plan for that is to reinstall macOS without loosing data from the recovery partition or reinstall normally and erase (both of which will reset the bootloader, since currently macOS is not available), then install rEFInd from macos and add arch as an entry from there.

Sorry about the lack of detail, it was late at night and I was panicked. I had followed the wiki entry for installing grub as a bootloader but I must have messed up some things or maybe confused two different entries while going back and forth between articles. I'm not quite sure what went wrong but I'll mark this as resolved none-the-less.

Thanks for your help and inspiration

Offline

#4 2020-03-18 08:21:04

Wild Penguin
Member
Registered: 2015-03-19
Posts: 406

Re: Broken MacOS with Arch (attempt at dualboot)

Hisbaan wrote:

I managed to mostly fix everything reinstalling arch and using systemd as my bootloader instead as that was what was recommended by the wiki. I am able to use arch as normal but I still can't boot into macOS. My plan for that is to reinstall macOS without loosing data from the recovery partition or reinstall normally and erase (both of which will reset the bootloader, since currently macOS is not available), then install rEFInd from macos and add arch as an entry from there.

Re-installing is rarely needed, and it would make more sense to actually figure out what has gone wrong. Otherwise, you could be just repeating the same mistakes.

As I said earlier, unless you have accidentally erased the OS X partition, OS X should still be there. Hold down "Opt" while powering the MacBook, and you should be able to bypass grub/ReFind/systemd bootloader. Installing another boot manager / loader will not touch the OS X bootloader on the EFI partition, but just install another one and adjust default bootloader entry in EFI.

Neither will re-installing OS X actually remove your current bootloader, it will just make the OS X one the default. Reinstalling just seems unnecessary extra work, and doesn't diagnose the error you've made (which may cause problems later on, in case you keep repeating)... but, YMMV, you can make your own choices how to continue!

Oh, and none of the bootloaders is strongly recommended against another on a Mac, and I think there are several recommendations in different parts of the Wiki (which is written by humans). You can regard those as experienced users opinions in there, on which one to choose (but, AFAIK, all / most bootmanagers/loaders should work just fine, unless specifically mentioned they have problems). ReFind is often recommended since it can be easily installed from either OS (OS X or Linux) and, perhaps, because it's default menu system looks a bit Apple-like. So there may be esthetic reasons, too :-).

(EDIT: Also, the EFI partition might get formatted / reset by OS X updates. That's why it makes sense to choose a bootloader/manager which is easy to restore from OS X, but YMMV; in case you have a rescue-USB image always handy, it can be trivial to boot into the Arch to fix things, too)

The bless thing might cause issues, which might be only slightly more easily circumvented trough OS X (even there, booting to recovery mode might be needed ... I don't remember the details from the top of my head, ReFind official documentation is quite good in this regard).

Hisbaan wrote:

Sorry about the lack of detail, it was late at night and I was panicked. I had followed the wiki entry for installing grub as a bootloader but I must have messed up some things or maybe confused two different entries while going back and forth between articles. I'm not quite sure what went wrong but I'll mark this as resolved none-the-less.

Don't panic! :-)

In case an error has been made, there's no sense in rushing. Take a deep breath, step back, and gather the information you have.

Partition layout is the most important bit of information in these kind of situations IMO, as it is really the only thing which can cause permanent data loss (in case wrong partitions were deleted / formatted).

Cheers!

p.s. In case you think this is solved, edit the title and add [SOLVED] there, as per forum CoC.

Last edited by Wild Penguin (2020-03-18 08:27:41)

Offline

#5 2020-03-18 12:07:11

Hisbaan
Member
Registered: 2020-03-11
Posts: 8
Website

Re: Broken MacOS with Arch (attempt at dualboot)

You seen to be pretty knowledgable about this tuff so I'll ask you one more question if you don't mind:

When I restart and hold option, the only entry there is the EFI Boot places there by systemd. The apple entry still exists if I go look at the /boot partition but afaik, I have no way to access it. Is there a way I can re-add it to the apple bootloader or even just boot into it once to install rEFInd?

Thanks again smile

Offline

#6 2020-03-23 07:58:02

Wild Penguin
Member
Registered: 2015-03-19
Posts: 406

Re: Broken MacOS with Arch (attempt at dualboot)

Sorry about not replying, somehow this reply went under my radar.

Hisbaan wrote:

When I restart and hold option, the only entry there is the EFI Boot places there by systemd. The apple entry still exists if I go look at the /boot partition but afaik, I have no way to access it. Is there a way I can re-add it to the apple bootloader or even just boot into it once to install rEFInd?

Hmm, that is a bit weird. It may have something to do with the age of the Macbook (Pro?) (they might have a slightly different EFI partition contents per default). Being proprietary computers, I believe it is difficult to find information on what is actually going on...

In case you can not see the OS X in the "Opt" menu, I believe you may have accidentally removed it's partition. That is the only sensible explanation I can see. Can you boot into *any* OS? If so, post the contents of "lsblk" and "blkid" as requested before. Otherwise this is just some guesswork. Also, you don't need OS X to install ReFind, you can install it from Linux, too, however: you should be able to boot into OS X without ReFind, always. If you can not do that, better check the partition layout, to see what has gone wrong. But you might as well just re-install OS X, too, especially if there is nothing (important documents etc) you need to salvage on the HDD.

About the "Opt" menu: AFAIK, There should be at least the recovery options and the default entry in the built-in menu. If it is an older Macbook, recovery is from separate partition (unless you have deleted it), and on a newer one, there should be an Internet recovery option (which is not dependent on what is on the HDD, but boots from the firmware, unless I'm mistaken). The "default" entry would be the installed default bootloader, i.e. OS X unless something else has been installed. It could be ReFind, grub or systemd, however I've been in a situation when I've been able to choose between ReFind and OS X (from the same EFI partition) this way. However I go to that menu quite seldomly, and such setup is not something Apple endorses, and they might have some proprietary, weirdly-behaving, partial UEFI implementation...

Offline

#7 2020-03-23 12:05:30

Hisbaan
Member
Registered: 2020-03-11
Posts: 8
Website

Re: Broken MacOS with Arch (attempt at dualboot)

Hi, I realize I forgot to say so but this is a MacBook Air 7,2 (early 2015). The MacOS partition is still there as I can still access my files and mount it using apfs-fuse.

I've already done a full disk clone of MacOS so I'm ready for a reinstall but what sucks is that I have to re-upgrade 5 whole releases! (It wants to install a really old MacOS version)

I'll post lsblk and blood shortly

Last edited by Hisbaan (2020-03-23 12:06:30)

Offline

#8 2020-03-23 12:17:46

Hisbaan
Member
Registered: 2020-03-11
Posts: 8
Website

Re: Broken MacOS with Arch (attempt at dualboot)

I'm able to boot into Arch and have a fully functional install working.

lsblk:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 233.8G  0 disk
├─sda1   8:1    0   200M  0 part          (bootloader)
├─sda2   8:2    0 140.2G  0 part         (MacOS)
└─sda3   8:3    0    93G  0 part /         (Arch)



sudo blkid /dev/sda:

/dev/sda: PTUUID="f56c8712-8b0c-4af2-b10c-f74174da8ee6" PTTYPE="gpt"



sudo blkid /dev/sda1:

/dev/sda1: LABEL_FATBOOT="EFI" LABEL="EFI" UUID="67E3-17ED" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="11f286ac-9141-40e7-adbb-8f3868c617bb"



sudo blkid /dev/sda2:

/dev/sda2: UUID="b0749e0b-85b9-4582-a90f-40613c83242b" BLOCK_SIZE="4096" TYPE="apfs" PARTLABEL="Macintosh HD" PARTUUID="69a6278c-7aec-4a0e-933b-e63eac8eeac2"



sudo blkid /dev/sda3:

/dev/sda3: LABEL="arch_os" UUID="d2412dfa-8eb1-4fa6-93d1-3fbd2778b2ad" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="1bd35a12-20f9-4981-8b0a-f0cfefe46859"

Last edited by Hisbaan (2020-03-23 12:18:21)

Offline

#9 2020-03-23 13:05:56

Wild Penguin
Member
Registered: 2015-03-19
Posts: 406

Re: Broken MacOS with Arch (attempt at dualboot)

Hi,

EDIT: Your partition layout seems to be in order AFAICT.

Your situation seems indeed a bit weird, I'm a bit at loss how I would go further. FWIW, here are the contents of my Macbook Pro EFI partition for the parts which seem to be handled by Mac OS Catalina. In "EFI" folder (which is in the root of the EFI partition):

EFI/APPLE/
EFI/APPLE/EXTENSIONS
EFI/APPLE/EXTENSIONS/Firmware.scap
EFI/apfs.efi

Other files seems to have been created by ReFind, grub, uefi shell and memtest installation processess (I have all of those installed in there). Actually, I'm not sure who created the apfs.efi file!

This is an old MacBook Pro 5,5, which doesn't officially support macOS Catalina (or, actually maybe it is vice versa). I've installed it as a fallback OS, just in case Arch get's broken and I need to get something immediately done.

If I were in your shoes, I would try:

  1. Make a ReFind USB-bootable stick and see if it finds OS X

  2. Install ReFind from Linux to the EFI boot partition, and see if it finds OS X (does not probably help if alternative 1. does not work)

  3. Search via Google, if/how it is possible to restore OS X bootloader only, without full re-install

Perhaps alternative 1. is the easiest and it would not modify your HD in any way. But alternative 2 shouldn't hurt anything, either in your current situation - especially in case you can make an USB stick which can find either OS, as then you can use it to boot again, in case the ReFind installation goes awry for any reason (up to the point of "Opt" menu is not useful). OTOH, if you can boot ReFind from an USB stick (alternative 1.), but it doesn't detect OS X, it is most probable installing ReFind to EFI is of little use, as it is essentially irrelevant from where ReFind is booted from.

I know recovering OS X can be a pain, if the recovery will result in an older version being installed (and: Apple seems to have a bad habit of not updating the certificates in their installation images of older, not-supported-anymore, OS X versions - be prepared to juggle the system time!).

For future, you might want to make the installation media from the most recent OS X (or macOS as it was renamed) you can download from Apple Store, and save that resulting USB stick somewhere (you can make this for offline install from the files the installer will download from the Apple store). Actually, if you have any (recent-ish) Apple computer, you could use that to make an USB-bootable installation media, so you don't need to go trough the tedious upgrade path, in case the bootloader can not be restored.

Good luck!

Last edited by Wild Penguin (2020-03-23 13:08:24)

Offline

#10 2020-03-23 15:29:29

Hisbaan
Member
Registered: 2020-03-11
Posts: 8
Website

Re: Broken MacOS with Arch (attempt at dualboot)

I've already tried installing rEFInd and it doesn't seem to detect MacOS. There are three options: The Linux kernel, (some option that I can't remember at the moment but it wasn't macOS), and Arch.

I've already done some searching and the only way to reset the bootloader is to do a full reinstall but if you do it from the recovery menu, you keep your data and applications.
I think that a reinstall is my last option. I'm wondering if you can still keep your data when installing from an external medium. The upgrade path shouldn't be too bad regardless, it'll only take a couple of hours.

I have a couple of assignments due today so I won't start yet but I'll update here once I do and if I get anything.

Offline

#11 2020-03-23 17:13:39

Wild Penguin
Member
Registered: 2015-03-19
Posts: 406

Re: Broken MacOS with Arch (attempt at dualboot)

AFAIK the recovery option is exactly like installing from external medium, save it might have some different text in some menus. The end result is the same. Installing from external installation media wont remove your setting and user documents, either (nor applications). You can do a "clean" install, but you need to do this on purpose - i.e. go to the disk utility before install, and erase the partition.

However, better back up important documents and other data, if using my advice above, as I'm not 100% certain (only fairly certain!).

Last edited by Wild Penguin (2020-03-23 17:14:46)

Offline

#12 2020-04-05 04:18:58

cmurf
Member
Registered: 2019-09-06
Posts: 27

Re: Broken MacOS with Arch (attempt at dualboot)

I've got a 2011 Macbook Pro, dual booting macOS 10.13 and Fedora 32. But I haven't run into a situation where the built-in boot manager (option key at boot chime) doesn't show the option to boot macOS. A few possible work arounds before clean installing macOS:

a. If you just need to grab some files off macOS's APFS volume, you can install apfs-fuse, and mount the macOS volume read-only.

b. "Zap the PRAM" to reset NVRAM using command-option-P-R at the boot chime until it reboots a second time. Ordinarily, a Mac's firmware will prefer to boot macOS first following this reset. However, this will also blow away the NVRAM entry for Arch. Maybe the option key at the boot chime to get the built-in boot manager will still work and get you back to Arch.

Offline

#13 2020-05-02 12:39:42

Hisbaan
Member
Registered: 2020-03-11
Posts: 8
Website

Re: Broken MacOS with Arch (attempt at dualboot)

I've given up. I went to reinstall MacOS but soon realized that the OS doesn't recognize that partition at all and I need to do a full format and clean install. Can't just install it in place. After a full month I've resorted to just leaving it the way it is. I plan to get a new laptop soon enough but until then, I've gotten more comfortable with Arch so I don't think that I even need my MacOS install. I might have a fresh install just incase but that's about it. How can I mark this thread as solved without actually marking it as solved (because that would be misleading)?

Offline

#14 2020-05-02 12:40:55

Hisbaan
Member
Registered: 2020-03-11
Posts: 8
Website

Re: Broken MacOS with Arch (attempt at dualboot)

Thank the both of you for all your help smile you guys have really shown me just how nice the Arch community is and have helped to make me want to be a part of it.

Offline

Board footer

Powered by FluxBB