[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sarge Server Minimalinstallation?



Hallo Mathias, *,

Mathias Tauber schrieb:
> ...
> Bei Sarge habe ich jetzt das Gefühl, dass da doch wesentlich
> mehr installiert wird, was ich gar nicht haben will.
>
Das hatte ich schon bei woody!

> Kann man
> das irgendwie schon bei der Installation unterbinden?
>
ja, zumindest bei woody kann ich das. Du kannst ja versuche das auf sarge
anzupassen, falls es nötig sein sollte.

> Mich interessiert jetzt, wie ihr damit umgeht?

Von einer bestehenden Debian Installation (Live-CD, NFS-root oder
Extrapartition) aus:


# Festplatte bootfähig machen
install-mbr /dev/hda

# Festplatte partitionieren
sfdisk /dev/hda < /root/hda.sfdisk

# Filesystem erstellen
mkfs -t ext2 -j /dev/hda3

# SWAP
# mkswap /dev/hd...
# swapon /dev/hd...

# Mountpoint für Installationsziel anlegen
mkdir -p /mnt/install

# Installationsziel mounten
mount -t ext2 /dev/hda3 /mnt/install/

# ggf. weitere Einhängepunkte anlegen,
# fs erstellen und mounten.

# Bezugsquellenliste --> Zielsystem
mkdir -p /mnt/install/etc/apt
grep 192.168 /etc/apt/sources.list >> /mnt/install/etc/apt/sources.list

# Zwischenspeicher für apt anlegen
mkdir -p /mnt/install/var/cache/apt/archives/partial

# Liste verfügbarer Pakete erstellen
mkdir -p /mnt/install/var/lib/apt/lists/partial
mkdir -p /mnt/install/var/lib/dpkg/updates
touch /mnt/install/var/lib/dpkg/status
apt-get -c=/root/apt.conf -qq update

# Alle "Essential"-Pakete holen
apt-get -c=/root/apt.conf -y -d -qq install sysvinit bash \
shellutils fileutils grep sed bsdutils diff findutils gzip \
hostname ncurses-base ncurses-bin perl-base tar textutils
# wer mag, könnte noch versuchen, das weiter einzuschränken

# Pakete entpacken (nur die zu installierenden Daten, kein Konfiguration)
for i in /mnt/install/var/cache/apt/archives/*.deb
   do
      ar -p $i data.tar.gz | tar -xzf - -C /mnt/install
   done

# Liste installierter Pakete erstellen
touch /mnt/install/var/lib/dpkg/available

# dpkg vorlügen es wäre schon auf dem Zielsystem installiert
# Paketstatus eintragen
echo 'Package: dpkg
Version: '`ar -p /mnt/install/var/cache/apt/archives/dpkg_1.9.21_i386.deb
control.tar.gz | zcat | tar -O -xf - ./control | sed -ne 's/^Version:
*//Ip'`'
Status: install ok installed' >> /mnt/install/var/lib/dpkg/status
# !! Von "Version:" bis "*//Ip'`'" eine Zeile!!
# Infodatei anlegen
touch /mnt/install/var/lib/dpkg/info/dpkg.list

# Zeitzone einstellen (wird für Konfiguration von libc6 benötigt)
ln -sf /usr/share/zoneinfo/Europe/Berlin /mnt/install/etc/localtime
# libc6 wird als Abhängigkeit von dpkg installiert
# dpkg installieren
apt-get -c=/root/apt.conf -y -qq install dpkg 

apt-get -c=/root/apt.conf -y -qq install perl-base

apt-get -c=/root/apt.conf -y -qq install bash shellutils \
fileutils grep sed bsdutils diff
apt-get -c=/root/apt.conf -y -q install findutils gzip \
hostname ncurses-base ncurses-bin tar 
apt-get -c=/root/apt.conf -y -qq install textutils
# warum auch immer man die Pakete nicht auf einmal installieren kann

# Gerätedateien anlegen
cp -a /dev/ /mnt/install/
# die braucht man bestimmt nicht alle

apt-get -c=/root/apt.conf -y -qq install sysvinit
# Jetzt sollten alle Essential-Pakete installiert sein

# proc im chroot des Installationsziels verfügbar machen
mkdir -p /mnt/install/proc
mount -t proc proc /mnt/install/proc

# Kernel installieren
apt-get -c=/root/apt.conf -qq install modutils
mkdir -p /mnt/install/boot
ln -s boot/dummy /mnt/install/vmlinuz
apt-get -c=/root/apt.conf -qq install kernel-image-2.2.20-idepci

# LILO installieren
echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > /mnt/install/etc/fstab
cp /root/lilo.conf /mnt/install/etc/lilo.conf
echo -e 'y\n'| apt-get -c=/root/apt.conf install lilo
cp /root/fstab /mnt/install/etc/fstab
chroot /mnt/install lilo

# Lauffähiges System installiert!

# aufräumen
umount /mnt/install/proc
umount /mnt/install/

# Ende der Minimalinstallation
# ---------------------------


in der apt.conf steht:

// $Id: configure-index,v 1.3 2001/02/20 07:03:17 jgg Exp $

// Directory layout
Dir "/mnt/install/"
{
  // Location of the state dir
  State "var/lib/apt/" 
  {
     lists "lists/";
     xstatus "xstatus";
     userstatus "status.user";
     status "/mnt/install/var/lib/dpkg/status";
     cdroms "cdroms.list";
  };
  
  // Location of the cache dir
  Cache "var/cache/apt/" {
     archives "archives/";
     srcpkgcache "srcpkgcache.bin";
     pkgcache "pkgcache.bin";     
  };
  
};

DPkg 
{
   Options {"--root=/mnt/install";};
};
// Ende apt.conf


Jetzt kannst Du alles weitere nach eigenen Vorstellungen installieren.
Deutsche Tastatur wäre nicht schlecht. Netzwerk ist für einen Server
sicherlich auch sinnvoll:-)

Gruß Uli
-- 
Auftragsdatenbank: http://jobjektiv.de/index.html



Reply to: