Wednesday, November 12, 2008

Digital Microscope Linux

installation script for our Distribution

That part of the Ubuntu Linux team was working on a Ubuntu metadistribution is nothing new.

Well, we have gone a step further. Has been established distribution facilities. I know we are far from having its own distribution, but is walking and walking, albeit slowly, always shortens the road.

I will remember a post we did on how to make your own distribution of Ubuntu for Netbooks, now I'll show you how to make an installer for it.

need (entering in the field) two scripts. The first, generate an image of the distribution you are running, the second will be included in the Ubuntu installation CD Mini.

Script Generation:


# / bin / bash


me = $ (whoami)


echo "Loading ...." Listing Packages


dpkg-query-W-f = '$ {Package} \\ n'> packages.txt


echo "List of packages received"


echo "Loading User Settings"


cd / home / I


$ cp / etc / apt / sources.list.

tar-cvvf
installer / home.tar. - Exclude = installer - exclude =. ssh - exclude =*. mozilla - exclude =. aptitude


This script gets the list of installed packages and configuration files from home current user. The three files it generates (home.tar, packages.txt and sources.list) will have to put them on the same path of the installer, the installation CD.

Installation Script:


# / bin / bash me = $ (whoami)


if [[$ me = "root"]]


Then


echo "Checking Package List"

Then

echo "List of packages found, starting the installation ..."
packages.txt cat - Assume-yes install $ package


done echo "Installed Packages Beginning User settings"
echo "Type a user name in lowercase letters and without accents:"
echo-e "Name User: \\ c "read user


adduser $ user $ user adduser admin

tar-xvvf
home.tar-C / home / $ user
cp / home / $ user / sources.list / etc / apt / sources.list
chown-R $ user. $ user / home / $ user
  1. else echo "Could not find the list of packages, not installed" fi
else echo "You are not root, do nothing" fi



And that's all. That is, for now, you have to do is download the ubuntu mini, install and run the script "install.sh" I leave for another entry as do the installation CD. Take care!

0 comments:

Post a Comment