Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #IsiX OS Install script v0.001
- VERS="0.001"
- PRT="IsiX OS"
- VOS="IsiX OS"
- TPRT="2.6.27-rc6"
- TMP=/tmp/setup
- tmp=/tmp/setup
- INST_PNT=/var/mnt
- CD_MNT=/cdrom
- RDIR=/dev/null
- ROOT_DEV="/dev/sda"
- ROOT_PART="/dev/sda1"
- SWAP_PART="/dev/sda2"
- device=/dev/sr0
- FS_TAB=$TMP/fstemp
- if [ ! -d $TMP ]; then
- mkdir -p $TMP
- fi
- if [ ! -d $CD_MNT ]; then
- mkdir -p $CD_MNT
- fi
- if [ ! -d $INST_PNT ]; then
- mkdir -p $INST_PNT
- fi
- dialog --backtitle "$VOS $VERS $TPRT"\
- --title "Welcome to IsiX OS Install" --msgbox "\n\n\n\
- You are about to install a Development Release of $VOS\n\
- This is a Fast, Stable, and Refined Linux Multimedia Distribution \
- designed for the Linux/Unix Power User.\n\n " 16 70
- dialog --backtitle \
- "$VOS $VERS $TPRT" \
- --title "Partition Setup" --msgbox "As first you will need to set up 2 partitions manually using Cfdisk\n\n\
- -1- as / for the main system.\n\
- -2- as Swap for paging memory.\n\
- -3- Mark the root parition bootable" 10 70
- cfdisk /dev/sda
- dialog --backtitle \
- "$VOS $VERS $TPRT" \
- --title "Select the main partition" --inputbox "Wich is your main partition?\n\
- If it is the first you made, then it is $ROOT_PART\n\
- otherwise insert it here:" 10 70 $ROOT_PART 2>$TMP/ROOT_PART
- ROOT_PART=$(cat $TMP/ROOT_PART);rm $TMP/ROOT_PART
- echo y|mkreiserfs $ROOT_PART
- dialog --backtitle \
- "$VOS $VERS $TPRT" \
- --title "Select the Swap partition" --inputbox "Wich is your swap partition?\n\
- If it is the first you made, then it is $SWAP_PART\n\
- otherwise insert it here:" 10 70 $SWAP_PART 2>$TMP/SWAP_PART
- SWAP_PART=$(cat $TMP/SWAP_PART);rm $TMP/SWAP_PART
- mkswap $SWAP_PART >/dev/null
- echo "setting swap";swapon $SWAP_PART
- dialog --backtitle \
- "$VOS $VERS $TPRT" \
- --title "Mounting Devices" --infobox "The Installer will mount and prepare all spaces for the install." 8 70
- sleep 5
- #montamos dispositivos
- mount $ROOT_PART $INST_PNT >/dev/null
- mount -o ro,exec -t iso9660 $device $CD_MNT 1> $RDIR 2> $RDIR
- #preparamos directorios
- mkdir -p $INST_PNT/var/log/packages
- mkdir -p $INST_PNT/var/log/scripts
- cd $INST_PNT ; chmod 755 ./; chmod 755 ./var
- if [ -d $INST_PNT/usr/src/linux ]; then
- chmod 755 $INST_PNT/usr/src/linux
- fi
- if [ ! -d $INST_PNT/proc ]; then
- mkdir $INST_PNT/proc
- chown root.root $INST_PNT/proc
- fi
- if [ ! -d $INST_PNT/sys ]; then
- mkdir $INST_PNT/sys
- chown root.root $INST_PNT/sys
- fi
- chmod 1777 $INST_PNT/tmp
- if [ ! -d $INST_PNT/var/spool/mail ]; then
- mkdir -p $INST_PNT/var/spool/mail
- chmod 755 $INST_PNT/var/spool
- chown root.mail $INST_PNT/var/spool/mail
- chmod 1777 $INST_PNT/var/spool/mail
- fi
- #montamos proc y sys
- mount -t proc /proc $INST_PNT/proc 1> /dev/null 2> /dev/null
- mount --bind /sys $INST_PNT/sys 1> /dev/null 2> /dev/null
- #avisamos
- dialog --backtitle \
- "$VOS $VERS $TPRT" \
- --title "Starting the Instalation" --msgbox "From Now on the install will do all steps for you automaticly." 5 70
- #instalamos
- #a
- dialog --backtitle "$VOS $VERS $TPRT" --title "Writing to Hard Drive - 1/14"\
- --infobox "Installing Base System Files to disk, this is the first step ......" 5 60
- wait;
- cd $CD_MNT/packages/a ;
- installpkg -root $INST_PNT -infobox *.tgz > /dev/null;
- #ap
- dialog --backtitle "$VOS $VERS $TPRT" --title "Writing to Hard Drive - 2/14"\
- --infobox "Installing Main System apps, the second step You're Not Done Yet ......" 5 60
- wait;
- cd $CD_MNT/packages/ap ;
- installpkg -root $INST_PNT -infobox *.tgz > /dev/null;
- #d
- dialog --backtitle "$VOS $VERS $TPRT" --title "Writing to Hard Drive - 3/14"\
- --infobox "Installing Bin files. All needed by the system and for Your own compiles" 5 60
- wait;
- cd $CD_MNT/packages/d ;
- installpkg -root $INST_PNT -infobox *.tgz > /dev/null;
- #e
- dialog --backtitle "$VOS $VERS $TPRT" --title "Writing to Hard Drive - 4/14"\
- --infobox "Installing Emacs. Just Sitback and Relax ......" 5 60
- wait;
- cd $CD_MNT/packages/e ;
- installpkg -root $INST_PNT -infobox *.tgz > /dev/null;
- #f
- dialog --backtitle "$VOS $VERS $TPRT" --title "Writing to Hard Drive - 5/14"\
- --infobox "Installing Linux FAQ's and HowTo's included in any complete distro ......" 5 60
- wait;
- cd $CD_MNT/packages/f ;
- installpkg -root $INST_PNT -infobox *.tgz > /dev/null;
- #k
- dialog --backtitle "$VOS $VERS $TPRT" --title "Writing to Hard Drive - 6/14"\
- --infobox "Installing the Linux Kernel - This is a specially compiled Kernel for the XHL 90 laptop" 5 60
- wait;
- cd $CD_MNT/packages/k ;
- installpkg -root $INST_PNT -infobox *.tgz > /dev/null;
- #kde
- dialog --backtitle "$VOS $VERS $TPRT" --title "Writing to Hard Drive - 7/14"\
- --infobox "Installing KDE environment. Your Desktop environment by default ....." 5 60
- wait;
- cd $CD_MNT/packages/kde ;
- installpkg -root $INST_PNT -infobox *.tgz > /dev/null;
- #l
- dialog --backtitle "$VOS $VERS $TPRT" --title "Writing to Hard Drive - 8/14"\
- --infobox "Installing main Library Files the most needed by the system ....." 5 60
- wait;
- cd $CD_MNT/packages/l ;
- installpkg -root $INST_PNT -infobox *.tgz > /dev/null;
- #n
- dialog --backtitle "$VOS $VERS $TPRT" --title "Writing to Hard Drive - 9/14"\
- --infobox "Installing Networking parts, this takes a while ......" 5 60
- wait;
- cd $CD_MNT/packages/n ;
- installpkg -root $INST_PNT -infobox *.tgz > /dev/null;
- #t
- dialog --backtitle "$VOS $VERS $TPRT" --title "Writing to Hard Drive - 10/14"\
- --infobox "Installing tetex transfig & xfig You Can't Turn Back Now ! ......" 5 60
- wait;
- cd $CD_MNT/packages/t ;
- installpkg -root $INST_PNT -infobox *.tgz > /dev/null;
- #tcl
- dialog --backtitle "$VOS $VERS $TPRT" --title "Writing to Hard Drive - 11/14"\
- --infobox "Installing tcl Just wait a little more ......" 5 60
- wait;
- cd $CD_MNT/packages/tcl ;
- installpkg -root $INST_PNT -infobox *.tgz > /dev/null;
- #x
- dialog --backtitle "$VOS $VERS $TPRT" --title "Writing to Hard Drive - 12/14"\
- --infobox "Installing X core files , those ones needed to start the graphical Interface ......" 5 60
- wait;
- cd $CD_MNT/packages/x ;
- installpkg -root $INST_PNT -infobox *.tgz > /dev/null;
- #xap
- dialog --backtitle "$VOS $VERS $TPRT" --title "Writing to Hard Drive - 13/14"\
- --infobox "Installing X app files , those ones needed to use on the graphical Interface ......" 5 60
- wait;
- cd $CD_MNT/packages/xap ;
- installpkg -root $INST_PNT -infobox *.tgz > /dev/null;
- #y
- dialog --backtitle "$VOS $VERS $TPRT" --title "Writing to Hard Drive - 14/14"\
- --infobox "Installing Unix Games , not QUAKE but something else ......" 5 60
- wait;
- cd $CD_MNT/packages/y ;
- installpkg -root $INST_PNT -infobox *.tgz > /dev/null;
- ####Last step
- chroot $INST_PNT /sbin/vgscan --mknodes --ignorelockingfailure 2> /dev/null
- chroot $INST_PNT /sbin/vgscan --mknodes --ignorelockingfailure 2> /dev/null
- # There is no root password
- cp /usr/lib/setup/dopass.exp $INST_PNT/sbin
- chroot $INST_PNT /sbin/dopass.exp root isix${RANDOM} > /dev/null
- chroot $INST_PNT useradd -G plugdev,haldaemon,audio,video,cdrom -s /bin/bash -d /home/isixuser -m -k /etc/skel isix
- chroot $INST_PNT /sbin/dopass.exp isix isixos1234
- rm $INST_PNT/sbin/dopass.exp
- dialog --title "ATTENTION" --msgbox "A default user is created with the following details, \
- please note and remember this to log in to the new system\n\nUsername: isix\nPassword: isixos1234" 12 60
- # make fstab
- echo "$ROOT_PART / reiserfs defaults 1 1" >$INST_PNT/etc/fstab
- echo "$SWAP_PART swap swap defaults 0 0">>$INST_PNT/etc/fstab
- echo "proc /proc proc defaults 0 0" >>$INST_PNT/etc/fstab
- echo "sysfs /sys sysfs defaults 0 0" >>$INST_PNT/etc/fstab
- echo "devpts /dev/pts devpts gid=5,mode=620 0 0" >>$INST_PNT/etc/fstab
- # make mtab
- echo "$ROOT_PART / reiserfs rw 0 0">$INST_PNT/etc/mtab
- echo "proc /proc proc rw 0 0">>$INST_PNT/etc/mtab
- echo "sysfs /sys sysfs rw 0 0">>$INST_PNT/etc/mtab
- echo "usbfs /proc/bus/usb usbfs rw 0 0">>$INST_PNT/etc/mtab
- echo "tmpfs /dev/shm tmpfs rw 0 0">>$INST_PNT/etc/mtab
- #Generate lilo
- touch $TMP/lilo_echo
- mbrinstdrv="$ROOT_DEV"
- echo "## IsiX OS lilo.conf">$TMP/lilo_echo
- echo "append=\" vt.default_utf8=0\"">>$TMP/lilo_echo
- echo "boot = $ROOT_DEV">>$TMP/lilo_echo
- echo "#bitmap = /boot/boot.bmp">>$TMP/lilo_echo
- echo "#bmp-colors = 120,255,120,255,120,255">>$TMP/lilo_echo
- echo "#bmp-table = 60,6,255,0">>$TMP/lilo_echo
- echo "#bmp-timer = 65,27,255,0">>$TMP/lilo_echo
- echo "prompt">>$TMP/lilo_echo
- echo "timeout = 150">>$TMP/lilo_echo
- echo "change-rules">>$TMP/lilo_echo
- echo "reset">>$TMP/lilo_echo
- echo "vga = 791">>$TMP/lilo_echo
- echo "# Linux bootable partition config begins">>$TMP/lilo_echo
- echo "image = /boot/vmlinuz">>$TMP/lilo_echo
- echo " root = $ROOT_PART">>$TMP/lilo_echo
- echo " label = IsiX_OS">>$TMP/lilo_echo
- echo " read-only">>$TMP/lilo_echo
- echo "# Linux bootable partition config ends">>$TMP/lilo_echo
- cat $TMP/lilo_echo > $INST_PNT/etc/lilo.conf 2> /dev/null
- chmod 644 $INST_PNT/etc/lilo.conf 2> /dev/null
- #install lilo
- chroot $INST_PNT /sbin/lilo 2> /dev/null
- chroot $INST_PNT /usr/sbin/nvidia-switch --install >/dev/null
- FECHADEHOY=`date "+%d-%m-%y"`
- chroot $INST_PNT echo "#Isix OS installed on $FECHADEHOY" >/etc/isix-install
- chroot $INST_PNT fc-cache -f
- #limpiamos
- rm -Rf $INST_PNT/*pkg*
- rm -Rf $INST_PNT/*install*
- rm -Rf $INST_PNT/*tgz
- #dejamos sistema con permisos
- chmod 755 $INST_PNT
- #liberamos dispositivos
- cd
- #desmontamos
- umount $CD_MNT
- #expulsamos disco
- eject $DRIVE_FOUND
- #hasta la vista
- dialog --backtitle \
- "$VOS $VERS $TPRT" \
- --title "In The Begining There Was Darkness" --yesno "Your Finnished! reboot and \
- remove the CD ! \n < Ctrl+Alt+Del > \nselect < No > to go back to console. " 8 60
- if [ "$?" = "0" ] ; then
- echo "Remember: isix - isixos1234"
- sleep 3
- reboot
- fi
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement