Re: Install Debian 10 amd64 onto USB flash drive with and for Macintosh
On 8/31/21 3:53 PM, Dan Ritter wrote:
David Christensen wrote:
debian-user:
I have an Apple MacBook Pro (Retina, 15-inch, Mid 2015) with an Intel Core
i7-4770HQ processor, 16 GB memory, and 256 GB SSD:
If I now power up the machine with the buster-mac USB flash drive installed,
Debian starts.
If I now power up the machine without the buster-mac USB flash drive
installed and hold the Option key, I see the MacBook firmware disk window
showing the internal SSD. Selecting the internal SSD starts macOS.
If I now power up the machine without the buster-mac USB flash drive
installed and hold the Command-R keys, I see the MacBook firmware POST
screen, then the MacBook firmware utilities window. Selecting Disk Utility
and View -> Show All Devices, I see:
I am pretty sure you didn't want to install GRUB at all -- the
Mac's own EFI booter should work on your USB stick; it's invoked
by holding down option at boot time.
Thank you for the reply. :-)
If I now power up the machine with the buster-mac USB flash drive
installed and hold the Option key, I see the MacBook firmware disk
window showing the internal SSD only; the target USB flash drive with
the Debian instance is not shown.
Perhaps the debian-10.10.0-amd64-xfce-CD-1 Debian Installer USB flash
drive holds a clue, as the MacBook firmware Option key disk window
displays two "EFI Boot" disks:
2021-08-31 16:56:36 root@buster-mac ~
# fdisk -l /dev/sdd
Disk /dev/sdd: 3.6 GiB, 3887595520 bytes, 7592960 sectors
Disk model: USB Flash Drive
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: 0x08fe9327
Device Boot Start End Sectors Size Id Type
/dev/sdd1 * 0 1425407 1425408 696M 0 Empty
/dev/sdd2 7272 12199 4928 2.4M ef EFI (FAT-12/16/32)
2021-08-31 16:57:10 root@buster-mac ~
# mount -o ro /dev/sdd2 /mnt
2021-08-31 16:58:30 root@buster-mac ~
# tree /mnt
/mnt
`-- efi
|-- boot
| |-- bootx64.efi
| `-- grubx64.efi
`-- debian
`-- grub.cfg
3 directories, 3 files
2021-08-31 17:01:22 root@buster-mac ~
# file /mnt/efi/boot/bootx64.efi
/mnt/efi/boot/bootx64.efi: PE32+ executable (EFI application) x86-64
(stripped to external PDB), for MS Windows
2021-08-31 17:01:35 root@buster-mac ~
# file /mnt/efi/boot/grubx64.efi
/mnt/efi/boot/grubx64.efi: PE32+ executable (EFI application) x86-64
(stripped to external PDB), for MS Windows
2021-08-31 17:01:46 root@buster-mac ~
# file /mnt/efi/debian/grub.cfg
/mnt/efi/debian/grub.cfg: ASCII text
2021-08-31 17:01:59 root@buster-mac ~
# cat /mnt/efi/debian/grub.cfg
search --file --set=root /.disk/info
set prefix=($root)/boot/grub
source $prefix/x86_64-efi/grub.cfg
My guess is that efi/boot/bootx64.efi and efi/boot/grubx64.efi
correspond to the two "EFI Boot" disks displayed by the MacBook firmware
Option key disk window (?).
I also noted that the ESP partition on the target USB flash drive is empty:
2021-08-31 17:02:02 root@buster-mac ~
# umount /mnt
2021-08-31 17:06:43 root@buster-mac ~
# mount -o ro /dev/sdb1 /mnt
2021-08-31 17:07:08 root@buster-mac ~
# ls -alF /mnt
total 8
drwxr-xr-x 2 root root 4096 Dec 31 1969 ./
drwxr-xr-x 19 root root 4096 Aug 31 00:09 ../
I expect it needs the equivalent of boot/bootx64.efi, boot/grubx64.efi,
and/or debian/grub.conf as found on the Debian Installer USB flash
drive, but I very much doubt that simply copying those files from the
Debian Installer USB flash drive to the target USB flash drive would
work, given the "hybrid ISO" layout, overlapping partitions, etc., of
the Debian Installer USB stick.
Here is the ESP partition of the MacBook SSD again for comparison:
2021-08-31 17:33:40 root@buster-mac ~
# tree /boot/efi
/boot/efi
|-- BOOTLOG
`-- EFI
|-- APPLE
| |-- CACHES
| | `-- CAFEBEEF
| `-- FIRMWARE
| `-- MBP114.fd
`-- debian
|-- BOOTX64.CSV
|-- fbx64.efi
|-- grub.cfg
|-- grubx64.efi
|-- mmx64.efi
`-- shimx64.efi
6 directories, 8 files
Maybe if I copied the EFI/debian tree to the target USB flash drive ESP
partition, reworked /etc/fstab, and/or reworked whatever other system
configuration files are involved (?), the target USB flash device would
be self-booting (?).
Booting the debian-10.10.0-amd64-xfce-CD-1 Debian Installer USB flash
drive, I see
-> Advanced options...
-> Expert install
Maybe if I do an expert install, I will be given the opportunity to
install GRUB and related onto the target USB flash drive (?).
Alternatively:
-> Advanced options...
-> Rescue mode
May if I knew enough, I could enter the right commands in a rescue shell
and fix the target USB flash drive (?).
I'll wait and see if anyone else has more information.
David
Reply to: