You are not logged in.
Pages: 1
Hi there,
I am trying to install arch on a macbook 12" (late 2016 model).
When booting I add
nomodeset
and
acpi=off
as kernel parameters to avoid a blank screen issue.
Once in the shell
fdisk -l
returns
[b]Disk /dev/sda: 28.9 GiB, 31029460992 bytes, 60604416 sectors[/b]
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x7887f83f
[b]Device Boot Start End Sectors Size Id Type[/b]
/dev/sda1 * 0 985087 985088 481M 0 Empty
/dev/sda2 164 131235 131072 64M ef EFI (FAT-12/16/32)
[b]Disk /dev/loop0: 369.5 Mib, 387477504 bytes, 756792 sectors[/b]
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512bytes / 512 bytes
This leads me to believe that the internal ssd is not mounted, and I do not know why.
While I am sure this has been addressed somewhere, I am having difficulty finding anything.
Any help would be greatly appreciated.
Thank you.
Last edited by vasavest (2017-06-21 19:23:04)
Offline
Did you check the wiki[1] for tips/hints? This here[2] seems to be something worth investigating.
[1] https://wiki.archlinux.org/index.php/Mac
[2] https://wiki.archlinux.org/index.php/Ma … sion_9.2C1
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Hey ROOKIE, thanks for responding- not sure how I missed that one!
So it looks like I need to create a custom mkinitcpio hook.
I have read over the wiki page on mkinitcpio to get an idea of what is going on, then I came across this page detailing how someone wrote a custom hook.
From what I gathered I created a short bash script:
#!/bin/bash
modprobe nvme; echo 106b 2003 > /sys/bus/pci/drivers/nvme/new_id
I saved this as 'modprobe' in /etc/initcpio/hooks, then I added 'modprobe' after 'udev' at 'HOOKS="base udev ... etc"' in /etc/mkinitcpio.conf.
I'm not sure if this is how one is supposed to add a custom hook, as I was just winging it.
When I went to regenerate the image by running
# sudo mkinitcpio -p linux
I got the error:
==>Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> ERROR: specified kernel image does not exist '/boot/vmlinuz-linux'
==>Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> ERROR: specified kernel image does not exist '/boot/vmlinuz-linux'
I couldnt find much relevant information from searching for the error , and most of the forum posts are relating to upgrading a kernel. Not really sure what is going on here.
Any help is appreciated.
Thanks!
Last edited by vasavest (2017-06-19 22:07:14)
Offline
I also found this page insightful and thought it might interest anyone else working with a 2016 macbook.
Offline
The initramfs does not use bash, it uses something similar but the syntax for some things is slightly different. For what you want to do it doesn't matter but your shebang is not correct it should be "#!/usr/bin/ash". Check other hooks and take them as examples. Your hook does not seem to "comply" with how a hook should be written, which if you read the page your second link points to it would be obvious. You may also have to add the nvme module to the modules line in mkinitcpio.conf if it isn't added automatically to the initramfs images.
The error message about not finding vmlinuz-linux might be because you haven't mounted your boot partition or it isn't mounted in the right place.
As a last aside, you can and should edit your posts if no one has posted after you and you want to add more information, otherwise you are not complying with our code of conduct https://wiki.archlinux.org/index.php/Code_of_conduct.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
R00KIE, thank you very much for your help.. sorry about not following the code of conduct.
I also apologize for taking so long between posts..
I have fixed the shebang the for hook, but am still stumped on the part about my boot partition not being mounted, or being mounted in the wrong place.
Here is the output of lsblk -f
TARGET SOURCE FSTYPE OPTIONS
/ airootfs overlay rw,relatime,lowerdir=/run/archiso/sfs/airootfs,upperdir=/run/archiso/cowspace/persistent_ARCH_201705/x86_64/upperdir,workdir=/run/archiso/cowspace/persistent_ARCH_201705/x86_64/workdir
├─/proc proc proc rw,nosuid,nodev,noexec,relatime
│ └─/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=33,pgrp=1,timeout=0,minproto=5,maxproto=5,direct
├─/sys sys sysfs rw,nosuid,nodev,noexec,relatime
│ ├─/sys/firmware/efi/efivars efivarfs efivarfs rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/security securityfs securityfs rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/cgroup tmpfs tmpfs ro,nosuid,nodev,noexec,mode=755
│ │ ├─/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd
│ │ ├─/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatime,freezer
│ │ ├─/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatime,blkio
│ │ ├─/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatime,devices
│ │ ├─/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuset
│ │ ├─/sys/fs/cgroup/cpu,cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct
│ │ ├─/sys/fs/cgroup/net_cls cgroup cgroup rw,nosuid,nodev,noexec,relatime,net_cls
│ │ ├─/sys/fs/cgroup/perf_event cgroup cgroup rw,nosuid,nodev,noexec,relatime,perf_event
│ │ ├─/sys/fs/cgroup/pids cgroup cgroup rw,nosuid,nodev,noexec,relatime,pids
│ │ └─/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatime,memory
│ ├─/sys/fs/pstore pstore pstore rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/config configfs configfs rw,relatime
│ └─/sys/kernel/debug debugfs debugfs rw,relatime
├─/dev dev devtmpfs rw,nosuid,relatime,size=4018208k,nr_inodes=1004552,mode=755
│ ├─/dev/shm tmpfs tmpfs rw,nosuid,nodev
│ ├─/dev/pts devpts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
│ ├─/dev/hugepages hugetlbfs hugetlbfs rw,relatime
│ └─/dev/mqueue mqueue mqueue rw,relatime
├─/run run tmpfs rw,nosuid,nodev,relatime,mode=755
│ ├─/run/archiso/bootmnt /dev/sda1 iso9660 ro,relatime
│ ├─/run/archiso/cowspace cowspace tmpfs rw,relatime,size=262144k,mode=755
│ ├─/run/archiso/sfs/airootfs /dev/loop0 squashfs ro,relatime
│ └─/run/user/0 tmpfs tmpfs rw,nosuid,nodev,relatime,size=807824k,mode=700
├─/tmp tmpfs tmpfs rw,nosuid,nodev
├─/etc/pacman.d/gnupg tmpfs tmpfs rw,relatime,mode=755
└─/mnt/usbstick /dev/sdb1 fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096
└─/mnt/usbstick /dev/sdc1 fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096
I noticed that /dev/sda1 (which I believe is the boot partition based on the output of 'fdisk -l', which I posted earlier) is mounted at /run/archiso/bootmnt.
Should I unmount it and mount it somewhere else?
The contents of /run/archiso/bootmnt/ are 'arch EFI isolinux loader'.
I couldnt find 'initramfs-linux.img' or 'initramfs-linux-fallback.img' anywhere.
Thank you for everything, and let me know if there is any more information I can provide.
Offline
Sda2 is an EFI partition, what's the role of sda1 is anyone's guess as you didn't mark the purpose of the partition. Your custom hook should only make the nvme disk visible, the rest is as described in the wiki. For the install media you shouldn't need hooks.
You can and should mount your root and boot partitions somewhere then you install the system or you chroot into your install's root and then run mkinitcpio to include your custom hook in the initramfs.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Now I am very confused.
I realize now that you mean mount the boot & root partitions of my internal hd, not something from the install media.
But I cant mount those partitions, because the install media is not registering them... which is what I thought the hook was for.
I was following the installation guide when I got to the part on partitioning and realized that the disk was not being recognized by the live system. Which is why I made the first post...
Offline
The hook is for your installed system as it will also not see the disk until you do the magic described in the wiki.
For the install media you do the magic manually and the drive should show up, then you mount it manually. I'm not even sure if the current install media even does any auto mounting but even if it does, which I doubt, you want to mount the partitions manually in the correct places and order.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
There seems to be a fair bit of confusion in this thread. Vasavest, I initially assumed that you just said the drive wasn't being mounted but I assumed you used that term incorrectly and your problem was that the device wasn't even recognized and didn't appear at all in the fisk output which would prevent you from even starting the installation (I also assumed you were still in the live usb and had not done any of the installation steps yet).
I *think* ROOKIE read this differently assuming that you had already installed your new system but when you tried to reboot the partitions weren't mounted (correct me if I'm wrong ROOKIE).
In either case, can you make this more clear so we don't end up running down the wrong path because of some assumptions. Have you been able to partition your drive and run pacstrap and related steps of the installation yet, or have you not been able to start the process? When you say your ssd is not mounted, do you actually just mean it's not mounted, or do you mean it doesn't show up in fdisk output?
Note that a disk would never be mounted: disks aren't mounted, partitions are. Further the live iso would never mount any partitions - when you boot the live iso you don't even need to have a partitioned drive yet. The first step of the installation process is to partition a drive, then you manually mount them where they need to be under /mnt/.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
From my second post I was assuming that the system was installed given that the OP was talking about mkinitcpio hooks and having difficulty rebuilding the initramfs, which I assumed was being done from a chroot. Having spend sometime writing a hook myself I guess I got lost in the tiny details that can make writing and testing hooks difficult.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Sorry about all this, and thanks for clearing things up- really appreciate the help from both of you.
When I wrongly said the device wasn't mounted I meant it was not being recognized at all from the installation media. It does not show up in fdisk and I have not been able to partition my drive / run pacstrap, etc.
I feel like I have learned a fair amount though.
Offline
Thanks. So to get the device to show up in fdisk (so you can partition and continue with the install) you may just need to run the two commands directly:
modprobe nvme
echo 106b 2003 > /sys/bus/pci/drivers/nvme/new_id
If this works, then you will likely need to make that into the mkinitcpio hook for the newly installed system.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
That did it. Thank you so much!
Edit: I just want to clarify the process of writing the custom hook, which I had to do once the system was installed and I could chroot into it.
Create file /etc/initcpio/hooks/modprobe with the contents
#!/usr/bin/ash</code>
run_hook() {
modprobe nvme
echo 106b 2003 > /sys/bus/pci/drivers/nvme/new_id
}
Create another file /usr/lib/initcpio/install/modprobe with the contents
#!/bin/bash
build() {
add_runscript
}
then
#mkinitcpio -p linux
voila.
Last edited by vasavest (2017-06-29 20:49:34)
Offline
Pages: 1