I am using a loop file system because I do not have another partition to mount and I am only practicing as I study for my sysadmin exam. I added the following line to my stab
/tmp/imagefile mnt/tempdir ext4 defaults 0 0
— this was done after creating a 1 mb file using the dd command and successfully mounting it manually using the mount command. However when I added this line to fstab and rebooted it restarted into emergency mode. I was able to edit the file in emergency mode and removing the line allowed a normal reboot. This happened on two systems a centos 7 system and a fedora 20 system.
Best Answer
For a loopback mount, you would want to invoke
mount
with-o loop
, so changedefaults
toloop
.Also, give an absolute path to
/mnt/tempdir
.After editing fstab, verify that you can run
mount /mnt/tempdir
, and if so, it should work on the next boot.