The time has come for me to change the laptop, and with extreme displeasure for myself, I found that there are simply no laptops with a 16x10 screen, except for the products of one fruit company (s). I must say that for the gland the new bug is not very bad, and despite the horse price tag, the toad was crushed and the laptop was purchased.
In this article there will be no new methods of dealing with apple separatism - all recipes are drawn on the Internet. I hope that my experience will be useful to someone, but at once I will make a reservation, everything you do, guided by this article - you do at your own peril and risk, so ...
Break the Internet, I came to the conclusion that there are three fundamental possibilities for installing and using Linux on Macs:
- Using a special distribution with a suffix mac. Secretly interacts with BootCamp in order to disable EFI boot
- Using rEFIt (or its development rEFInd)
- With the help of the native apple loader (hereinafter referred to as the apple loader)
The approach with a special distribution kit with the mac suffix imho is not applicable to the 2013 bug - in order to make linux work after installation, many sources offer different keys for the kernel - from nolapic to nosmp, which, as you understand, is absolutely not suitable . Cross out.
Of the remaining two, the native loader application is more dear to me — fewer entities, and in general, although loading with rEFInd is perfectly entitled to life. Let us stop at the apple loader.
It should be noted that modern uefi loaders have quite a uefi, but, as usual, not quite normal - everything that does not work will not be loaded. There are still some nuances, but now we will not analyze them.
In order for the apple loader to load Linux dear to our heart, the latter must pretend to be osx, or rather not Linux itself, but efi grub. To do this, the following conditions must be met:
- Must be Apple type HFS, respectively, with the hfs file system
- This partition should have a System / Library / CoreServices directory with boot.efi and SystemVersion.plist files, in a special format describing the contents of the partition
- in the root of the partition should be the file mach_kernel
If these conditions are met, the apple loader will kindly consider the possibility of downloading this fake copy of macosx.
So here we go.
- Prepare installation flash drive using Unetbootin from mirror.yandex.ru/ubuntu-releases/13.10/ubuntu-13.10-desktop-amd64.iso ( note, not mac version !!! )
- boot into osx, resize partishen (I left 160GB for osx, although this method allows you to do without osx, but for me - let it be)
- reboot while holding Alt while loading to select the source of the load. Our flash drive is seen in two versions - you need to choose the efi boot option.
- In the grub menu, select try ubuntu. When booting from a flash drive, it makes sense to edit the kernel boot options string by adding libata.force = noncq to it - there are complaints on the internet about periodic 20 -30 second fading of the system when accessing the disk.
- We connect to the Internet - for this we install the perimeter driver WiFi System Settings-> Software & Updates-> Additional Drivers , where we turn on the Broadcom 802.11 driver and connect to the
neighboring WiFi - we put gdisk
sudo apt-get install gdisk
- using gdisk we create a megabyte size 10 partition ( hereinafter, this partition will be referred to as 10MB partition ). It is necessary to retreat 128 megabytes from partishen with osx - otherwise the latter will be very worried. It is convenient to use + 128M and + 10M as partitioning parameters. It is imperative to set the type of AF00 partitions - Apple HFS / HFS + - otherwise the apple loader does not recognize partishen as suitable for loading.
- At this stage, it makes sense to reboot into osx and check the disk. It can also be formatted in Mac OS Extended (not a journalized version, otherwise there will be difficulties from under Linux) and rename it to Ubuntu, although in this manual we will do everything from under linux, because we may want to demolish osx entirely.
- again we reboot on alt from the flash drive and go to try ubuntu (do not forget to add libata.force = noncq)
- run the installer (Install Ubuntu 13.10)
- we mark up partisens for installation to taste - I made root 20G and everything else is home. Swap did not - you can always create a file.
- Next, we install ubuntu with one remark - do not reboot at the end of the installation. ( Please note that the computer name contains a plaintive message that it was not possible to correctly read the DMI. This is better corrected, otherwise the invitation in the terminal will take up half of the screen )
- after the installation is completed, without rebooting (although, if you reboot, that's okay, but you will need to boot from the flash drive again, since our Linux is not yet pretending to be osx) we are mounting our just-received installation
mkdir /tmp/u sudo mount /dev/sda4 /tmp/u sudo cp /etc/resolv.conf /tmp/u/etc/resolv.conf sudo mount --bind /dev /tmp/u/dev sudo mount --bind /proc /tmp/u/proc sudo mount --bind /sys /tmp/u/sys
- we copied resolv.conf - this is required in order for the chroot environment to work properly name resolution. When our installed ubuntu starts, this file will be recreated by the Network Manager.
- you can still mount / dev / pts
- Actually, go to chroot:
sudo chroot /tmp/u/
- we put support for hfs and gdisk
sudo apt-get install hfsprogs icnsutils gdisk
(since we are doing this from chroot, these packages will be supplied in our new installation) - format the created 10MB partishen (in my case / dev / sda3)
sudo mkfs.hfsplus /dev/sda3 -v Ubuntu
- we find out UUID 10MB partishen by means of blkid
- edit / etc / fstab - change mount / boot / efi to UUID, which was defined in the previous step and the file system from vfat to auto
- remount / boot / efi
umount /boot/efi mount boot/efi
- edit the file / usr / sbin / grub-install, commenting on the file system type check - something like
if test -n "$efidir"; then efi_fs=`"$grub_probe" --target=fs "--device-map=${device_map}" "${e$ # if test "x$efi_fs" = xfat; then :; else # gettext_printf "%s doesn't look like an EFI partition.\n" "${ef$ # efidir= # fi fi
- run grub-install
- create osx fake install:
touch /boot/efi/mach_kernel
mkdir -p /boot/efi/System/Library/CoreServices
- create the file /boot/efi/System/Library/CoreServices/SystemVersion.plist with the following content:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList- 1.0.dtd"> <plist version="1.0"> <dict> <key>ProductBuildVersion</key> <string></string> <key>ProductName</key> <string>Ubuntu</string> <key>ProductVersion</key> <string>13.10</string> </dict> </plist>
- create a link to grubx64.efi
ln /boot/efi/EFI/ubuntu/grubx64.efi /boot/efi/System/Library/CoreServices/boot.efi
- edit / etc / default / grub, casting the line to the form:
GRUB_CMDLINE_LINUX_DEFAULT = "libata.force = noncq" - perform
update-grub
- overload.
At this stage, we already have a workable system into which we can boot via alt and which we can easily choose from under the osx (boot disk) as the main one.
')
Some notes:
In the following series:
- bringing to a usable, high-resolution, view of the ubuntu theme - as long as you can switch the resolution to a lower one. ( The roots of the difficulties go to the gnome in which some good people have dug into the tight 96DPI, and the editing of this define leads to ambiguous consequences. )
- zapilivanie switch to integrated graphics and back to discrete. there are high hopes for the 3.13 kernel - a lot of good changes in the integrated graphics from intel.
Have a good hack!