You are not logged in.

#101 2008-11-25 01:24:12

ryclegman
Member
Registered: 2008-07-23
Posts: 47
Website

Re: Arch Linux Automatic Installer

ralvez wrote:

@solarwind,

I just stumbled upon this thread and after reading a bit and going to your  website and reading the code you have there I thought to share a couple of things  and code.
I have done so many installations of Arch for family and friends that I have come up with a similar  concept as yours to "automate" the installation. I think the idea can be useful for new users as well as "old users" that wish a fast-track installation process.
Now to the  code. Here is my script:

#!/bin/bash
# A script to automate installation of programs in a new set up of ArchLinux
# Author: R. Alvez
#
# ======================================================================== #

user=$UID

 if [ $user != 0 ] 
  then
  echo "Sorry. Only the ROOT user can run this program !"
  exit
 else
  echo "###############( Updating Programs )###############"
  echo
  echo "Start: " 
  date
 fi

# Basic programs

function baseprogs(){

echo "==============( Basic Programs )================="
echo

  for PROGRAM in xorg xorg-apps gdm firestarter
  do 
   echo +=========================+
   echo "PROGRAM: $PROGRAM"
   echo +=========================+
   echo
   pacman -Sy --noconfirm $PROGRAM 
   echo -e \\n\\n
  done
}


# Desktop Environments

function E17(){

echo "==============( Desktop Environment : E17 )================="
echo

  for PROGRAM in e17-svn e17-extra-svn gdm
  do 
   echo +=========================+
   echo "PROGRAM: $PROGRAM"
   echo +=========================+
   echo
   pacman -Sy --noconfirm $PROGRAM 
   echo -e \\n\\n
  done
}


function OBox(){

echo "==============( Desktop Environment : Openbox )================="
echo

  for PROGRAM in openbox obconf mmaker openbox-themes gmrun stalonetray
  do 
   echo +=========================+
   echo "PROGRAM: $PROGRAM"
   echo +=========================+
   echo
   pacman -Sy --noconfirm $PROGRAM 
   echo -e \\n\\n
  done
}

function KDE4(){

echo "==============( Desktop Environment : KDE4 )================="
echo

  for PROGRAM in kde
  do 
   echo +=========================+
   echo "PROGRAM: $PROGRAM"
   echo +=========================+
   echo
   pacman -Sy --noconfirm $PROGRAM 
   echo -e \\n\\n
  done
}


function DE(){

# Uncomment the desired function to install a D.E.
OBox
#KDE4
#E17
}


# Productivity tools

function productivity(){

echo "==============( Productivity Tools )================="
echo

  for PROGRAM in htop screen hwd openssh ntp host mc yakuake 
  do 
   echo +=========================+
   echo "PROGRAM: $PROGRAM"
   echo +=========================+
   echo
   pacman -Sy --noconfirm $PROGRAM 
   echo -e \\n\\n
  done
}

# Web Development

function webdev(){

echo "==============( Web Development Programs )================="
echo

for PROGRAM in bluefish cssed kdewebdev gvim eric4 apache mod_python php mysql mysql-python python-ldap mysql-gui-tools pyqt pyqt3 qt qt-doc qt3 qt3-doc
  do 
   echo +=========================+
   echo "PROGRAM: $PROGRAM"
   echo +=========================+
   echo
   pacman -Sy --noconfirm $PROGRAM 
   echo -e \\n\\n
  done
}


# Multimedia

function multimedia(){

echo "==============( Multimedia Programs )================="
echo
  for PROGRAM in xine-lib xine-ui amarok-engine-xine alsa-lib alsa-oss alsa-utils alsaplayer gstreamer0.10-alsa alsa-plugins mplayer mplayer-plugin amarok-base amarok-engine-xine gstreamer0.10
  do 
   echo +=========================+
   echo "PROGRAM: $PROGRAM"
   echo +=========================+
   echo
   pacman -Sy --noconfirm $PROGRAM 
   echo -e \\n\\n
  done
}


# Printer tools

function printertools(){

echo "==============( Printer Tools )================="
echo

  for PROGRAM in cups 
  do 
   echo +=========================+
   echo "PROGRAM: $PROGRAM"
   echo +=========================+
   echo
   pacman -Sy --noconfirm $PROGRAM 
   echo -e \\n\\n
  done
}


# Office productivity programs

function office(){

echo "==============( Office Programs )================="
echo

  for PROGRAM in jre openoffice-base openoffice-spell-en openoffice-es
  do 
   echo +=========================+
   echo "PROGRAM: $PROGRAM"
   echo +=========================+
   echo
   pacman -Sy --noconfirm $PROGRAM 
   echo -e \\n\\n
  done
}


# Tools for running/using CDs and DVDs

function cd_dvd_tools(){

echo "==============( CD-DVD Tools )================="
echo

  for PROGRAM in libdvdcss dvd+rw-tools libdvdread k3b
  do 
   echo +=========================+
   echo "PROGRAM: $PROGRAM"
   echo +=========================+
   echo
   pacman -Sy --noconfirm $PROGRAM 
   echo -e \\n\\n
  done
}

# Some of my favorite programs

function favorites(){

echo "==============( Favorite Programs )================="
echo

  for PROGRAM in conky kompose xbindkeys pidgin guifications purple-plugin-pack workrave gkrellm gkrellmlaunch gkrellweather tuxcards katapult
  do 
   echo +=========================+
   echo "PROGRAM: $PROGRAM"
   echo +=========================+
   echo
   pacman -Sy --noconfirm $PROGRAM 
   echo -e \\n\\n
  done
}


# Special Drivers

function drivers(){

echo "==============( Program Drivers )================="
echo

  for PROGRAM in linux-uvc-svn xf86-video-intel
  do 
   echo +=========================+
   echo "PROGRAM: $PROGRAM"
   echo +=========================+
   echo
   pacman -Sy --noconfirm $PROGRAM 
   echo -e \\n\\n
  done
}


# MS-True Type fonts

function ttfonts(){

  echo +=========================+
  echo "Program: MS-TT Fonts"
  echo +=========================+
  echo
  pacman -Sy --noconfirm ttf-ms-fonts 
  echo -e \\n\\n
}


baseprogs
productivity
cd_dvd_tools
multimedia
printertools
office
favorites
webdev
drivers
ttfonts
DE

echo "All done!"

Notice that I broke the install into functions that can be called independently, depending on the type of installation, ( say desktop vs. laptop). So if I install a desktop system I may just put KDE but if it is a laptop I would install Openbox as the DE.
I also check for root being the user installing the programs at the beginning so there is no need for sudo (I  noticed that this approach was used in the script in your  site) which requires that the  sudo package be installed already.

I've added the DE function  very recently and have not taken  any time to do it properly (meaning, the desired DE should be passed as an argument to the function; eg: DE(openbox) ) but you get the idea. What I did take time to do was add all I feel is needed (in terms of packages) to have each DE fully functional from the get go.

I hope some of these ideas may help you in your work. I'll be happy to help if I can.

Regards,

R.

Hey, I am project manager of Borderless Linux, and was wondering if we could use your script a bit... We are currently in rout to creating our Beta 3 and a better installer will be on the list. If you allow us, we will glad fully give you credit towards your work!
Thanks


Project manager of Borderless Linux

Offline

#102 2008-11-25 01:40:36

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: Arch Linux Automatic Installer

@ryclegman,

By all means do use it.
Again, if I can be of any help do not hesitate to give me a shout. You can use the e-mail in my profile.

Regards,

R.

Offline

#103 2008-11-25 21:42:55

ryclegman
Member
Registered: 2008-07-23
Posts: 47
Website

Re: Arch Linux Automatic Installer

alright Great!! If to talk on our Irc channel its.... #borderless-linux

our site is http://Borderlesslinux.org


Project manager of Borderless Linux

Offline

#104 2008-11-30 13:57:09

cliffbreaker
Member
From: Tiraspol, Transnistria
Registered: 2008-11-23
Posts: 52

Re: Arch Linux Automatic Installer

Well, why do you need so much time to configure Arch? It takes me approximately 1,5 hours - it doesn't make much difference, i think


Windows works in 80 % cases, Linux in 20%, but you can make linux work in other 80% cases whilst you can never make windows work in last 20%

Offline

#105 2008-11-30 15:20:25

ogronom
Member
From: Toronto, Canada
Registered: 2008-05-06
Posts: 123

Re: Arch Linux Automatic Installer

Gentoo example shows that automatic installer should be FULLY bug-free, otherwise it become unusable.
Now they switched back to min-install smile

Although auto-installer can be helpful for admin, when one needs to install system on more than one computer, I find it some sort of harmful for desktop-oriented Arch. More users who don't used to read manuals, drop of the "quality" of problems discussed in forums (see Ubuntu forums) etc. 
I hope that auto-installer will never become the main stream of Arch.

Offline

#106 2008-11-30 15:32:36

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: Arch Linux Automatic Installer

^^
Nothing to worry about there, unless if we get new devs that replace the current dev team, then we might need to start worrying!


Website - Blog - arch-home
Arch User since March 2005

Offline

#107 2008-11-30 19:57:15

LTSmash
Member
From: Aguascalientes - Mexico
Registered: 2008-01-02
Posts: 348
Website

Re: Arch Linux Automatic Installer

Perhaps trying Shift linux?
www.shiftlinux.net


Proud Ex-Arch user.
Still an ArchLinux lover though.

Currently on Kubuntu 9.10

Offline

#108 2008-11-30 21:09:16

el_zoona
Member
From: Argentina
Registered: 2008-02-01
Posts: 58
Website

Re: Arch Linux Automatic Installer

LTSmash wrote:

Perhaps trying Shift linux?
www.shiftlinux.net

I was going to post the same tongue. You could try to get in touch with Shift Linux people too, if you develop this script maybe they will find it usefull.


// Send more Chuck Berry

Offline

#109 2008-11-30 22:57:09

Myav
Member
Registered: 2007-05-07
Posts: 58

Re: Arch Linux Automatic Installer

cliffbreaker wrote:

Well, why do you need so much time to configure Arch? It takes me approximately 1,5 hours - it doesn't make much difference, i think

Configuring takes small amount of time only in case if you vividly remember what configs to edit and which programs to install. But if you don't refresh your memory often enough you will eventually forget some of those things. It is a pity, because you won't be able to configure your system in a proper manner as quickly as before.

The best way to save such a knowledge is to write a script, configuring your system as you like. That is why I find auto-installers extremely useful. But there is a small requirement: to be able to quickly modify a script you need to write it yourself (or at least actually understand what someone else's installer does).

Offline

#110 2008-12-01 00:17:41

ogronom
Member
From: Toronto, Canada
Registered: 2008-05-06
Posts: 123

Re: Arch Linux Automatic Installer

Myav wrote:
cliffbreaker wrote:

Well, why do you need so much time to configure Arch? It takes me approximately 1,5 hours - it doesn't make much difference, i think

Configuring takes small amount of time only in case if you vividly remember what configs to edit and which programs to install. But if you don't refresh your memory often enough you will eventually forget some of those things. It is a pity, because you won't be able to configure your system in a proper manner as quickly as before.

The best way to save such a knowledge is to write a script, configuring your system as you like. That is why I find auto-installers extremely useful. But there is a small requirement: to be able to quickly modify a script you need to write it yourself (or at least actually understand what someone else's installer does).

What about the choices? When you write a script not only for yourself this means that it will not fit to someone. Therefore you will need to make it more complex and introduce there new and new options (with X, without, for laptop, for desktop etc) Your script will be more and more complex. Simple bug in the option will crash the whole installation.

There is a wiki to help your memory. And with rolling release you need to make installation only once (i.e. 1 day max for several years of usage). I think it's not worth it.

Offline

#111 2008-12-01 22:03:06

Myav
Member
Registered: 2007-05-07
Posts: 58

Re: Arch Linux Automatic Installer

ogronom wrote:

What about the choices? When you write a script not only for yourself this means that it will not fit to someone. Therefore you will need to make it more complex and introduce there new and new options (with X, without, for laptop, for desktop etc) Your script will be more and more complex.

You are right in that all attempts to make universal auto-installer with bells and whistles won't be very popular. Auto-installers for everybody are actually auto-installers for nobody. But theoretic auto-installer I talked about isn't supposed to be used as universal solution for everyone (At least as thing that just works. We have setup/quickinst ащк it).

Just write it for yourself and then share it for community smile Other people will find a lot of interesting ideas reading your script and will use those ones in their own auto-installers.

So there isn't need to add new and new options. Just let people add all the custom options by themselves.

Simple bug in the option will crash the whole installation.

It depends. Most of the bugs aren't critical and can quickly be fixed by hand after installation. Do it and then fix your script smile It'll make your script more stable.

There is a wiki to help your memory.

Yeah, I know that I can store all the steps to reproduce in my notebook (or in wiki), but I consider a script to be a better replacement. Just because installer can do all the work while I'm drinking tea.

And with rolling release you need to make installation only once (i.e. 1 day max for several years of usage). I think it's not worth it.

Rolling based system (and especially Archlinux!) is so good that I forget what I did to configure my system smile

Offline

#112 2008-12-01 23:20:06

Wintervenom
Member
Registered: 2008-08-20
Posts: 1,011

Re: Arch Linux Automatic Installer

What about something like installation profiles?

People could submit installation profiles they think would be useful to others, and if enough people like it, it could be added to the installer.

Offline

#113 2008-12-02 07:59:03

cautha
Member
From: Kingston, Ontario
Registered: 2008-06-02
Posts: 115
Website

Re: Arch Linux Automatic Installer

+1

As other people have said, I think that installing Arch the old-fashioned way is valuable the first few times you do it  (and any time you attempt a configuration that requires finesse). After that, it is almost an exercise in muscle memory tongue

Installation profiles would streamline the process, and making them available to everyone through submissions to a particular section of the website could enrich the community - providing another way for those of us who aren't necessarily talented software-developers to contribute something of value to the project.

Just my two cents.

Alternatively, just providing the option to create such a profile for personal use could be handy for some people. And why not? I'm not saying we should have a GUI . . . roll

Simplicity is the key here. And if you always set up your systems the same way, I don't think there's any reason why you shouldn't be allowed to type fewer keystrokes to get a usable system.

Harry

Last edited by cautha (2008-12-02 08:02:08)

Offline

#114 2008-12-03 06:53:26

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Arch Linux Automatic Installer

Why dont all of us who are for custom installation profiles post one script each for what you yourself need. If every body in this thread and similar threads posted one, by this time we would have had a huge collection of post installation scripts.

Since i had to install arch only once, spare me from contributing ;-)


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

Board footer

Powered by FluxBB