You are not logged in.
Dear Forum Members,
I am new to Devuan and Refracta and a mediocre Linux user so please be patient with me ;-)
Background information:
I am a teacher in an technical school in Austria. The pupils need to sit an 100min long programming (python) exam. Because of budget limitations we don't have school PCs, but the pupils have their own laptops (mostly running windows). To give them a realistic programming environment (instead of pen and paper), we decided on preparing a linux live usb system, which the pupils should boot on their own laptops. I prepared the system in a VM and customized it (offline python doc, severals IDEs, prepared maria DB, no network access, no sudo rights and no mounting of their own hard drives) and made an live iso with the help of the refracta tools.
So far so good, but I have one significant problem ...
At the end of the exam, the pupils should safe their python programs on this or another usb stick and carry it to a windows PC with an printer attached to it, to print their work to paper.
My problem:
I masked the udisks2 service on the VM system, such that the pupils (as live users later on) are unable to mount their own hard disks and look for solutions to the exam questions. This means that they can not mount a second usb stick to safe their programs. So I thought it would be good to create a second fat32 partition with a label on the live usb stick and mount it during startup with systemd. I put a line in /etc/fstab on my VM to mount it and created the iso with refracta tools. But the /etc/fstab file on the live system is completely different from the one in my VM.
Is there a way to influence the /etc/fstab for the live system to auto mount the fat32 partition or do you guys know a better way of reaching my goal?
p.s. I know that with refracta2usb it is possible to create persistence, but only with linux file systems, which will not be readable on the windows pc with the printer.
Thank you for your help and please excuse poor my English.
Markus
Offline
I masked the udisks2 service on the VM system, such that the pupils (as live users later on) are unable to mount their own hard disks and look for solutions to the exam questions.
Why not a program that restores the service with the need of a secret password? You can write it in the blackboard at the end of the exam.
If you work systematically, things will come by itself (Lev D. Landau)
Offline
You can preserve the /etc/fstab in the source system by commenting out the line for it in /usr/lib/refractasnapshot/snapshot_exclude.list
If that doesn't work for you, there's probably a way to do it with a hook script, which I've used in the past but don't recall how to do it. See the man pages for live-boot and live-config and maybe even the debian-live manual.
Offline
You might need to add the word 'skipconfig' to the boot command for the live system. It looks like that is an undocumented option.
See /lib/live/boot/9990-fstab.sh and 9990-cmdline-old
I'm away from home right now and can't test any of this. Please let me know what you find.
Offline
Thanks for your hints - especially for the snapshot_exluded.list - I was not aware of that.
However in the meantime I found a solution using systemd.
I created the file:
sudo nano /etc/systemd/system/home-user-Meine_FSST_Daten.mount
########
[Unit]
Description=Mount second fat32 partion on the boot stick to /home/user/Meine_FSST_Daten>
[Mount]
What=/dev/disk/by-label/MY_DATA
Where=/home/user/Meine_FSST_Daten
Type=vfat
Options=rw,umask=0000
[Install]
WantedBy=multi-user.target
##############
and enabled the service:
sudo systemctl enable home-user-Meine_FSST_Daten.mount
The mount option umask=0000 was necessary because the ownership of my mount directory always changed to root. Now it is still owned by root, but the live user can also read and write.
After that I created the refracta snapshot and now it works
Thanks for your help!
Offline