Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bitjockey42/dbb3c813d7e2fd5cbbcae2373fda3274 to your computer and use it in GitHub Desktop.
Save bitjockey42/dbb3c813d7e2fd5cbbcae2373fda3274 to your computer and use it in GitHub Desktop.

Ubuntu 16.04

Overview

This gist is at 4a6d8c218817447357e7412128625292 Dual boot OS X 10.11 and Ubuntu 16.04.

Partition Layout

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 233.8G  0 disk 
├─sda1   8:1    0   200M  0 part /boot/efi
├─sda2   8:2    0    59G  0 part 
├─sda3   8:3    0 619.9M  0 part 
├─sda4   8:4    0 116.2G  0 part /mnt/data
└─sda5   8:5    0  57.7G  0 part /

sda2 OS X root sda4 Shared data partition sda5 Ubuntu root

Bootloader installation

systemd-boot installation

Shared Data Partition

Create HFS+ partition.

Turn off journaling on that partition in OS X:

diskutil disableJournal /dev/sda4 # use diskutil list to determine which one this is

chroot into newly installed ubuntu.

Install dependencies and change permissions so as to be able to write.

apt install hfs*
usermod -u 501 aj
vigr # change existing group with id 20 to something else
find / -user 1000 -exec chown -h 501 {} \;
groupmod -g 20 aj
find / -group 1000 -exec chgrp -h 20 {} \;
usermod -g 20 aj

Then restart computer.

Troubleshooting: No longer mounting as rw

Sometimes you’ll find that the HFS mountpoint no longer mounts as read-write.

Happens when you have to force reboot/poweroff.

To fix:

sudo fsck.hfsplus -f /dev/sda4

Then reboot.

Another option is to change `/etc/fstab` so that the data partition is automatically `fsck`d:

“` apacheconf

UUID=another-long-uuid /mnt/data hfsplus rw,defaults 0 2 “`

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda5 during installation
UUID=some-longass-uuid / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=short-uuid /boot/efi vfat umask=0077 0 1
# shared data partition
UUID=another-long-uuid /mnt/data hfsplus rw,defaults 0 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment