eject kiosk-boot-cdrom

Here you can post about the issues related to modifications performed manually (not through the kiosk wizard). Example: swapped kernel, added 3rd party modules or files.
Please describe in detail what has been changed and hopefully other kiosk user will be able to help.
Porteus team wont resolve bugs posted in this category as we support only modifications made by the kiosk wizard.
Post Reply
omega
White ninja
White ninja
Posts: 14
Joined: 29 Jul 2014, 20:07
Distribution: Porteus
Location: Germany

eject kiosk-boot-cdrom

Post#1 by omega » 26 Aug 2014, 21:51

Hi,

when I boot porteus-kiosk burned on a cdrom, the cdrom-drive gets locked, but I can't find something like "eject -i" that locks the drive. I need to take out the cdrom after booting. Where is the "magic line" I have to change?

Is it possible to automatically throw out the cdrom after booting? Already tried to change the config inside initrd.xz, but commands are missing :(

Thankful for every clue :Rose: :wink:

User avatar
fanthom
Site Admin
Site Admin
Posts: 4566
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: eject kiosk-boot-cdrom

Post#2 by fanthom » 27 Aug 2014, 05:57

this is a security feature that nobody can eject the CD in a public place.

anyway - if you want to be able to take it out then please modify 'init' script and unmount /mnt/$DEV just after "Copy important stuff to union". now eject button should work.
Please add [Solved] to your thread title if the solution was found.

omega
White ninja
White ninja
Posts: 14
Joined: 29 Jul 2014, 20:07
Distribution: Porteus
Location: Germany

Re: eject kiosk-boot-cdrom

Post#3 by omega » 27 Aug 2014, 09:31

Thank you for your fast answer! :Rose:

So I just try the command "umount -nl /mnt/$DEV 2>/dev/null" ?

Back to the auto-eject thing.. my theory is that I can copy the eject binary from porteus desktop into the bootloader usr/bin and call "eject" in that init-script.. but not tested that. Is there a chance of success or am I on the wrong track?

User avatar
fanthom
Site Admin
Site Admin
Posts: 4566
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: eject kiosk-boot-cdrom

Post#4 by fanthom » 27 Aug 2014, 11:18

yes - once booting media is unmounted you can eject CD from initrd (init script) or the union (rc.local for example).
Please add [Solved] to your thread title if the solution was found.

omega
White ninja
White ninja
Posts: 14
Joined: 29 Jul 2014, 20:07
Distribution: Porteus
Location: Germany

Re: eject kiosk-boot-cdrom

Post#5 by omega » 28 Aug 2014, 20:36

Unfortunately the command "umount -nl /mnt/$DEV 2>/dev/null" does not work in the init-file. When the command is included, the "exec /sbin/switch_root /union /sbin/init"-command does not load the GUI anymore. Instead there is no error-message, but I can write text, but no commands. Do you perhaps have a clue how to fix that?

User avatar
fanthom
Site Admin
Site Admin
Posts: 4566
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: eject kiosk-boot-cdrom

Post#6 by fanthom » 28 Aug 2014, 21:10

please try to do it from rc.local so:

Code: Select all

umount -nl /dev/sr0
eject /dev/sr0
if wont work then only 'custom build' will allow this (i'll have to tweak fundamental kiosk security settings):
http://porteus-kiosk.org/builds.html
Please add [Solved] to your thread title if the solution was found.

omega
White ninja
White ninja
Posts: 14
Joined: 29 Jul 2014, 20:07
Distribution: Porteus
Location: Germany

Re: eject kiosk-boot-cdrom

Post#7 by omega » 29 Aug 2014, 22:52

Thank you very much for the help!

As ejecting or unmounting in the init-script didn't work, I saved the $DEV variable in a file within the init-script:

Code: Select all

$DEV > /union/usr/share/lw.txt
Then I modified rc.S:

Code: Select all

read DEV < /usr/share/lw.txt
umount -nl /dev/$DEV
eject -rsfqpm /dev/$DEV
Now the CD gets ejected :good:

Post Reply