Fix for Gadget mode (PiZero) in Bookworm.

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

Fix for Gadget mode (PiZero) in Bookworm.

Post by /RaspberryPi »


The old procedure for gadget mode works to enable USB based networking in jessie thru bullseye, but in bookworm, the default state of the USB network (usb0) is down. Kinda defeats the purpose of enabling a USB network to access a device in a headless config, if the interface is down by default.

So the new bookworm procedure to do a headless install of a PiZero (non-W) is:
  • Download, verify (GPG) and install the Imager utility
  • Download and verify (GPG) the latest bookworm image
  • Load the bookworm image in the Imager utility
  • Use the gear button to configure userid, password, hostname, and SSH
  • Edit the FAT files in the procedure to enable USB networking (gadget mode)
  • On the SD next to config.txt edit firstrun.sh with the following;

Replace the line rm -f /boot/firstrun.sh in firstrun.sh with:

cat >/etc/network/interfaces.d/usb0

Source: https://www.reddit.com/r/raspberry_pi/c ... _bookworm/
/RaspberryPi
Post Reply

Return to “Raspberry Pi Forum”