LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Boot Linux running Apache PHP MySQL and Firefox from pen-drive. (https://www.linuxquestions.org/questions/linux-newbie-8/boot-linux-running-apache-php-mysql-and-firefox-from-pen-drive-775653/)

frankychan04 12-14-2009 05:56 PM

Boot Linux running Apache PHP MySQL and Firefox from pen-drive.
 
Hi,
I am very new to Linux so bare with my lack of knowledge.
This is a very specific request that I need to know how to do as part of an project I am thinking about starting.
Basically I have written a PHP web application which I want to be bootable without an OS via a pendrive. So I need a small distro of Linux which when booted does not show the GUI but automatically opens an instance of Firefox in full screen mode with the homepage set to the URL of the app which is installed on the pen-drive (with Linux also is running Apache PHP and MySQl). It should also be able to connect to the internet so that normal browsing can be done through my app.
Some other things which aren't imperative at the moment but would be cool:
If the pen-drive is plugged in on a computer which already has been booted to its original OS (Windows or Mac or even another Linux distro) I would like it to open up the OS in a virtual environment on the desktop.
Now this could either be super easy or super hard. But in theory with my very minimal knowledge of Linux from working with PHP it shouldn't be that hard.
Any Ideas?
Cheers
Franky

jstephens84 12-14-2009 08:47 PM

yes this can be done. I believe they make a pen drive ubuntu version which will be easiest. What you would want to do is first get it installed. http://www.pendrivelinux.com/usb-x-ubuntu-610/. Then you can get it to start with apache / mysql services.

Now to change it so that you don't get the window manager
create a file in the user account that auto logs in. .Xclients and add the line firefox. Make sure .Xclients is executable.

jefro 12-14-2009 09:04 PM

See webconverger or xpud.

frankychan04 12-14-2009 09:16 PM

Thanks for that. Are those instructions specific to that version of ubuntu or can I use the latest version?

jstephens84 12-14-2009 10:05 PM

you can probably use the latest version. Also look into http://www.tldp.org/HOWTO/Kiosk-HOWTO.html that might help.

frankychan04 12-15-2009 06:55 AM

Okay, I have successfully installed Ubuntu on my portable hardrive and am currently running off it now :D
Next questions:
I want to remove the first screen you see when you start up which asks you whether to boot from live or install. I just want it to go straight to the live version no questions asked :)
If I make changes to anything while running off it will they be saved on the portable hardrive (I want this to happen).
Also can I now uninstall (and install) the default applications that come with it to save some space (I cant find where to do it, is it disabled in live mode?)
The rest I can probably google.
Cheers
Franky

linus72 12-15-2009 07:40 AM

OK

1) you gotta edit the syslinux.cfg on the usb
how did you install to usb? Unetbootin or usb-creator?
Please post the syslinux.cfg here if neccessary..

it should say something like

Code:

include menu.cfg
default vesamenu.c32
prompt 0
timeout 300
gfxboot bootlogo

so make that
Code:

include menu.cfg
default vesamenu.c32
prompt 0
timeout 0
gfxboot bootlogo

then also edit
any other .cfg that says timeout ???
I think its prompt.cfg...
set it to 0

2) For persistence its best to use Ubuntu's usb-creator
and it will make a casper-rw persistent file on usb
https://help.ubuntu.com/community/In...n/FromUSBStick

frankychan04 12-15-2009 08:22 AM

Thanks,
Since I could not easily install/uninstall applications im now trying a different method which is installing ubuntu fully onto the portable hdd(Got instructions from http://beastie.cs.ua.edu/cs150/usb-install.html). I have just finished installing it and everything seems to be working :D and I don't have any limitations. Will I come across any issues using this method especially when I plug into a different computer?
As for the above snippet I dont think its needed since all it does now is ask which OS I want to boot to. I would however like to change the various boot images/pages you see when booting and maybe change the text you see when it asks you which OS you want to boot to.
Now to get Apache MySQL and PHP working then some firefox tweaking :D
This is by far the most helpful forum I have been to. Im actually learning stuff.
Cheers
Franky


All times are GMT -5. The time now is 07:54 PM.