The officially official Devuan Forum!

You are not logged in.

#1 2019-12-03 23:44:45

Altoid
Member
Registered: 2017-05-07
Posts: 1,592  

Xfe + isomount question

Hello:

Continuing with my ongoing tune up of a minimal Devuan ascii live *.iso, I am stuck ith the issue regarding automounting the drives.

While trying to see how to mount an *.iso image, I installed the isomount package as it had a much smaller footprint then other available options.

I found a couple of adequate scripts on the isomount project page which I set up in /home/groucho/.config/xfe/scripts:

#fxe script iso-mount
#!/bin/bash
 
FILE=$(basename "$1")
MOUNTPOINT="$HOME/Desktop/$FILE"
 
fuseiso -p "$1" "$MOUNTPOINT"

     
and

#fxe script iso-umount
 #!/bin/bash
 
 FILE=$(basename "$1")
 MOUNTPOINT="$HOME/Desktop/$FILE"
 
 fusermount -u "$MOUNTPOINT"

Now I can right-click on an *.iso file and do scripts -> mount or scripts -> unmount.

The surprise was that doing a right-click on the image mounted in /Desktop also showed me a greyed out Mount and an Unmount option, the latter bringing up a pop-up that said Permisison denied when clicked on.

So I can mount and unmount an *.iso made with Refractasnapshot using the scripts I set up as the logged in user but cannot unmount it from Xfe.
I cannot mount it either as the Mount and Unmount icons in the bar are greyed out and the Unmount icon appears only if I have previously mounted the *.iso file with the isomount script.

Same thing happens if I change the ownership of the *.iso file to the logged in user.

What am I missing here?

Thanks in advance.

A.

Offline

#2 2019-12-04 00:11:34

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,500  

Re: Xfe + isomount question

Your commands are correct for fuseiso and fusermount. I stopped using fuseiso a few years ago because it went away. I guess it's back, but I haven't tried it.

As root:

mount snapshot.iso /some/mountpoint
do stuff
umount /some/mountpoint

Why do you want to mount the isos?

Offline

#3 2019-12-04 00:44:13

Altoid
Member
Registered: 2017-05-07
Posts: 1,592  

Re: Xfe + isomount question

Hello:

fsmithred wrote:

... commands are correct ...

Yes ...
I thought so too, because ...
... one thing I tried actually worked?  ;-D

fsmithred wrote:

Why do you want to mount the isos?

If you recall, this live Devuan ascii *.iso will live inside my box in a small capacity USB plugged into a motherboard USB port and will be used as a sort of rescue installation.
The drive will also have one or maybe two separate logical partitions inside an extended partition to hold a few *.iso files which I may need.

This is why I consider it important to be able to mount an *.iso image from within the live installation.
eg: imagine a rig with disabled boot drive and a failing CD/DVD unit with the backups/images in another drive in the box or on a portable external drive.

That said, why the difference in behaviour I mentioned earlier?

ie: Why can I mount and unmount an *.iso made with Refractasnapshot using the scripts I set up as the logged in user but cannot unmount it from Xfe?

On a related subject:

My Devuan ascii 2.0.0 installation works with four internal SAS drives, a DVD drive and four additional USB/FireWire ports, all of which I have to be to be available in Xfe to mount as needed via the live.iso.

It would have to be always there, to be awakened if I have a problem.
This means it has to be oblivious as to which drives are living inside the box when booted or to the ID any of the USB/FireWire drives that could be plugged in at any time.

ie:
When I boot the live.iso and start Xfe, I need to see the on-board drives present in the box at that time and any USB/FireWire drive I plug in so I can mount any of them.

Just like with my main Devuan ascii installation, where I can see all my drives in Thunar and mount/unmount them (w/pw) as needed.

How can I get that done?
With autofs?

Thanks in advance,

A.

Offline

#4 2019-12-04 03:35:55

bgstack15
Member
Registered: 2018-02-04
Posts: 205  

Re: Xfe + isomount question

I suspect that Xfe is recognizing that the /home/groucho/Desktop/Example1 is a separate mount point. That is why it is giving you options (that don't work, because you're not running xfe as root) for mount and umount.

Can you write a custom xfe function to fusermount -u the selected directory?


This space intentionally left blank.

Offline

#5 2019-12-04 09:04:39

Altoid
Member
Registered: 2017-05-07
Posts: 1,592  

Re: Xfe + isomount question

Hello:

bgstack15 wrote:

... Xfe is recognizing that the /home/groucho/Desktop/Example1 is a separate mount point.
... why it is giving you options (that don't work ...

Yes, if I mount the *.iso with the script as user and then open another instance of Xfe as root, I am able to unmount the *.iso with the icon from there.
I can also mount the *.iso with the script (mounts in /root/Desktop) but not with the the icon as it is also greyed out when as running as root.

Command line mounting of the iso on /media/cdrom is only possible as root.

groucho@devuan:/home/snapshot$ sudo mount snapshot-20191203_1428.iso /media/cdrom
mount: /dev/loop0 is write-protected, mounting read-only
groucho@devuan:/home/snapshot$
groucho@devuan:/home/snapshot$ sudo umount snapshot-20191203_1428.iso /media/cdrom
umount: snapshot-20191203_1428.iso: not mounted
groucho@devuan:/home/snapshot$ 
bgstack15 wrote:

Can you write a custom xfe function to fusermount -u the selected directory?

I'm sorry but my scripting abilities are non-existent so I'd need a more detailed explanation.
The isounmount script uses fusermount and is called from Xfe by selecting the *.iso file and right-click -> scripts -> isounmount

#fxe script iso-umount
 #!/bin/bash
 
 FILE=$(basename "$1")
 MOUNTPOINT="$HOME/Desktop/$FILE"
 
 fusermount -u "$MOUNTPOINT"

What I don't understand is why the mount icon does not go 'live' when I select the *.iso file with the pointer.
ie: Xfe is not identifying it as 'mountable' but then it does identify it as 'unmountable' once it is mounted.

Similar thing happens ith a USB stick:

I can mount it as root via command line and then the unmount icon is 'live' but the operation is not permitted.

Xfe is highly configurable, maybe this is all related to Edit -> Preferences -> Programs where Volume management is configured?

Mount: mount
Unmount: umount

Thanks for your input.

Cheers,

A.

Offline

#6 2019-12-04 15:20:03

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,500  

Re: Xfe + isomount question

If you recall, this live Devuan ascii *.iso will live inside my box in a small capacity USB plugged into a motherboard USB port and will be used as a sort of rescue installation.
The drive will also have one or maybe two separate logical partitions inside an extended partition to hold a few *.iso files which I may need.

This is why I consider it important to be able to mount an *.iso image from within the live installation.
eg: imagine a rig with disabled boot drive and a failing CD/DVD unit with the backups/images in another drive in the box or on a portable external drive.

I can understand why you want to be able to boot an iso for rescue/repair, and I can understand why you want to be able to mount your installed partitions from that live system, but I still don't understand why you need to mount the isos. Are you planning to do frequent editing of the iso's boot menu?

According to the xfe docs here: http://roland65.free.fr/xfe/index.php?page=docs
You can mount filesystems with ctrl-M and unmount with ctrl-U. What I can't figure out is how/where you find these unmounted filesystems. I don't see anything in the preferences about volume management or devices. I can only see mounted filesystems.

Edit: Oh, I'm looking at an older version in jessie. I see this for 1.42, which is the version in ascii:

This release fixes several bugs and regressions and adds custom mount / unmount commands to the Preferences dialog.

Offline

#7 2019-12-04 18:42:32

Altoid
Member
Registered: 2017-05-07
Posts: 1,592  

Re: Xfe + isomount question

Hello:

fsmithred wrote:

... don't understand why you need to mount the isos.

To tell the truth, neither do I.

So I tried to recall how that came about and then it came back to me: I was trying out mounting (in general) with Xfe.
I was having the issues I have mentioned with USB drives and was also having problems mounting CD/DVDs.

So I then tried an *.iso I had at hand in /home/snapshot.
That is what happened and ho it came about.
Sorry ... 

fsmithred wrote:

... planning to do frequent editing of the iso's boot menu?

No, not really.
I can do that before generating it in refractasnapshot.conf, right?

You are (as usual) right and I stand corrected: the title of the post should have been different.
But the issue is common to mounting an *.iso, a USB drive or system drives are similar or the same.

fsmithred wrote:

According to the xfe docs ...

Yes, read them.

fsmithred wrote:

... mount filesystems with ctrl-M and unmount with ctrl-U.
What I can't figure out is how/where you find these unmounted filesystems.

Right.
That is exactly what I need to find out how to do.

fsmithred wrote:

... don't see anything in the preferences about volume management or devices.

Neither do I.

fsmithred wrote:

... adds custom mount / unmount commands ...

Yes, it was a feature someone asked for and the author implementes a couple of years later.
And that's what I want to use but I can only select to mount something Xfe can see/show as available.

Maybe it has to look in /etc/fstab?
I have two mount points /media/cdrom and /media/usb but my /etc/fstab only has rootfs / rootfs rw 0 0.

Thanks and sorry for the *.iso confusion.

Best,

A.

Offline

#8 2019-12-04 20:16:31

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,500  

Re: Xfe + isomount question

Right, you can set up the boot menu before or when you make the snapshot.

If you set up the extra partitions in fstab with 'noauto,user' options, then you can mount/unmount by right-clicking on the mountpoint. I just tested this in jessie and it works. That's the version before the custom mount/unmount commands were added.

If xfe won't do what you want, take a look at spacefm or pcmanfm.

Offline

#9 2019-12-04 22:54:55

Altoid
Member
Registered: 2017-05-07
Posts: 1,592  

Re: Xfe + isomount question

Hello:

fsmithred wrote:

... can set up the boot menu before or when you make the snapshot.

OK

fsmithred wrote:

... set up the extra partitions in fstab with 'noauto,user' options, then you can mount/unmount by right-clicking on the mountpoint.

Yes, that should do it.

Excuse my ignorance, but how do I set that up in a live *.iso when I don't know what drives will be in the box when I use it?

fsmithred wrote:

If xfe won't do what you want ...

Xfe is really lean, quick and most importantly, desktop agnostic.
I'd rather stay with Xfe.

Thanks for your input, much appreciated.

Best,

A.

Offline

#10 2019-12-05 02:49:44

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,500  

Re: Xfe + isomount question

Excuse my ignorance, but how do I set that up in a live *.iso when I don't know what drives will be in the box when I use it?

Oh yeah, I didn't think of that. Once you get everthing set up, you could make a hookscript that will run when you boot the live iso and inject the necessary lines into /etc/fstab. But that won't work for a rescue usb that you're booting on some other box. For that, you might be better off doing it manually in a root terminal. Then you can run fdisk, df and blkid to get information about the partitions and figure out which one you want to mount.  That's my preferred method, even on a box that will let me mount partitions from the desktop.

Offline

#11 2019-12-05 21:25:55

Altoid
Member
Registered: 2017-05-07
Posts: 1,592  

Re: Xfe + isomount question

Hello:

fsmithred wrote:

... you could make a hookscript that will run when you boot the live iso and inject the necessary lines into /etc/fstab.

No idea how to do that.

fsmithred wrote:

... won't work for a rescue usb that you're booting on some other box.

It's always the same box but as this *.iso (fortunately) is not used with any frequency, the disk configuration is likely to change so to all effects and purposes it is/could well be another box.

fsmithred wrote:

... better off doing it manually in a root terminal.
... fdisk, df and blkid to get information ...
... figure out which one you want to mount.

Yes, you might be right.
I have found that doing things in the terminal is helping me become, slowly albeit steadily, a bit more proficient with in use of the command line.

But it is hard to shed years point&click muscle memory and the apparent convenience it brought along.

I'll see what I can rig up.

Thanks for your input.

Best,

A.

Offline

Board footer