Skip to content

Instantly share code, notes, and snippets.

@chrisdiana
Last active July 12, 2023 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisdiana/282b416986c4597d71812cba467bc1fd to your computer and use it in GitHub Desktop.
Save chrisdiana/282b416986c4597d71812cba467bc1fd to your computer and use it in GitHub Desktop.
MacBook Debian Live USB w/ Persistence

MacBook Debian Live USB w/ Persistence

  1. Download Debian ISO
  2. Modify the ISO to use persistence volume instead:
LANG=C sed 's/splash quiet/persistence /;s/quiet splash/persistence /' \
    </debian-live-10.0.0-amd64-mate.iso \
    >/debian-live-10.0.0-amd64-mate-persist.iso
  1. Burn the ISO to USB with Etcher

  2. Boot to the USB by restarting the MacBook and holding Option. Then, select "EFI Boot" and click enter.

  3. Select the "Debian Live" option

  4. Verify the device using lsblk. The USB should be something like sda or sdb etc sdX

  5. Run to set a variable

$ usb=/dev/sda
  1. Create a new partition using the rest of the USB
$ sudo fdisk $usb <<< $(printf "n\np\n\n\n\nw")
  1. Verify the new partition using lsblk. It should be something like sda3.
  2. Format the partition and label it
$ sudo mkfs.ext4 -L persistence ${usb}3
  1. Create a mount point, mount the new partition there, and then create the configuration file to enable persistence. Finally, unmount the partition:
$ sudo mkdir -p /mnt/my_usb
$ sudo mount ${usb}3 /mnt/my_usb
$ echo "/ union" | sudo tee /mnt/my_usb/persistence.conf
$ sudo umount ${usb}3
$ reboot

Now the USB should have persistence.


Additional steps for MacBook 12" Retina

Get the audio drivers

$ sudo apt install wget symlinks make gcc linux-headers-generic
$ git clone https://github.com/leifliddy/macbook12-audio-driver.git  
$ cd macbook12-audio-driver/
$ sudo ./install.cirrus.driver.sh
$ reboot

Get the bluetooth drivers

$ sudo apt install wget make gcc linux-headers-generic
$ git clone https://github.com/leifliddy/macbook12-bluetooth-driver.git
$ cd macbook12-bluetooth-driver/
$ sudo ./install.bluetooth.sh 
$ reboot

Edit Bluetooth config vi /etc/Bluetooth/main.conf

FastConnectable = true

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment