SuSE GmbH

SuSE Support Database

Title: PCMCIA: Notebook in miscellaneous networks

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

PCMCIA: Notebook in miscellaneous networks

Applies to

SuSE Linux: Versions since 5.3

Preliminary Remark:

For the following tips and their possible consequences no free installation support is available ! The listed topics are to be understood as annotations only, how a such project could be implemented. It is of ourse possbible to apply your own extensions.

Request:

You want to use a computer (Notebook/Laptop), that has PCMCIA slots in miscellaneous network environments at different times.

Procedure:

The configuration of such a S.u.S.E. Linux system can be done via a mechanism that is part of the PCMCIA subsystem since the beginning. Every desired network configuration is stored as a "scheme" and gets activated at boot time (e.g. directly at the LILO prompt). Detailed information can be found in the PCMCIA documentation (/usr/doc/packages/pcmcia/PCMCIA-HOWTO).

  1. The package "pcmcia" must obviously be installed.

  2. Don't configure the PCMCIA network card with YaST. If you've already done that : Enter the YaST "System Administration" menue and deactivate the network card (eth0): "Network configuration" -> "Network base configuration" .

  3. Store the individual network schemata in /etc/pcmcia/network.opts; e.g. like this :
    # 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"
        # 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"
        # 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
    
    /etc/fstab must contain all "MOUNTS"; don't forget the option noauto !

    All necessary files will be copied to the correct place with the function start_fn .

  4. You should now set some variables to "no" in the /etc/rc.config, since the PCMCIA subsystem is able to activate some special services by itself :
    NETCONFIG=""
    CHECK_ETC_HOSTS=no
    BEAUTIFY_ETC_HOSTS=no
    CREATE_HOSTCONF=""
    CREATE_RESOLVCONF=""
    

  5. Now you still have to create several LILO sections with correct append lines in /etc/lilo.conf so the correct scheme can be started at boot time :
    # 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
    

    You must of course adapt these settings to your local configuration.

  6. Call /sbin/lilo .

  7. Boot the desired scheme by entering either home or suse at the LILO prompt.

----------

See also:

----------

Keywords: PCMCIA, SCHEME, NETWORK, NETZWERK, NOTEBOOK, LAPTOP, ENVIRONMENT

----------

Categories: Configuration , Network , Internet

----------

Feedback welcome: Send Mail to ke@suse.de (Please give the following subject: SDB-ke_pcmcia-scheme)

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

SDB-ke_pcmcia-scheme, Copyright SuSE GmbH, Nuremberg, Germany - Version: 26. Aug 1998
SuSE GmbH - Last generated: 07. Oct 1999 16:48:24 by maddin with sdb_gen 1.00.0