Skip to content

Instantly share code, notes, and snippets.

@edwardsharp
Created February 4, 2022 19:28
Show Gist options
  • Save edwardsharp/ae587bdd19df88d3ff64174862225444 to your computer and use it in GitHub Desktop.
Save edwardsharp/ae587bdd19df88d3ff64174862225444 to your computer and use it in GitHub Desktop.
init usb disk linux raspberry pi
# init usb disk
# substitute /dev/sda1 and WHAT-EVER-UUID with apropos valuez
sudo blkid
sudo mkfs -t ext4 /dev/sda1
sudo mkdir /mnt/teebee
sudo mount /dev/sda1 /mnt/teebee
# or whatever user. 🤷
sudo chown -R pi:pi /mnt/teebee
sudo umount /dev/sda1
ls -l /dev/disk/by-uuid/
sudo vim /etc/fstab
UUID=WHAT-EVER-UUID /mnt/teebee ext4 defaults,nofail,discard 0 0
# check if it workz
sudo mount -a
# if it does, then
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment