

{"id":1994,"date":"2017-08-03T11:51:57","date_gmt":"2017-08-03T10:51:57","guid":{"rendered":"http:\/\/www.fabionline.net\/aaaaaaa\/?p=1994"},"modified":"2025-03-31T20:44:14","modified_gmt":"2025-03-31T18:44:14","slug":"installazione-debian-9-su-macbook","status":"publish","type":"post","link":"https:\/\/www.fabionline.net\/blog\/linux\/installazione-debian-9-su-macbook\/","title":{"rendered":"How to install Debian 9 on Macbook (end 2009) &#8211; dual boot"},"content":{"rendered":"<p>Here how i installed Debian 9 stretch on my old macbook 6,1 (mid 2009)<br>\nNB: where you&#8217;ll see a # before command, means you should be root or need to use sudo.<br>\n<strong>Hardware:<\/strong><br>\n<span style=\"font-size: 10pt;\">Video card NVIDIA \u00a0GeForce 9400M with 256 MB of SDRAM shared with main memory<\/span><br>\n<span style=\"font-size: 10pt;\"> Screen size 13&#8243;<\/span><br>\n<span style=\"font-size: 10pt;\"> Wireless card Broadcom BCM4360<\/span><br>\n<span style=\"font-size: 10pt;\"> Disk 256 Gb Serial ATA (5400 RPM) hard drive<\/span><br>\n<span style=\"font-size: 10pt;\"> Ram 8 gb SODIMM 1600MHz<\/span><br>\n<span style=\"font-size: 10pt;\"> Wi-fi controller Broadcom Corporation BCM43224 802.11a\/b\/g\/n (rev 01)<\/span><br>\n<span style=\"font-size: 10pt;\"> Ethernet controller NVIDIA Corporation MCP79 Ethernet (rev b1)<\/span><br>\n<span style=\"font-size: 10pt;\"> USB 2.0 ports (2x)<\/span><br>\n<span style=\"font-size: 10pt;\"> Audio in\/out port NVIDIA Corporation MCP79 High Definition Audio (rev b1)<\/span><br>\n<span style=\"font-size: 10pt;\"> Mini DisplayPort that supports an external display at 2560&#215;1600<\/span><br>\n<strong>Procedure :<br>\n<\/strong>1)From mac OS , using utility disk, i resized Osx partition freeing up space for Linux ( i did not format this empty space)<br>\n2) i &#8216;ve downloaded a debian image (i used netinst ) and put in a usb pen (i used unetbootin)<br>\n3) i have connected wired cable (wi-fi will not work at first time)<br>\n4)\u00a0inserted usb pen, turned on mac holding down the Option key while booting<br>\n5) I have installed Debian &#8211; i formatted free space as ext4, \u00a0i choose Mate as display manager, because is light (Kde would have been unfeasible)- LightDM was selected automatically as login manager.<br>\nAfter reboot, MBR will be overwritten by Grub, so only Debian will start (for now)<br>\n<strong>Fix Reboot<br>\n<\/strong>Shutdown, suspend and hibernate all work out of the box. For reboots, a modification should be made.<br>\n# <span style=\"color: #0000ff;\">\/nano\/etc\/default\/grub<\/span><br>\nadding \u00a0&#8220;<em><span style=\"color: #0000ff;\">reboot=pci<\/span><\/em>&#8221; in GRUB_CMDLINE_LINUX DEFAULT row<br>\nif e.g. you have<br>\n<em>GRUB_CMDLINE_LINUX_DEFAULT=&#8221;quiet splash&#8221;<br>\n<\/em>will become\u00a0<em>GRUB_CMDLINE_LINUX_DEFAULT=&#8221;quiet splash <strong>reboot=pci<\/strong>&#8221;<br>\n<\/em>Now, on the terminal run <em>sudo <span style=\"color: #0000ff;\">update-grub<\/span><\/em>, shutdown macbook and power it on again.<br>\nReboot should works at the end.<br>\n<strong>Refind Bootloader installation<br>\n<\/strong>Since i have Mac Osx in the other partition, i need to install Refind boot manager, that will allow to choose between Debian\/Mac during system startup, therefore :<br>\n# <span style=\"color: #0000ff;\">apt-get install refind<\/span><br>\nAfter installation, at startup time you will have in addition to Mac,\u00a02 (?) Debian icons, each of which respectivaly run initrd (initial ramdisk) and vmlinuz (kernel).<br>\nLeaving aside initrd\/vmlinuz explanation, (is not the scope of this post) , important thing to know is that if we will boot using initrd we&#8217;ll use Grub, while if we will boot choosing kernel we&#8217;ll not use Grub<br>\n\/boot\/initrd.img-4.9.0.3-amd64 &#8211;&gt; start with grub<br>\n\/boot\/vmlinuz-4.9.03-amd64 &#8211;&gt; start without grub<br>\nSince as i described in Grub section, reboot works thanks to grub modification (reboot=pci); therefore clearly we need to start image that uses grub (unless you want to reboot the macbook by turning it off and then turning it back on with the button \ud83d\ude42<br>\nOnly option is to use initrd.img, so we have to modify refind configuration in order to hide vmlinux image in refind startup menu:<br>\n# <span style=\"color: #0000ff;\">nano \/boot\/efi\/EFI\/refind\/refind.conf<\/span><br>\nand we add:<br>\n<em>dont_scan_files vmlinuz-4.9.0-3-amd64<br>\n<\/em><em>scan_all_linux_kernels false<br>\n<\/em>Save and Exit.<br>\n<b>Video drivers<br>\n<\/b>i am not a nouveau lover:basically, in my opinion Nvidia drivers working better, so i don&#8217;t see any reason to not use them; furthermore, i needed to have possibility to work also with an external monitor and this is perfectly working using nvidia drivers<br>\nTherefore i installed nvidia-drivers (340) and \u00a0nvidia-settings (optional but strongly suggested)<br>\n# <span style=\"color: #0000ff;\">apt-get install nvidia-legacy-340xx-driver nvidia-settings-legacy-340xx<\/span><br>\nNvidia-settings-legacy is a GUI with all settings, useful especially if you need to use an external monitor (but not only, as you can see later).<br>\nAfter reboot you will see nvidia logo before login-manager (obviously you can remove it).<br>\nNB i tried to install drivers with version &gt; 340 but did&#8217;nt work out , so don&#8217;t waste your time:-)<br>\n<strong>Wi-fi<br>\n<\/strong>At first boot,Wi-fi will be not recognized<br>\nwe have to install broadcom drivers<em><br>\n<\/em># <span style=\"color: #0000ff;\">apt-get install linux-image-$(uname -r|sed &#8216;s,[^-]*-[^-]*-,,&#8217;) linux-headers-$(uname -r|sed &#8216;s,[^-]*-[^-]*-,,&#8217;) broadcom-sta-dkms<\/span><br>\nlet&#8217;s avoid that other wifi modules would be in conflict with my broadcoam<br>\n# <span style=\"color: #0000ff;\">modprobe -r b44 b43 b43legacy ssb brcmsmac bcma<\/span><br>\nnow\u00a0 we add our wl module<br>\n# <span style=\"color: #0000ff;\">modprobe wl<\/span><br>\nat reboot you should have your working Wi-fi.<br>\n<strong>Audio<br>\n<\/strong>Work out of the box, Nvidia audio card was recognizes, however checking alsamixer*configurations i noticed that pulseaudio was present as additional sound card, so i decided to remove it<br>\n# <span style=\"color: #0000ff;\">apt-get remove pulseaudio<br>\n<\/span>After reboot , default card will be HDA Nvidia<br>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2013\" src=\"https:\/\/www.fabionline.net\/blog\/wp-content\/uploads\/macbookdebaudio.png\" alt=\"\" width=\"253\" height=\"83\" \/><br>\nHeadphone as default are set to zero volume; with alsamixer you can active them (headphone section)<br>\n*i strongly suggest to install alsamixer and alsamixer-gui<br>\n<strong>Isight (webcam)<br>\n<\/strong>Work out of the box , i suggest to make a first check doing (being root) <span style=\"color: #0000ff;\">dmesg | grep iSight\u00a0<\/span><br>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2012\" src=\"https:\/\/www.fabionline.net\/blog\/wp-content\/uploads\/macbookdebisight.png\" alt=\"\" width=\"754\" height=\"75\" \/><br>\nto see cam in action you can also install\u00a0<em>cheese<\/em>, and\u00a0<em>guvcview<\/em>\u00a0to change settings.<br>\n# <span style=\"color: #0000ff;\">apt-get install cheese guvcview<\/span><br>\n<span style=\"font-size: 10pt;\"><strong>Optional ( isight-firmware-tools)<\/strong><\/span><br>\nthis part is optional (if cam works, skip this part)<br>\ni installed isight-firmware-tool<br>\nI wanted to try <em>isight-firmware tool<\/em> extracting original firmware directly from Mac Osx partition : In order to avoid boring useless permission problems, instead to specify Mac Osx path in tool i prefered to copy in advance the file\u00a0<em>AppleUSBVideoSupport<\/em> from Mac Osx partition to my Desktop ,\u00a0so path was \/home\/fafa\/Scrivania\/AppleUSBVideoSupport<br>\nThen i have execute command:<br>\nroot@MacDebian:\/home\/fafa\/Scrivania#<br>\n<span style=\"color: #0000ff;\">ift-extract -a \/home\/fafa\/Scrivania\/AppleUSBVideoSupport<br>\n<\/span>As result:<span style=\"color: #0000ff;\"><br>\n<em>** Message: Found firmware signature at offset 0x1998.<br>\n<\/em><em>** Message: Firmware extracted successfully in \/lib\/firmware\/isight.fw<br>\n<\/em><em>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<br>\n<\/em><em>** Message: Firmware patched successfully<br>\n<\/em><\/span>Now, looking in \/lib\/firmware you can see<em> isight.fw<br>\n<\/em>I must say i did&#8217;nt notice any difference after installation of this firmware, so if your webcam will immediatly works , you can avoid to install isight-firmware-tools<br>\nNB: Scrivania is Desktop in italian language :-).<br>\n<strong>f1-f2 \u00a0buttons( backlights)<br>\n<\/strong>At beginning will not work, i fixed problem adding in \/etc\/X11\/xorg.conf following row, under Device section<strong><br>\n<\/strong><em>Option &#8220;RegistryDwords&#8221; &#8220;EnableBrightnessControl=1&#8221;<br>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2021\" src=\"https:\/\/www.fabionline.net\/blog\/wp-content\/uploads\/macbookdebnvidiax.png\" alt=\"\" width=\"243\" height=\"98\" \/><br>\n<\/em>if xorg.conf is not present, you can easily edit\/save it trough nvidia-settings tool:<br>\nGo to Server Display Configuration , then on the bottom right corner clickbutton \u201csave toX configuration file\u201d , before save, click \u201cshow preview\u201d and addOption &#8220;RegistryDwords&#8221; &#8220;EnableBrightnessControl=1&#8221; under Device section<br>\nAfter reboot , f1-f2 should work \u2013 in order to preserve backlight level after reboot, i strongly suggest to add string in grub<br>\n<span style=\"color: #0000ff;\"># \/nano\/etc\/default\/grub<br>\n<\/span>then in<span style=\"color: #0000ff;\">\u00a0<em>GRUB_CMDLINE_LINUX_DEFAULT section i added<\/em><\/span><br>\n<em><span style=\"color: #0000ff;\">acpi_backlight=vendor<\/span><br>\n<\/em>so (if you followed my previous suggestion ) will have situation below<br>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2025\" src=\"https:\/\/www.fabionline.net\/blog\/wp-content\/uploads\/macbookdebgrub.png\" alt=\"\" width=\"525\" height=\"18\" \/><br>\n<span style=\"font-size: 10pt;\">NB: i have also removed from grub &#8220;<em>quiet-splash &#8221; <\/em>cause i like to see loading services (of course you can leave it.<\/span><br>\n<strong><br>\nf10-f12 buttons (sound level regulation )<br>\n<\/strong>Work out of the box.<br>\n<strong>Bluetooth<\/strong><br>\nIt seems working; i wrote &#8220;seems&#8221; because i did not tested it with other bluetooth devices.<br>\nas default is enabled, to disable it:<br>\n#\u00a0<span style=\"color: #0000ff;\">nano \/etc\/bluetooth\/main.conf<br>\n<\/span>Then look for a row named\u00a0<em>Initially powered =true <\/em>and replace &#8220;true&#8221; with &#8220;false&#8221;<br>\nSave, exit and reboot: Afterthat Bt should be off.<br>\n<strong><br>\nFinal result\u00a0<\/strong>(click image below for enlarge)<br>\nDebian 9 stretch + Mate+Docky on macbook 6.1<br>\n<a href=\"http:\/\/www.fabionline.net\/aaaaaaa\/wp-content\/uploads\/macbookdebianscreen.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-2043 size-full\" src=\"https:\/\/www.fabionline.net\/blog\/wp-content\/uploads\/macbookdebianscreen_mini-1.jpg\" alt=\"\" width=\"420\" height=\"263\" \/><\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Here how i installed Debian 9 stretch on my old macbook 6,1 (mid 2009) NB: where you&#8217;ll see a # before command, means you should be root or need to use sudo. Hardware: Video card NVIDIA \u00a0GeForce 9400M with 256 &hellip; <a href=\"https:\/\/www.fabionline.net\/blog\/linux\/installazione-debian-9-su-macbook\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_links_to":"","_links_to_target":""},"categories":[5,6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/posts\/1994"}],"collection":[{"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/comments?post=1994"}],"version-history":[{"count":1,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/posts\/1994\/revisions"}],"predecessor-version":[{"id":2612,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/posts\/1994\/revisions\/2612"}],"wp:attachment":[{"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/media?parent=1994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/categories?post=1994"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/tags?post=1994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}