Skip to content

Instantly share code, notes, and snippets.

@yestyle
Last active December 17, 2015 05:08
Show Gist options
  • Save yestyle/5555091 to your computer and use it in GitHub Desktop.
Save yestyle/5555091 to your computer and use it in GitHub Desktop.
To mount Windows partitions automatically on startup in Ubuntu, just add the following lines in /etc/fstab (change the device node path and/or mount point as per your own scene)
/dev/sda1 /media/reserved ntfs-3g defaults 0 0
/dev/sda2 /media/c ntfs-3g defaults 0 0
/dev/sda3 /media/d ntfs-3g defaults 0 0
/dev/sda5 /media/e ntfs-3g defaults 0 0
/dev/sda6 /media/f ntfs-3g defaults 0 0
@yestyle
Copy link
Author

yestyle commented Oct 30, 2013

If Ubuntu is installed by non-Wubi, the partition that originally used for Wubi installing need to be mounted too. Add the following line in /etc/fstab as needed:
/dev/sda3 /media/d ntfs-3g defaults 0 0

And for convenience, create a symbol link named '/host' pointing to the new mounted partition:
sudo ln -s /media/d /host

@yestyle
Copy link
Author

yestyle commented Oct 30, 2013

Use the following command to remount all partitions after modifying the /etc/fstab:
sudo umount /dev/sda*
cd /media
sudo mkdir reserved c d e f
sudo mount -a

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