[Solved] Start Kiosk from Iso-Image on hdd

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.
Forum rules
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
omega
White ninja
White ninja
Posts: 14
Joined: 29 Jul 2014, 20:07
Distribution: Porteus
Location: Germany

[Solved] Start Kiosk from Iso-Image on hdd

Post#1 by omega » 26 Mar 2015, 13:01

Hi, I would like to Porteus Kiosk on several notebooks with a boot-option. These computers have no connection to a network. The user should get a bootmenu (I am using grub4dos at the moment) and can chose between Kiosk (which is used to startup a special application (no browser) and the regular installed OS.

My problem is that Kiosk can't find its files when booting from iso-file, because of the restriction that it only works when "burned" on cd/usb/hdd (FAQ §3), but I prefer not to create an extra partition for Kiosk because the change of the regular system should be as minimal as possible.

My attempts were
1) Changing the init-script in initrd.xz, but I assume the restriction is inside vmlinuz or busybox, so changing the init-script can't work. Is that so?
2) Booting with grub4dos trying different parameters. With this configuration the bootloader starts, but there is no drive with Kiosk on it, so it won't load the files and starts that countdown (lazy).
title Kiosk
find --set-root --ignore-floppies --ignore-cd /kiosk.iso
map /kiosk.iso (0xff)
map --hook
chainloader (0xff)
3) Like 2, but also "burned" Kiosk on a usb-stick. When the stick is inside, the bootloader from hdd finds the files on that usb stick (usb-boot can be disabled in bios) and starts everything. But then everytime someone wants to start Kiosk Needs that usb-stick :(

Do you have a clue how to solve that problem?
Last edited by omega on 26 Mar 2015, 22:03, edited 1 time in total.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Start Kiosk from Iso-Image on hdd

Post#2 by fanthom » 26 Mar 2015, 13:31

changing the init should be enough.
you must find the partition first, then mount the ISO somewhere in /mnt and that should be it.

please mind that kiosk 3.3.0 supports only FAT/NTFS/XFS/ISO9660 partitions.
Please add [Solved] to your thread title if the solution was found.

User avatar
Ed_P
Contributor
Contributor
Posts: 8578
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Start Kiosk from Iso-Image on hdd

Post#3 by Ed_P » 26 Mar 2015, 16:20

omega wrote:2) Booting with grub4dos trying different parameters. With this configuration the bootloader starts, but there is no drive with Kiosk on it, so it won't load the files and starts that countdown (lazy).
title Kiosk
find --set-root --ignore-floppies --ignore-cd /kiosk.iso
map /kiosk.iso (0xff)
map --hook
chainloader (0xff)
In booting non-kiosk Porteus ISOs my grub4dos menus are like this:

Code: Select all

set ISO31=Porteus-LXQT-v3.1-x86_64-nu.iso
set ISO30i=Porteus-RazorQT-v3.0.1-i486-nu.iso



title Porteus 3.1   Always Fresh  \n186MB\n %ISO31% 
find --set-root                       /ISOs/%ISO31%
map --heads=0 --sectors-per-track=0   /ISOs/%ISO31% (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz    from=/ISOs/%ISO31% volume=40  
initrd /boot/syslinux/initrd.xz

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

Re: Start Kiosk from Iso-Image on hdd

Post#4 by omega » 26 Mar 2015, 22:03

Your Posts helped me a lot! Thank you very much! :Yahoo!:

As no files on the image were accessible (no entries in blkid) I moved boot, docs and xzm-folder in a new folder called "iso", so the initrc.xz becomes much bigger. This is no problem for me, because the image-size stays the same. I made the following changes in the init-script:

DEV="kiosk"
mkdir /mnt/$DEV
mount -n /iso /mnt/$DEV 2>/dev/null
instead of
search || lazy || . fatal

In grub4dos the following menu-entry worked:

title start myKiosk
find --set-root /myKiosk.iso
map --heads=0 --sectors-per-track=0 /myKiosk.iso (0xff)
map --hook
root (0xff)
kernel /boot/vmlinuz from=/myKiosk.iso
initrd /boot/initrd.xz

jk9
White ninja
White ninja
Posts: 29
Joined: 01 May 2016, 12:19
Distribution: Porteus_Kiosk
Location: Germany

Re: [Solved] Start Kiosk from Iso-Image on hdd

Post#5 by jk9 » 01 May 2016, 12:46

Hi there lads and thanks a lot for this brilliant distro.

First off, using 'dd' to burn kiosk image to a small partition on my usb stick and booting the lot from Grub4Dos works like a charm.

I'm however keen on going omega's way, I've been trying to do the same as instructed but to no avail :(
Now, the way I understand this, I have to:
1. Unpack initrd.xz
2. Edit init by replacing the line:
search || lazy || . fatal
with
DEV="kiosk"
mkdir /mnt/$DEV
mount -n /iso /mnt/$DEV 2>/dev/null

3. Repack initrd.xz
4. Create a folder named iso on my usb stick.
5. Copy boot, docs, xzm from kiosk.iso to the iso folder.
6. Copy kiosk.iso to the usb stick.

..... but it fails miserably with the lazy code ...

Image
Image

Any advice?
Last edited by jk9 on 04 May 2016, 04:49, edited 1 time in total.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: [Solved] Start Kiosk from Iso-Image on hdd

Post#6 by fanthom » 01 May 2016, 17:51

You need to place whole kiosk ISO inside the initrd.xz then mount in from init:

Code: Select all

DEV="kiosk"
mkdir /mnt/$DEV
mount -n /kiosk.iso /mnt/$DEV 2>/dev/null
using 'dd' to burn kiosk image to a small partition on my usb stick and booting the lot from Grub4Dos works like a charm.
WARNING:
Things changed in 3.7.0 release and if you are using remote management then you must burn the ISO to second partition of the media. If you burn it to e.g. /dev/sda3 then kiosk reconfiguration will fail.
If you are not using remote management then you can burn the ISO to any partition.
Please add [Solved] to your thread title if the solution was found.

jk9
White ninja
White ninja
Posts: 29
Joined: 01 May 2016, 12:19
Distribution: Porteus_Kiosk
Location: Germany

Re: [Solved] Start Kiosk from Iso-Image on hdd

Post#7 by jk9 » 01 May 2016, 18:11

@ fanthom
Thanks a lot for the prompt answer.
Yes, I "dd" kiosk.iso to the last partition of my usb and it works flawlessly :wink: (no remote management)

Could you please drop a line or two on how to:

Code: Select all

place whole kiosk ISO inside the initrd.xz then mount in from init:
Sorry for being thick, I'm a Windows user :%)

jk9
White ninja
White ninja
Posts: 29
Joined: 01 May 2016, 12:19
Distribution: Porteus_Kiosk
Location: Germany

Re: [Solved] Start Kiosk from Iso-Image on hdd

Post#8 by jk9 » 02 May 2016, 07:05

Nevermind, I figured that out by myself.
You see, it all comes down to understanding what the poster actually means.
I'm still testing, I'll post how I proceeded in a short while.

jk9
White ninja
White ninja
Posts: 29
Joined: 01 May 2016, 12:19
Distribution: Porteus_Kiosk
Location: Germany

Re: [Solved] Start Kiosk from Iso-Image on hdd

Post#9 by jk9 » 02 May 2016, 14:37

I'm still getting into some oddities ...
fanthom, could you pretty please explain what you mean by:

Code: Select all

place whole kiosk ISO inside the initrd.xz then mount in from init: 
I mean, what do you mean by whole kiosk ISO ? ( is it the kiosk.iso file I've created with the wizard ? )
I'm doing the lot on VirtualBox running porteus live CD.
A short step-by-step would be highly appreciated.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: [Solved] Start Kiosk from Iso-Image on hdd

Post#10 by fanthom » 02 May 2016, 15:06

is it the kiosk.iso file I've created with the wizard ?
Yes.

Your initrd.xz will be big (like 100MB) but one initrd.xz is ready you can remove /xzm from unpacked ISO to not double modules and save space.
Please add [Solved] to your thread title if the solution was found.

jk9
White ninja
White ninja
Posts: 29
Joined: 01 May 2016, 12:19
Distribution: Porteus_Kiosk
Location: Germany

Re: [Solved] Start Kiosk from Iso-Image on hdd

Post#11 by jk9 » 02 May 2016, 17:58

fanthom wrote: Your initrd.xz will be big (like 100MB) but one initrd.xz is ready you can remove /xzm from unpacked ISO to not double modules and save space.
Thanks for your help but bear with me a little more .....

1. Unpack kiosk.iso
2. Unpack initrd.xz

Code: Select all

xz -d < initrd.xz | cpio -i
3. Edit the file init
replace the line:

Code: Select all

search || lazy || . fatal
with

Code: Select all

DEV="kiosk"
mkdir /mnt/$DEV
mount -n /iso /mnt/$DEV 2>/dev/null
4. Place kiosk.iso in the same location as the unpacked initrd.xz
5. Repack initrd.xz

Code: Select all

find | cpio -H newc -o | xz --check=crc32 --x86 --lzma2 > ../initrd.xz
... which leads to a new initrd.xz (roughly 103 MB)
Image
6. Delete the xzm folder from the unpacked kiosk.iso

Now, if this is all right, where do I go from here?
Last edited by jk9 on 01 Jun 2016, 06:39, edited 1 time in total.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: [Solved] Start Kiosk from Iso-Image on hdd

Post#12 by fanthom » 02 May 2016, 18:11

Now you run make_iso.sh to create new ISO and you can use Grub4DOS as instructed by ED_P to boot the kiosk from the ISO file (no need to burn the kiosk on a device/partition).
Please add [Solved] to your thread title if the solution was found.

jk9
White ninja
White ninja
Posts: 29
Joined: 01 May 2016, 12:19
Distribution: Porteus_Kiosk
Location: Germany

Re: [Solved] Start Kiosk from Iso-Image on hdd

Post#13 by jk9 » 03 May 2016, 09:39

fanthom wrote:Now you run make_iso.sh to create new ISO
Fair enough. Done.
and you can use Grub4DOS as instructed by ED_P to boot the kiosk from the ISO file
Why would I use that code (?) He's obviously booting a non-kiosk Porteus. Besides, kiosk doesn't accept cheat codes AFAIK.

Just for the sake of testing, I used Rufus to create a bootable usb stick using the newly generated kiosk.iso file (slightly bigger than the one created by the wizard) and it works.
I didn't have to use the "dd" burn function in Rufus this time, which was mandatory to boot the original kiosk.iso created by the wizard.

Now, I've got the newly generated kiosk.iso file and I want to boot that using Grub4Dos.
What would your menu.lst in this particular case look like?
Do I need anything else on my usb stick apart from the kiosk.iso file ?

User avatar
Ed_P
Contributor
Contributor
Posts: 8578
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: [Solved] Start Kiosk from Iso-Image on hdd

Post#14 by Ed_P » 03 May 2016, 16:08

Actually fanthom my grub4dos code does not work with porteus kiosk!! I suspect it is because the ISO is on an NTFS partition though that doesn't effect booting the regular porteus ISOs.

Code: Select all

set ISOx=Porteus-Kiosk-3.7.0-i586.iso


title Kiosk                            \n\n %ISOx%
find --set-root                       /ISOs/%ISOx%
#map --mem                             /ISOs/FiraDisk.gz (fd0) 
map --heads=0 --sectors-per-track=0   /ISOs/%ISOx% (0xff) 
map --hook
root (0xff)
kernel /boot/vmlinuz             from=/ISOs/%ISOx%  quiet first_run   
initrd /boot/initrd.xz
I get the

Code: Select all

^device not ready....
error. The debug lines show:

Code: Select all

booting parameters: net.iframes=0 from=/ISOs/Porteus-Kiosk-3.7.0-i586.iso quiet first-run
kernel version: 4.4.3-porteus-kiosk
kernel modules version: 
available network interfaces: lo
:(

Sorry jk9.


-edit-

BTW The \boot\isolinux\isolinux.cfg file.

Code: Select all

timeout 0
prompt 0
default kiosk

label kiosk
kernel /boot/vmlinuz
append initrd=/boot/initrd.xz   quiet   first_run

jk9
White ninja
White ninja
Posts: 29
Joined: 01 May 2016, 12:19
Distribution: Porteus_Kiosk
Location: Germany

Re: [Solved] Start Kiosk from Iso-Image on hdd

Post#15 by jk9 » 03 May 2016, 16:26

@ Ed_P

Code: Select all

title Porteus Kiosk
kernel /kiosk/vmlinuz
initrd /kiosk/initrd.xz
Indeed, this would work if you "dd" kiosk.iso to a partition on the usb stick.

Locked