[Colchester] Debian repair

john at cloned.org.uk john at cloned.org.uk
Wed Mar 19 03:21:47 GMT 2008


On Tue, 18 Mar 2008, Wayland Sothcott wrote:

> Hello Colchester,
>
> I am wondering if someone can help. I have a Debian etch server which has 
> been in use for several weeks which now refuses to recognize the network 
> card. The machine networks fine on a live CD and the original Debian network 
> install. Trying a bog standard RTL8139D card is the same problem.
>
> When I do a /etc/init.d/network restart it says
> eth0: ERROR while getting interface flags: No such device
>
> however the card shows up on a lspci

What does dmesg say (/var/log/dmesg for log or just type dmesg on 
console)? I think debian does something weird with mac addresses as I 
swapped the hard drive in a box on sunday (from and two another box 
with a single NIC (but different motherboard)) and it also then broke 
eth0. When booting, dmesg claims:
  eth0: SiS 900 PCI Fast Ethernet at 0xe800, IRQ 11, 00:0d:61:65:1f:96

But I found that if I pretend its eth1, and changed debians network 
interface config to that it works fine:
  eth1: Media Link On 100mbps full-duplex

I vaguelly recollect seeing this a few years ago but don't know what it 
was and not got round to googling it after I fixed it by calling it eth1.

> I am in a dilemma, do I reinstall Debian from the netinstall disk whilst 
> attempting to not format the Hard Drive (one partition then partitioned using 
> LVM) or do I try and fix the fact it does not see the network cards.

See if its the same as above, and if so, Google to find out the proper 
fix!

> Maybe someone could suggest how I could use a 2nd hard drive to backup the 
> /home and /etc and anything else I might need to do before reinstalling.

I would do something along the lines of:

Insert second hard drive.
Boot machine.
Make sure BIOS see's it.
Find out what device its mapped to using dmesg
  - ('dmesg | grep hd' or 'dmesg | grep sd' and some logic should tell you)
fdisk /dev/sdX (or appropriate device)
  - delete everything on it
  - create a new linux partition (it should do linux by default, but you
    can change it to type 83 as required if not)
  - write the config
format the partition
  - (mke2fs -j /dev/sdX1) assuming ext3
wait.
mount the partition
  - (mkdir /mnt/2nd_disk)
  - (mount -t ext3 /dev/sdX1 /mnt/2nd_disk)
copy everything over you want
  - cp -a /home /mnt/2nd_disk
cd ~
umount /mnt/2nd_disk

hope this helps.

john



More information about the Colchester mailing list