#!/bin/bash # # Knoppix Installation auf Festplatte # knx-hdinstall 0.30 # 9/2002 Christian Perle, perle@itm.tu-clausthal.de # # Spanish translation by Luis Llorente, luis.llorente@hispalinux.es # Japanese translation and patch by ya-knoppix-jp project # TODO: # weitere Filesysteme f.AN|r $TR (ext3, xfs, reiserfs) initrd.gz, pivot_root? # Fremde Partitionen (vfat, ntfs) in /etc/fstab eintragen # bei DHCP: "iface eth0 inet dhcp" eintragen # Auswahl: Automounter oder nicht # LILO im MBR nur auf der ersten Platte installieren (BIOS-Reihenfolge) # "no cloop"-Install (extract_compressed_fs, doppelter Plattenplatz n.ANvtig) # # $BF|K\8lHG(BChangeLog # #2002/12/07 0.9.4 kinneko $BK\2H(B v0.30 $B%Y!<%9$X0\9T(B # #2002/12/04 0.9.3 K.Wonderboy $B$5$s$K$h$k%Q%C%A(B # $B!&(Bboot-ja.img $B$N:n@.$r@5>o$K$G$-$k$h$&$K$7$?(B # #2002/12/03 0.9.2 Max $B$5$s$K$h$k=$@5(B # $B!&%G%9%/%H%C%W>e$NITMW%"%$%3%s=|5n(B #$B!!!!!!!!!!!!!!!!!!!!!!!!!!!!(B (/cdrom$BFb$N%5%s%W%k%U%!%$%k$X$N%7%g!<%H%+%C%H(B) # $B!&(BOpenOffice.org$B=i2s5/F0;~5sF0=$@5(B #$B!!!!!!!!!!!!!!!!!!!!!!!!!!!!(B ($B%$%s%9%H!<%k>uBV$rH=CG$7=i2s;~$O%;%C%H%"%C%W(B) # #2002/12/01 0.9.1 $BH9$5$s$K$h$k%Q%C%A(B # $B!!!&(BTitle $B$NF|K\8l2=(B # $B!!!&%F%s%W%l!<%H%"!<%+%$%V$NCV$->l=j$NJQ99(B # $B!!!!!!(B(/temp -> $B%9%/%j%W%H%+%l%s%H(B) # $B!!!&%U%!%$%kL>$NJQ99(B (knx-hdinstall-jp) # Max$B$5$s$K$h$k%Q%C%A(B # $B!!!&(Bkickerrc $B$N2~NI(B # $B!!!!!!(B(Mozilla-Navigator $B$H(B KMail $B%"%$%3%sI=<((B) # #2002/11/27 0.9 Natureza$B$5$s$K$h$j(B knx-hdinstalljp $B=i8x3+(B SVERSION="0.30-3/0.94jp" rotdash() { p=$1 while [ -d /proc/$p ] do echo -n '/' ; usleep 100000 echo -n '-' ; usleep 100000 echo -n '\' ; usleep 100000 echo -n '|' ; usleep 100000 done } # X oder Textkonsole case "`tty`" in /dev/tty[1-8]) MODE=text DIA=dialog ;; # $BF|K\8lHG$G%3%a%s%H%"%&%H$5$l$F$$$k$N$G9g$o$;$k$,MWD4::(B # /dev/pts/*|/dev/ttyp*) # MODE=x # export XDIALOG_HIGH_DIALOG_COMPAT=1 # [ -x /usr/bin/gdialog ] && DIA=gdialog # [ -x /usr/bin/Xdialog ] && DIA=Xdialog # [ $DIA = dialog ] && MODE=text # ;; *) MODE=text DIA=dialog ;; esac # Textmode wenn DISPLAY nicht gesetzt ist if [ -z "$DISPLAY" ] ; then MODE=text DIA=dialog fi # Mountpoint f.AN|r das Rootfilesystem TR="/mnt/target" # Mountpoints f.AN|r Loop-Mounts TL1="/mnt/l1" TL2="/mnt/l2" # $BF|K\8lHG$GF3F~$5$l$?JQ?t!)1Q8lHG(B0.30$B$K$O$J$$$N$G%3%a%s%H%"%&%HMWD4::(B ## Name des Template-Archivs #INSTDATA="/usr/local/lib/knx-templates-$SVERSION.tgz" # Hierhin werden die Templates entpackt TM="$TR/templates" # Default Hostname # $BK\2H$G$O(B box $B$r:NMQ(B DEFHNAME="localhost" if [ $UID != 0 ] ; then # $BMWB?8@8l2=(B # echo "Dieses Skript l.ANduft nur mit root-Rechten." echo "$B$3$N%9%/%j%W%H$O(Broot$B8"8B$GH$,$G$-$l$P%G%U%)%k%H$GF|K\8l$K$J$k!)(B $BMWD4::(B #<<<<<<< variant A #[ -f /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n #ORIG_LANG="$LANG" #ORIG_LANGUAGE="$LANGUAGE" #ORIG_LC_ALL="$LC_ALL" #>>>>>>> variant B ORIG_LANG="ja_JP.eucJP" ORIG_LANGUAGE="ja" ORIG_LC_ALL="ja_JP.eucJP" #======= end # ...weg mit den locales export LANG=C export LANGUAGE=C export LC_ALL=C umask 022 killall dhcpcd >/dev/null 2>&1 killall -9 pump >/dev/null 2>&1 killall automount >/dev/null 2>&1 swapoff -a >/dev/null 2>&1 case "$ORIG_LANGUAGE" in de|at|ch) BT="Knoppix Installation" M1="Dieses Skript hilft bei der Installation \ von Knoppix auf Festplatte. Beachten Sie, \ dass sich knx-hdinstall noch in der \ Entwicklungsphase befindet. F.AN|r Datenverluste oder HardwareschNdden \ .AN|bernimmt der Autor Christian Perle und KNOPPER.NET keine Haftung." ;; es) BT="Instalaci.ANsn de Knoppix" M1="Este script ayuda en la instalaci.ANsn de Knoppix \ en el disco duro. N.ANstese que knx-hdinstall estNa todavNma en \ desarrollo. El autor no toma ninguna responsabilidad \ en caso de p.ANirdida de datos o daNqo del hardware." ;; ja) BT="Knoppix $B%$%s%9%H!<%k(B" M1="$B$3$N%9%/%j%W%H$O!"(Bknoppix $B$r%O!<%I%G%#%9%/$K%$%s%9%H!<%k$9$k$b$N$G$9!#(B\ $B$^$@3+H/Cf$G$9$N$G!"%G!<%?$r<:$C$?$j!"%O!<%I%&%(%"$N8N>c$N860x$K$J$C$F$b@UG$$O;}$F$^$;$s!#(B\ $BF|K\8l$G$N3+H/$O!"(Bya-knoppix-jp $B%W%m%8%'%/%H$,9T$J$C$F$$$^$9!#(B" ;; *) BT="Knoppix Install" M1="This script helps installing Knoppix \ on a hard disk. Note that knx-hdinstall is still under \ development. The author Christian Perle and KNOPPER.NET take no responsibility \ for data loss or hardware damage." ;; esac $DIA --backtitle "$BT" --title "knx-hdinstall $SVERSION" --msgbox "$M1" 16 45 # Check f.AN|r die Templates case "$ORIG_LANGUAGE" in de|at|ch) T1="Datei fehlt" M1="Die vom Skript ben.ANvtigte Datei knx-templates-$SVERSION.tgz wurde nicht gefunden oder ist beschNddigt. Das Skript wird beendet." ;; es) T1="Archivo no encontrado" M1="El archivo knx-templates-$SVERSION.tgz requerido, no est.ANa o estNa corrupto. El script finalizarNa." ;; jp) T1="$B%U%!%$%k$,$"$j$^$;$s!#(B" M1="knx-templates-$SVERSION.tgz $B$,8+$D$+$i$J$$$+2u$l$F$$$^$9!#=hM}$rCf;_$7$^$9!#(B" ;; *) T1="Missing file" M1="The required file knx-templates-$SVERSION.tgz is missing or corrupted. The script will be terminated." ;; esac INSTDATA="" for x in "`dirname $0`/knx-templates-$SVERSION.tgz" \ "/usr/local/lib/knx-templates-$SVERSION.tgz" do if [ -z "$INSTDATA" ] ; then tar tzf "$x" >/dev/null 2>&1 [ $? = 0 ] && INSTDATA="$x" fi done if [ -z "$INSTDATA" ] ; then $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1" 15 60 rm -f $TMP exit 0 fi # G.AN|ltige Partitionierung: mind. 2.2 GB Filesystem, mind. 128 MB Swap. FSMIN=2200 SWAPMIN=128 # F.AN|r "no cloop"-Methode wird mehr Platz gebraucht NCLOOPFSMIN=4400 # Gr.ANvN_e der initrd: 2.5 MB INSIZE=2500 # Auswahl der Platte zum Partitionieren > $TMP NUMHD=0 if [ -f /proc/partitions ] ; then while read x x x p x do case "$p" in hd?) if [ "`cat /proc/ide/$p/media`" = "disk" ] ; then echo "$p `tr ' ' _ > $TMP NUMHD=$[NUMHD+1] fi ;; sd?) x="`scsi_info /dev/$p | grep MODEL | tr ' ' _`" x=${x#*\"} x=${x%\"*} echo "$p $x" >> $TMP NUMHD=$[NUMHD+1] ;; *) ;; esac done < /proc/partitions fi HARDDISKS="`cat $TMP`" case "$ORIG_LANGUAGE" in de|at|ch) T1="Partitionieren" M1="W.ANdhlen Sie eine Festplatte aus (Leertaste zum Ankreuzen):" ;; es) T1="Particionar el disco duro" M1="Seleccione un disco duro (La barra espaciadora selecciona):" ;; jp) T1="$B%O!<%I%G%#%9%/$NNN0h3NJ](B" M1="$B%O!<%I%G%#%9%/$rA*$s$G2<$5$$!#(B($B%9%Z!<%9%-!<$GA*Br(B)" ;; *) T1="Partition hard disk" M1="Choose a hard disk (Space bar selects):" ;; esac $DIA --backtitle "$BT" --title "$T1" --radiolist "$M1" 16 60 $NUMHD \ $(echo "$HARDDISKS" | while read p model ; do echo "$p" "$model" off ; done) \ 2> $TMP HDCHOICE="`cat $TMP`" case "$ORIG_LANGUAGE" in de|at|ch) M1="Sie haben keine Festplatte ausgew.ANdhlt. Das Skript wird beendet." ;; es) M1="No se ha seleccionado un disco duro. El script finalizar.ANa." ;; ja) M1="$B%O!<%I%G%#%9%/$,A*Br$5$l$F$$$^$;$s!#=hM}$rCf;_$7$^$9!#(B" ;; *) M1="No hard disk chosen. The script will be terminated." ;; esac if [ -z "$HDCHOICE" ] ; then $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1" 15 40 rm -f $TMP exit 0 fi x=$(fdisk -l /dev/$HDCHOICE 2>/dev/null | grep "^Disk.*cylinders") HDS=${x%% heads*} HDS=${HDS##* } SECT=${x%% sectors*} SECT=${SECT##* } CYLS=${x% cylinders} CYLS=${CYLS##* } case "$ORIG_LANGUAGE" in de|at|ch) M1="Sie haben /dev/$HDCHOICE gew.ANdhlt. \ Die Platte hat eine Kapazit.ANdt von \ $[CYLS*HDS*SECT/2048] MB. \ Das Partitionierungsprogramm \ cfdisk wird jetzt gestartet." ;; es) M1="Disco duro /dev/$HDCHOICE seleccionado. \ Capacidad de este dispositivo: \ $[CYLS*HDS*SECT/2048] MB. \ Ahora se arrancar.ANa la herramienta cfdisk \ de particionado." ;; jp) M1="$B%O!<%I%G%#%9%/NN0h(B /dev/$HDCHOICE $B$,A*Br$5$l$^$7$?!#(B\ $B%G%#%9%/MFNL$O(B: \ $[CYLS*HDS*SECT/2048] MB $B$G$9!#(B\ $B%O!<%I%G%#%9%/NN0h:n@.%W%m%0%i%`(B cfdisk $B$r5/F0$7$^$9!#(B" ;; *) M1="Hard disk /dev/$HDCHOICE chosen. \ Capacity of this device: \ $[CYLS*HDS*SECT/2048] MB. \ The partitioning tool \ cfdisk will be launched now." ;; esac $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1" 15 40 if [ $MODE = text ] ; then ( LANG="$ORIG_LANG" LANGUAGE="$ORIG_LANGUAGE" LC_ALL="$ORIG_LC_ALL" cfdisk /dev/$HDCHOICE ) else ( LANG="$ORIG_LANG" LANGUAGE="$ORIG_LANGUAGE" LC_ALL="$ORIG_LC_ALL" xterm -fn 10x20 -e cfdisk /dev/$HDCHOICE ) fi # Auswahl: Swap oder nicht case "$ORIG_LANGUAGE" in de|at|ch) T1="Virtueller Speicher (Swap)" M1="Soll eine Swap-Partition verwendet werden (empfohlen)?" ;; es) T1="Memoria virtual (swap)" M1="Quiere utilizar una partici.ANsn de memoria virtual (recomendado)?" ;; jp) T1="$B2>A[%a%b%j(B (swap)" M1="$B%9%o%C%WNN0h$rA*Br$7$^$9$+!)(B" ;; *) T1="Virtual memory (swap)" M1="Do you want to use a swap partition (recommended)?" ;; esac $DIA --backtitle "$BT" --title "$T1" --yesno "$M1" 15 60 x=$? if [ $x = 0 ] ; then # Auswahl der Swap-Partition (Swap einrichten) > $TMP fdisk -l /dev/$HDCHOICE | grep "^/dev.*Linux swap$" | while read dev x x size x do size=${size%+} echo $dev $[size/1024]_MB off >> $TMP done NUMSWAP="`wc -l <$TMP`" SWAPART="`cat $TMP`" if [ $NUMSWAP = 0 ] ; then case "$ORIG_LANGUAGE" in de|at|ch) T1="Swap einrichten" M1="Es wurde keine Swap-Partition auf der gew.ANdhlten Platte gefunden. Das Skript wird beendet." ;; es) T1="Instalar swap" M1="No se pudo encontrar una partici.ANsn swap en el disco duro elegido. El script finalizarNa." ;; jp) T1="$B%9%o%C%WNN0h$N:n@.(B" M1="$BA*Br$5$l$?%O!<%I%G%#%9%/$K$O%9%o%C%WNN0h$,$"$j$^$;$s!#=hM}$rCf;_$7$^$9!#(B" ;; *) T1="Set up swap" M1="No swap partition could be found on the chosen hard disk. The script will be terminated." ;; esac $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1" 15 40 rm -f $TMP exit 0 fi case "$ORIG_LANGUAGE" in de|at|ch) T1="Swap einrichten" M1="W.ANdhlen Sie die Swap-Partition aus:" ;; es) T1="Instalar swap" M1="Elija una partici.ANsn swap:" ;; jp) T1="$B%9%o%C%WNN0h$N:n@.(B" M1="$B%9%o%C%WNN0h$rA*Br$7$F$/$@$5$$!#(B" ;; *) T1="Set up swap" M1="Choose a swap partition:" ;; esac $DIA --backtitle "$BT" --title "$T1" --radiolist "$M1" 16 60 $NUMSWAP \ $SWAPART 2> $TMP SWCHOICE="`cat $TMP`" if [ -z "$SWCHOICE" ] ; then case "$ORIG_LANGUAGE" in de|at|ch) M1="Sie haben keine Partition ausgew.ANdhlt. Das Skript wird beendet." ;; es) M1="No se ha seleccionado ninguna partici.ANsn swap. El script finalizarNa." ;; jp) M1="$B%9%o%C%WNN0h$,A*Br$5$l$F$$$^$;$s!#=hM}$rCf;_$7$^$9!#(B" ;; *) M1="No swap partition chosen. The script will be terminated." ;; esac $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1" 15 40 rm -f $TMP exit 0 fi case "$ORIG_LANGUAGE" in de|at|ch) M1="Die gew.ANdhlte Partition ist kleiner als $SWAPMIN MB. Das Skript wird beendet." ;; es) M1="La partici.ANsn swap seleccionada es menor que $SWAPMIN MB. El script finalizarNa." ;; jp) M1="$BA*Br$5$l$?%9%o%C%WNN0h$OI,MW$J(B $SWAPMIN MB $B$h$j>.$5$/!"MFNL$,ITB-$7$F$$$^$9!#=hM}$rCf;_$7$^$9!#(B" ;; *) M1="The chosen swap partition is smaller than $SWAPMIN MB. The script will be terminated." ;; esac size=$(echo "$SWAPART" | grep "$SWCHOICE") size=${size%%_*} size=${size##* } if [ $size -lt $SWAPMIN ] ; then $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1" 15 40 rm -f $TMP exit 0 fi case "$ORIG_LANGUAGE" in de|at|ch) M1="Soll $SWCHOICE als Swap eingerichtet werden (alle Daten auf der Partition gehen verloren)?" ;; es) M1="Quiere instalar $SWCHOICE como swap (se perder.ANan todos los datos en esta particiNsn)?" ;; jp) M1="$SWCHOICE $B$r%9%o%C%WNN0h$H$7$F=i4|2=$7$^$9!#(B($B$b$7%G!<%?$,F~$C$F$$$l$P<:$o$l$^$9(B)" ;; *) M1="Do you want to set up $SWCHOICE as swap (all data on this partition will be lost)?" ;; esac $DIA --backtitle "$BT" --title "$T1" --yesno "$M1" 15 60 x=$? if [ $x != 0 ] ; then case "$ORIG_LANGUAGE" in de|at|ch) M1="Abgebrochen, das Skript wird beendet." ;; es) M1="Cancelado. El script finalizar.ANa." ;; jp) M1="$B%-%c%s%;%k$5$l$^$7$?!#=hM}$rCf;_$7$^$9!#(B" ;; *) M1="Cancelled. The script will be terminated." ;; esac $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1" 15 40 rm -f $TMP exit 0 fi case "$ORIG_LANGUAGE" in de|at|ch) echo "Partition $SWCHOICE wird als Swap eingerichtet..." ;; es) echo "Instalando $SWCHOICE como swap..." ;; jp) echo "$B%Q!<%F%#%7%g%s(B $SWCHOICE $B$r:n@.Cf(B ..." ;; *) echo "Setting up $SWCHOICE as swap..." ;; esac sleep 2 dd if=/dev/zero of=$SWCHOICE bs=1k count=16 >/dev/null 2>&1 sync mkswap $SWCHOICE 2> $TMP if [ $? != 0 ] ; then case "$ORIG_LANGUAGE" in de|at|ch) M1="Beim Einrichten der Swap-Partition ist ein Fehler aufgetreten. Hier die Meldungen von mkswap:" ;; es) M1="Ocurri.ANs un error mientras se instalaba la swap. Algunos mensajes de mkswap:" ;; jp) M1="$B%9%o%C%WNN0h$N@_DjCf$K%(%i!<$,H/@8$7$^$7$?!#(Bmkswap $B$N%a%C%;!<%8(B:" ;; *) M1="An error occurred while setting up swap. Some messages from mkswap:" ;; esac $DIA --backtitle "$BT" --title "$T1" \ --msgbox "$M1 `tail -8 $TMP`" 15 60 rm -f $TMP exit 0 fi swapon $SWCHOICE >/dev/null 2>&1 else SWCHOICE=none fi # Auswahl der Rootpartition (Filesystem anlegen) > $TMP fdisk -l /dev/$HDCHOICE | grep "^/dev.*Linux$" | tr -d '*' | while read dev x x size x do size=${size%+} echo $dev $[size/1024]_MB off >> $TMP done NUMEXT2="`wc -l <$TMP`" EXT2PART="`cat $TMP`" case "$ORIG_LANGUAGE" in de|at|ch) T1="Filesystem anlegen" M1="Es wurde keine Linux-Partition auf der gew.ANdhlten Platte gefunden. Das Skript wird beendet." ;; es) T1="Crear sistema de ficheros" M1="No se pudo encontrar ninguna partici.ANsn Linux en el disco duro seleccionado. El script finalizarNa." ;; jp) T1="$B%U%!%$%k%7%9%F%`$N:n@.(B" M1="$BA*Br$5$l$?%O!<%I%G%#%9%/$K$O(B Linux $B%Q!<%F%#%7%g%sNN0h$,8+$D$+$j$^$;$s$G$7$?!#=hM}$rCf;_$7$^$9!#(B" ;; *) T1="Create filesystem" M1="No Linux partition could be found on the chosen hard disk. The script will be terminated." ;; esac if [ $NUMEXT2 = 0 ] ; then $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1" 15 40 rm -f $TMP exit 0 fi case "$ORIG_LANGUAGE" in de|at|ch) M1="W.ANdhlen Sie die Rootpartition aus:" ;; es) M1="Elija la partici.ANsn raNmz:" ;; jp) M1="$B%k!<%H%7%9%F%`NN0h$rA*Br$7$F$/$@$5$$!#(B" ;; *) M1="Choose the root partition:" ;; esac $DIA --backtitle "$BT" --title "$T1" --radiolist "$M1" 16 60 $NUMEXT2 \ $EXT2PART 2> $TMP FSCHOICE="`cat $TMP`" case "$ORIG_LANGUAGE" in de|at|ch) M1="Sie haben keine Partition ausgew.ANdhlt. Das Skript wird beendet." ;; es) M1="No se ha seleccionado ninguna partici.ANsn. El script finalizarNa." ;; jp) M1="$BNN0h$,A*Br$5$l$F$$$^$;$s!#=hM}$rCf;_$7$^$9!#(B" ;; *) M1="No partition chosen. The script will be terminated." ;; esac if [ -z "$FSCHOICE" ] ; then $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1" 15 40 rm -f $TMP exit 0 fi size=$(echo "$EXT2PART" | grep "$FSCHOICE") size=${size%%_*} size=${size##* } case "$ORIG_LANGUAGE" in de|at|ch) M1="Die gew.ANdhlte Partition ist kleiner als $FSMIN MB. Das Skript wird beendet." ;; es) M1="La partici.ANsn seleccionada es menor que $FSMIN MB. El script finalizarNa." ;; jp) M1="$BA*Br$5$l$?NN0h$O(B $FSMIN MB $B$h$j>.$5$/NN0h$,ITB-$7$F$$$^$9!#=hM}$rCf;_$7$^$9!#(B" ;; *) M1="The chosen partition is smaller than $FSMIN MB. The script will be terminated." ;; esac if [ $size -lt $FSMIN ] ; then $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1" 15 40 rm -f $TMP exit 0 fi #FIXME: FSTYPE ausw.ANdhlen case "$ORIG_LANGUAGE" in de|at|ch) M1="Soll auf $FSCHOICE das Filesystem erzeugt werden (alle Daten auf der Partition gehen verloren)?" ;; es) M1="Quiere crear un sistema de ficheros en $FSCHOICE (se perder.ANan todos los datos en esta particiNsn)?" ;; jp) M1="$FSCHOICE $B$r%U%!%$%k%7%9%F%`$H$7$F=i4|2=$7$^$9$+!)(B ($B$3$NNN0h$N$9$Y$F$N>pJs$O<:$o$l$^$9(B)" ;; *) M1="Do you want to create a filesystem on $FSCHOICE (all data on this partition will be lost)?" ;; esac $DIA --backtitle "$BT" --title "$T1" --yesno "$M1" 15 60 x=$? if [ $x != 0 ] ; then case "$ORIG_LANGUAGE" in de|at|ch) M1="Abgebrochen, das Skript wird beendet." ;; es) M1="Cancelado. El script finalizar.ANa." ;; jp) M1="$B%-%c%s%;%k$5$l$^$7$?!#=hM}$rCf;_$7$^$9!#(B" ;; *) M1="Cancelled. The script will be terminated." ;; esac $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1" 15 40 rm -f $TMP exit 0 fi case "$ORIG_LANGUAGE" in de|at|ch) echo "Das Filesystem wird auf $FSCHOICE angelegt..." ;; es) echo "Creando el sistema de ficheros en $FSCHOICE..." ;; jp) echo "Filesystem $FSCHOICE $B$r:n@.Cf(B ..." ;; *) echo "Creating filesystem on $FSCHOICE..." ;; esac sleep 2 dd if=/dev/zero of=$FSCHOICE bs=1k count=16 >/dev/null 2>&1 sync mke2fs $FSCHOICE 2> $TMP # $B%G%U%)%k%H$G(B ext2 $B$K$J$C$F$7$^$&!#$3$l$OA*Br$G$-$k$h$&$K$9$k$Y$-$G$O!)(B #mkfs -t ext3 $FSCHOICE 2> $TMP if [ $? != 0 ] ; then case "$ORIG_LANGUAGE" in de|at|ch) M1="Beim Anlegen des Filesystems ist ein Fehler aufgetreten. Hier die Meldungen von mke2fs:" ;; es) M1="Ocurri.ANs un error mientras se creaba el sistema de ficheros. Algunos mensajes de mke2fs:" ;; jp) M1="$B%U%!%$%k%7%9%F%`:n@.Cf$K%(%i!<$,H/@8$7$^$7$?!#(Bmke2fs $B%3%^%s%I$N%a%C%;!<%8(B:" ;; *) M1="An error occurred while creating the filesystem. Some messages from mke2fs:" ;; esac $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1 `tail -8 $TMP`" 15 60 rm -f $TMP exit 0 fi case "$ORIG_LANGUAGE" in de|at|ch) T1="Dateien kopieren" M1="Jetzt werden die Dateien der Knoppix-CD auf die Rootpartition kopiert. Dies kann je nach Geschwindigkeit der Festplatte und des CDROM-Laufwerks 10-40 Minuten dauern." M2="Kopiere Dateien..." ;; es) T1="Copiar archivos" M1="Ahora se copiar.ANan todos los archivos del CD de Knoppix al disco duro. Esto lleverNa de 10 a 40 minutos, dependiendo del hardware." M2="Copiando archivos..." ;; jp) T1="$B%U%!%$%k$N%3%T!<(B" M1="$B$3$l$+$i(B Knoppix CD $B$NFbMF$r%O!<%I%G%#%9%/$K%3%T!<$7$^$9!#$3$N:n6H$K$O(B 10 $B!A(B 40 $BJ,DxEYI,MW$G$9!#(B" M2="$B%U%!%$%k$N%3%T!/dev/null 2>&1 mount -t ext2 $FSCHOICE $TR 2> $TMP # $B%U%!%$%k%7%9%F%`$rG$0U$KA*$Y$k$h$&$K$7$?>l9g!"%^%&%s%H;~$K$b%*%W%7%g%s$ND4@0$,I,MW!#(B #mount -t ext3 $FSCHOICE $TR 2> $TMP if [ $? != 0 ] ; then case "$ORIG_LANGUAGE" in de|at|ch) M1="Beim Einbinden der Rootpartition $FSCHOICE ist ein Fehler aufgetreten. Hier die Meldungen von mount:" ;; es) M1="Ocurri.ANs un error mientras se montaba la particiNsn raNmz $FSCHOICE. Algunos mensajes de mount:" ;; jp) M1="$FSCHOICE $B$r%k!<%H%7%9%F%`NN0h$H$7$F%^%&%s%HCf$K%(%i!<$,5/$3$j$^$7$?!#=hM}$rCf;_$7$^$9!#(B" ;; *) M1="An error occurred while mounting the root partition $FSCHOICE. Some messages from mount:" ;; esac $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1 `tail -8 $TMP`" 15 60 rm -f $TMP exit 0 fi # Jetzt beginnt die eigentliche Datenschaufelei echo -n "$M2" (cd /KNOPPIX ; cp -a * $TR ; sync) & rotdash $! # Zwei Beeps echo -ne "\007" >/dev/tty1 ; usleep 500000 echo -ne "\007" >/dev/tty1 ; usleep 500000 case "$ORIG_LANGUAGE" in de|at|ch) T1="Dateien kopiert" M1="Der Kopiervorgang ist abgeschlossen." ;; es) T1="Copia finalizada" M1="El proceso de copia ha finalizado." ;; jp) T1="$B%3%T!<40N;(B" M1="$B%3%T!<$O40N;$7$^$7$?!#(B" ;; *) T1="Copying finished" M1="The copying process has finished." ;; esac $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1" 15 40 # Entpacken der Templates mkdir -p $TM tar xpzf $INSTDATA -C $TM >/dev/null 2>&1 # "Normalisieren" der Runlevel-Verzeichnisse rm -f $TR/etc/rc[056S].d/* for x in 0 5 6 S do cp -a $TM/etc/rc$x.d/* $TR/etc/rc$x.d/ done # Nicht alle Dienste m.AN|ssen gestartet werden case "$ORIG_LANGUAGE" in de|at|ch) T1="Mailserver" M1="Soll der Mailserver (smail) beim Hochfahren des Systems gestartet werden?" ;; es) T1="Servidor de correo" M1="Quiere ejecutar el servidor de correo (smail) al arrancar el sistema?" ;; jp) T1="$B%a!<%k%5!<%P!<$N@_Dj(B" M1="$B%a!<%k%5!<%P!<(B (smail) $B$r%7%9%F%`5/F0;~$KF0:n$5$;$^$9$+!)(B" ;; *) T1="Mail server" M1="Do you want to start the mail server (smail) at system boot?" ;; esac $DIA --backtitle "$BT" --title "$T1" --yesno "$M1" 15 60 x=$? if [ $x != 0 ] ; then rm -f $TR/etc/rc5.d/S??smail fi case "$ORIG_LANGUAGE" in de|at|ch) T1="Secure Shell Server" M1="Soll der Secure Shell Server (sshd) beim Hochfahren des Systems gestartet werden?" ;; es) T1="Servidor de shell seguro" M1="Quiere ejecutar el servidor de shell seguro (sshd) al arrancar el sistema?" ;; jp) T1="$B%;%-%e%"!&%7%'%k!&%5!<%P!<(B(sshd)$B$N@_Dj(B" M1="$B%;%-%e%"!&%7%'%k!&%5!<%P!<(B (sshd) $B$r%7%9%F%`5/F0;~$KF0:n$5$;$^$9$+!)(B" ;; *) T1="Secure shell server" M1="Do you want to start the secure shell server (sshd) at system boot?" ;; esac $DIA --backtitle "$BT" --title "$T1" --yesno "$M1" 15 60 x=$? if [ $x != 0 ] ; then rm -f $TR/etc/rc5.d/S??ssh fi case "$ORIG_LANGUAGE" in de|at|ch) T1="Samba Server" M1="Soll der Samba Server (smbd/nmbd) beim Hochfahren des Systems gestartet werden?" ;; es) T1="Servidor Samba" M1="Quiere ejecutar el servidor samba (smbd/nmbd) al arrancar el sistema?" ;; jp) T1="Samba $B%5!<%P!<$N@_Dj(B" M1="Samba $B%5!<%P!<(B (smbd/nmbd) $B$r%7%9%F%`5/F0;~$KF0:n$5$;$^$9$+!)(B" ;; *) T1="Samba server" M1="Do you want to start the samba server (smbd/nmbd) at system boot?" ;; esac $DIA --backtitle "$BT" --title "$T1" --yesno "$M1" 15 60 x=$? if [ $x != 0 ] ; then rm -f $TR/etc/rc5.d/S??samba fi case "$ORIG_LANGUAGE" in de|at|ch) T1="K Display Manager" M1="Soll der K Display Manager (grafische Anmeldung) beim Hochfahren des Systems gestartet werden?" ;; es) T1="Gestor de pantalla de KDE" M1="Quiere ejecutar kdm (ingreso en el sistema de forma gr.ANafica) al arrancar el sistema?" ;; jp) T1="K $B%G%#%9%W%l%$!&%^%M!<%8%c$N@_Dj(B" M1="$B%7%9%F%`5/F0;~$K%0%i%U%#%+%k%m%0%$%s$rDs6!$9$k(B K $B%G%#%9%W%l%$!&%^%M!<%8%c(B(kdm) $B$rF0:n$5$;$^$9$+!)(B" ;; *) T1="K display manager" M1="Do you want to start kdm (graphical login) at system boot?" ;; esac $DIA --backtitle "$BT" --title "$T1" --yesno "$M1" 15 60 x=$? if [ $x != 0 ] ; then rm -f $TR/etc/rc5.d/S??kdm fi # hotplug entfernen, wenn kein USB-Modul geladen ist grep -E "usb|uhci|ohci" /proc/modules >/dev/null 2>&1 if [ $? != 0 ] ; then rm -f $TR/etc/rc5.d/S??hotplug fi # cardmgr entfernen, wenn kein PCMCIA-Modul geladen ist grep "pcmcia_core" /proc/modules >/dev/null 2>&1 if [ $? != 0 ] ; then rm -f $TR/etc/rc5.d/S??pcmcia fi # Keymap setzen case "$ORIG_LANGUAGE" in de|at|ch) cp -af $TM/etc/init.d/keymap.sh-de $TR/etc/init.d/keymap.sh ;; es) cp -af $TM/etc/init.d/keymap.sh-es $TR/etc/init.d/keymap.sh ;; jp) cp -af $TM/etc/init.d/keymap.sh-jp $TR/etc/init.d/keymap.sh # jp-0.9x $B$G$O(B $TM/init.d/* $TR/etc/init.d/ $B$GA4It%3%T!<$7$F$$$k!#MWD4@0!#(B ;; *) cp -af $TM/etc/init.d/keymap.sh-en $TR/etc/init.d/keymap.sh ;; esac # Anlegen der Symlinks /dev/cdrom und /dev/mouse if [ -f /etc/sysconfig/mouse ] ; then x="`grep DEVICE= /etc/sysconfig/mouse`" x=${x#*/dev/} MOUSEDEV=${x%\"*} fi [ -z "$MOUSEDEV" ] && MOUSEDEV="psaux" (cd $TR/dev ; ln -sf $MOUSEDEV mouse ; ln -sf sr0 cdrom) # Prompt .ANdndern und "." aus PATH entfernen in /etc/profile cp -af $TM/etc/profile $TR/etc/profile # "Normalisieren" von /etc/inittab cp -af $TM/etc/inittab $TR/etc/inittab # Update von /etc/motd echo -e "Welcome to Knoppix (Kernel `uname -r`)\n" > $TR/etc/motd # Erzeugen von /etc/modules aus den aktuell geladenen Kernelmodulen cat <<\EOF >$TMP # /etc/modules: kernel modules to load at boot time. # # This file should contain the names of kernel modules that are # to be loaded at boot time, one per line. Comments begin with # a `#', and everything on the line after them are ignored. EOF tail +1 /proc/modules | grep -v '\[.*\]' | grep -v cloop | while read mod x do if [ $mod = apm ] ; then echo "apm power_off=1" >>$TMP else echo $mod >>$TMP fi done cp -f $TMP $TR/etc/modules # Anpassen von /etc/inputrc (8-bit clean) cp -af $TM/etc/inputrc $TR/etc/inputrc # Erzeugen von /etc/fstab cat <$TR/etc/fstab # /etc/fstab: Tabelle einzubindender Dateisysteme. # # Dateisystem Mountpunkt Typ Optionen dump pass $FSCHOICE / ext2 defaults,errors=remount-ro 0 1 EOF if [ $SWCHOICE != none ] ; then echo "$SWCHOICE none swap sw 0 0" >>$TR/etc/fstab fi cat <>$TR/etc/fstab proc /proc proc defaults 0 0 /dev/fd0 /floppy vfat defaults,user,noauto,showexec,umask=022 0 0 /dev/cdrom /cdrom iso9660 defaults,ro,user,noexec,noauto 0 0 EOF # .AN\bertragen der Knoppix-generierten XF86Config cp -af /etc/X11/XF86Config $TR/etc/X11/XF86Config cp -af /etc/X11/XF86Config-4 $TR/etc/X11/XF86Config-4 # X-Session nicht auf KDE festlegen mv $TR/etc/X11/Xsession.d/45xsession $TR/root/xsession.knx-hdinstall.backup # Display-Permissions f.AN|r xdm/kdm (Bug in Woody?) sed -e 's,DisplayManager\*authorize:.*true,DisplayManager*authorize: false,g' /etc/X11/xdm/xdm-config >$TR/etc/X11/xdm/xdm-config for x in /etc/kde[23]/kdm/kdmrc do sed -e 's,#Authorize=false,Authorize=false,g' $x >$TR/$x done # Hostname setzen case "$ORIG_LANGUAGE" in de|at|ch) T1="Rechnernamen setzen" M1="Geben Sie den Rechnernamen ein (ohne Domain-Anhang):" ;; es) T1="Asignar nombre de host" M1="D.ANi un nombre de host a esta mNaquina (sin el dominio aNqadido):" ;; jp) T1="$B%[%9%HL>$N@_Dj(B" M1="$B$3$N%3%s%T%e!<%?$N%[%9%HL>$r@_Dj$7$^$9!#(B($B%I%a%$%sL>$O4^$^$J$$$G$/$@$5$$(B)" ;; *) T1="Set hostname" M1="Give a host name for this machine (without domain appended):" ;; esac $DIA --backtitle "$BT" --title "$T1" --inputbox "$M1" 15 60 $DEFHNAME 2>$TMP HNAME="`cat $TMP`" [ -z "$HNAME" ] && HNAME=$DEFHNAME cat <$TR/etc/hosts 127.0.0.1 $HNAME localhost # The following lines are desirable for IPv6 capable hosts # (added automatically by netbase upgrade) ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts EOF echo "$HNAME" > $TR/etc/hostname echo "$HNAME" > $TR/etc/mailname # Netzwerkkarte einrichten, wenn vorhanden grep eth0 /proc/net/dev >/dev/null 2>&1 if [ $? = 0 ] ; then ( LANG="$ORIG_LANG" LANGUAGE="$ORIG_LANGUAGE" LC_ALL="$ORIG_LC_ALL" rm -f /etc/resolv.conf touch /etc/resolv.conf netcardconfig ) cp -af /etc/network/interfaces $TR/etc/network/interfaces : >$TR/etc/network/ifstate rm -f $TR/etc/resolv.conf cat /etc/resolv.conf >$TR/etc/resolv.conf fi # Alle Dienste in /etc/inetd.conf deaktivieren cp -af $TM/etc/inetd.conf $TR/etc/inetd.conf # Knoppix-Eintrag aus /etc/sudoers entfernen #cp -af $TM/etc/sudoers $TR/etc/sudoers # jp0.93 $B$G$N=hM}J}K!$rM%@h(B $TM $B$,;H$o$l$J$$$N$O$J$<$+$J!)(B cp -af /etc/sudoers $TR/etc/sudoers # Knoppix-Konfigurationsprogramme entfernen, da sie ohne sudoers sowieso nicht # mehr funktionieren... chroot "$TR" apt-get -q -y --purge remove cupsconfig-knoppix \ knoppix-terminalserver mkdosswapfile-knoppix netcardconfig-knoppix \ rootshell-knoppix saveconfig-knoppix soundcardconfig-knoppix \ sshstart-knoppix startnessus-knoppix wlcardconfig-knoppix \ networkconfig-knoppix # $B$7$+$7!"$3$l$i$r(B purge $B$7$A$c$&$H$?$@$N(B debian $B$K$J$C$A$c$&$J$!!#(B # jp $BHG$K$OF~$C$F$$$J$$%Q%C%1!<%8$b$"$k46$8$J$N$G!"MW%A%'%C%/!#(Bapt $B$G%(%i!<$K$J$k$+$b!#(B # Sprache: /etc/sysconfig/i18n wird in /etc/profile gesourced! mkdir -p $TR/etc/sysconfig #cp -af /etc/sysconfig/i18n $TR/etc/sysconfig/ # i18n $B%G%#%l%/%H%j$,F3F~$5$l$F$k$J$!!"%^%9%?$d%F%s%W%l!<%H$N4X78$b$"$k$N$G(B jp $B$K$"$o$;$k!#(B cp -af /etc/sysconfig/* $TR/etc/sysconfig/ # $B0J2<$O(B jp $BHG$N@_Dj$r%3%T!<$7$F$*$/!#MWD4@0!#(B #cp -af $TM/etc/fstab $TR/etc/fstab mv /ramdisk/var $TR/var ( cp -af $TM/etc/.xsession $TR/etc/kde3/kdm/ ) cp -af $TM/etc/Xsession $TR/etc/kde3/kdm/ mkdir $TR/proc # $B$3$3$O(B 0.30 $BDI2CJ,(B jp $B$K$O$J$$(B # OpenOffice-Sprachen setzen mkdir -p $TR/etc/alternatives rm -f $TR/etc/alternatives/soffice.* cp -af /etc/alternatives/soffice.* $TR/etc/alternatives/ # /etc/hosts.allow weniger restriktiv cp -af $TM/etc/hosts.allow $TR/etc/hosts.allow # "Echtes" /tmp mit Modus 1777 erzeugen rm -rf $TR/tmp mkdir $TR/tmp chmod 1777 $TR/tmp # /etc/mtab als normale Datei erzeugen rm -f $TR/etc/mtab touch $TR/etc/mtab # .ANDndern des Homeverzeichnisses fN|r root auf /root sed -e 's,/home/root,/root,g' /etc/passwd > $TR/etc/passwd # $B>e$N(B OOo $B=hM}ItJ,$H$V$D$+$k!)(B $BMWD4::(B # [jp] Max: replace OpenOffice related shortcuts and add scripts for it. cp -af $TM/applnk/openoffice.desktop $TR/usr/share/applnk/Office/ cp -af $TM/applnk/openoffice.desktop $TR/etc/skel/Desktop/ chown root.root $TR/usr/share/applnk/Office/openoffice.desktop chown root.root $TR/etc/skel/Desktop/openoffice.desktop cp -af $TM/bin/OpenOffice_org $TR/usr/local/bin/ rm -rf "$TR/usr/share/applnk/OpenOffice.org 1.0" # [jp] Max # Erzeugen des Homeverzeichnisses f.AN|r User knoppix # $B$3$3$+$i(B cp -af $TM/etc/filemanagement $TR/etc/skel/.kde/share/apps/konqueror/profiles/ cp -af $TM/etc/kxkbrc $TR/etc/skel/.kde/share/config/ cp -af $TM/etc/kbabelrc $TR/etc/skel/.kde/share/config/ cp -af $TM/etc/Desktop/* $TR/etc/skel/Desktop/ cp -af $TM/etc/kdeglobals $TR/etc/skel/.kde/share/config/ cp -af $TM/etc/kdesktoprc $TR/etc/skel/.kde/share/config/ cp -af $TM/etc/kickerrc $TR/etc/skel/.kde/share/config/ cp -af $TM/etc/.kderc $TR/etc/skel/ cp -af $TM/etc/qtrc $TR/etc/skel/.qt/ rm -rf $TR/etc/skel/office # $B$3$3$^$G(B jp $B$N$_(B rm -rf $TR/home/knoppix # [jp] Max: Remove invalid desktop shortcuts here. rm -f $TR/etc/skel/Desktop/Music rm -f "$TR/etc/skel/Desktop/$B%Q%o!<%]%$%s%H%5%s%W%k(B.ppt" rm -f "$TR/etc/skel/Desktop/$B%(%/%;%k%5%s%W%k(B.xls" rm -f "$TR/etc/skel/Desktop/$B%o!<%I%5%s%W%k(B.doc" # [jp] Max cp -a $TR/etc/skel $TR/home mv $TR/home/skel $TR/home/knoppix chown -R knoppix.knoppix $TR/home/knoppix # Setzen g.AN|ltiger PasswNvrter fN|r die User root und knoppix mittels # chroot-Umgebung case "$ORIG_LANGUAGE" in de|at|ch) echo "Neues Passwort f.AN|r den User root setzen" ;; es) echo "Asigne una nueva contrase.ANqa para el usuario root" ;; jp) echo "$B%7%9%F%`4IM}MQ%f!<%6(B(root)$B$N%Q%9%o!<%I$r@_Dj$7$F2<$5$$(B" ;; *) echo "Set new password for user root" ;; esac chroot $TR passwd root case "$ORIG_LANGUAGE" in de|at|ch) echo "Neues Passwort f.AN|r den User knoppix setzen" ;; es) echo "Asigne una nueva contrase.ANqa para el usuario knoppix" ;; jp) echo "$B0lHL%f!<%6(B(knoppix)$B$N%Q%9%o!<%I$r@_Dj$7$F2<$5$$(B" ;; *) echo "Set new password for user knoppix" ;; esac chroot $TR passwd knoppix # Bei SCSI-System: Erzeugen einer initrd mit ash.static und SCSI-Modul #FIXME: auch bei FSTYPE ext3 und reiserfs INITRD="" SCSIMODS="" mkdir -p $TL1 $TL2 >/dev/null 2>&1 case "$FSCHOICE" in /dev/sd*) mount -t vfat -o loop,ro /cdrom/KNOPPIX/boot.img $TL1 gzip -cd $TL1/miniroot.gz > $TR/miniroot umount $TL1 dd if=/dev/zero of=$TR/ird bs=1k count=$INSIZE mke2fs -F -m 0 -i 1024 -q $TR/ird mount -t ext2 -o loop,ro $TR/miniroot $TL1 mount -t ext2 -o loop,rw $TR/ird $TL2 cp -a $TL1/dev $TL1/etc $TL1/static $TL2 mkdir -p $TL2/proc $TL2/modules for i in `ls $TL1/modules/scsi` do i=${i%.o} if [ -n "`grep $i /proc/modules`" ] ; then SCSIMODS="$SCSIMODS $i" fi done echo "#!/static/sh" >$TL2/linuxrc for i in $SCSIMODS do cp $TL1/modules/scsi/$i.o $TL2/modules echo "insmod /modules/$i.o" >>$TL2/linuxrc done chmod 755 $TL2/linuxrc umount $TL1 umount $TL2 rm -rf $TR/miniroot gzip -9 $TR/ird mv $TR/ird.gz $TR/boot/initrd.gz INITRD=" initrd=/boot/initrd.gz" ;; *) ;; esac # Einrichten von LILO mittels chroot-Umgebung case "$ORIG_LANGUAGE" in de|at|ch) T1="Bootloader einrichten" M1="Soll der Bootloader (LILO) in den Master Boot Record (MBR) geschrieben werden?" ;; es) T1="Instalar cargador de arranque" M1="Quiere instalar el cargador de arranque (LILO) en el master boot record (MBR)?" ;; jp) T1="$B%V!<%H%m!<%@$N@_Dj(B" M1="$B%V!<%H%m!<%@(B (LILO) $B$r%^%9%?%V!<%H%l%3!<%I(B (MBR) $B$K=q$-9~$_$^$9$+!)(B" ;; *) T1="Set up boot loader" M1="Do you want to install the boot loader (LILO) into the master boot record (MBR)?" ;; esac $DIA --backtitle "$BT" --title "$T1" --yesno "$M1" 15 60 x=$? if [ $x = 0 ] ; then LBOOT=${FSCHOICE%%[1-9]*} else LBOOT=$FSCHOICE fi BKERNEL="/boot/vmlinuz-`uname -r`" cat <$TR/etc/lilo.conf boot=$LBOOT vga=791 prompt timeout=50 append = "hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi apm=power-off noapic" # image=$BKERNEL # $B$H$j$"$($:(B jp $B$K$"$o$;$k(B $BKERNEL $B$rMWD4::!#(B image=/boot/vmlinuz label=knoppix root=$FSCHOICE read-only $INITRD ## A Windows installation, example for partition 1 on first IDE harddisk # other=/dev/hda1 # label=dos # optional # table=/dev/hda EOF case "$ORIG_LANGUAGE" in de|at|ch) echo "Der Bootloader (LILO) wird eingerichtet..." ;; es) echo "Instalando el cargador de arranque (LILO)..." ;; jp) echo "$B%V!<%H%m!<%@(B (LILO) $B=q$-9~$_Cf(B..." ;; *) echo "Setting up boot loader (LILO)..." ;; esac lilo -r $TR # LILO-Bootsektor in Datei schreiben (f.AN|r boot.ini von NT/2k) if [ $LBOOT = $FSCHOICE ] ; then dd if=$LBOOT of=$TR/linboot.img bs=512 count=1 fi # Bootdiskette erzeugen case "$ORIG_LANGUAGE" in de|at|ch) T1="Bootdiskette erzeugen" M1="Soll eine Bootdiskette erzeugt werden (empfohlen)?" ;; es) T1="Crear disquete de arranque" M1="Quiere crear un disquete de arranque (recomendado) ?" ;; jp) T1="$B5/F0MQ%U%m%C%T!<$N:n@.(B" M1="$B5/F0MQ%U%m%C%T!<$r:n@.$7$^$9$+!)(B" ;; *) T1="Create boot floppy" M1="Do you want to create a boot floppy (recommended)?" ;; esac $DIA --backtitle "$BT" --title "$T1" --yesno "$M1" 15 60 x=$? if [ $x = 0 ] ; then case "$ORIG_LANGUAGE" in de|at|ch) M1="Legen Sie eine Diskette ein (alle Daten darauf gehen verloren)." M2="Schreibe Bootdiskette..." ;; es) M1="Inserte un disquete en la unidad /dev/fd0 (se perder.ANan todos los datos en Nil)." M2="Escribiendo disquete de arranque..." ;; jp) M1="$B%I%i%$%V(B(/dev/fd0)$B$K%U%m%C%T!<$rF~$l$F$/$@$5$$!#(B($B%U%m%C%T!<$NFbMF$O$9$Y$F>C5n$5$l$^$9(B)" M2="$B5/F0MQ%U%m%C%T!<=q$-9~$_Cf(B..." ;; *) M1="Insert a floppy in drive /dev/fd0 (all data on it will be lost)." M2="Writing boot floppy..." ;; esac $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1" 15 40 echo "$M2" mformat -t 80 -h 2 -s 18 a: # syslinux /dev/fd0 # jp $B$K$O(B -sf $B$,IU$$$F$$$k!#(Bjp $B$K$"$o$;$k!#MWD4::!#(B syslinux -sf /dev/fd0 mount -t vfat /dev/fd0 $TL1 cp $BKERNEL $TL1/vmlinuz [ -n "$INITRD" ] && cp $TR/boot/initrd.gz $TL1 cat <$TL1/syslinux.cfg default knoppix prompt 1 timeout 50 label knoppix kernel vmlinuz EOF echo -n " append root=$FSCHOICE ro vga=791 apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi noapic" >>$TL1/syslinux.cfg if [ -n "$INITRD" ] ; then echo " initrd=initrd.gz" >>$TL1/syslinux.cfg else echo "" >>$TL1/syslinux.cfg fi [ $LBOOT = $FSCHOICE ] && cp $TR/linboot.img $TL1 umount $TL1 fi #echo -n "debug delay... " #read x # Templates entfernen rm -rf $TM # Loopdevices explizit l.ANvsen (sonst ist $FSCHOICE busy) for i in 7 6 5 4 3 2 1 0 do losetup -d /dev/loop$i >/dev/null 2>&1 done # Rootpartition unmounten umount $TR >/dev/null 2>&1 case "$ORIG_LANGUAGE" in de|at|ch) T1="Beendet" M1="Die Installation ist abgeschlossen." ;; es) T1="Finalizado" M1="El proceso de instalaci.ANsn ha terminado." ;; jp) T1="$B40N;(B" M1="$B%$%s%9%H!<%k$r=*N;$7$^$7$?!#(B" ;; *) T1="Finished" M1="The installation process is finished." ;; esac $DIA --backtitle "$BT" --title "$T1" --msgbox "$M1" 15 40 rm -f $TMP exit 0