SuSE GmbH

SuSE Support-Datenbank

Titel: PCMCIA SCHEMES: Notebook in verschiedenen Netzen

----------

Übersicht o Stichwortsuche o History o Versionen o Kategorien o Alle Artikel
English

----------

PCMCIA SCHEMES: Notebook in verschiedenen Netzen

Bezieht sich auf

SuSE Linux: Versionen ab 5.3

Vorbemerkung:

Für die folgenden Tips und die möglichen Folgen kann kein kostenfreier Installationssupport in Anspruch genommen werden! Die aufgelisteten Punkte sind nur als Hinweise zu verstehen, wie sich ein derartiges Projekt realisieren ließe; eigene Erweiterungen sind selbstverständlich möglich.

Anliegen:

Sie möchten einen Rechner (Notebook/Laptop), der über PCMCIA-Slots verfügt, abwechselnd in verschiedenen Netzumgebungen verwenden.

Vorgehen:

Die Konfiguration eines solchen SuSE Linux Systems kann über einen Mechanismus geschehen, der beim PCMCIA-Subsystem von Hause aus vorgesehen ist. Jede gewünschte Netzkonfiguration wird als ein "scheme" (Schema) hinterlegt und beim Booten (z.B. direkt am LILO-Prompt) aktiviert. Detail-Hinweise sind der PCMCIA-Dokumentation zu entnehmen (/usr/doc/packages/pcmcia/PCMCIA-HOWTO).

  1. Das Paket "pcmcia" muß installiert sein, natürlich.
  2. Konfigurieren Sie die PCMCIA-Netzkarte nicht mit YaST; falls dies bereits geschehen ist: gehen Sie in die YaST-Administration und deaktivieren Sie die Netzkarte (eth0): "Netzwerk konfigurieren" -> "Netzwerk Grundkonfiguration".
  3. Hinterlegen Sie die einzelnen Netzwerk-Schemata in /etc/pcmcia/network.opts; z.B. so:

    # Network adapter configuration
    #
    # The address format is "scheme,socket,instance,hwaddr".
    #
    # Note: the "network address" here is NOT the same as the IP address.
    # See the Networking HOWTO.  In short, the network address is the IP
    # address masked by the netmask.
    #
    case "$ADDRESS" in
    home,*,*,*)
        # Transceiver selection, for cards that need it -- see 'man ifport'
        IF_PORT=""
        # Use BOOTP [y/n]
        BOOTP="n"
        # Use DHCP (via /sbin/dhclient)? [y/n]
        DHCP="n"
        # Use /sbin/pump for BOOTP/DHCP? [y/n]
        PUMP="n"
        # IP address
        IPADDR="192.168.1.11"
        # Netmask
        NETMASK="255.255.255.0"
        # Network address
        NETWORK="192.168.1.0"
        # Broadcast address
        BROADCAST="192.168.1.255"
        # Gateway address
        GATEWAY="192.168.1.2"
        # Local domain name
        DOMAIN="ke.central.de"
        # Search list for host lookup
        SEARCH=""
        # Nameserver #1
        DNS_1=""
        # Nameserver #2
        DNS_2=""
        # Nameserver #3
        DNS_3=""
        # NFS mounts, should be listed in /etc/fstab
        MOUNTS=""
        # For IPX interfaces, the frame type (i.e., 802.2)
        IPX_FRAME=""
        # For IPX interfaces, the network number
        IPX_NETNUM=""
        # Extra stuff to do after setting up the interface
        start_fn () {
          rm -f /etc/hosts
          cp /etc/netenv/hosts-home /etc/hosts
          rm -f /etc/auto.master
          cp /etc/netenv/auto.master-home /etc/auto.master
        }
        # Extra stuff to do before shutting down the interface
        stop_fn () { return; }
        ;;
    suse,*,*,*)
        # Transceiver selection, for cards that need it -- see 'man ifport'
        IF_PORT=""
        # Use BOOTP [y/n]
        BOOTP="n"
        # Use DHCP (via /sbin/dhclient)? [y/n]
        DHCP="n"
        # Use /sbin/pump for BOOTP/DHCP? [y/n]
        PUMP="n"
        # IP address
        IPADDR="192.168.103.11"
        # Netmask
        NETMASK="255.255.255.0"
        # Network address
        NETWORK="192.168.103.0"
        # Broadcast address
        BROADCAST="192.168.103.255"
        # Gateway address
        GATEWAY="192.168.103.1"
        # Local domain name
        DOMAIN="suse.de"
        # Search list for host lookup
        SEARCH="suse.de"
        # Nameserver #1
        DNS_1="192.168.102.1"
        # Nameserver #2
        DNS_2=""
        # Nameserver #3
        DNS_3=""
        # NFS mounts, should be listed in /etc/fstab
        MOUNTS="/home"
        # For IPX interfaces, the frame type (i.e., 802.2)
        IPX_FRAME=""
        # For IPX interfaces, the network number
        IPX_NETNUM=""
        # Extra stuff to do after setting up the interface
        start_fn () {
          rm -f /etc/hosts
          cp /etc/netenv/hosts-suse /etc/hosts
          rm -f /etc/auto.master
          cp /etc/netenv/auto.master-suse /etc/auto.master
        }
        # Extra stuff to do before shutting down the interface
        stop_fn () { return; }
        ;;
    esac
    

    Die "MOUNTS" müssen sämtlichst in der /etc/fstab eingetragen sein; die Option noauto nicht vergessen!

    In der Funktion start_fn werden die jeweils benötigten Dateien an die richtige Stelle kopiert.

  4. Damit das PCMCIA-Subsystem bestimmte Dienste selbständig aktivieren kann, sollte man nun einige Variablen in der /etc/rc.config auf "no" setzen:

    NETCONFIG=""
    CHECK_ETC_HOSTS=no
    BEAUTIFY_ETC_HOSTS=no
    CREATE_HOSTCONF=""
    CREATE_RESOLVCONF=""
    
  5. Nun noch unterschiedliche LILO-Sektionen mit passenden append-Zeilen in /etc/lilo.conf erzeugen, damit das richtige Schema gleich beim Starten angesprungen werden kann:

    # LILO Konfigurations-Datei
    # Start LILO global Section
    boot=/dev/hda
    #compact        # faster, but won't work on all systems.
    read-only
    prompt
    #timeout=50
    vga = normal    # force sane state
    # End LILO global section
    # Linux bootable partition config begins
    image = /boot/vmlinuz
      root = /dev/hda3
      label = home
      append = "SCHEME=home"
    # Linux bootable partition config ends
    # Linux bootable partition config begins
    image = /boot/vmlinuz
      root = /dev/hda3
      label = suse
      append = "SCHEME=suse"
    # Linux bootable partition config ends
    

    Natürlich müssen Sie auch diese Einträge auf Ihre Gegebenheiten abstimmen.

  6. /sbin/lilo aufrufen.
  7. In das jeweilige Schema booten, indem am LILO-Prompt entweder home oder suse eingegeben wird.

----------

Siehe auch:

----------

Stichwörter: PCMCIA, SCHEME, NETWORK, NETZWERK, NOTEBOOK, LAPTOP, ENVIRONMENT

----------

Kategorien: Konfiguration , Netzwerk , Internet

----------

Übersicht o Stichwortsuche o History o Versionen o Kategorien o Alle Artikel
English

----------

SDB-ke_pcmcia-scheme, Copyright SuSE GmbH, Nuremberg, Germany - Version: 20. Aug 1998
SuSE GmbH - Zuletzt generiert: 29. Feb 2000 10:09:36 by sm with sdb_gen 1.00.0