Advice please re MBP dual boot install

Help with issues regarding installation of Debian

Advice please re MBP dual boot install

Postby kdeen » 2020-03-26 10:42

Hi All,

I have not used Linux in many years. I want to come back. :) I would like to convert my macbook pro (2017, 13-inch, 14,1, APFS) to dual boot Debian/macOS. I have done nothing yet. At this stage I am only reading and trying to understand how to do it. I have four questions.

I am currently "sheltering in place" due to coronavirus in the south of Sweden, thousands of miles from home. All I have with me is my MBP, an external hard drive, and access to wireless and (for a price) wired Internet. I do not have a USB stick with me. Where I am, it is still possible, as I write this at least, to go to a store for non-essential items. I could go buy a USB stick. For wired Internet, I could go buy a Thunderbolt-to-Ethernet adapter.

Q1: Does there exist a howto for me? I found https://wiki.debian.org/MacBookPro and https://wiki.debian.org/InstallingDebianOn/Apple but these are out of date. The former talks only about HFS+ and ext3 (I have APFS and want to create ext4.) The latter talks about specific MBP models up to 12,1 (I have 14,1). And the former has a couple of sentences which clearly imply "beware - advice here is likely to be obsolete soon". (I quote from BootLoader section: "In future ... it may be able to use ..." and "Best practice has been changing with improved development of GRUB and supporting software.")

Mar 26 Update: This page looks promising: https://www.lifewire.com/dual-boot-linu ... os-4125733 It was updated Mar 25 2020. It's for installing Ubuntu, but maybe I can tweak it to install Debian. It's worth a try. I'm on it ...

Q2: Can I create and use a partition on my external HD as a USB-stick-lookalike? I can't find anything online to support or refute my guess that this ought to work. (Mar 27 update: I bought a USB stick, so this question is now moot for me. (mac Disk Utility hangs when I try to add a partition to my external HD. I'll look into this new issue some other day. Maybe. The disk still works fine in its primary role as backup.))

Q3: If answer to Q2 is no, what do you recommend I do? (Mar 27 update: moot.)

Q4: If answer to Q3 is "buy a USB stick" (my guess), how much capacity do I need? (Mar 27 update: moot. i bought 16GB, the smallest this particular store had. I'm sure that's plenty big.)

I should stop right there. Read on only if you have time to kill haha ...

I'd like to tell you the reason I'm choosing Debian as my distro, just so someone can tell me if I'm missing something. I'm a 68yo retired programmer. I learned Unix in 1972, long before there was a windowing system. To this day, I still, even in macOS, work at the command line as much as I can. I prefer to install packages ONLY if and when I know I will use them. I probably don't need a desktop - just X + a window manager should be fine I think. Given all this, from what I understand, the Debian distro seems to be tailor-made for me.

Ultimately, I'd like to ditch Apple and buy a Dell or similar laptop with a 1TB SSD, something Apple does not offer in a laptop. So, an obvious solution for me would be to buy that Dell NOW and leave my MBP as is. But, well, I anticipate spending many hours setting up Linux and porting my software, and I love to work in coffee shops and libraries, and I'd rather not be carrying around two laptops. More importantly, I'd like to take Linux for a "test drive" before I spend the money on that Dell. And, during that "test drive", I want a FAST Linux, booting from internal SSD. Thanks in advance.
Last edited by kdeen on 2020-03-27 09:21, edited 1 time in total.
kdeen
 
Posts: 9
Joined: 2020-03-25 18:06

Re: Advice please re MBP dual boot install

Postby Deb-fan » 2020-03-26 13:05

Never had nor dualbooted a Mac, this looks like a good resource on the topic though ... https://www.lifewire.com/dual-boot-linu ... os-4125733

Agree with much of what the guy says too, was going to suggest rEFInd as the bootloader, the guy Rod Smith, developer of rEFInd clearly knows his stuff and gnu/Linux + Mac is part of his stuff. I've played with rEFInd on a uefi-gpt system, it's certainly not bad regardless. I'd look over any documentation he has on the subject at his website for rEFInd. I also agree with them advising folks to try Ubuntu (or my preference in such Linux Mint)whatever is based on their latest LTS = long term support offerings. When uefi(+ secureboot) + gpt hit, I had a problem child system and wasn't yet up to speed, many distro's such as Debian wouldn't install normally. So as a shortcut I used Linux Mint's Xfce release on a 10-15gb partition, was just intended to smooth things over and could be used to boot non-uefi etc capable distro's.

Anyway, Ubuntu ( or LM's Ubuntu based main releases) are geared to widest range hardware possible out-of-box, surely this includes Mac/Apple hardware. Plus that tute suggests trying it out in live session prior to installing and yeppers that ext4 is supported. REFInd is perfectly capable of ext4 and with it handling the boot, doesn't matter if Mac decides to list them as "Unknown" or whatever when you're booted into it. Can't hurt to try Ubuntu, tute says 25gb's is the bare minimum Canonical Inc recommends for an install. Personally I favor all of 29-30gbs for Debian. Though I also do minimal netinstalls a Stretch install takes up all of 4-5gbs, that's after several years and I do keep most my shared data on a separate partition, a Buster install about the same anyway. Not sure what a stock Debian install uses in terms of disk space, they'll have those posted somewhere surely. Only ever once installed a full Debian OS and it was by accident long ago while attempting to do a bare minimal netinstall. Bare minimal netinstall's don't require super-nix-ninja powers or anything but are much more involved than a full Debian OS install in out-of-box condition. Would tackle one project at a time and installing something gnu/Linux to your Mac is obviously priority/proj #1 here.

One thing of possible interest, gnu/Linux support swapfiles as it has for a long time. People don't necessarily have to use a dedicated partition, I do because it's what I'm used to and it's the conventional method. Though people are doing much with swapfiles as well. Evidently even able to hibernate with them and whatever else. A swapfile is still going to take up X-amount of disk space and I also tend to have 2, sometimes 3 other gnu/Nix installs on the system, so also prefer having a dedi swap partition for that reason, they can all share it no problem. Of course being gnu/Linux someone can have a combo, bunch of swap partitions and/or files and assign priorities for how they should get used.

Sighs ... kind of jumping all over the place here and not done either. :)

Not sure as to exactly how partitioning works on Mac's either way. Whether there's some limit to how many, some other oddness etc. So mostly just going to shut it, though if the above is relevant, could always shoe-horn Debian in there(or others), perhaps use a Kvm virtual machine or etc too. Debian is very much capable of anything Ubuntu is(or buntu based)last I bothered checking Ubuntu still is vast majority Debian, just no longer binary compatible for their own reasons. Would still favor buntu ( or Mint) over Debian in this situation just cause of hardware support, less fiddling required and likely to be involved vs going with Debian in all it's glory. That's one of Debian's founding principles and obvious traditions, no proprietary out-of-box, that's certainly going to apply to Apple(Mac OS.) Just saying Ubuntu( Linux Mint) probably path of lesser resistance. At least until you get more familiar and comfortable.

Also have installed more than a few gnu/Linux Os's with only wireless connection as an option. Another reason for advising buntu/Mint, more likely to have any required wifi driver for you already. Will quickly become apparent during live session testing whether or not a wired connection might be involved. If you have an external usb drive, then don't necessarily need a thumb drive. Really is just a bigger thumb drive, errrr, sort of. Never had to use an external usb drive for the purpose can't see much difference, still just a block device, still capable of being partitioned (a size adequate to hold the iso and would go with fat32 as usual.) Using an external drive vs a thumb drive should be no problem, same, same really.

It's easy enough to get a bay adaptor for not all that much on a pc to turn an optical drive bay into a place for a second drive (like an SSD.) Not sure if that's the same for Mac, not seeing much reason it shouldn't be. Something to take up later, when this plague scare calms down. It's causing all manner of weirdness here in the USA too, in my state the Governor closed all public offices to the public until Apr 6th. I'm not getting what all the hubbub is about it. An avg flu season supposedly kills 22thou people per yr here, mostly old and really young. Mortality rate of under 4%, much higher than influenza, not omg we're all going to die by any stretch though. Haven't really been paying all that close attention to this but poking here and there. Data I looked over said 80% of the fatalities attributed are people 65yrs or older. Errrrr ... with you being an 68yr old retired programmer that's probably not as comforting as intended.

Also it's clearly not funny when people of whatever age are dying from a virus. Only saying yeah, mucho nastier than flu but people are acting like it's a prospective extinction event and the stuff I'm seeing on it clearly indicates that's ridiculous. Keeps bugging me, making me wonder what in the hades I'm missing here. Guess I should actually start reading about it perhaps. Of course I'm not going to slow dance with a bunch of people known to be infected with this bug, only not losing much sleep over it either. As a relatively healthy middle aged person. Would be taking it more seriously with young ones or esp elderly people I care about around. What's it like there, any credible stats you know of on this situation ?

Ending on a good note, your experience with Unix/Mac and the command-line is bound to come in handy with anything tech. Tackling gnu/Linux + Mac definitely shouldn't be overly tough.
Deb-fan
 
Posts: 679
Joined: 2012-08-14 12:27

Re: Advice please re MBP dual boot install

Postby Head_on_a_Stick » 2020-03-26 13:33

kdeen wrote:Can I create and use a partition on my external HD as a USB-stick-lookalike?

You should be able to burn the Debian ISO image to the hard drive and boot from it as if it was a USB stick. But don't try unetbootin (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775689), use either dd(1) or cp(1) from the OSX terminal, as per https://www.cyberciti.biz/faq/how-to-cr ... d-command/

Search for "unofficial non-free debian iso image" to find the images that already include the non-free firmware that your hardware will almost certainly need and also check my wireless & graphical [FAQ] posts in the HowTo section for post-installation tips.

The netinstall ISO will allow you to install a console-only system (decline to select a graphical desktop when asked) so that you can build up a simple window manager environment.

And please also accept my message of solidarity from a fellow self-isolator in London :)
User avatar
Head_on_a_Stick
 
Posts: 11453
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Advice please re MBP dual boot install

Postby Deb-fan » 2020-03-27 10:22

Just another good looking resource on this topic. https://linuxnewbieguide.org/how-to-ins ... -computer/

Some added misc thoughts. For many obvious reasons would still advise Linux Mint or Ubuntu itself. Something a person is already unfamiliar with, add installing Debian with it's clear stance on no non-free more complication, if were to attempt a minimal netinstall on top of that yet more. Sheesh whoever wants to do the math and conclude the likely outcome. :P It's only common sense. If insist at least consider the more minimal Debian based which already include nonfree and personally would want some solid indication of users successfully dualbooting the distro w Mac systems. Searching google, it's forum, perhaps joining and asking.

The unofficial iso with nonfree included doesn't even support my Broadcom wireless (surely would have had the Ethernet but not like the wl module is uncommon) and you'll see no shortage of nixer's using it and still having hardware support problems which can be easy enough to sort out after install but still this is PC hardware, let alone Mac's. Used a few Debian based which installed via wireless no problem. Thing about unetbootin yep, still popular though, guessing many still use it w/o issues to burn nix images. Honestly have never used it and do go with cp or dd. Quit using Windows yrs ago. Though guy in that link mentions an alternative tool he likes. Am really being overly cautious, not like dualbooting Nix + Mac isnt something many have been doing a long time already. Only isnt my data or hardware(no 1st hand w Mac's) so seems right to advise with more caution. There's some good infobits in these posts somewhere. You'll get things figured out kdeen. :)
Deb-fan
 
Posts: 679
Joined: 2012-08-14 12:27

Re: Advice please re MBP dual boot install

Postby kdeen » 2020-03-27 11:47

check my wireless & graphical [FAQ] posts in the HowTo section for post-installation tips.


Head_on_a_stick - Could you help me find this post to which you refer? I poked around a bit but so far no joy.
kdeen
 
Posts: 9
Joined: 2020-03-25 18:06


Re: Advice please re MBP dual boot install

Postby kdeen » 2020-03-27 13:52

Mar 27 3:23pm Sweden time update:
I copied (dd) this(*) to my USB stick, and now I can boot to Debian live with xfce. But my MBP trackpad does not work and I think ditto the keyboard ("I think" because I am not sure what kb functionality to expect at the xfce desktop). I am researching/contemplating my options. I may need to buy or borrow a USB kb and a USB mouse in order to download drivers.

(Yes I did say I would skip a desktop environment entirely. But I decided to try xfce 'cuz they say it's light weight. No frills, no animations. I've never had experience with a lightweight desktop. Who knows maybe I'll like it.)

Would installing linux as a VM solve the kb/trackpad issue? VirtualBox? I might be able to borrow a USB mouse but I'd have to buy a USB kb and I'm trying to avoid that. If I must spend more than a few bucks, I'd rather buy a cheap laptop and make it a dedicated Linux box...

(*) https://cdimage.debian.org/cdimage/unof ... onfree.iso
kdeen
 
Posts: 9
Joined: 2020-03-25 18:06

Re: Advice please re MBP dual boot install

Postby Head_on_a_Stick » 2020-03-27 14:12

kdeen wrote:I think ditto the keyboard

What problems are you having with the keyboard, exactly?

kdeen wrote:Would installing linux as a VM solve the kb/trackpad issue?

Debian should support most virtual input devices. But then it should also support most real input devices.

kdeen wrote:VirtualBox?

That was removed from the stable release because of poor security support from the VB developers. I think you can use the guest additions from the buster-backports repositories though: https://backports.debian.org/Instructions/
User avatar
Head_on_a_Stick
 
Posts: 11453
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Advice please re MBP dual boot install

Postby kdeen » 2020-03-27 15:42

What problems are you having with the keyboard, exactly?


The keyboard, best I can tell, is completely dead - except for the power off key. That brought up a dialog box, with options like "Log Off", "Shut Down", and some others. However, I was not able to change the selection nor choose the default selection "Log Off". <Enter> does nothing. Arrow keys do nothing. The various other keys and key combinations I tried did nothing. My uncertainty is just based on the fact that I'm looking at a GUI desktop and I am not sure what you're supposed to be able to do from the kb. If I hold down the power-off key for some seconds, I get a hard shutdown as always on mac.
kdeen
 
Posts: 9
Joined: 2020-03-25 18:06

Re: Advice please re MBP dual boot install

Postby Head_on_a_Stick » 2020-03-27 15:54

kdeen wrote:My uncertainty is just based on the fact that I'm looking at a GUI desktop and I am not sure what you're supposed to be able to do from the kb.

Can you switch to a console screen with <ctrl>+<alt>+F3? Use <alt>+F7 to get back to the desktop (or perhaps <alt>+F2, not sure which display manager the Cinnamon ISO uses).

2017 is pretty recent (for Debian stable) so the stock kernel may not offer the best support, see also viewtopic.php?f=16&t=139003 (for an installed system).

This site is for the 2016 MBP variant: https://github.com/Dunedan/mbp-2016-linux
User avatar
Head_on_a_Stick
 
Posts: 11453
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Advice please re MBP dual boot install

Postby kdeen » 2020-03-27 18:02

Head_on_a_Stick wrote:Can you switch to a console screen with <ctrl>+<alt>+F3?


Short answer no ... but there is more to say ...

I am using the mac boot manager (old down the <option> key during power up, and I get a choice - boot from Macintosh HD or "EFI Boot". I choose EFI Boot. Then I get a GNU GRUB screen with 6 or so choices, including "GNU/Debian Live" (or similar, sorry, this is from memory), "Debian Installer", and "Debian Graphics Installer". At THIS screen, GRUB screen, the up and down arrow keys WORK to make a selection, and Enter key WORKS to choose a selection. I choose default "GNU/Debian Live", and then I see a pretty (but unfamiliar to me) xfce desktop. HERE is where kb fails, except for the power down key (which of course is another name for the power up key).

Mac does not have an <alt> key, but I read somewhere that the <option> key maps to <alt> when running linux. So, no, <control>+<option>+<F3> does nothing. Nor does <fn>+<control>+<option>+<F3>. Nor do a dozen other variants I tried.

On a lark, I went to the "Debian Installer" from GRUB one time, just to further test the kb. Here, you get a screen where you are supposed to make a selection from a text based menu. And here, there is a help message on screen that tells me how to use the keyboard (<Tab> and <space> navigate the menu, if I remember correctly, and <Enter> makes a selection.) Nothing I tried, not <Tab>, not <space>, not <Enter>, not anything, had any affect on this page. KB is dead here as well best I can tell, except for the ppwer Off button.

So what do you make of the fact that kb works in GRUB, but only in GRUB?
kdeen
 
Posts: 9
Joined: 2020-03-25 18:06

Re: Advice please re MBP dual boot install

Postby Head_on_a_Stick » 2020-03-27 19:53

If the keyboard works in the GRUB screen then press "e" with the relevant menu entry highlighted and add this to the end of the line that starts with "linux":
Code: Select all
noapic nolapic

Then press <ctrl>+x (at the same time) to boot the modified entry.

Reference: https://wiki.debian.org/DebianInstaller ... 7t_work.21

Perhaps also try the iommu=soft kernel parameter.
User avatar
Head_on_a_Stick
 
Posts: 11453
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Advice please re MBP dual boot install

Postby kdeen » 2020-03-27 19:55

This resource(*) says keyboard and trackpad "works out of the box with Linux 5.3 and above" on MacbookPro 14,1 (which is what I have). My .iso is debian-live-10.3.0-amd64-xfce+nonfree.iso. Does this mean I am using Linux 10.3.0?

(*) https://github.com/Dunedan/mbp-2016-lin ... --touchpad.
kdeen
 
Posts: 9
Joined: 2020-03-25 18:06

Re: Advice please re MBP dual boot install

Postby Head_on_a_Stick » 2020-03-27 20:22

No, "LInux" refers to the kernel version. Debian stable is on 4.19.

I think I can build you an image with the kernel from the buster-backports repositories if you give me a bit.

Or use an Arch Linux ISO image and this method to install a system with that newer kernel version, if you're feeling adventurous.
User avatar
Head_on_a_Stick
 
Posts: 11453
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Advice please re MBP dual boot install

Postby kdeen » 2020-03-27 21:47

I think I can build you an image with the kernel from the buster-backports repositories if you give me a bit.


Wow that is most kind of you! "giving you a bit" is no problem since I'm going to sleep in a few minutes. It's late here.

Or use an Arch Linux ISO image and this method to install a system with that newer kernel version, if you're feeling adventurous.


I'll keep that thought in my hip pocket. I'll try it if need be, but definitely not tonight. And tomorrow I'm moving, I may be busy with other things most of the day.

f the keyboard works in the GRUB screen then press "e" with the relevant menu entry highlighted and add this to the end of the line that starts with "linux":
CODE: SELECT ALL
noapic nolapic
Then press <ctrl>+x (at the same time) to boot the modified entry.


I tried this. Didn't work. (Do I ignore "CODE: SELECT ALL"?) Permit me to elaborate on this ...

When I type "e", here is what I see (It's possible I have a typo here, as I copied by hand to paper and now from paper.)
Code: Select all
setparams 'Debian GNU/Linux Live (kernel 4.19.0-8-amd64)'

  linux /live/vmlinuz-4.19.0-8-amd64 boot=live components splash quiet "${loopback}"
  initrd /live/initrd.img-4.19-0-8-amd64


So yeah I made the edit you suggest and now the linux line looks like this:

Code: Select all
  linux /live/vmlinuz-4.19.0-8-amd64 boot=live components splash quiet "${loopback}" noapic nolapic


Then I pressed F10 to boot (ctrl-x did not work, but an on-screen message says I can use ctrl-x or F10). I get xfce desktop like before, and, like before, kb and trackpad are dead.

More info and thoughts...

When the mac boot manager gives me a screen where I choose between "Macintosh HD" and "EFI Boot" it also gives me a dropdown menu of wifi networks. I can select a wifi network. If I do that, I then get a enter-password screen. So, if I do this, when I am in grub and beyond, maybe, just maybe, I have Internet.

On the other hand, I notice when I get to the xfce desktop there is a message "You have Wi-Fi networks available. Use the Network Manager to login to a wifi network." (Or something close to that. This wording is from memory.) What can we infer from this? I'm guessing we can infer that (a) my wifi hardware is supported (linux sees that networks are available) and (b) the mac boot manager's wifi login does not carry forward to the linux desktop. You agree?

Is it possible in the grub edit screen to specify booting to a virtual console? If so then maybe from there I can install kb/trackpad drivers? Or ... Is it possible to install drivers from the grub command line?

One more tidbit: During the boot between GRUB and xfce desktop, some error messages flash on the screen for less than a second, 2 or 3 times, same messages I think. Too fast for me to write down. But I can say this: several (but not all) of the messages include the phrase "ACPI Error" and "ACPI (BIOS) Error". This happens with or without the edit to the linux command. Makes me wonder (just a know-nothing thought): Is it possible I want "noacpi" rather than "noapic"?
kdeen
 
Posts: 9
Joined: 2020-03-25 18:06

Next

Return to Installation

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable