The officially official Devuan Forum!

You are not logged in.

#1 2019-12-06 16:41:42

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

Refracta Snapshot VM mount points question.

Hello:

I have set up two mount points in my Devuan ascii 2.0.0 VM ...

/media/cdrom and /media/usb, the first one listed in /etc/fstab:

groucho@devuan:~$ cat /etc/fstab
rootfs    / rootfs                             rw         0   0
dev/sr0   /media/cdrom    auto    noauto,owner,ro,users   0   0
groucho@devuan:~$ 

... but when I boot the *.iso image made with RS, the mount points are not there.

Is this how it is supposed to be or am I missing something with respect to Refracta Snapshot's configuration or VMs in general?

Thanks in advance,

A.

Offline

#2 2019-12-06 20:55:38

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,263  

Re: Refracta Snapshot VM mount points question.

That missing "/" before "dev/sr0", is that a typo in this post, or a typo in "fstab"?

Offline

#3 2019-12-06 21:31:57

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

Re: Refracta Snapshot VM mount points question.

Hello:

ralph.ronnquist wrote:

... is that a typo in this post, or a typo in "fstab"?

It's a typo in fstab.
But the cdrom gets automatically mounted in the VM nevertheless.

[Changing it now]

Done.

groucho@devuan:~$ cat /etc/fstab
rootfs    / rootfs                              rw         0   0
/dev/sr0   /media/cdrom    auto    noauto,owner,ro,users   0   0
groucho@devuan:~$ 

Thanks for the heads up.

Best,

A.

Offline

#4 2019-12-06 21:52:01

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

Re: Refracta Snapshot VM mount points question.

fstab is excluded in the rsync copy when you make a snapshot.
fstab gets created when you install with refractainstaller. There's no entry for cdrom. I haven't needed that in years. If you do need it, I think you'd need to add a line of code to refractasnapshot.

Offline

#5 2019-12-06 22:55:03

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

Re: Refracta Snapshot VM mount points question.

Hello:

fsmithred wrote:

fstab is excluded in the rsync copy ...
... gets created when you install with refractainstaller.

OK.
Sort of makes sense.
The live *.iso would take a large portion of boot time figuring out why it was not being able to mount what fastab said was there and may not be.

But what I am referring to is the fact that the mount points I generated in /media ie: /media/cdrom and /media/usb on the VM are not copied over to the *.iso.
ie: there are no files in /media on the live *.iso.

They survive a reboot of the VM and belong to root.
And I can mount a cdrom or usb to them as root.

If they do not get carried over to the live *.iso, I have to generate them everytime I boot the *.iso file.
Make sense?

fsmithred wrote:

There's no entry for cdrom.
I haven't needed that in years.

I still have a score or so of DVDs and CDs with data and need to access them every so often. 

fsmithred wrote:

... you'd need to add a line of code to refractasnapshot.

That's rather over my head.

Would it be possible to (eventually) add an option for that to refractasnapshot.conf?

--- ot ---
One of the very good things that TinyCore linux has is an application called mount tool.

A very simple desktop panel with a button for each of the drives in the system you are booting into.
Click on a drive and it gets mounted, click again, it gets unmounted.

I wonder if it was specially written for TCore or it has its origins in some linux application.
--- ot ---

Thanks in advance,

A.

Offline

#6 2019-12-07 12:46:56

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

Re: Refracta Snapshot VM mount points question.

I use optical media, too. Any directories under /media that are needed get created automatically. I think udev takes care of that.

To preserve any directories you made under /media, take a look at the rsync excludes list (/usr/lib/refractasnapshot/snapshot_exclude.list) and comment out one or more of the following lines, as needed.
Like this:

#- /cdrom/*
#- /media/*

Do the same with /usr/lib/refractainstaller/installer_exclude.list

To add a line to fstab in the installer, you just need to add this line:

echo -e "/dev/sr0\t/media/cdrom\tauto\tnoauto,owner,ro,users\t0\t0" >> /target/etc/fstab

You can put it right after the section that adds the swap line to fstab. That section starts around line 1430 in /usr/bin/refractainstaller and around line 1570 in /usr/bin/refractainstaller-yad. The last two lines in the following code block are what you need to add.

# add entry for swap to fstab if needed
if [[ $use_existing_swap = "yes" ]] ; then
        if [[ $use_uuid = yes ]]; then
                swap_part="$(/sbin/blkid -s UUID $swap_dev | awk '{ print $2 }' | sed 's/\"//g')"
        else
                swap_part="$swap_dev"
        fi
        echo -e $"\n Adding swap entry to fstab...\n"
        echo -e "$swap_part\tswap\tswap\tdefaults\t0\t0" >> /target/etc/fstab
else
        echo -e "/swapfile\tswap\tswap\tdefaults\t0\t0" >> /target/etc/fstab
fi

# Make entry for cdrom in fstab
echo -e "/dev/sr0\t/media/cdrom\tauto\tnoauto,owner,ro,users\t0\t0" >> /target/etc/fstab

Offline

#7 2019-12-07 15:15:10

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

Re: Refracta Snapshot VM mount points question.

Hello:

fsmithred wrote:

I use optical media, too.
... directories under /media that are needed get created automatically. I think udev takes care of that.

OK

fsmithred wrote:

... directories you made under /media, take a look at the rsync excludes ...
... comment out one or more of the following lines, as needed.
Like this:

#- /cdrom/*
#- /media/*

Do the same with /usr/lib/refractainstaller/installer_exclude.list

Great ...  =-)

fsmithred wrote:

To add a line to fstab in the installer, you just need to add this line:

echo -e "/dev/sr0\t/media/cdrom\tauto\tnoauto,owner,ro,users\t0\t0" >> /target/etc/fstab

... right after the section that adds the swap line to fstab.
... starts around line 1430 in /usr/bin/refractainstaller and around line 1570 in /usr/bin/refractainstaller-yad.

The last two lines in the following code block are what you need to add.

# add entry for swap to fstab if needed
if [[ $use_existing_swap = "yes" ]] ; then
        if [[ $use_uuid = yes ]]; then
                swap_part="$(/sbin/blkid -s UUID $swap_dev | awk '{ print $2 }' | sed 's/\"//g')"
        else
                swap_part="$swap_dev"
        fi
        echo -e $"\n Adding swap entry to fstab...\n"
        echo -e "$swap_part\tswap\tswap\tdefaults\t0\t0" >> /target/etc/fstab
else
        echo -e "/swapfile\tswap\tswap\tdefaults\t0\t0" >> /target/etc/fstab
fi

# Make entry for cdrom in fstab
echo -e "/dev/sr0\t/media/cdrom\tauto\tnoauto,owner,ro,users\t0\t0" >> /target/etc/fstab

Thank you so much for taking the time to explain/write all this up.

I'll try it and see how it goes.
Just in case, this time I'll have a snapshot of the VM available.

Fortunately, I have backintime installled so I did not have to redo all my previous work after I went edit-happy with /ect/fstab.

With respect to seeing the devices in Xfe, I remembered gnome-disk-utility and decided to try it out on the VM and things got easier.
Not too heavy on the file system but certainly dangerous to use without the proper attention.

eg: that readily available delete selected partition button ...

Have a good week-end.
Cheers,

A.

Offline

Board footer