Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a Debian server (vm's) here at work and the server crashed after a power failure. I can only boot the system in maintenance mode, and the whole file system is set to read only. I can run fsck though maintenance mode, however I would like to get a backup of some files before I do. Problem: I cannot access the net since there is no network connectivity in maintenance mode, and for some reason I try to add a USB flash drive to the computer but I can't find it through the console.

Question: how to you find/mount a usb drive on Debian? I have tried several resources from the internet but nothing worked. Is there any other way I could get a backup of my files? I cannot start networking since the filesystem is set to read only.

Any help would be appreciated.

share|improve this question
When you plug the usb drive it will be detected automatically and you could then find its "device name" in the outuput of dmesg (look for /dev/sdX). – Shadok Jul 2 '12 at 14:12
up vote 2 down vote accepted

You can start networking without a writable filesystem -- you just probably can't use the init scripts to do it (newer versions of Debian use a tmpfs for this, but I'm going to assume you're not using one of those). Just use ip (or ifconfig if that's your bag) to give the interface an IP and bring it up:

ip addr add dev eth0
ip link set eth0 up

If you need to talk to a machine off your local subnet, you can add a default route, too:

ip route add default via dev eth0

Mounting a USB drive on Debian is exactly the same as it is on every other Linux distribution:

mount /dev/sdXN /mnt

You might be hitting limitations due to /etc/mtab not being writable, which is cool, just give mount the -n option.

share|improve this answer
Thanks. Unfortunately, after giving the commands you just mentioned, the network is still not working. Am I missing something? – Spiros Jul 2 '12 at 14:31
Diagnostic information, for starters. – womble Jul 2 '12 at 14:32
It looks like I am half way through. I have used instructions from this website (thanks to your hint for manual configuration) but still there is something missing as there is networking but no connection to the outside world. I am probably missing this line as I am receiving an error * Tell your machine that a hub is ready for information with the command "route add -net netmask eth0. * What exactly does it do? – Spiros Jul 3 '12 at 9:01
Problem Solved! Thanks allot! – Spiros Jul 3 '12 at 9:19
And what was the solution? The key here isn't just asking questions, it's sharing the knowledge. From the look of things, you'd configured your network interface, but failed to set up routing by defining a default gateway. – Dr. Edward Morbius Jul 11 '12 at 0:04

You can make the vm start from an image of any live distro. I dont know if you have kvm, xen or virtualbox /vmwarem, etc. But most would let you start from a cd. With that you can recover most your files, I would recommend rescuecd.
To your other question

how to you find/mount a usb drive on Debian?

With the commands

lsusb, dmesg and with the command mount mount -t vfat /dev/sdXY /mount/point/you/choose

You can even drop the -t vfat, most of the time linux will recognize what type of partition you are using.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.