LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-24-2022, 03:46 PM   #1
nicholas_hubbard
LQ Newbie
 
Registered: Apr 2022
Posts: 11

Rep: Reputation: 1
Cannot boot on Apple hardware when installing to encrypted root partition.


I am trying to install Slackware 15.0 on my 2011 MacBook Pro. I am able to do this without any problems when I do not encrypt my root partition. However, if I try to install onto an encrypted root partition then I get stuck on this screen when I boot:
Click image for larger version

Name:	slackmac-boot.jpg
Views:	35
Size:	268.3 KB
ID:	39126

I have successfully installed Slackware 15.0 on my main computer (on multiple occasions) using the exact same partition/encryption setup on btrfs using the grub bootloader.

In the image you can see that it seems to know to ask for my decryption passphrase, but cannot actually prompt me. Hmm.

Next I will walk you through how I went about the installation.

Before running the installer I partition my disks. Here is the output of lsblk -f to show how I have done this:
Code:
NAME         FSTYPE      FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                      
|-sda1       vfat        FAT32       9886-F7B8                             492.1M     4% /boot/efi
|-sda2       ext2        1.0         56454cfa-acaa-488e-a6e7-30a0671b2d00  838.8M    12% /boot
`-sda3       crypto_LUKS 2           6403afb3-cac7-409b-8b81-001ae5ba999f                
  `-lukssda3 btrfs                   81b1cb8e-7ec4-43a9-928c-136931e20e0d  456.1G     2% /
...
As you can see I setup my encrypted partition to use btrfs, so I then create a root subvolume that I mount at /mnt before mounting my boot and efi partitions.

Next I run the installer. Note that I skip installing lilo/elilo because I am going to use grub.

After I successfully run the slackware installer, I go back to the shell, chroot into /mnt, setup my /etc/fstab, and run the following commands before rebooting:

# /usr/share/mkinitrd/mkinitrd_command_generator.sh | sh
Code:
OK: /lib/modules/5.15.19/kernel/drivers/usb/storage/usb-storage.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/usb/host/ehci-hcd.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/usb/host/ehci-hcd.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/usb/host/ehci-pci.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/usb/host/xhci-hcd.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/usb/host/xhci-pci-renesas.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/usb/host/xhci-pci.ko added.
WARNING:  Could not find firmware "/lib/firmware/renesas_usb_fw.mem"
OK: /lib/modules/5.15.19/kernel/drivers/usb/host/ehci-hcd.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/usb/host/ohci-hcd.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/usb/host/ohci-pci.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/usb/host/xhci-hcd.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/usb/host/uhci-hcd.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/usbhid/usbhid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/i2c/i2c-core.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/i2c-hid/i2c-hid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid-generic.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/acpi/video.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/platform/x86/wmi.ko added.
OK: /lib/modules/5.15.19/kernel/net/rfkill/rfkill.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/input/sparse-keymap.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/acpi/battery.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/acpi/platform_profile.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/platform/x86/asus-wmi.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/usbhid/usbhid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid-asus.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid-cherry.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/usbhid/usbhid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid-logitech.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/usbhid/usbhid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid-logitech-dj.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid-logitech-hidpp.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid-lenovo.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid-microsoft.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/5.15.19/kernel/drivers/hid/hid-multitouch.ko added.
OK: /lib/modules/5.15.19/kernel/lib/zstd/zstd_compress.ko added.
OK: /lib/modules/5.15.19/kernel/lib/zstd/zstd_compress.ko added.
OK: /lib/modules/5.15.19/kernel/fs/btrfs/btrfs.ko added.
OK: /lib/modules/5.15.19/kernel/crypto/af_alg.ko added.
OK: /lib/modules/5.15.19/kernel/crypto/algif_skcipher.ko added.
/boot/initrd.gz created.
Be sure to run lilo again if you use it.
# grub-install --target=x86_64-efi --efi-directory=/boot/efi
Code:
Installing for x86_64-efi platform.
Installation finished. No error reported.
# grub-mkconfig -o /boot/grub/grub.cfg
Code:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-huge-5.15.19
Found initrd image: /boot/initrd.gz
Found linux image: /boot/vmlinuz-huge
Found initrd image: /boot/initrd.gz
Found linux image: /boot/vmlinuz-generic-5.15.19
Found initrd image: /boot/initrd.gz
Found linux image: /boot/vmlinuz-generic
Found initrd image: /boot/initrd.gz
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
In case you are thinking the problem is with my /etc/fstab, here is what that file looks like:
Code:
UUID=81b1cb8e-7ec4-43a9-928c-136931e20e0d / btrfs rw,noatime,compress=zstd,space_cache=v2,commit=120,subvol=@ 0 1
UUID=9886-F7B8 /boot/efi vfat defaults,noatime 0 2
UUID=56454cfa-acaa-488e-a6e7-30a0671b2d00 /boot ext2 defaults,noatime 0 2
UUID=81b1cb8e-7ec4-43a9-928c-136931e20e0d / btrfs rw,noatime,compress=zstd,space_cache=v2,commit=120,subvol=@snapshots 0 2
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs nosuid,nodev,noexec 0 0
Any ideas on what the problem could be?

Please note that when I get this machine setup I will refer to it as my slackmac.

Last edited by nicholas_hubbard; 06-25-2022 at 07:49 PM.
 
Old 06-24-2022, 04:19 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,048

Rep: Reputation: Disabled
Maybe you need a specific module for your USB keyboard in the initramfs built by mkinitrd_command_generator.sh or something like that.
 
Old 06-24-2022, 04:25 PM   #3
nicholas_hubbard
LQ Newbie
 
Registered: Apr 2022
Posts: 11

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Didier Spaier View Post
Maybe you need a specific module for your USB keyboard in the initramfs built by mkinitrd_command_generator.sh or something like that.
I see how that could be the problem. Ill look into figuring out what module that may be.

Last edited by nicholas_hubbard; 06-24-2022 at 04:28 PM.
 
Old 06-24-2022, 04:47 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,048

Rep: Reputation: Disabled
I now use dracut. It ships a lot of modules so the risk you miss one is low.
 
1 members found this post helpful.
Old 06-25-2022, 03:54 AM   #5
ctrlaltca
Member
 
Registered: May 2019
Location: Italy
Distribution: Slackware
Posts: 316

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
From the image it looks like the correct module for the usb keyboard is being loaded, and the boot is stuck at the "Enter passphrase for /dev/sda3:" prompt.
The prompt itself is hidden behind some of the output related to the usb keyboard being detected.
Did you try just writing the password?
Does it work if you connect an external usb keyboard?
 
Old 06-25-2022, 08:33 AM   #6
nicholas_hubbard
LQ Newbie
 
Registered: Apr 2022
Posts: 11

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by ctrlaltca View Post
Did you try just writing the password?
Does it work if you connect an external usb keyboard?
I did try just typing in the password but that did not work.

However, I tried plugging in my external logitech keyboard as you suggested, and it worked!

This strongly suggests that the problem is indeed centered around keyboard modules. I am going to look into setting up dracut now.
 
Old 06-25-2022, 08:11 PM   #7
nicholas_hubbard
LQ Newbie
 
Registered: Apr 2022
Posts: 11

Original Poster
Rep: Reputation: 1
I solved the problem! The missing module was called hid_apple. To add this module to the initrd I ran -
Code:
# /usr/share/mkinitrd/mkinitrd_command_generator.sh -m hid_apple | sh
# grub-mkconfig -o /boot/grub/grub.cfg
When I boot it still seems like I am stuck with the same issue, but now I am able to enter my decryption password from the built-in keyboard.

Last edited by nicholas_hubbard; 06-25-2022 at 08:16 PM.
 
Old 06-26-2022, 08:19 AM   #8
tjallen
Member
 
Registered: Jan 2014
Location: Central New York
Distribution: Slackware
Posts: 69

Rep: Reputation: 23
I'm running both Slackware64 versions 14.2 and 15.0 on my 2012 MacBook Pros. This problem bit me as well. (And it took me way too long to figure it out!) My solution is to use the following to make my initrd:

Code:
mkinitrd -c -k 5.15.49 -m xhci-pci:xhci-hcd:ehci-pci:i2c_i801:sdhci_pci:agpgart:i915:sdhci:i2c_algo_bit:i2c_core:mmc_core:tg3:libphy:bcma:hwmon:ptp:pps_core:acpi_als:kfifo_buf:industrialio:fjes:video:button:processor:loop:ehci-hcd:hid:usbhid:hid-generic:hid_apple:hid_appleir:applesmc:mbcache:jbd2:drm:swap -f ext4 -C /dev/sda2 -r /dev/cryptvg/root -u -L -h /dev/cryptvg/swap -o /boot/initrd51549.gz
I also get the prompt for the password because I've loaded the video drivers as well as the HID devices.

You'll also need to install a daemon to run the fans on the MBP. I use mbpfan and have a SlackBuild if you want it. There are a few other little quirks that I've solved, too.
 
Old 06-26-2022, 09:28 AM   #9
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,048

Rep: Reputation: Disabled
Here:
Code:
root[/]# lsinitrd |grep hid-apple.ko
-rw-r--r--   1 root     root         8053 Jun 17 00:35 lib/modules/5.18.5/kernel/drivers/hid/hid-apple.ko.zst
So my solution is to run:
Code:
dracut
Caveat: in such a case do not run instead:
Code:
dracut -H
as then it will include in the iniramfs only the modules needed on the host where you run it.

Last edited by Didier Spaier; 06-26-2022 at 09:29 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hardware Issue: Backdoor Method of Installing Ubuntu 18.04 to Apple Hardware mike3644 Linux - Hardware 5 09-05-2018 12:10 AM
Shrink partition (LVM encrypted PVs + encrypted LVs) gedaj Linux - Newbie 2 05-22-2013 03:44 AM
Resizable encrypted LVM requiring just one password on boot (encrypted volume group)? Nyyr Linux - Software 9 01-24-2013 05:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration