Grub для mac os

LINUX — Жизнь в консоли ЕСТЬ.

Главное меню

Последние статьи

Счетчики

Меняем Grub2 на Grub. Прописываем загрузку Mac OS и Windows7.

Небольшая предистория. Есть у меня нетбук acer aspire one 110 с замененным SSD на нормальный HDD. Как то путешествуя по просторам rutracker.org наткнулся на сборку Macintosh OS как раз для моего бука (образ, созданный с помощью Acronis). Очень хотелось посмотреть на эту ось. Отформатировал весь винт, создал четыре раздела: 26Гб под Mac (пока оставил пустым, то бишь не форматировал), 20Гб под Win7(сделал его primary), третий раздел под lubuntu, четвертый — файл подкачки. Сначала установил Win7 на второй раздел. Затем с помошью Acronis развернул образ мака на первый раздел, в процессе поставив галочки переписать загрузочную запись MBR из образа и сделать первый раздел первичным (primary). В результате получил две ОС, изначально грузился маковский загрузчик под названием хамелеон, в меню которого можно было выбрать загрузку виндовс. дальше были танцы с бубном: в установленном поверх всего lubuntu, точнее в его загрузчике grub2, необходимо было прописать загрузку мака. Grub2 сам находил mac os, но при попытке ее загрузить — черный экран, и тишина. В итоге с Grub2 мне поладить так и не удалось, и я решил снести его и поставить старый добрый grub.

sudo apt-get purge grub-pc

sudo apt-get install grub

Создаем необходимые для загрузчика файлы (menu.lst и др.) командой:

sudo update-grub

Записываем информацию в загрузочный раздел диска:

sudo grub-install /dev/sda

где /dev/sda — мой жесткий диск (можно посмотреть командой sudo fdisk -l).

Далее приступаем к редактированию загрузчика, так как пока в нем есть запись только для загрузки самого lubuntu:

sudo nano /boot/grub/menu.lst

Комментируем символом # строку:

# hiddenmenu

если комментарий не убран — для отображения всех вариантов загрузки нужно жать Esc.

Меняем timeout 3 на :

timeout 10

это время в секундах, в течение которого можно выбрать вариант загрузки. По умолчанию загружается линукс.

Далее идем почти в конец файла и прописываем загрузку mac os и windows 7. В итоге у меня последняя секция выглядит так:

## ## End Default Options ##

title LUbuntu :)))

uuid 95619c02-5f7c-4a4b-9bd7-308007e7fc2a

kernel /boot/vmlinuz-2.6.32-19-generic root=UUID=95619c02-5f7c-4a4b-9b$

initrd /boot/initrd.img-2.6.32-19-generic

title Mac_OS 🙂

rootnoverify (hd0,0)

makeactive

chainloader +1

title Windows_7 🙁

rootnoverify (hd0,1)

makeactive

chainloader +1

### END DEBIAN AUTOMAGIC KERNELS LIST

Title — заголовок, то, что мы увидим в меню при загрузке.

Команда rootnoverify указывает что не требуется определять тип файловой системы, и grub не будет пытаться монтировать ее.

Команда makeactive выставляет флаг активности в таблицу разделов для указанного раздела, некоторые ОС это требуют, например windows98, возможно в моем примере будет работать и без этой команды, не пробовал, на всякий случай пусть будет.

Читайте также:  Планшеты с windows игровые

Chainloader +1 -передаем управление загрузчику ОС.

Источник

Snippet: How to Create a Mac Boot Entry in Grub2

If you have just created a dual-boot system with Mac Snow Leopard and Ubuntu Karmic and find that the Grub2 does not boot up your Mac, you can follow the instruction below to add the correct boot entry in Grub2.

Boot into Ubuntu Karmic.

Open a terminal and type:

Add the following to the end of the file:

Save and close the file. Back in the terminal, type:

That’s it. You should now see an extra entry in your Grub screen. Scroll down to the last entry and it will boot into your Mac Snow Leopard.

Damien Oh started writing tech articles since 2007 and has over 10 years of experience in the tech industry. He is proficient in Windows, Linux, Mac, Android and iOS, and worked as a part time WordPress Developer. He is currently the owner and Editor-in-Chief of Make Tech Easier.

11 comments

I was told that running Ubuntu on a MacBook could break its processor and stuff as it cant handle some lowlevel-things about the hardware. Is that true?

The article was not referring to Ubuntu on a Macbook, but Mac on a PC (with Ubuntu). In another word, I am referring to hackintosh.

So far, I have not been able to dual boot Ubuntu on a Macbook yet.

I am running ubuntu on my 1st gen macbook and it works just fine. 🙂

So how did you set it up with this then?
I can’t seem to get it to work :

Hello guys. I have Ideneb 10.5, XP and Ubuntu all on my HDD using Grub2. It doesn’t see the Mac OS X on the boot screen. Can someone help me resolve this? I am new to Linux. Thanks

Try the following command in your terminal:

Thanks Damien, I tried it and the list it generates in the terminal window still doesn’t show the Mac OS X.

my sl partition is on /dev/sdb2 so i add this :

menuentry “MacOS X Snow Leopard1” <
insmod hfsplus
set root=(hd1,2) #change X to the Mac SL partition
multiboot /boot
>

what is multiboot exact?

this menuentry dont work for me:(

perhaps, problem is for chamelone on sl?

It load Chameleon fine but that fails to load Snow Leopard.

Thanx great fix!
I had to use hd0,1 instead of hd0,2 which was where my mac snowleopard partition was located.

Just out of curiosity, what does multiboot mean?

how to build grub2 on mac os x?

Comments are closed.

RedMagic 6S Pro Review: Gaming Is Serious Business.

How to Fix Mac Wi-Fi Problems and Dropped Connections

How to Boot to Recovery Mode (Safe Mode) in Ubuntu

Ubuntu Software Center Not Working? Here Are the Fixes

How to Stress Test a Graphics Card on Linux

5 Simple (Yet Cool) Drawing Apps for Mac

How to Mount a Windows Share Folder on Linux

How to Mount Your iPhone as an External Drive in Ubuntu

Читайте также:  Mac os чем отличается закрыть от свернуть

How to Fix Ubuntu Freezing in VirtualBox

Camera Not Working or Available on Mac? Here’s How to Fix It

How to Run Android Apps on Mac

Affiliate Disclosure: Make Tech Easier may earn commission on products purchased through our links, which supports the work we do for our readers.

Источник

Grub для mac os

I have a dual-boot configuration consisting of Mac OS X Snow Leopard and Bunsenlabs Helium. I want to be able to boot Mac OS X Snow Leopard from grub2.

The partition arrangement is as follows:

As you can see, Mac OS X was installed first. After installing Bunsenlabs Helium, when the grub was installed, it automatically detected the Mac OS X installation and provided two entries:

However, when choosing either of the entries above, I receive the following error:

I’m surprised this does not work, especially since Bunsenlabs goes to the trouble of detecting there is a Mac OS X system.

Following some guides online, I edited the /etc/grub.d/40_custom file and added the following entries:

Then updated the grub:

with the following result:

However, when choosing either of the entries above, I receive the following error:

What am I doing wrong?
I read that this should be easy to configure Mac OS X entries for grub2, especially for releases prior to Yosemite.

Last edited by jimjamz (2018-08-30 05:41:39)

#2 2018-08-22 12:32:14

Re: [SOLVED] Booting to Mac OS X via Grub2

Assuming this is EFI GRUB, what GRUB needs to find is the osx bootloader’s .efi executable so that you can chain into it. An unqualified guess would be that multiboot takes the path to that file as the argument, and the correct path to the file may be /System/Library/CoreServices/boot.efi, however there could be changes between each OSX release (from https://askubuntu.com/questions/679173/ … into-os-x).

I suppose the next step would be to locate the EFI executable, and configure GRUB accordingly.

#3 2018-08-24 11:22:43

Re: [SOLVED] Booting to Mac OS X via Grub2

I had already read that article, and found it didn’t help me solve my issue, yet I don’t know why my setup is different.

In the Mac OS X system, I located the .efi at the same location you had specified. I modified the grub entry as follows:

However, when selecting this in grub, I receive:

Источник

Правильная загрузка ядра linux с EFI на Macbook

Предлагаю несколько вольный перевод программиста Gentoo о правильном способе загрузке на ноутах с EFI вместо BIOC-а на борту.
Мне недавно купили Macbook Pro 13.3 дюйм и я решил поставить на нём Gentoo Linux.

Сказано — сделано. В целом инсталляция прошла успешно, не считая маленьких недоразумений вроде неработающей клавы из под LiveCD, ядро видит консоль только с vesafb .

Единственное, что немного меня напрягало, это эмуляция BIOS-а. Маки используют для загрузки интеловский EFI, а для остальных ОС Apple добавило уровень эмуляции BIOS-а. Именно так Ubuntu и грузится на Маках.

Мне же это показалось неверным в техническом плане и в принципе. Я немного поднапрягся и мне удалось запустить ядро Linux из под EFI без всяких эмуляций. Документации достаточно мало, поэтому хочу поделиться своим способом.

  1. EFI стартует при загрузке.
  2. Запускает rEFIt, программа, которая расширяет возможности дефолтного загрузчика, добавляя нормальное загрузочное меню, командную строку, и т. п.
  3. Сканирует FAT/HFS разделы (ext* не поддерживаются) ища загрузочный, который содержал бы каталог /efi/ ; и загрузочные образы.
  4. Запускает образ Grub2 EFI с FAT раздела.
  5. Загружает ядро Linux с /boot (+ initrd/initramfs если задано).
  6. Ядро, как обычно, загружается с корневого раздела, можно выбрать любую файловую систему.
Читайте также:  Как установить windows с диска без дисковода

Можно использовать elilo , но Grub2 (точнее Grub 1.97.1 ) справляется лучше, вернее это единственное, что хоть как-то работает с небольшими модификациями (добавить в ebuild USE флаг efi через —with-platform=efi ). У меня получилось настроить /boot раздел на файловую систему FAT, но от этого падает installkernel скрипт запускаемый из директории исходников ядра, который создает символические ссылки на новый и предыдущий образы ядра.

Инструкции по установке EFI образа Grub2 тут. Установите образ EFI в директорию, что-то наподобие /efi/grub (обязательно должен быть путь /efi ). Команды bless можно пропустить, они для OS X. Можете создать простенький конфиг-файл командой grub-mkconfig и затем модифицировать его. Однако, для того, чтобы сделать По Уму™ вручную отредактируйте файлы из /etc/grub.d/ .

Конечно же надо выставить в ядре поддержку EFI, но на этом уже всё. Теперь вы осознаете с некоторым маниакально-навязчивым удовлетворением, что не должны подключать лишнее звено для поддержки еще одного проприетарного интерфейса, находящегося за пределами вашей видимости и контроля.

Источник

How to fix grub to boot Mac OS X Yosemite?

But. now I have problem with booting Mac OS X Yosemite. I have error message: error file’/mach_kernel’ not found. etc How to fix it?

Thanks in advance!

P.S.: May be problem not in grub.cfg

This is grub.cfg:

2 Answers 2

This might not be very helpful but, holding Option (or Alt) while powering up will normally give you Apple’s own boot manager, from you should be able to boot into Yosemite.

Then you could reinstall rEFInd using the ./install.sh —alldrivers installation (as described here), or the official rEFInd guidelines (found here, or as an answer on the previous link) which I have also used to perform a fresh installation of Ubuntu, with dual-booting working just fine.

I agree with holding down the option key while you start up. However, I have found that if you hold down command + option + r + p when you are starting up, wait for the two «ding»s and restart, it will automatically boot into whatever Mac system you are using. I have MacOS 10.12.4, and it works fine now.

Also, if you start up using the option key, you can go into system preferances—>startup disk and select your operating system, it will boot directly into it.

Not the answer you’re looking for? Browse other questions tagged macos ubuntu boot or ask your own question.

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.10.8.40416

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Оцените статью