Page 1 of 2

[Solved] Start Kiosk from Iso-Image on hdd

Posted: 26 Mar 2015, 13:01
by omega
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?

Re: Start Kiosk from Iso-Image on hdd

Posted: 26 Mar 2015, 13:31
by fanthom
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.

Re: Start Kiosk from Iso-Image on hdd

Posted: 26 Mar 2015, 16:20
by Ed_P
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

Re: Start Kiosk from Iso-Image on hdd

Posted: 26 Mar 2015, 22:03
by omega
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

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

Posted: 01 May 2016, 12:46
by jk9
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?

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

Posted: 01 May 2016, 17:51
by fanthom
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.

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

Posted: 01 May 2016, 18:11
by jk9
@ 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 :%)

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

Posted: 02 May 2016, 07:05
by jk9
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.

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

Posted: 02 May 2016, 14:37
by jk9
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.

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

Posted: 02 May 2016, 15:06
by fanthom
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.

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

Posted: 02 May 2016, 17:58
by jk9
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?

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

Posted: 02 May 2016, 18:11
by fanthom
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).

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

Posted: 03 May 2016, 09:39
by jk9
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 ?

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

Posted: 03 May 2016, 16:08
by Ed_P
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

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

Posted: 03 May 2016, 16:26
by jk9
@ 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.