You are not logged in.
Hi!
I often need to work with CD/floppy/HDD images for retro gaming.
I have made a bit hacky, I must admit, setup in my fstab as such:
# Image script mount points
/mnt/image/.image.CD /mnt/image/cd auto noatime,user,noauto,loop 0 0
/mnt/image/.image.1 /mnt/image/1 auto noatime,user,noauto,loop 0 0
/mnt/image/.image.2 /mnt/image/2 auto noatime,user,noauto,loop 0 0
/mnt/image/.image.3 /mnt/image/3 auto noatime,user,noauto,loop 0 0
/mnt/image/.image.4 /mnt/image/4 auto noatime,user,noauto,loop 0 0
/mnt/image/.image.5 /mnt/image/5 auto noatime,user,noauto,loop 0 0
/mnt/image/.image.6 /mnt/image/6 auto noatime,user,noauto,loop 0 0
/mnt/image/.image.7 /mnt/image/7 auto noatime,user,noauto,loop 0 0
/mnt/image/.image.8 /mnt/image/8 auto noatime,user,noauto,loop 0 0
/mnt/image/.image.9 /mnt/image/9 auto noatime,user,noauto,loop 0 0The user can write / change symbolic links at the .image.* files. Yes, this is not probably a secure and not advisable as a general thing to do, but it's my personal computer, and if someone besides me gains access to writing to those symbolic links, I got bigger problems to worry about. Sometimes I mess around a lot with image files. This has worked fine for me.
At some point, this set up has stopped working. I don't know precisely when since there can be months of gaps when I do not use these mount points. I suppose there has been some security-related setting or default behavior which was changed at some point in kernel or systemd, but this is all a guess and speculation.
With this fstab I used to be able to mount images just by:
ln -sf "$imgfile" ${IMAGELINKPREFIX}.image.$IMAGESUFFIX
mount "$MOUNTPOINT"But currently, as I try to mount I just get (when running the mount command, link creation is fine):
mount: /mnt/image/cd: failed to set up loop device for /mnt/image/.image.CD.I still need to mount as root despite having "user" in fstab (i.e.; perhaps a more concise description of the problem would be: can not mount with loop,user options in fstab).
I can see this could be an A instead of B problem; is you have suggestions on how to set up / use images instead of constantly needing to use sudo, suggestions are welcome. Maybe creating a script solely for this, and set it up as NOPASSWD in sudoers....
Last edited by Wild Penguin (Today 16:40:55)
Offline
after reading this i found this:
https://wiki.archlinux.org/title/FuseISO
how have i not known about this, i always use root to mount images, i guess you learn/find somthing new everyday.
Offline
Offline