Page 1 of 1

Fstab (mount USB drive to specified folder) deletes on boot

Posted: Sun Jan 01, 2017 1:24 am
by GinDiamond
Hello,

I'm trying to get my USB drive to be mounted on boot via an /etc/fstab command:

Code: Select all
UUID=<uuid-string>    /root/USB    vfat    defaults    0     2


However, I found out that there actually ISN'T a file called /etc/fstab, and whenever I reboot the vocore2, it gets deleted.

The USB folder I made in /root/ in preparation for the mounting is not deleted on reboots however.

What is happening, and how can I fix this?

Re: Fstab (mount USB drive to specified folder) deletes on b

Posted: Sun Jan 01, 2017 8:51 pm
by noblepepper
You shouldn't need to do anything, when you plug in a USB drive or reboot with one plugged in it will be mounted automatically.

Re: Fstab (mount USB drive to specified folder) deletes on b

Posted: Sun Jan 01, 2017 9:56 pm
by GinDiamond
Yes, this is true. The usb does mount automatically.

However, say I want to add an sd card or even a usb hub (that one is highly unlikely). How do I mount the same usb drive every time to the right folder? How can I map /mnt/sda1 to /root/USB every time, basically? (Future use would be for installing software on rootfs on a usb stick)

Re: Fstab (mount USB drive to specified folder) deletes on b

Posted: Mon Jan 02, 2017 1:20 am
by GinDiamond
Update:

Never mind, its all good

I found in the luci web interface there's a much easier way: going to the mount points page and doing stuff from there. The UUID is already there, and what I did was just set the USB stick as the root filesystem. So much easier.

When the sdxc card comes, I'll do that instead.