Debian Developers - Developing a kiosk type system - advice needed

This is Interesting: Free IT Magazines  
Home > Archive > Debian Developers > October 2005 > Developing a kiosk type system - advice needed





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Developing a kiosk type system - advice needed
Simon Guerrero

2005-10-04, 5:56 pm

Hi

I am developing a "kiosk" type of system, where I want to a) boot up fast
and b) be able to switch off and back on and restart with a clean image.

I have 1Gb filesys to play with (CF or similar) and 128-256mb RAM.

I was hoping to do something like this:

1. Make the disk read-only

2. Use software suspend with KEEPIMAGE to always start from a stored image,
and do the following in a resume script:

a. Load the 'writeable' parts of the system (e.g. /tmp, /var) from
disk images and mount them into the right mount points
b. Start up X and appropriate applications.


I don't want any data (e.g. cookies, cache, logs etc) to be saved, so that
the box can be restored just by switching it off and back on.

I was looking at using loop devices to mount /var and /tmp, but how can I
make sure that the image on the disk won't be changed? Can I mount a loop
device so the ramdisk is writeable but the disk file isn't? Or can anyone
suggest a better way of doing this?

Thanks for your help

Simon


________________________________________
______________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
________________________________________
______________________________
Torsten Marek

2005-10-04, 5:56 pm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mattia Dongili schrieb:
> On Tue, October 4, 2005 1:04 pm, Petter Reinholdtsen said:
>
>
>
> about a) an partly b): would suspending (S4) to a swap file once and the
> always resume from that without overwriting it reach the goal?
> Note: never tried it.
>

Hi,

this could be possible, one should however be careful about the file system,
since the suspended image might contain information about the status of the file
system that does not longer hold true (at least with suspend2). Mounting most of
the file systems ro permanently should however solve this problem.

best regards

Torsten

- --
Torsten Marek <shlomme@gmx.net>
ID: A244C858 -- FP: 1902 0002 5DFC 856B F146 894C 7CC5 451E A244 C858
Keyserver: subkeys.pgp.net

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDQmUWfMVFHqJEyFgRAh5GAJ9X7W+XuBHV
H0CfAxvpSQyXaqknEwCgrHiE
sDQ9+/dftiBVsa5io2zKc6Y=
=lBKH
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Mattia Dongili

2005-10-04, 5:56 pm

On Tue, October 4, 2005 1:04 pm, Petter Reinholdtsen said:
> [Simon Guerrero]
>
> Part a is a bit tricky, but should be solvable. Part b sounds like a


about a) an partly b): would suspending (S4) to a swap file once and the
always resume from that without overwriting it reach the goal?
Note: never tried it.

--
mattia
:wq!



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Simon Guerrero

2005-10-04, 5:56 pm

Yes, I will have a look at how the live CD creation works. I guess I never
thought of it as a Live CD but it's doing something quite similar (just with
software suspend too).

-----Original Message-----
From: debian-devel-request@lists.debian.org
[mailto:debian-devel-request@lists.debian.org]On Behalf Of Petter
Reinholdtsen
Sent: 04 October 2005 12:05
To: Simon Guerrero
Cc: 'debian-devel@lists.debian.org'
Subject: Re: Developing a kiosk type system - advice needed


[Simon Guerrero]
> I am developing a "kiosk" type of system, where I want to a) boot up fast
> and b) be able to switch off and back on and restart with a clean image.


Part a is a bit tricky, but should be solvable. Part b sounds like a
the system from a normal live CD. Perhaps you should check out the
possibilities with live CDs?


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org


________________________________________
_____________________________

This message has been checked for all known viruses on behalf of Sungard
Vivista by MessageLabs.

http://www.messagelabs.com or Email: mailsweeper.info@vivista.co.uk

For further information http://www.sungard.com/vivista

________________________________________
______________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
________________________________________
______________________________


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Simon Guerrero

2005-10-04, 5:56 pm

Hi

Thanks for your responses. The "suspend and always resume without
overwriting" is done by software suspend, with no problem. It is the
difficulty of resuming the writeable parts of the filesystem (/var and /tmp)
each time from an image which I am not sure about.

I am thinking about adding a script to the rc2.d (or other runlevel) which
does:

cat /ramdisks/var.img > /dev/ram1
mount /dev/ram1 /var
and
cat /ramdisks/tmp.img > /dev/ram2
mount /dev/ram2 /tmp


....would that do the job? Maybe it is simpler than I thought :-/

Simon

-----Original Message-----
From: debian-devel-request@lists.debian.org
[mailto:debian-devel-request@lists.debian.org]On Behalf Of Mattia
Dongili
Sent: 04 October 2005 12:10
To: 'debian-devel@lists.debian.org'
Subject: Re: Developing a kiosk type system - advice needed


On Tue, October 4, 2005 1:04 pm, Petter Reinholdtsen said:
> [Simon Guerrero]
>
> Part a is a bit tricky, but should be solvable. Part b sounds like a


about a) an partly b): would suspending (S4) to a swap file once and the
always resume from that without overwriting it reach the goal?
Note: never tried it.

--
mattia
:wq!



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org


________________________________________
_____________________________

This message has been checked for all known viruses on behalf of Sungard
Vivista by MessageLabs.

http://www.messagelabs.com or Email: mailsweeper.info@vivista.co.uk

For further information http://www.sungard.com/vivista

________________________________________
______________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
________________________________________
______________________________


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Torsten Marek

2005-10-04, 5:56 pm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Simon Guerrero schrieb:
> Hi
>
> Thanks for your responses. The "suspend and always resume without
> overwriting" is done by software suspend, with no problem. It is the
> difficulty of resuming the writeable parts of the filesystem (/var and /tmp)
> each time from an image which I am not sure about.
>
> I am thinking about adding a script to the rc2.d (or other runlevel) which
> does:
>
> cat /ramdisks/var.img > /dev/ram1
> mount /dev/ram1 /var
> and
> cat /ramdisks/tmp.img > /dev/ram2
> mount /dev/ram2 /tmp
>
>

Hi,

that might be one way, but I don't know if there are any problems if frozen
programs have open files on /tmp or /var, since the processes are resumed before
any run-level scripts (?).
Maybe I am missing something, but if you have /tmp and /var as (size-restricted)
tmpfs's when you create the image in the first place, what is the problem with that?

best regards

Torsten
- --
Torsten Marek <shlomme@gmx.net>
ID: A244C858 -- FP: 1902 0002 5DFC 856B F146 894C 7CC5 451E A244 C858
Keyserver: subkeys.pgp.net

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDQmw5fMVFHqJEyFgRAheiAJ4qwSu+lNqX
i5C4WbQqo+U9H5DWNQCeNiKp
dJvhLFOfMl7OxQFJePdH4nw=
=9xx0
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Simon Guerrero

2005-10-04, 5:56 pm

Yes, you're right about suspend2 - I figured if I mount most of the
filesystems ro, then create the writeable ones each time from static images,
I shouldn't have issues with corruption - right?

Simon



>
>
> about a) an partly b): would suspending (S4) to a swap file once and the
> always resume from that without overwriting it reach the goal?
> Note: never tried it.
>

Hi,

this could be possible, one should however be careful about the file system,
since the suspended image might contain information about the status of the
file
system that does not longer hold true (at least with suspend2). Mounting
most of
the file systems ro permanently should however solve this problem.

best regards

Torsten

- --
Torsten Marek <shlomme@gmx.net>
ID: A244C858 -- FP: 1902 0002 5DFC 856B F146 894C 7CC5 451E A244 C858
Keyserver: subkeys.pgp.net

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDQmUWfMVFHqJEyFgRAh5GAJ9X7W+XuBHV
H0CfAxvpSQyXaqknEwCgrHiE
sDQ9+/dftiBVsa5io2zKc6Y=
=lBKH
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org


________________________________________
_____________________________

This message has been checked for all known viruses on behalf of Sungard
Vivista by MessageLabs.

http://www.messagelabs.com or Email: mailsweeper.info@vivista.co.uk

For further information http://www.sungard.com/vivista

________________________________________
______________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
________________________________________
______________________________


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Simon Guerrero

2005-10-04, 5:56 pm


Hi

Doh! I forgot about tmpfs. That would be fine. I think I should start again.
8-)

-----Original Message-----
From: debian-devel-request@lists.debian.org
[mailto:debian-devel-request@lists.debian.org]On Behalf Of Torsten Marek
Sent: 04 October 2005 12:49
To: 'debian-devel@lists.debian.org'
Subject: Re: Developing a kiosk type system - advice needed


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Simon Guerrero schrieb:
> Hi
>
> Thanks for your responses. The "suspend and always resume without
> overwriting" is done by software suspend, with no problem. It is the
> difficulty of resuming the writeable parts of the filesystem (/var and

/tmp)
> each time from an image which I am not sure about.
>
> I am thinking about adding a script to the rc2.d (or other runlevel) which
> does:
>
> cat /ramdisks/var.img > /dev/ram1
> mount /dev/ram1 /var
> and
> cat /ramdisks/tmp.img > /dev/ram2
> mount /dev/ram2 /tmp
>
>

Hi,

that might be one way, but I don't know if there are any problems if frozen
programs have open files on /tmp or /var, since the processes are resumed
before
any run-level scripts (?).
Maybe I am missing something, but if you have /tmp and /var as
(size-restricted)
tmpfs's when you create the image in the first place, what is the problem
with that?

best regards

Torsten
- --
Torsten Marek <shlomme@gmx.net>
ID: A244C858 -- FP: 1902 0002 5DFC 856B F146 894C 7CC5 451E A244 C858
Keyserver: subkeys.pgp.net

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDQmw5fMVFHqJEyFgRAheiAJ4qwSu+lNqX
i5C4WbQqo+U9H5DWNQCeNiKp
dJvhLFOfMl7OxQFJePdH4nw=
=9xx0
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org


________________________________________
_____________________________

This message has been checked for all known viruses on behalf of Sungard
Vivista by MessageLabs.

http://www.messagelabs.com or Email: mailsweeper.info@vivista.co.uk

For further information http://www.sungard.com/vivista

________________________________________
______________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
________________________________________
______________________________


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Rudi Effe

2005-10-04, 5:56 pm

Am Dienstag, 4. Oktober 2005 12:41 schrieb Simon Guerrero:
> 1. Make the disk read-only


How about a software application of what many hardware "PC guards" (and
likewise) do:

Use unionfs as a layer that you put away at any reboot to obtain the
original system.

Regards
Rudi Effe


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Eduard Bloch

2005-10-04, 5:56 pm

Moin Simon!
Simon Guerrero schrieb am Dienstag, den 04. Oktober 2005:

> Yes, you're right about suspend2 - I figured if I mount most of the
> filesystems ro, then create the writeable ones each time from static images,
> I shouldn't have issues with corruption - right?


In theory, however some filesystems (ext3) write stuff on the disk
ignoring the ro option.

Oh, and please fix your mail client to respect the References and stop
quoting the whole messages for no reason.

Eduard.

--
Willst du wissen, wie alt du bist, so frage nicht die Jahre, die du
gelebt hast, sondern den Augenblick, den du genießt.
-- Arthur Schnitzler (Kriegspatenschaft-Kalender, 1917)


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Kai Hendry

2005-10-24, 4:22 pm

I suggest working from Live Kiosk from: http://www.livecd.net/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com