Category: fixit

Adding existing NTFS mount to Linux Mint 19.1

I had a Windows machine that had a Vagrant setup on a different drive.  When I replaced the Windows partition with Linux Mint, I wanted to have the other drive, already formatted as NTFS and containing my Vagrant workspace, mounted as /vagrant in the Linux machine.

First, I found out the properties of the drive:

sudo fdisk -l

I found it was a device under /dev/sdb1 and formatted as type HPFS/NTFS/exFAT.  Now to open the fstab file

sudo vi /etc/fstab

Then add this line:

/dev/sdb1 /vagrant ntfs defaults,uid=1000 0 0

Changes to that file can then be applied with “sudo mount -a” (except I believe with partitions marked as ‘noauto’), or in my case, a reboot.

I’m quite sure there is some optimizing that could be done there, but I’ll update this later if I find some.

Fixing Virtualbox network configuration issues due to Vagrant public/private networking changes

A few times I’ve switched from the default private networking (NAT with port forwarding) to public networking (bridged) in the Vagrantfile.  When switching *back* to private networking, I wasn’t able to SSH back into the machine (i.e, “vagrant up” will time out).

Assuming you’re using a Linux Mint guest (or other Debian-based) OS, a fix for this is to open the /etc/network/interfaces file and remove anything in between the #VAGRANT BEGIN and #VAGRANT END section.  Next, run vagrant reload from the host OS to reload the guest with the updated network interface configuration.