You are Here:   FAQ->Dedicated Servers->Linux Server->Linux Server Recovery->Article #7


How do I mount my drives in the Rescue System?


For Linux Dedicated Servers only!Linux Dedicated Servers Only!
      This DOES NOT include:
arrow 1&1 Beginner arrow 1&1 Dual Starter
arrow 1&1 Home (MS/Linux) arrow 1&1 Dual Standard (MS/Linux)
arrow 1&1 Business (MS/Linux) arrow 1&1 Dual Unlimited (MS/Linux)
arrow 1&1 Business Pro (MS/Linux) arrow 1&1 Dual Business (MS/Linux)
arrow 1&1 Professional (MS/Linux) arrow 1&1 Managed Servers





Your drives should be automatically mounted in the normal boot mode. When booting to the Rescue System, the data on your drive(s) are not mounted automatically. This FAQ may be used as a guide to the procedure however you must ensure that the server is rebooted into the Linux Rescue System first. For more information on how to reboot you machine into the Linux Rescue System, please reference What can I do with the Recovery Tool?

You will also need to log into the server via SSH as the root user. If, when rebooting into the Rescue System, you are given a generated password from the 1&1 Control Panel, use that password instead of your normal root user password.

Step 1:

Once you are logged into your server in the Rescue System via SSH, type fdisk -l to list the current partition tables. In this example, the system is set up using software RAID 1 using two drives - sda and sdb. As you can see below, each of the two drives have the same partitions and then are linked together through Multiple Device Drivers and shown as md1, md5 and md6.

Linux rescue 2.6.27.45 #2 SMP Tue Feb 23 16:54:24 UTC 2010 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
rescue~# fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1217     9775521   fd  Linux raid autodetect
/dev/sda2            1218        1461     1959930   82  Linux swap / Solaris
/dev/sda4            1462       19457   144552870    5  Extended
/dev/sda5            1462        2678     9775521   fd  Linux raid autodetect
/dev/sda6            2679       19457   134777286   fd  Linux raid autodetect

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1217     9775521   fd  Linux raid autodetect
/dev/sdb2            1218        1461     1959930   82  Linux swap / Solaris
/dev/sdb4            1462       19457   144552870    5  Extended
/dev/sdb5            1462        2678     9775521   fd  Linux raid autodetect
/dev/sdb6            2679       19457   134777286   fd  Linux raid autodetect

Disk /dev/md6: 138.0 GB, 138011869184 bytes
2 heads, 4 sectors/track, 33694304 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md6 doesn't contain a valid partition table

Disk /dev/md5: 10.0 GB, 10010034176 bytes
2 heads, 4 sectors/track, 2443856 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md5 doesn't contain a valid partition table

Disk /dev/md1: 10.0 GB, 10010034176 bytes
2 heads, 4 sectors/track, 2443856 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table
rescue:~#     




If instead you have a server with hardware RAID or no RAID at all you should see output similar to the one below which will only show partitions for one drive.

Linux rescue 2.6.27.45 #2 SMP Tue Feb 23 16:54:24 UTC 2010 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
rescue~# fdisk -l

Disk /dev/sda: 750.1 GB, 750155988992 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1217     9775521   83  Linux
/dev/sda2            1218        1461     1959930   82  Linux swap / Solaris
/dev/sda4            1462       91201   720836550    5  Extended
/dev/sda5            1462        2678     9775521   83  Linux
/dev/sda6            2679       91201   711060966   83  Linux

rescue:~#     
Step 2:

Type the mount command and press ENTER to view the already mounted devices. You should not see any /dev/mdX, /dev/sdX or /dev/hdX devices listed as they are not mounted by default in the Rescue system.

rescue:~# mount
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,qid=5,mode=620)
rescue:~#     
Step 3:

We will now mount the root parition to the /mnt/ folder.

For software RAID, type mount /dev/md1 /mnt to mount the root md partition to the /mnt/ folder.

rescue:~# mount /dev/md1 /mnt
resue:~#     



For hardware RAID, type mount /dev/sda1 /mnt to mount the root sda1 partition to the /mnt/ folder.

rescue:~# mount /dev/sda1 /mnt
rescue:~#     
Step 4:

Type the mount command again to verify that it has mounted correctly as highlighted in red in the output below.

rescue:~# mount
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,qid=5,mode=620)
/dev/md1 on /mnt type ext3 (rw)
rescue:~#     
Step 5:

Type cat /mnt/etc/fstab to output the file to the screen. This is the /etc/fstab file on your hard drive that specifies which folder each md partition should be mounted to. Because we are in the Rescue System and the root partition is mounted to /mnt/ we reference the file as /mnt/etc/fstab.

Each /dev/mdX device will show the correct mount folder directly after. As you can see from the file, /dev/md1 should be mounted to the root or / folder. Since we are using the Rescue System, we can not mount /dev/md1 to the / folder as the Rescue System is using the / folder. Therefore, we mounted /dev/md1 to the /mnt/ folder on the Rescue System and the /mnt/ folder will now essentially be the root folder for the contents of your hard drive.

rescue:~# cat /mnt/etc/fstab
/dev/md1        /               ext3    defaults        1 1
/dev/sda2       none            swap    sw
/dev/sdb2       none            swap    sw
/dev/md5    /usr        xfs     defaults        0 2
/dev/md6    /var        xfs     defaults        0 2
/dev/md7        /home           xfs     defaults,usrquota       0 2
devpts          /dev/pts        devpts  gid=5,mode=620  0 0
none            /proc           proc    defaults        0 0
none            /tmp    tmpfs   defaults        0 0
rescue:~#     


For hardware RAID, the output will be similar to the image below instead.

rescue:~# cat /mnt/etc/fstab
/dev/sda1       /               ext3    defaults,usrquota        1 1
/dev/sda2       none            swap    sw
/dev/sda5    /usr       xfs     defaults        0 2
/dev/sda6    /var       xfs     defaults,usrquota        0 2
devpts          /dev/pts        devpts  gid=5,mode=620  0 0
none            /proc           proc    defaults        0 0
none            /tmp    tmpfs   size=1g         0 0
rescue:~#     
Step 6:

Next we will mount the other devices to the correct folders ensuring that each is preceded with /mnt/ as this is where we mounted the root partition of the hard drive. Use the image below for reference.

rescue:~# mount /dev/md5 /mnt/usr
rescue:~# mount /dev/md6 /mnt/var
rescue:~# mount /dev/md7 /mnt/home
rescue:~#     


For hardware RAID, use the image below for reference instead.

rescue:~# mount /dev/sda5 /mnt/usr
rescue:~# mount /dev/sda6 /mnt/var
rescue:~#     


You should now be able to change directories to the /mnt/ folder and view the entire contents of your hard drive(s)!


Print Article
How useful was this article?
(From 5 = Very Useful to 1 = Not Very Useful at all):
1 2 3 4 5