Install Debian 10 amd64 onto USB flash drive with and for Macintosh
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:
https://support.apple.com/kb/SP719?viewlocale=en_US&locale=en_US
https://en.wikipedia.org/wiki/MacBook_Pro
The laptop has two USB 3.0 ports.
I would like to install Debian 10 onto a USB flash drive as a
self-contained, bootable, full, live installation that I use with this
and other Intel-based Macintosh computers.
I downloaded the following Debian Installer files, verified the
checksums, and verified the signature:
https://cdimage.debian.org/cdimage/archive/10.10.0/amd64/jigdo-cd/
SHA256SUMS*
SHA256SUMS.sign*
debian-10.10.0-amd64-xfce-CD-1.iso*
debian-10.10.0-amd64-xfce-CD-1.jigdo*
I assembled the ISO file, verified the checksum, and burned it to a
blank USB flash drive:
debian-10.10.0-amd64-xfce-CD-1.iso
I downloaded the following firmware files, verified the checksums,
verified the signature, expanded the archive, and copied the firmware
files to a vfat USB flash drive:
https://cdimage.debian.org/cdimage/unofficial/non-free/firmware/buster/10.10.0/
SHA256SUMS*
SHA256SUMS.sign*
firmware.tar.gz*
I powered off the Mac, inserted the Debian Installer USB flash drive,
powered up the Mac, pressed and held the Option key, selected the left
"EFI Boot" disk:
Debian GNU/Linux 10.10.0
Debian GNU/Linux UEFI Installer menu -> Install
Language -> C
Continent or region -> North America
Country, territory or area -> United States
Keymap to use -> American English
Detect network hardware
<insert firmware USB flash drive>
<install Wi-Fi adapter firmware>
<remove firmware USB flash drive>
<insert blank USB flash drive>
Configure the network ->
Wireless network -> wifi.tracy.holgerdanske.com
Wireless network type for w1p3s0 -> WPA/WPA2 PSK
WPA/WPA2 passphrase for wireless device w1p3s0 -> ********
Hostname -> buster-mac
Domain name -> localdomain
Root password -> ********
Re-enter password to verify -> ********
Full name for the new user -> debian
Username for your account -> debian
Choose a password for the new user -> ********
Re-enter password to verify -> ********
Select your time zone -> Pacific
Partitioning method -> Manual
<create partition table on blank USB flash drive>
<create "1 GB" EFI System Partition>
<create "1 GB" swap partition>
<create "13 GB" root partition>
Use a network mirror -> Yes
Debian archive mirror country -> United States
Debian archive mirror -> deb.debian.org
HTTP proxy information -> <blank>
Participate in the package usage survey -> No
Choose software to install ->
Debian desktop environment
Xfce
print server
SSH server
standard system utilities
Installation complete -> Continue
The machine rebooted into Debian. I logged in, created a default Xfce
panel, looked around briefly, and shutdown the machine.
Note that I was not prompted for the location for installing GRUB.
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, I see:
GNU GRUB version 2.02+dfsg1-20+deb10u4
Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists possible
device or file completions.
grub>
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:
Internal
APPLE SSD SM0256G Media
Container disk3
dpchrist-mbp
dpchrist-mbp - Data
If I select APPLE SSD SM0256G Media, Container disk3, dpchrist-mbp, or
dpchrist-mbp - Data and click First Aid, Disk Utility detects no errors.
Booting the buster-mac USB flash drive and looking around, it appears
that GRUB was installed on the internal SSD and not on the USB flash drive:
2021-08-31 14:56:11 root@buster-mac ~
# fdisk -l
Disk /dev/sda: 233.8 GiB, 251000193024 bytes, 490234752 sectors
Disk model: APPLE SSD SM0256
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 3B3CDB05-D771-4CA5-A9B0-1C47A5652B20
Device Start End Sectors Size Type
/dev/sda1 40 409639 409600 200M EFI System
/dev/sda2 409640 490234711 489825072 233.6G unknown
Disk /dev/sdb: 14.9 GiB, 16008609792 bytes, 31266816 sectors
Disk model: Ultra Fit
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: gpt
Disk identifier: 8F392ECB-7E30-46D7-ABAB-DBBCB659863C
Device Start End Sectors Size Type
/dev/sdb1 2048 1953791 1951744 953M EFI System
/dev/sdb2 1953792 3907583 1953792 954M Linux swap
/dev/sdb3 3907584 29298687 25391104 12.1G Linux filesystem
2021-08-31 15:09:59 root@buster-mac ~
# mount | egrep '/dev/sd.[0-9]'
/dev/sdb3 on / type ext4 (rw,relatime,errors=remount-ro)
/dev/sda1 on /boot/efi type vfat
(rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
2021-08-31 15:13:35 root@buster-mac ~
# df | egrep 'Filesystem|.dev.sd.[0-9]'
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/sdb3 12140M 3589M 7915M 32% /
/dev/sda1 197M 12M 186M 6% /boot/efi
2021-08-31 15:14: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
2021-08-31 15:11:12 root@buster-mac ~
# ls -l /boot/efi
total 2
-rwx------ 1 root root 520 Aug 31 14:16 BOOTLOG
drwx------ 4 root root 512 Aug 31 14:16 EFI
The goal is to have a self-contained Debian installation on the USB
flash drive. This means GRUB needs to be installed onto the USB flash
drive.
Suggestions?
David
Reply to: