Page 1 of 1

eject kiosk-boot-cdrom

Posted: 26 Aug 2014, 21:51
by omega
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:

Re: eject kiosk-boot-cdrom

Posted: 27 Aug 2014, 05:57
by fanthom
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.

Re: eject kiosk-boot-cdrom

Posted: 27 Aug 2014, 09:31
by omega
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?

Re: eject kiosk-boot-cdrom

Posted: 27 Aug 2014, 11:18
by fanthom
yes - once booting media is unmounted you can eject CD from initrd (init script) or the union (rc.local for example).

Re: eject kiosk-boot-cdrom

Posted: 28 Aug 2014, 20:36
by omega
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?

Re: eject kiosk-boot-cdrom

Posted: 28 Aug 2014, 21:10
by fanthom
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

Re: eject kiosk-boot-cdrom

Posted: 29 Aug 2014, 22:52
by omega
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: