dip.kiosk is a guide and script(s), that demonstrate a way to build a dual boot kiosk system with Lubuntu 18 x64 linux distro and Porteus Kiosk 4.8.0 x64 linux distro which can be administered and updated through cloud storage (Google Drive). Triple boot (or more) can be supported with light modifications, as long as: the second OS is Lubuntu and third is Porteus Kiosk (e.g. first OS: Microsoft Windows).
In this guide we use Google Drive as our storage source. Lubuntu is a full featured lightweight linux distro running on low end hardware. Porteus Kiosk is a fantastic solution for kiosks running on low end hardware too and its web site provides all the details to build a kiosk. Both distros have a great community and as such they make an ideal choice to build a hard disk driven, dual boot kiosk system.
However information on how to build and administer a dual boot system running Porteus Kiosk from hard disk is spread in various areas. Furthermore information on how to update you kiosk installation remotely is difficult to find.
Below we show draftly how to build a Lubuntu 18 x64 and prepare it for Porteus Kiosk 4.8.0 x64. Up next we demonstrate how to deploy Porteus Kiosk on a hard disk partition using a script and a Google Drive shared folder. Lastly we show how a typical remote update procedure should be issued.
- Default booting is Porteus
- Learn how to lock your
GRUB2with a password and letting only Porteus Kiosk boot - Although full automation of remote update can be possible (needs some research) it imposes security risks (you need to make Porteus
GRUB2aware by customizing your kiosk ISO, installgrub-set-defaultandgrub-rebooton both systems or/and you may have timetables to switchGRUB2configurations files and automate the script to run as service on Lubuntu etc) - Having Porteus kiosk run, as intended, securely from RAM, you need someone to boot to Lubuntu before you
sshto it and perform an update - In my use case scenario kiosks were at the same place I work, I only needed not to unscrew the kiosk, install CD/USB etc. to perform an update, thus I didn't bother designing a secure solution to fully automate remote updating (if I find myself some free time that I don't want to spend with my beloved ones, I will research it and propose another guide)
- Setting wrong values in properties file can damage your kiosk system irreversibly. You need to do 3 things: backup, backup and backup you system before proceeding.
- I am not responsible for what happens
- READ all of my texts and script source, disclaimers etc
- Read the previous 3 lines 3 times aloud then continue reading this guide
- OK you have been warned
- PC with Lubuntu minimum requirements
- Google Drive account
- Lubuntu 18 installation CD/USB link
- Porteus Kiosk 4.8 installation ISO/USB link
- familiar with
GRUB2,ssh,openssh-server,ufw
- Boot Lubuntu 18 x64 installation CD
- Install in one primary partition:
/dev/sda1 - Leave space 500MB for a second primary partition
- Create second partition
/dev/sda2as FAT32 and format it - Make sure
GRUB2gets installed in/dev/sda - Finish Lubuntu installation
- Make sure you can boot Lubuntu from hard disk using
GRUB2
- Boot to Lubuntu
- Install the following
$ sudo apt-get install syslinux, git
$ sudo apt-get install syslinux-utils
- Install
openssh-serverand start it
$ sudo apt-get install openssh-server
$ sudo service ssh restart
- Maybe you need to allow your
ufwto acceptsshincoming requests
$ sudo ufw allow ssh
- Edit custom
GRUB2config files, check--idyou assign. You will need it to set your default boot OS
$ sudo nano /etc/grub.d/40_custom
- Add the
GRUB2menuentry below at the end of the file and save
menuentry "Porteus-Kiosk-hybrid.iso" --id porteus-kiosk-hybrid-iso {
set isofile="/boot/isos/Porteus-Kiosk-hybrid.iso"
loopback loop (hd0,1)$isofile
linux (loop)/boot/vmlinuz boot=boot iso-scan/filename=$isofile noprompt noeject
initrd (loop)/boot/initrd.xz
}
- Edit your
GRUB2defaults
$ sudo nano /etc/default/grub
- Set your default boot, use the
--idvalue above
GRUB_DEFAULT=porteus-kiosk-hybrid-iso
- Update your
GRUB2boot loader
$ sudo update-grub2
The ISO image creation can vary from case to case (due to different functional requirements), from system to system (due to non-functional requirements). As such it is out of scope of this document to explain how you should build your own system. It is implied that you know exactly how to create a USB or CD with a running Porteus Kiosk. Play around and create it, Porteus Kioks wizard is self-explanatory and you will have no problem, if different Google and use Porteus fantastic community.
Please find below listed the main steps to follow along with some links to read/watch etc.
- Boot your Porteus Kiosk 4.8 CD/USB
- Follow wizard, make your choices (read parameters here)
- Make sure you add
sshsupport and enabled firewall * - Choose to "Save ISO" to USB as
Porteus-Kiosk.iso - The above can be tricky, if having trouble to Save ISO check the videos here
In order to access your Porteus Kiosk remotely (e.g. to reboot) you have to make sure that after completing this guide, you can access your running kiosk using ssh through the Internet. That probably means having your network's router/gateway with static ip (or dynamic DNS) and port forward some port to kiosk's port 22.
- Reboot to Lubuntu (hold shift during POST so
GRUB2shows up) - Upload your
Porteus-Kiosk.isoto a Google shared folder - Left click the uploaded ISO file and "Get Sharable link", e.g.
https://drive.google.com/open?id=3Kk2iOUUh485etmsOIa7sTDGoNrjQdY8M
Run the following
$ cd ~/Desktop
$ git clone https://github.com/dimipet/dip.kiosk.git
$ chmod u+x ~/Desktop/dip.kiosk/updateKioskCloud.sh
This is a key/value file with a TAB between key and value.
** When editing be careful **
There is a one single space between each key (e.g. tmp_folder) and its value (e.g. /tmp/porteus).
This single space is a TAB hidden character used as a delimiter between keys and their values.
If in doubt use a descent text editor (notepad++, atom, vim see here that can show hidden control characters. Below I use nano but take care not to delete anything.
First things first: make a copy of your properties sample file
$ cp -p ~/Desktop/dip.kiosk/updateKioskCloud.properties.sample ~/Desktop/dip.kiosk/updateKioskCloud.properties
Now edit your file
$ nano ~/Desktop/dip.kiosk/updateKioskCloud.properties
You should see the following content, edit it to suit your needs, again make sure not to delete TABs
isoCD_filename Porteus-Kiosk.iso
isoCD_MD5 9354d22bac456e1168769ef0d0f251eb
isoCD_URL https://drive.google.com/open?id=3Kk2iOUUh485etmsOIa7sTDGoNrjQdY8M
hybrid_filename Porteus-Kiosk-hybrid.iso
tmp_folder /tmp/porteus
boot_folder /boot/isos
target_partition /dev/sda2
- Set
isoCD_URLwith the sharable link you copied from Google Drive when you uploaded yourPorteus-Kiosk.iso - Find the MD5 of the
Porteus-Kiosk.isoyou created above (step 3). One way to do that is
$ ms5sum Porteus-Kiosk.iso
9354d22bac456e1168769ef0d0f251eb Porteus-Kiosk.iso
-
Set
isoCD_MD5with the MD5 value found above -
In case you don't install on
/dev/sda2, settarget_partitionto your desired target partition -
Upload your
updateKioskCloud.propertiesto a Google shared folder and make sure you uploaded it correclty, use (connect) an online text editor for that like AnyFile -
Delete your local
updateKioskCloud.propertiesfile, you wont need it anymore, you should be editing with extra care from now the file online, as the online properties file is the file that the script uses
$ rm ~/Desktop/dip.kiosk/updateKioskCloud.properties
- Head to your uploaded
updateKioskCloud.propertiesfile, left click it and "Get Sharable link", a link like the following should be copied to your clipboard e.g.https://drive.google.com/open?id=1Aa1oKJ6df89phsuOIa7sUGDoRVSqoP9Q
- Edit the script
updateKioskCloud.sh,
$ nano ~/Desktop/dip.kiosk/updateKioskCloud.sh
- Find the line
google_properties_link="https://drive.google.com/open?id=1dFfAw9tm95ok0JTskyvt6Lsl8y1NHMDT" - Delete the whole link between the two double quotes
- Paste the link you copied from Google Drive above
You should now see something like the following (but with your own copied link)
google_properties_link="https://drive.google.com/open?id=1Aa1oKJ6df89phsuOIa7sUGDoRVSqoP9Q"
- Run
$ sudo nano ~/Desktop/dip.kiosk/updateKioskCloud.sh
The script will
- download
updateKioskCloud.properties, - read its values,
- download and validate the ISO from Google drive
ddthe ISO to your/dev/sda2partition- update your
GRUB2 - reboot
After reboot you should be able to watch your Porteus Kiosk running !
You decide that you need to update your your kiosk.
- Create your new
Porteus-Kiosk.iso - Test your
Porteus-Kiosk.isoon VirtualBox, if OK proceed - Upload it to a Google shared folder (follow step 4)
- Direct edit
updateKioskCloud.propertiesin Google Drive with some connected app e.g. Anyfile and follow step 6 on how to fill values forisoCD_MD5andisoCD_URL - Have someone to hold SHIFT keyboard key (after POST before
GRUB2menu shows up) and select to boot Lubuntu sshto Lubuntu and run as step 8 above
$ sudo updateKioskCloud.sh
Each library is released under its own license. This repository is published under GNU/GPL Version 3.