Skip to content

Instantly share code, notes, and snippets.

@AlexZeitler
Last active August 31, 2015 19:28
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 AlexZeitler/35beb59ee653361a29a6 to your computer and use it in GitHub Desktop.
Save AlexZeitler/35beb59ee653361a29a6 to your computer and use it in GitHub Desktop.
Backup MacBook Pro to USB-Stick in Single User mode
Create a hfs+ usb stick on Ubuntu:
sudo apt-get install hfsprogs
sudo apt-get install gparted
using gparted, create a partition table and a partition, format the partition table to hfs+
Boot the MBP to Single User Mode using ⌘+S key on power on
When booted:
/sbin/fsck -fy
/sbin/mount -uw /
ls /dev/disk*
plug the USB stick into your MBP
ls /dev/disk*
compare the output with previous ls /dev/disk* output, there must be a new disk like disk2s1/disk2s2
fsck_hfs /dev/disk2s2 (your disk name goes here)
mkdir /Volumes/usbdrive
mount -t hfs /dev/disk2s2 /Volumes/usbdrive (again, your disk name goes here)
rsync -av /path/to/sourcefiles/* /Volumes/usbdrive
umount -f /Volumes/usbdrive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment