1
Is it possible to run a system command such as mount
a certain amount of time after system reboot?
My problem is that I had an entry in /etc/fstab
to mount a host disk in a Linux (Ubuntu) virtual machine. A direct mount wouldn't work because of some timing issues in loading kernel modules. So I used a noauto
option in fstab
and added a line in /etc/rc.local
to mount /some_disk
.
This had worked for Ubuntu (12.04 & 14.04), but now I switched to Lubuntu. And the above no longer works. I guess it's probably because Lubuntu reboots much faster, and rc.local
is executed early. BTW, I verified that other commands in rc.local
execute fine. And mount /some_disk
works when sudo
'ed after the system is up.
So I wonder how to postpone mount /some_disk
in a script like rc.local
, say 1 minute after the reboot?
Note: I can do
sudo mount /some_disk
successfully seconds after reboot (GUI is up).
Use
sleep 60; mount /some_disk
? – D Schlachter – 2014-10-23T15:27:06.690