Wissen, was gut ist. Studieren in Chemnitz.






Vorbetrachtungen

Für die Installation, Betrieb und ggf. Reinstallation spielt die Aufteilung der Festplatte (Partitionierung) eine entscheidene Rolle.

TIP Grundsätzlich wird eine Trennung zwischen Systeminstallation und Nutzerdaten empfohlen. Damit wird z.B. die Datensicherung aber auch evtl. erforderliche Reinstallationen bzw. Betriebssystemupgrades erleichtert.

TIP Arbeiten mehrere Nutzer an einem Gerät, müssen die eingesetzten Dateisysteme multiuserfähig sein.

Werden mehrere Betriebssystem wie Linux und Windows auf einem Gerät betrieben, kann sich eine Partition zum Datenaustausch (von beiden Systemen lesbar bzw. schreibbar) als nützlich erweisen. Alternativ gibt es zusätzliche Werkzeuge für den Zugriff auf ext2, ext3 -Dateisysteme von der Windowsplattform sowie ntfs -Dateisysteme von Linuxplattformen:

ALERT! Beachte: Filesystem-ACL werden von diesen Tools i.A. nicht unterstützt!

Installation von Linux (Linux )

Festplatte vorbereiten

Notebooks verfügen häufig über eine, die ganze Platte einnehmende NTFS-Partition mit einem vorinstallierten Windows. Um für Linux Platz zu schaffen, muss die Windows-Partition verkleinert werden. Im folgenden wird die Partition-Verkleinerung mittels ntfsresize und fdisk unter Steuerung eines KNOPPIX -Linux auf CD oder DVD gezeigt, empfohlen für Windows XP Windows XP.
(Windows Vista Windows Vista enthält eine Funktion zum Verkleinern eines Volumes, siehe "Datenträgerverwaltung" und rechte Maustaste.)

# sfdisk -s
/dev/hda:  20044080
total: 20044080 blocks

  • Welche Partition enthält Windows?
# fdisk -l /dev/hda

Disk /dev/hda: 255 heads, 63 sectors, 2480 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      2479  19912536    7  HPFS/NTFS                
  • Wieviel Speicher belegt zur Zeit das NTFS-Filesystem? (Im Beispiel 7851 MB)
# ntfsresize --info /dev/hda1
ntfsresize v1.9.4
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 20390432768 bytes (20391 MB)                          
Current device size: 20390436864 bytes (20391 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 7851 MB (38.5%%)
Collecting shrinkage constrains ...
Estimating smallest shrunken size supported ...
You might resize at 7850958848 bytes or 7851 MB (freeing 12540 MB).
  • Prüfen, ob eine Verkleinerung des NTFS-Filesystems auf 11000 MB möglich ist:
# ntfsresize --no-action --size 11000M /dev/hda1
ntfsresize v1.9.4
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 20390432768 bytes (20391 MB)                          
Current device size: 20390436864 bytes (20391 MB)
New volume size    : 10999996416 bytes (11000 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 7851 MB (38.5%%)
Collecting shrinkage constrains ...
Needed relocations : 265947 (1090 MB)
Schedule chkdsk NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Relocating needed data ...
100.00 percent completed
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
The read-only test run ended successfully.
  • successfully zeigt an, dass die Verkleinerung möglich ist.
  • ALERT! Bei Fehler nicht fortfahren!
  • jetzt wird die Verkleinerung des NTFS-Filesystems vorgenommen:
# ntfsresize --size 11000M /dev/hda1
ntfsresize v1.9.4
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 20390432768 bytes (20391 MB)
Current device size: 20390436864 bytes (20391 MB)
New volume size    : 10999996416 bytes (11000 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 7851 MB (38.5%%)
Collecting shrinkage constrains ...
Needed relocations : 265947 (1090 MB)
WARNING: Every sanity check passed and only the DANGEROUS operations left.
Please make sure all your important data had been backed up in case of an
unexpected failure!
Are you sure you want to proceed (y/[n])? y
Schedule chkdsk NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Relocating needed data ...
100.00 percent completed
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
Syncing device ...
NTFS had been successfully resized on device '/dev/hda1'.
You can go on to resize the device e.g. with 'fdisk'.
IMPORTANT: When recreating the partition, make sure you
  1)  create it with the same starting disk cylinder
  2)  create it with the same partition type (usually 7, HPFS/NTFS)
  3)  do not make it smaller than the new NTFS filesystem size
  4)  set the bootable flag for the partition if it existed before
Otherwise you may lose your data or can't boot your computer from the disk!

  • IDEA! falls sich ntfsresize auch mit "--force" wg. "ungeprüften NTFS" verweigert, dann Windows booten und die NTFS-Partition (beim Hochfahren) prüfen lassen, danach ntfsresize unter Knoppix wiederholen
  • Empfehlung: Integritätstest des verkleinerten NTFS-Filesystems

# ntfsresize --info --force /dev/hda1
ntfsresize v1.9.4
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 10999992320 bytes (11000 MB)                          
Current device size: 20390436864 bytes (20391 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 7851 MB (71.3%%)
Collecting shrinkage constrains ...
Estimating smallest shrunken size supported ...
You might resize at 7850958848 bytes or 7851 MB (freeing 3149 MB).
  • TIP unbedingt Partitionstabelle und MBR auf ein externes Speichermedium sichern (USB-Stick)
  • Annahme: USB-Stick unter /media/usbdisk montiert
# sfdisk -d /dev/hda > /media/usbdisk/notebook_hda.partition_table  
# dd if=/dev/hda of=/media/usbdisk/notebook_hda.mbr bs=512 count=1 
  • Neuanlegen der kleineren Partition mit fdisk
  • die Partition muss etwas größer sein als das erzeugte NTFS-Filesystem
  • plus 140 MB sollte in allen Fällen ausreichen (theoretisch maximale Zylinder-Grösse)
# fdisk /dev/hda

Command (m for help): p

Disk /dev/hda: 255 heads, 63 sectors, 2480 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      2479  19912536    7  HPFS/NTFS

Command (m for help): d
Partition number (1-4): 1

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2480, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-2480, default 2480): +11140M 

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 7
Changed system type of partition 1 to 7 (HPFS/NTFS)

Command (m for help): a
Partition number (1-4): 1

Command (m for help): p

Disk /dev/hda: 255 heads, 63 sectors, 2480 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      1355  10884006    7  HPFS/NTFS

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
  • TIP nochmal Test der NTFS Integrität durchführen
# ntfsresize --info --force /dev/hda1
ntfsresize v1.9.4
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 10999992320 bytes (11000 MB)                          
Current device size: 11145222144 bytes (11146 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 7851 MB (71.3%%)
Collecting shrinkage constrains ...
Estimating smallest shrunken size supported ...
You might resize at 7850958848 bytes or 7851 MB (freeing 3149 MB).
  • Reboot und kontrollieren, ob Windows startet
  • falls Windows nicht startet: siehe Troubleshooting

Installation (Linux FC_6_X86)

  • Image Boot-CD aus dem Netz laden (Fedora Core 6 unter http://wftp.tu-chemnitz.de/pub/linux/fedora-core/6/i386/os/images/boot.iso) und auf eine CD brennen
  • von dieser CD booten und den Anweisungen folgen (siehe auch Fedora- Installationsbeschreibung)
  • zu beachten sind folgende empfohlene Einstellungen
    • Installationsquelle: FTP
    • Netzwerkkonfiguration: dynamisches dhcpd wählen
    • Name des FTP-Servers: ftp.tu-chemnitz.de
    • Fedora Core Verzeichnis: /pub/linux/fedora-core/6/i386/os
    • Paketmenge Empfehlung: maximale Paketmenge
      • Installationstyp: Benuterdefiniert/Costume
      • Auswahl der Paketgruppen (ganz unten): Alles
    • Partitionierung: Manuelles Partitionieren mit Disk Druid mit folgenden Parametern
      Einhängepunkt Grösse Bemerkung
      /.afscache =1 Gb openafs-Datenbereich
      swap =2*Ram Auslagerungsbereich
      / >10Gb Systemverzeichnis
      /home Restspeicher Nutzerdaten
    • Konfiguration der Firewall: Aktiviere Firewall, Fernanmeldung (SSH)
    • SELinux aktivieren: Aktiv