Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
After installing Debian on USB stick, stick does not boot on MacBook
After installing Debian on USB stick, stick does not boot on MacBook
My goal is to install Debian to be bootable from a usb stick on a MacBook with two usb ports. To do so I booted from Debian Live flash on the first usb port. Next I used to Debian installer to install Debian on the second USB port. Installation completed with a message that Debian was successfully installed. Yet Debian does not boot from the usb where it was installed by installer.
Live system partitions:
Device: /dev/sdc1, Boot: *, Size: 3.2G, Id:0, Type: Empty
Device: /dev/sdc2, Boot: , Size: 5M, Id:ef, Type: EFI (FAT-12/16/32)
Partitions of the usb where installer installed Debian:
Device: /dev/sdd1, Boot: , Size: 99M, Id:c, Type: W95 FAT32 (LBA)
Device: /dev/sdd2, Boot: , Size: 14.5G, Id:83, Type: Linux
After booting MacBook from the Debian Live USB stick, I try to reinstall bootloader on the second USB stick with:
sudo mount /dev/sdd2 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
grub-install /dev/sdd
update-grub
And `grub-install /dev/sdd` returns:
Installing for x86_64-efi platform.
grub-install error: cannot find EFI directory
Any ideas how to make it boot?
Live system partitions:
Device: /dev/sdc1, Boot: *, Size: 3.2G, Id:0, Type: Empty
Device: /dev/sdc2, Boot: , Size: 5M, Id:ef, Type: EFI (FAT-12/16/32)
Partitions of the usb where installer installed Debian:
Device: /dev/sdd1, Boot: , Size: 99M, Id:c, Type: W95 FAT32 (LBA)
Device: /dev/sdd2, Boot: , Size: 14.5G, Id:83, Type: Linux
After booting MacBook from the Debian Live USB stick, I try to reinstall bootloader on the second USB stick with:
sudo mount /dev/sdd2 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
grub-install /dev/sdd
update-grub
And `grub-install /dev/sdd` returns:
Installing for x86_64-efi platform.
grub-install error: cannot find EFI directory
Any ideas how to make it boot?
Re: After installing Debian on USB stick, stick does not boot on MacBook
Can you give more info to the forum?
Code: Select all
lsblk --sort name --output name,label,partlabel,size,fstype,mountpoint,state
Code: Select all
inxi -Fxxxz
Re: After installing Debian on USB stick, stick does not boot on MacBook
panpan wrote: ↑2024-03-19 16:19 Can you give more info to the forum?Code: Select all
lsblk --sort name --output name,label,partlabel,size,fstype,mountpoint,state
Code: Select all
inxi -Fxxxz
Code: Select all
user@debian:~$ sudo lsblk --sort name --output name
NAME
loop0
sda
sda1
sda2
sda3
sdb
sdc
sdc1
sdc2
sdd
sdd1
sdd2
sr0
Code: Select all
$ sudo inxi -Fxxxz
System:
Kernel: 6.1.0-18-amd64 arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
Desktop: GNOME v: 43.9 tk: GTK v: 3.24.38 wm: gnome-shell dm: GDM3 v: 43.0
Distro: Debian GNU/Linux 12 (bookworm)
Machine:
Type: Laptop System: Apple product: MacBookPro6,2 v: 1.0 serial: <filter>
Chassis: type: 10 v: Mac-F22586C8 serial: <filter>
Mobo: Apple model: Mac-F22586C8 v: MacBookPro6,2 serial: <filter>
UEFI: Apple v: MBP61.88Z.005D.B00.1804100943 date: 04/10/18
Battery:
ID-1: BAT0 charge: 44.1 Wh (100.0%) condition: 44.1/75.2 Wh (58.6%)
volts: 12.0 min: 10.9 model: SMP bq20z451 type: Li-ion serial: N/A
status: full cycles: 1129
CPU:
Info: 4x 2-core model: Intel Core i5 M 540 bits: 64 type: MT MCP SMP
smt: enabled arch: Westmere rev: 2 cache: L1: 4x 128 KiB (512 KiB)
L2: 4x 512 KiB (2 MiB) L3: 4x 3 MiB (12 MiB)
Speed (MHz): avg: 1529 high: 2528 min/max: 1197/2528 boost: enabled
volts: 0.0 V ext-clock: 133 MHz cores: 1: 1197 2: 2528 3: 1197 4: 1197
bogomips: 20217
Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
Device-1: Intel Core Processor Integrated Graphics driver: i915 v: kernel
arch: Gen-5.75 bus-ID: 00:02.0 chip-ID: 8086:0046 class-ID: 0300
Device-2: NVIDIA GT216M [GeForce GT 330M] vendor: Apple driver: nouveau
v: kernel arch: Tesla pcie: speed: 2.5 GT/s lanes: 16 ports: active: LVDS-1
empty: DP-1 bus-ID: 01:00.0 chip-ID: 10de:0a29 class-ID: 0300 temp: 66.0 C
Device-3: Apple Built-in iSight type: USB driver: uvcvideo bus-ID: 2-1.1:3
chip-ID: 05ac:8507 class-ID: 0e02 serial: <filter>
Display: server: X.Org v: 1.22.1.9 with: Xwayland v: 22.1.9
compositor: gnome-shell driver: dri: nouveau gpu: nouveau note: X driver n/a
display-ID: :0 screens: 1
Screen-1: 0 s-res: 1440x900 s-dpi: 96 s-size: 381x238mm (15.00x9.37")
s-diag: 449mm (17.69")
Monitor-1: LVDS-1 mapped: XWAYLAND0 model: Apple Color LCD res: 1440x900
hz: 60 dpi: 111 size: 330x210mm (12.99x8.27") diag: 390mm (15.4") modes:
max: 1440x900 min: 640x350
API: OpenGL v: 3.3 Mesa 22.3.6 renderer: NVA5 direct-render: Yes
Audio:
Device-1: Intel 5 Series/3400 Series High Definition Audio
driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:3b56
class-ID: 0403
Device-2: NVIDIA GT216 HDMI Audio driver: snd_hda_intel v: kernel pcie:
speed: 2.5 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:0be2 class-ID: 0403
API: ALSA v: k6.1.0-18-amd64 status: kernel-api
Server-1: PipeWire v: 0.3.65 status: n/a (root, process) with:
1: pipewire-pulse status: active 2: wireplumber status: active
3: pipewire-alsa type: plugin
Network:
Device-1: Broadcom NetXtreme BCM5764M Gigabit Ethernet PCIe driver: tg3
v: kernel pcie: speed: 2.5 GT/s lanes: 1 port: N/A bus-ID: 02:00.0
chip-ID: 14e4:1684 class-ID: 0200
IF: enp2s0 state: down mac: <filter>
Device-2: Broadcom BCM43224 802.11a/b/g/n vendor: Apple AirPort Extreme
driver: bcma-pci-bridge v: N/A pcie: speed: 2.5 GT/s lanes: 1
bus-ID: 03:00.0 chip-ID: 14e4:4353 class-ID: 0280
IF-ID-1: wlp3s0b1 state: up mac: <filter>
Bluetooth:
Device-1: Apple Bluetooth Host Controller type: USB driver: btusb v: 0.8
bus-ID: 1-1.1.3:9 chip-ID: 05ac:8218 class-ID: fe01
Report: hciconfig ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 1.2
lmp-v: 2.1 sub-v: 422a hci-v: 2.1 rev: 34e
Drives:
Local Storage: total: 509.51 GiB used: 9.27 GiB (1.8%)
ID-1: /dev/sda vendor: Hitachi model: HTS545050B9SA02 size: 465.76 GiB
speed: 1.5 Gb/s type: HDD rpm: 5400 serial: <filter> rev: C60W scheme: GPT
ID-2: /dev/sdc type: USB vendor: Transcend model: JetFlash 32GB
size: 29.15 GiB type: SSD serial: <filter> rev: 8.07 scheme: MBR
ID-3: /dev/sdd type: USB vendor: Transcend model: JetFlash 16GB
size: 14.6 GiB type: SSD serial: <filter> rev: 8.07 scheme: MBR
Partition:
Message: No partition data found.
Swap:
Alert: No swap data was found.
Sensors:
System Temperatures: cpu: 63.0 C mobo: N/A gpu: nouveau temp: 66.0 C
Fan Speeds (RPM): N/A
Info:
Processes: 230 Uptime: 4h 23m wakeups: 2 Memory: 3.69 GiB
used: 2.28 GiB (61.9%) Init: systemd v: 252 target: graphical (5)
default: graphical Compilers: gcc: 12.2.0 alt: 12 Packages: pm: dpkg
pkgs: 2612 Shell: Sudo (sudo) v: 1.9.13p3 default: Bash v: 5.2.15
running-in: gnome-terminal inxi: 3.3.26
Re: After installing Debian on USB stick, stick does not boot on MacBook
**Update**
I decided to mount `sdd1` as efi boot:
Now it looks like `grub-install` works:
Not sure about `update-grub`, though:
Add yet usb still does not boot.
I decided to mount `sdd1` as efi boot:
Code: Select all
sudo mount /dev/sdd1 /mnt/boot/efi`.
Code: Select all
user@debian:~$ sudo mount /dev/sdd1 /mnt/boot/efi
user@debian:~$ sudo chroot /mnt
root@debian:/# grub-install /dev/sdd
Installing for x86_64-efi platform.
grub-install: warning: EFI variables are not supported on this system..
Installation finished. No error reported.
Code: Select all
root@debian:/# update-grub
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.1.0-18-amd64
Found initrd image: /boot/initrd.img-6.1.0-18-amd64
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map.
Re: After installing Debian on USB stick, stick does not boot on MacBook
You didn't give to the forum the correct output of the lsblk command, you can provide also the output of the
Code: Select all
sudo parted -l
Re: After installing Debian on USB stick, stick does not boot on MacBook
In previous message I gave the output of lsblk command:panpan wrote: ↑2024-03-20 17:51 You didn't give to the forum the correct output of the lsblk command, you can provide also the output of theCode: Select all
sudo parted -l
Code: Select all
user@debian:~$ sudo lsblk --sort name --output name
NAME
loop0
sda
sda1
sda2
sda3
sdb
sdc
sdc1
sdc2
sdd
sdd1
sdd2
sr0
-
- Global Moderator
- Posts: 2981
- Joined: 2014-07-20 18:12
- Location: Europe
- Has thanked: 75 times
- Been thanked: 407 times
Re: After installing Debian on USB stick, stick does not boot on MacBook
Hello,
This Debian Wiki can probably help you:
- https://wiki.debian.org/GrubEFIReinstall
- Reinstalling grub-efi on your hard drive
- Troubleshooting: Weak EFI implementation only recognizes the fallback bootloader
Re: After installing Debian on USB stick, stick does not boot on MacBook
Code: Select all
$ sudo parted -l
Model: ATA Hitachi HTS54505 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 20.5kB 210MB 210MB fat32 EFI system partition boot, esp
2 210MB 499GB 499GB hfs+ Macintosh HD
3 499GB 500GB 650MB hfs+ Recovery HD
Warning: Not all of the space available to /dev/sdc appears to be used, you can
fix the GPT to use all of the space (an extra 54415360 blocks) or continue with
the current setting?
Fix/Ignore? I
Error: Can't have overlapping partitions.
Ignore/Cancel? C
Model: JetFlash Transcend 32GB (scsi)
Disk /dev/sdc: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
Model: JetFlash Transcend 16GB (scsi)
Disk /dev/sdd: 15.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 105MB 104MB primary fat32 lba
2 105MB 15.7GB 15.6GB primary ext4
Re: After installing Debian on USB stick, stick does not boot on MacBook
This is the correct command:dokondr wrote: ↑2024-03-20 18:31In previous message I gave the output of lsblk command:panpan wrote: ↑2024-03-20 17:51 You didn't give to the forum the correct output of the lsblk command, you can provide also the output of theCode: Select all
sudo parted -l
What is incorrect in this output? Please explain.Code: Select all
user@debian:~$ sudo lsblk --sort name --output name NAME loop0 sda sda1 sda2 sda3 sdb sdc sdc1 sdc2 sdd sdd1 sdd2 sr0
Code: Select all
lsblk --sort name --output name,label,partlabel,size,fstype,mountpoint,state
-
- Global Moderator
- Posts: 2981
- Joined: 2014-07-20 18:12
- Location: Europe
- Has thanked: 75 times
- Been thanked: 407 times
Re: After installing Debian on USB stick, stick does not boot on MacBook
Hello @dokondr,
The device /dev/sdc (32 GB) is not formatted according to the output in your previous message:
while the JetFlash Transcend 16GB (scsi) uses a msdos partition table (instead of a GPT partition):
I assume that:
Therefore, you probably need to reinstall Debian using a GPT partition scheme booting the MacBook in UEFI mode.
Hope this helps.
The device /dev/sdc (32 GB) is not formatted according to the output in your previous message:
Code: Select all
Model: JetFlash Transcend 32GB (scsi)
Disk /dev/sdc: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
Code: Select all
Model: JetFlash Transcend 16GB (scsi)
Disk /dev/sdd: 15.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 105MB 104MB primary fat32 lba
2 105MB 15.7GB 15.6GB primary ext4
- you are installing Debian on the JetFlash Transcend 16GB USB device
- you are booting the MacBook using UEFI.
- boot the Debian Installer in UEFI mode (the MacBook should allow you to do so pressing some keys at boot)
- install Debian using a GPT partition table: the installer should recognise that you are booting in UEFI; below is an example of the GPT partition table (booted with UEFI) of an installed Debian running in a VM:
Code: Select all
# parted -l Model: Virtio Block Device (virtblk) Disk /dev/vda: 21.5GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 538MB 537MB fat32 EFI bios_grub 2 538MB 20.3GB 19.8GB ext4 Linux filesystem 3 20.8GB 21.5GB 669MB linux-swap(v1) Linux swap swap
Therefore, you probably need to reinstall Debian using a GPT partition scheme booting the MacBook in UEFI mode.
Hope this helps.
Re: After installing Debian on USB stick, stick does not boot on MacBook
Hello Aki,
Thanks for your help. I am installing on MacBook Pro, 15-inch, Mid 2010, 2.53 GHz, Intel Core i5, Memory 4 GB.
There is only one way to boot it from USB: power it up holding `alt` key. This results in a screen with two options:
1) boot from Mac drive
2) boot from USB. In case two USB ports have sticks, you can select USB to boot.
As far as I know there are no other keys that can be used to select boot options.
Related question:
From your explanation follows (please, correct if I am wrong) that in case I decide to install from this Debian live usb stick directly to Mac drive, it will not boot as well?
Thanks for your help. I am installing on MacBook Pro, 15-inch, Mid 2010, 2.53 GHz, Intel Core i5, Memory 4 GB.
There is only one way to boot it from USB: power it up holding `alt` key. This results in a screen with two options:
1) boot from Mac drive
2) boot from USB. In case two USB ports have sticks, you can select USB to boot.
As far as I know there are no other keys that can be used to select boot options.
Related question:
From your explanation follows (please, correct if I am wrong) that in case I decide to install from this Debian live usb stick directly to Mac drive, it will not boot as well?
-
- Global Moderator
- Posts: 2981
- Joined: 2014-07-20 18:12
- Location: Europe
- Has thanked: 75 times
- Been thanked: 407 times
Re: After installing Debian on USB stick, stick does not boot on MacBook
No. My guess is that your MacBook boots with UEFI firmware. Therefore, in order to get Debian to boot from an USB stick or an internal hard drive, the boot media must be installed with a UEFI-compatible partitioning. The latter requires that the boot media is partitioned using a GPT scheme and that the MacBook firmware recognizes it.
Hope this helps.