WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: customize linux distro  (Read 8305 times)

Offline sunlinux

  • Newbie
  • *
  • Posts: 4
customize linux distro
« on: September 09, 2009, 10:58:44 PM »
Hi, I guess I landed in pool of right people .

Requirement: I am in a search of linux system which can be installed from USB stick to any machine/Pc ( if it allow boot from USB)

1. It allow automated partition / if existing any delete and create new

2. It provides no user intervene from installation to END

3. It only allow connectivity through GPRS/ppp & Ethernet ( may allow user to set setting)

4. It runs only firefox latest in kiosk mode

5. It allows change in system setting/customization remotely via a server.

If you guys has such a solution pls let me know.

Offline samedirection

  • Jr. Member
  • **
  • Posts: 64
Re: customize linux distro
« Reply #1 on: September 10, 2009, 02:34:49 AM »
I can't comment on just how far TC can be made to fulfull each item on your list, but perhaps I can make a few comments that will help you decide whether TC can be made to meet your requirements.  You'll probably have picked up by now that the focus of TinyCore is to be *small* and *modular*.  That means that it does not have gobs of automation already set up for various different kinds of installs and administrative scenarios.  The standard unix-y tools are available to make your own, however.

TC supports several options for scripting.  The simple 'ash' shell is included, the standard 'bash' shell is an optional extension, and there are several scripting languages beyond those in which you could write scripts to do the sort of automated installs you are after.  Tinycore has some automated install-to-usb scripts which you can use as models.  I don't think there is out of the box functionality to do just the kind of installs you are asking for. 

Your final requirement is perhaps the thing that would take you the most work to create.  It would require some kind of configuration server running on each local machine.  TC does not do this by default.  What it does have is an ssh server, so that you can get a shell on each machine remotely, and edit configuration files.   So you can do a lot remotely, but for the most part it would be via a command line interface.   

So you won't find that TinyCore is a turnkey solution for your particular case.  If you need 'small and modular' and are willing to script your way towards the rest of the functionality you require, you will quite likely find willing help on this forum and the standard communications chanels for the scripting language you choose.

All the best.

Offline sunlinux

  • Newbie
  • *
  • Posts: 4
Re: customize linux distro
« Reply #2 on: September 10, 2009, 03:36:27 AM »
thanx for your comment samedirection

I just need your or community help regarding my 1st point which is installing OS from usb to harddisk but without any user intervene till you prompt for login. 8)

rest thing I shall take care.

Offline fladd

  • Jr. Member
  • **
  • Posts: 65
Re: customize linux distro
« Reply #3 on: September 10, 2009, 03:54:41 AM »
Well, the installation procedure is just a matter of copying some files, so this can be automated of course.
I would suggest to make a custom iso which includes grub already and then just make a shell script that executes the whole install tutorial in one go :-) (assuming  you want to install to hda1 that is).

fladd

Offline sunlinux

  • Newbie
  • *
  • Posts: 4
Re: customize linux distro
« Reply #4 on: September 10, 2009, 04:44:47 AM »
point "just make a shell script that executes the whole install tutorial in one go"

I hope you may provide or guide regarding this tutorial ( module/script sharing if any .) howto

Offline fladd

  • Jr. Member
  • **
  • Posts: 65
Re: customize linux distro
« Reply #5 on: September 10, 2009, 04:57:18 AM »
I was actually just suggesting to simply take out all the relevant commands and put them one after the other into a file, call that install.sh, make it executable and you are done.
This is the simplest working version I could think of.

(Oh and I am talking about the install tutorial on the main page of TC).

fladd

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: customize linux distro
« Reply #6 on: September 10, 2009, 12:20:24 PM »
1. It allow automated partition / if existing any delete and create new

2. It provides no user intervene from installation to END

I have done this. I remastered a TC image with grub and parted. I created an install script that is called from bootlocal that would completely setup the hda drive, do a frugal install TC, and install grub. Though if you want to limit the size of the installed OS (I did) then you can create a second remaster image (the actual image that is installed to hda) with the apps you want, i.e. firefox, firmware...


3. It only allow connectivity through GPRS/ppp & Ethernet ( may allow user to set setting)

You should include the firmware extension in your remaster to cover your bases on this.


4. It runs only firefox latest in kiosk mode

You could remove flwm from the base and use firefox instead, this would take away any wm function leaving only firefox as a gui (you may want to disable ctl-alt-backspace). Just make sure firefox is started in full screen.


5. It allows change in system setting/customization remotely via a server.

If you know PHP then you can run an HTTP/PHP server for this. I also do this on my machines with the auto-install. I use lighttpd, php-cgi, and openssl-0.9.8h for a https/php server. The php-cgi info file has some info on setting up PHP with lighttpd and apache


An auto-installation procedure can save a lot of time when you are installing to multiple machines
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline sunlinux

  • Newbie
  • *
  • Posts: 4
Re: customize linux distro
« Reply #7 on: September 10, 2009, 11:25:53 PM »
I just start , n will seek your expert guide whenever needed

Offline tclfan

  • Sr. Member
  • ****
  • Posts: 286
Re: customize linux distro
« Reply #8 on: September 11, 2009, 06:14:06 AM »
4. It runs only firefox latest in kiosk mode

You could remove flwm from the base and use firefox instead, this would take away any wm function leaving only firefox as a gui (you may want to disable ctl-alt-backspace). Just make sure firefox is started in full screen.
This gets very interesting.  Could you please elaborate how to accomplish this? If we can do this alone we could in effect create a browser appliance LiveCD based on TinyCore, which is kind of LiveCd version of kiosk implementation the originator of this thread is asking for...
This is quite a hit in my opinion, certainly worth pursuing. Some customization and remastering I see needed. I see TinyCore the best suited for this linux at this point.  This is unless Kolibri speeds up development and comes up with a usable browser and network support...

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: customize linux distro
« Reply #9 on: September 11, 2009, 08:20:19 AM »
Quote
You could remove flwm from the base

Try using Microcore.

Just leave out whatever you don't want.

/microcore.html][removed due to policy violation]/microcore.html
Many people see what is. Some people see what can be, and make a difference.

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: customize linux distro
« Reply #10 on: September 11, 2009, 10:51:19 AM »
Quote
Quote
You could remove flwm from the base

Try using Microcore.
I suggest this too. It's easier to start with microcore and use the core extensions and leave out flwm then to hunt down all the files associated with flwm.

You can use any application in the same way TC starts a wm. The only requirements for a gui application to start (besides the deps) is either Xvesa of Xorg need to be currently running. You could change your .xsession file in your home directory to something similar to:
Code: [Select]
Xvesa -br -mouse /dev/psaux,5 -screen 1024x768x32 -shadow -nolisten tcp -I 2>&1 > /dev/null &
waitforX

while [ 1 ]
do
     firefox
done

The above will require bash to be installed.
This should ensure that firefox is always running and will restart if it is exitted. But will take away all chances of shutting down or restarting if ctl+alt+backspace and ctl+alt+del are disabled. But you could put a shutdown and/or a restart button in a password protected php script.

For a fullscreen firefox you can edit the file /usr/local/firefox-official/defaults/profile/localstore.rdf to something like the following:
Code: [Select]
<?xml version="1.0"?>
<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
      xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#sidebar-title"
                   value="" />
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#sidebar-box"
                   sidebarcommand=""
                   width=""
                   src="" />
  <RDF:Description RDF:about="chrome://browser/content/browser.xul">
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#main-window"/>
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-box"/>
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-title"/>
  </RDF:Description>
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#main-window"
                   sizemode="normal"
                   width="1024"
                   height="768"
                   screenX="0"
                   screenY="0" />
</RDF:RDF>

Just change the width and height of the window to whatever the Xvesa resolution is in the first line of .xsession
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10962
Re: customize linux distro
« Reply #11 on: September 11, 2009, 11:20:58 AM »
There's also a Firefox kiosk extension, very useful for this kind of purpose (it adds some kiosk limits, and defaults to full screen).
The only barriers that can stop you are the ones you create yourself.

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: customize linux distro
« Reply #12 on: September 11, 2009, 11:22:23 AM »
Here is my auto-installation script:
Code: [Select]
#!/bin/sh

# Partition flash drive at /dev/hda
echo "Create File System hda1"
parted -s /dev/hda mkpartfs primary ext2 0 100
parted -s /dev/hda set 1 boot on
echo "Create File System hda2"
parted -s /dev/hda mkpartfs primary ext2 100 150
echo "Create File System hda3"
MAXSIZE=`parted -s /dev/hda print | grep /dev/hda | cut -d " " -f3 | cut -d M -f 0`
parted -s /dev/hda mkpartfs primary ext2 150 $MAXSIZE
parted -s /dev/hda quit


# Install kernel and boot files
echo "Installing kernel and boot config"
mkdir /mnt/hda1
mkdir /mnt/hda3
mount /dev/sda1
mount /dev/hda1
cp -pr /mnt/sda1/install/boot /mnt/hda1


# Install bootloader
echo "Installing GRUB Bootloader"
grub-install /dev/hda --root-directory=/mnt/hda1


# Install additional application
echo "Installing support files"
mount /dev/hda3
cp -pr /mnt/sda1/istall/app/* /mnt/hda3


# Unmount drives and shutdown
umount /dev/hda1
umount /dev/hda3
umount /dev/sda1

echo "Finished"

poweroff &

exit 0

Some assumptions:
  The desired device to install to is /dev/hda
  The desired kernel, remastered TC image to be installed, and grub info is located at /mnt/sda1/install/boot
  The first partition is 100MB, the second is 50MB, and the third is the remaining disk space.

To get this to work:
  Install TC/MC to a USB. (use usbinstall)
  Install grub and parted to the tce folder on the USB.
  Put the installation script somewhere on the USB.
  Edit the bootlocal.sh file to run the installation script upon boot. (remember to backup so the bootlocal file is saved)

You can also look at the usbinstall script to see another way of installing to a disk.
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: customize linux distro
« Reply #13 on: September 11, 2009, 12:26:12 PM »

4. It runs only firefox latest in kiosk mode


I do not know Firefox's kiosk mode but built a MANDRIVA based kiosk machine a year ago with Opera and was really usable after some tweaking. It is still used.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."