You are not logged in.

#1 2009-04-04 21:09:58

yingwuzhao
Member
Registered: 2009-01-13
Posts: 109

Want to write my personal Arch_Install Script, help please..

Hi, guys, I want to write a script to make my arch-installation automatic. The following is my personal procedures I follow to install my Arch.
I am wondering is there any way I can make it automatic instead of input every command manually, for example starting from "Adduser" after reboot after the base installation, can I make the rest run automatically by a script?

Will it work if I simply write all commands one by one in each line into a text file, and exec it after chmod +x ?
Or any suggestions?
Thanks. smile:)

ARCHLICH INSTALLATION

      <=============================boot==============================>

1. Install Base system from FTP/HTTP-USB

2. Configure system:
   1)rc.conf (HOSTNAME="home")
   2)etc/hosts (".. localhost home")
   3)locale.gen
   4)Root password

3. Grub Install, change waiting time from 5 to 0.

      >=============================Reboot==============================<

1. Adduser (tty,disk,video,audio,optical,storage,wheel) seperat by a single ","

2. Setup sudo
   1)pacman -S sudo
   2)nano /etc/sudoers (uncomment "%wheel  ALL=(ALL) ALL")

3. Xorg, driver, xorg.conf
   1)pacman -Sy xorg-server xorg-xinit xf86-input-mouse xf86-input-keyboard
   2)pacman -Sy nvidia
   3)mkdir "/mnt/backup" and mount /dev/sdb1
   4)copy xorg.conf from /mnt/backup/linux-backup/arch to /etc/X11

4. Fonts & Scim (scim is configured later)
   1)pacman -Sy ttf-dejavu
   2)pacman -Sy ttf-ms-fonts artwiz-fonts
   3)pamcna -Sy terminus-font
   4)pacman -Sy ttf-arphic-uming ttf-arphic-ukai ttf-fireflysung
   5)pacman -Sy scim scim-pinyin

5. Install OpenBox and Thunar
   1)openbox, lxappearance, gtk2-themes-collection, openbox-themes, nitrogen
   2)gamin, thunar, unrar, unzip, xarchiver, thunar-archive-plugin
   3)mousepad, rxvt-unicode, gqview
   4)MODULES=(!soundcore)
   5)DAEMONS=(.. dbus hal)

6. nano /etc/inittab
   1)id:5:initdefault:  (unmoment the one with 3)
   2)comment out agetty3-6
   3)add the following line to the bottom and uncomment others:

    x:5:once:/bin/su kevin -l -c "/bin/bash --login -c startx >/dev/null 2>&1"

7. log into kevin
   1)mkdir .config and cp openbox into it from backup
   2)mkdir .themes and cp DarkFiber into it from backup
   3)nano .xinitrc add "exec openbox-session"
   4)cp .Xdefaults to  ~/ from backup

      >=============================Reboot==============================<

0. Mount sdb1 as root and cp .bashrc_root to root's home as .bashrc

1. Exit to kevin and cp .bashrc to kevin's home.

2. Install cpu-frequency
   1)pacman -S cpufrequtils
   2)nano /etc/conf.d/cpufreq:
                       min_freq="2GHz"
                       max_freq="2.7GHz"
3. lm_sensors
   1)pacman -Sy lm_sensors
   2)sensors-detect

4. NumbLock
   1)pacman -S numlockx
   2)add it to ~/.xinitrc:
numlockx &
nitrogen --restore &
#conky &
exec openbox-session

5. Install OSS
   1)pacman -S oss

6. Install Openntpd to adjust your computer time.
   1)pacman -S openntpd

7. Diable IPv6 Module, mousepad /etc/modprobe.conf, and add:
# disable autoload of ipv6
alias net-pf-10 off

8. Copy PolicyKit.conf from backup to /etc/PolicyKit/, for USB to auto-mount.

9. Edit MODULES and DAEMONS:

MODULES=(!soundcore powernow-k8 cpufreq_ondemand)

DAEMONS=(syslog-ng network netfs crond dbus hal cpufreq sensors oss)    [Optional: preload]

10. Add /etc/sudoers.(!Remember to have a new line in the end!)
%users   ALL=NOPASSWD:/sbin/shutdown

11. Edit /etc/fstab,(copy the 2 lines from /arch/fstab in backup)
  1)use nitrogen to change wallpaper

      >=============================Reboot==============================<


                             APPLICATION INSTALLATION
      >================================================================<
0. obmenu, obconf, librsvg

1. firefox, flashplugin

2. mplayer, mplayer-plugin, codecs

4. cd /backup/linux: pacman -U mpg123-oss-TAB [ossxmix to diable vmix]

5. openoffice-base, jre

6. emacs (copy .emacs .virc to ~/ to prevent *~ file)(M-x custmize-variable RET
   latex-run-command RET, then change latex into pdflatex)

7. texlive-most

8. conky [edit .xinitrc to auto-start conky]
   (cp .conkrc and .weather and chmod +x .weather)

9. tuxguitar

10. openssh, sshfs
   1)mkdir .ssh, then as root cp private key to .ssh
   2)mkdir /mnt/yzhao and chown kevin:users /yzhao

                      nano /etc/pacman.conf
----------------------------------------------------------------\
[kdemod-legacy]
Server = http://mirror.rit.edu/kdemod/legacy/i686

       <=====================OR=======================>
[kdemod-legacy]
Server = http://mirror.rit.edu/kdemod/legacy/x86_64

----------------------------------------------------------------/

11. kdemod3-kdegraphics-kdvi, kdemod3-kdegraphics-kpdf
12. kile, k3b

13. Add ":/opt/kde/bin" to /etc/profile, to use kde applications.

14. Configure Scim to be usable, add to /etc/profile:
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"
scim -d

15. deluge, pidgin [diable system tray, ossplay %s]
      <=============================End==============================>

Last edited by yingwuzhao (2009-04-04 21:12:20)

Offline

#2 2009-04-05 09:09:57

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: Want to write my personal Arch_Install Script, help please..

Try a search for this topic, it came up recently a few times and should help you to ask more specific questions later.

Offline

#3 2009-04-05 09:27:22

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: Want to write my personal Arch_Install Script, help please..

Well if you want to do all that, you obviously need to learn about bash scripting.
You can also have a look at the automatic procedure from aif, which is made exactly for automatic installations.  See http://bbs.archlinux.org/viewtopic.php?id=58110


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

Board footer

Powered by FluxBB