You are not logged in.

#1 2018-07-15 18:42:37

MaSydJun
Member
Registered: 2013-05-25
Posts: 12

Cannot install ArchLinux on new MacBook Pro due to unrecognized SSD

Hey guys,

yesterday I bought the new MacBook Pro (MacBookPro15,2), which has just been released a few days ago.
Now I want to use ArchLinux alongside OSX, so I followed the instructions on https://wiki.archlinux.org/index.php/Mac.
I couldn't get far, cause my Live-Boot Archlinux (Linux archiso 4.17.3-1-ARCH [...]) obviously does not support the SSD used in my macbook.

lsblk

for instance gives me:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0   7:0    0 463M   1 /run/archiso/sfs/airootfs
sda      8:0    1   7,6G  0 disk 
├─sda1   8:1    0   574M  0 part /run/archiso/bootmnt
├─sda2   8:2    0    64M  0 part

which is my Live-Boot USB drive.

lspci | grep storage

gives me:

02:00.0 Mass storage controller: Apple Inc. ANS2 NVMe Controller (rev 01)

Is there a new driver for this SSD or do I need a newer kernel, afaik 4.17.3-1 is already pretty new.

Thanks in advance!

Regards
Stefan

Last edited by MaSydJun (2018-08-17 12:43:44)

Offline

#2 2018-07-15 18:58:05

progandy
Member
Registered: 2012-05-17
Posts: 3,784

Re: Cannot install ArchLinux on new MacBook Pro due to unrecognized SSD

Try to rerun your lspci command with "-nn" to get the pci device id.

You might try to bind the nvme driver manually to this id, but I give no guarantee that this will keep you data safe. (Normally it should either work or throw errors, though)
https://bbs.archlinux.org/viewtopic.php?pid=1719588


Edit: If manually binding works, then a request to add the id would be in order, if you want you can create the necessary patch as well. Otherwise it should be a bug report.
https://lists.infradead.org/mailman/listinfo/linux-nvme
https://www.kernel.org/doc/html/v4.17/a … -bugs.html
https://www.kernel.org/doc/html/v4.17/p … tches.html

Example of a patch for an older NVME: http://lists.infradead.org/pipermail/li … 04618.html

Last edited by progandy (2018-07-15 19:11:51)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#3 2018-07-15 19:35:41

MaSydJun
Member
Registered: 2013-05-25
Posts: 12

Re: Cannot install ArchLinux on new MacBook Pro due to unrecognized SSD

Thanks a lot for the quick answer!

first of all, I checked

lspci -nn

Now i see the device ID in brackets which is:

106b:2005

As I checked your link for the example patch in NVME, I recognized the following line:

{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },  /* for the MacBook 9,1 */

I'm sure those device ID's are written in hex and the constant

PCI_VENDOR_ID_APPLE

could be

106b

(Not sure though). So this might be already pretty close.

The only problem is, I don't know which of those drivers in /sys/bus/... is the one for NVME devices, in order to manually bind it to my MacBook SSD.
Do you know how to find that out? I mean there are a couple of directories in /sys/bus. (one of them being

nvmem

, not sure if thats what I need...)

[EDIT]

Ok, the following link verifies the device ID:
https://devicehunt.com/view/type/pci/ve … evice/2005

Since on the website it says "Type: PCI", I thought I need to search the driver in /sys/bus/pci. And yes, there it is: nvme
... And it's also kinda obvious, since I found the device through lspci ...

Thank you, I will try this out.

[EDIT II]

Now I face a new challenge: How to manually bind the device ID to a driver?
On this website I read, that i cand achive this with a command like:

echo -n "1-1:1.0" > /sys/bus/usb/drivers/usb-storage/bind

I tried the same with my device ID:

echo -n "106b:2005" > /sys/bus/pci/drivers/nvme/bind

but it gives me:

echo: write error: no such device

[EDIT III]

Ok, I know, why this doesn't work. I need to supply a actual ID from /sys/bus/pci/devices in the echo command, not the one from "lspci -nn".
I just don't know how to map those ID's.

Last edited by MaSydJun (2018-07-15 19:56:22)

Offline

#4 2018-07-15 20:43:42

progandy
Member
Registered: 2012-05-17
Posts: 3,784

Re: Cannot install ArchLinux on new MacBook Pro due to unrecognized SSD

I did give you a link that explains the binding as well: https://bbs.archlinux.org/viewtopic.php?pid=1719588

I guess this should work:

modprobe nvme
echo 106b 2005 > /sys/bus/pci/drivers/nvme/new_id

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2018-07-15 21:45:47

MaSydJun
Member
Registered: 2013-05-25
Posts: 12

Re: Cannot install ArchLinux on new MacBook Pro due to unrecognized SSD

Sorry, seems like I missed this one.
The commands you provided, actually worked. I also checked "lsblk" it showed my SSD (without partitions though).
However, after a few seconds my MacBook turned off. I think this driver might not 100% suitable in this case. As you already said:

You might try to bind the nvme driver manually to this id, but I give no guarantee that this will keep you data safe. (Normally it should either work or throw errors, though)

[EDIT]

I can confirm, this happens every time after manually binding the device to the driver with:

modprobe nvme
echo 106b 2005 > /sys/bus/pci/drivers/nvme/new_id

Last edited by MaSydJun (2018-07-15 22:00:00)

Offline

#6 2018-07-16 11:52:56

progandy
Member
Registered: 2012-05-17
Posts: 3,784

Re: Cannot install ArchLinux on new MacBook Pro due to unrecognized SSD

Maybe you'll have better luck with 4.18. You'd still have to load the driver with new_id, though.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2018-07-17 19:03:49

MaSydJun
Member
Registered: 2013-05-25
Posts: 12

Re: Cannot install ArchLinux on new MacBook Pro due to unrecognized SSD

Sorry, I won't be able to test it for the next two weeks. But I will definately post my results after I tested it.

Offline

#8 2018-08-24 18:43:10

jojtek
Member
Registered: 2018-08-24
Posts: 1

Re: Cannot install ArchLinux on new MacBook Pro due to unrecognized SSD

Hey there, tried same with Manjaro, kernel 4.14, Arch kernel 4.17 and Ubunu 18.04 kernel 4.15..

and the result is the same, after binding the nvme is visible but mac restarts after a few secs.

Does anyone have a solution for that?

Thanks

Offline

Board footer

Powered by FluxBB