============================ Mandrakelinux Network Repair - if your Mini system has no networking ============================ -IAN! idallen@idallen.ca This file explains how to: - fix the Mini system urpmi config file to use the Mini iso database - use urpmi to fetch and install the missing client DHCP package from disk - configure the system to run a DHCP client on both eth0 and eth1 You have a network problem if when you reboot your Mini system you do not see "OK" beside at least one of your network cards (you must have at least one working card), or if you find you cannot ping any nearby hosts, or if you find that "/etc/resolv.conf" is empty, or if you find that "/sbin/ifconfig" fails to show an IPv4 network address for at least one of your network cards eth0 and eth1. (You need at least one working network card with an assigned IP address.) If typing "ifup eth0" or "ifup eth1" (as root) gives an error message: # ifup eth0 Can't find a dhcp client you have a Mini system installed without the necessary DHCP client packages. This needs to be fixed: # rpm -q dhcp-client package dhcp-client is not installed The long way to create a Mini system with DHCP installed is to reboot your installer and re-install the Mini system and when you get to the final Summary page, click on "Configure" for networking. Select DHCP networking for whichever network card (eth0 or eth1) you are using. Then the installer will copy the DHCP packages to your new Mini system. If you already have a Mini system already configured, but are missing the DHCP package "dhcp-client", there is a shortcut way to install it. Of course, since networking isn't working, you can't use the network to fetch the missing package from any Internet sources. Verify and mount your Mini iso file ----------------------------------- Boot the Mini system. Log in as the super user, root. Earlier (described in Notes file mandrake_install.txt), you installed the Mini system iso file in partition three and created a short symlink that points to the iso file. Verify that the symlink still works: # ls -l /mnt/hd/mini.iso lrwxrwxrwx 1 root root 74 Mar 12 15:35 /mnt/hd/mini.iso -> Mandrakelinux-10.1-Official-Mini/Mandrakelinux-10.1-Official-Mini.i586.iso # ls -l -L /mnt/hd/mini.iso -rw-rw-r-- 1 root root 334766080 Mar 12 14:52 /mnt/hd/mini.iso Now create a mount point for this iso file, "loopback" mount the file, check the list of mounted file systems, and make sure you can access the files contained in the iso, including the DHCP package files: # mkdir -p /mnt/mini # mount -o loop /mnt/hd/mini.iso /mnt/mini # df Filesystem Size Used Avail Use% Mounted on /dev/hdc5 984M 299M 635M 33% / /dev/hdc3 658M 627M 0 100% /mnt/hd /mnt/hd/Mandrakelinux-10.1-Official-Mini/Mandrakelinux-10.1-Official-Mini.i586.iso 320M 320M 0 100% /mnt/mini # ls -l -L /mnt/mini/media/main | wc 411 3692 31847 # ls /mnt/mini/media/main/dhcp-* /mnt/mini/media/main/dhcp-client-3.0.1-5mdk.i586.rpm /mnt/mini/media/main/dhcp-common-3.0.1-5mdk.i586.rpm Note the use of the "-o loop" option to mount a file rather than a hard disk partition. You could now use rpm to simply install these two DHCP client packages in your system; but, setting up a working urpmi configuration is more flexible since it automatically selects dependencies for you in case you want to install other missing files into your Mini system. Updating urpmi.cfg in the Mini system ------------------------------------- After you have done a fresh install of Mandrake 10.1 Mini and have booted the Mini system, you will find that the Mandrake urpmi system contains one non-functional media source: # urpmq --list-url Installation Mini CD (disk-iso1) /media/main The above summary comes from the file /etc/urpmi/urpmi.cfg : Installation\ Mini\ CD\ (disk-iso1) /media/main { hdlist: hdlist.Installation Mini CD (disk-iso1).cz with_hdlist: ../../media/media_info/hdlist1.cz key-ids: 70771ff3 } The first field on the first line "Installation Mini CD (disk-iso1)" is the "name" of this media source. The second field "/media/main" is the location of this media source. Since the Mini system has no directory named /media/main, the location is broken and this media source does not work. Here's how to fix it: Having just mounted the Mini iso file on /mnt/mini, edit /etc/urpmi.cfg and fix the media source on the first line of urpmi.cfg to point to the correct mount location that you just created (above): Installation\ Mini\ CD\ (disk-iso1) /mnt/mini/media/main { Write out the fixed urpmi.cfg file and verify that your edit worked: # urpmq --list-url Installation Mini CD (disk-iso1) /mnt/mini/media/main Now request the missing DHCP client using urpmi (note how urpmi automatically detects the dependencies and asks to install them too): # urpmi dhcp-client To satisfy dependencies, the following 2 packages are going to be installed (1 MB): dhcp-client-3.0.1-5mdk.i586 dhcp-common-3.0.1-5mdk.i586 Is this OK? (Y/n) y installing /mnt/mini/media/main/dhcp-client-3.0.1-5mdk.i586.rpm /mnt/mini/media/ main/dhcp-common-3.0.1-5mdk.i586.rpm Preparing... ################################################## 1:dhcp-common ################################################## 2:dhcp-client ################################################## You may also use urpmi to fetch other packages from the Mini system iso; however, the Mini iso contains only a very small subset (about 10%) of all the available Mandrake packages: # urpmq --sources nc /mnt/mini/media/main/nc-1.10-18mdk.i586.rpm # urpmi nc installing /mnt/mini/media/main/nc-1.10-18mdk.i586.rpm Preparing... ################################################## 1:nc ################################################## Once networking is fixed, to gain access to the thousands of packages available to your Mandrake system, upgrade your urpmi system with some external media sources as described in Notes file mandrake_config.txt . Configuring client DHCP on eth0 and eth1 ---------------------------------------- Here is how to configure two network interfaces to request client DHCP at boot time. Change to the system configuation directory and make sure networking is enabled: # cd /etc/sysconfig # cat network NETWORKING=yes Move to the network-scripts subdirectory and make sure client DHCP is requested for both eth0 and eth1: # cd network-scripts # pwd /etc/sysconfig/network-scripts # cat ifcfg-eth0 DEVICE=eth0 BOOTPROTO=dhcp NETMASK=255.255.255.0 ONBOOT=yes # cat ifcfg-eth1 DEVICE=eth1 BOOTPROTO=dhcp NETMASK=255.255.255.0 ONBOOT=yes Create or edit the files ifcfg-eth0 and ifcfg-eth1 so that they contain the above lines. Now, when you ask to bring up a client DHCP network interface, it will work: # ifup eth0 Determining IP information for eth1... done.