Find the answer to your Linux question:
Results 1 to 10 of 10
Hey all, I have a dedicated test server (based on Linux Debian Sarge) with which I train myself as I'm a newbie ... but it's been cracked as it's not ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    4

    How to mount HD on dedicated server?


    Hey all,

    I have a dedicated test server (based on Linux Debian Sarge) with which I train myself as I'm a newbie ... but it's been cracked as it's not accessible by SSH anymore (password not recognized anymore), I asked my provider to set the rescue CD, so that I can mount my HD and clean and reinstall SSH with a new password. But I struggling with it:

    after logging I'm on the CD driver

    First I search the existing Hard Disk on my machine with:
    rescuecd:~# fdisk -l | grep Disk
    output:
    Disk /dev/hda: 20.4 GB, 20404371456 bytes

    I created a new directory "mnt/hd" on the root, and I asked to mount the HD with :
    rescuecd:~# mount /dev/hda /mnt/hd
    output:
    mount: you must specify the filesystem type

    I tried to get the filesystem by:
    rescuecd:~# df -T /dev/hda
    output:
    Filesystem Type 1K-blocks Used Available Use% Mounted on
    tmpfs tmpfs 10240 2568 7672 26% /dev

    Apparently the file system is "tmpfs", so I called the mount command with this parameter:
    rescuecd:~# mount -t tmpfs /dev/hda /mnt/hd

    this time no output, so I guess everything is ok, I check the HD is well mounted with:
    rescuecd:~# df
    output:
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/hda 257712 0 257712 0% /var/mnt/hd

    Apparently it's mounted on /var/mnt/hd and not on /mnt/hd as I requested
    but those folders are empty!

    I'm not sure to use the right method, I tried to get a good tutorial for Linux Sarge platform via Google but found nothing.
    Does anyone know a good link or can give the right procedure?

    Thanks in advance

  2. #2
    Linux User Daan's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    323
    You might want to have look at /etc/mtab to see what is mounted and where it is mounted.

    Code:
    # cat /etc/mtab
    OS's I use: Debian testing, Debian stable, Ubuntu, OpenSuse 12.1, Windows 7, Windows Vista, Windows XP

  3. #3
    Just Joined!
    Join Date
    Mar 2009
    Posts
    4
    Hey Daan,

    Thanks for your answer, In the /etc/mtab file I can see this line:
    /dev/hda /var/mnt/hd tmpfs rw 0 0

    So I believe the HD is mounted on /var/mnt/hd but this folder is empty.
    I don't know yet how I can access to my HD ... any idea?

  4. $spacer_open
    $spacer_close
  5. #4
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    I think you should try this:
    fdisk -l
    Do not use grep on this because it will not show the partitions. You may have partitions that you need to mount and not just the whole disk.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  6. #5
    Just Joined!
    Join Date
    Mar 2009
    Posts
    4
    Thanks very much MikeTbob!

    Thanks to this command I can see there are 2 partitions:
    Device Boot Start End Blocks Id System
    /dev/hda1 1 2352 18892408+ 83 Linux
    /dev/hda2 2354 2480 1020127+ 82 Linux swap / Solaris

    I tried to mount hda1 with:
    mount -t tmpfs /dev/hda1 /mnt/hd

    according to the /etc/mtab file, it's mounted on var/mnt/hd but this folder is empty

    then I unmounted hda1 and mounted hda2:
    mount -t tmpfs /dev/hda2 /mnt/hd

    unfortunately I have the same result, the folder var/mnt/hd is still empty ... any idea?

  7. #6
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    try this
    Code:
    mount -t ext3 /dev/hda1 /mnt/hd
    then browse to the /mnt/hd folder again.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  8. #7
    Just Joined!
    Join Date
    Mar 2009
    Posts
    4
    MikeTbob you are my HERO!!!!!!!!

    It works!!!!!!!!!!!!!!! Thanks soooooooo Much!!!!!!!!!

    but ..... How have you found that I was supposed to put 'ext3' as parameter?

    Now I have to check what's wrong with my SSH server
    Thanks once again

  9. #8
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Filesystem ID=83 which=ext3
    /dev/hda1 1 2352 18892408+ 83 Linux
    You are welcome.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  10. #9
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,763
    Quote Originally Posted by MikeTbob View Post
    Filesystem ID=83 which=ext3
    /dev/hda1 1 2352 18892408+ 83 Linux
    You are welcome.


    Partition ID *does not equal filesystem.*

    Example:

    Code:
    fdisk -l
    
    Disk /dev/sda: 120.0 GB, 120034123776 bytes
    255 heads, 63 sectors/track, 14593 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x44456654
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1        1913    15361888+   7  HPFS/NTFS
    Partition 1 does not end on cylinder boundary.
    /dev/sda2            1913        3218    10485720    7  HPFS/NTFS
    Partition 2 does not end on cylinder boundary.
    /dev/sda3   *        3219        3231      104422+  83  Linux
    /dev/sda4            3232       14593    91265265    f  W95 Ext'd (LBA)
    /dev/sda5            3232        3362     1052226   82  Linux swap / Solaris
    /dev/sda6            3363        5973    20972826   83  Linux
    /dev/sda7            5974       12501    52436128+  83  Linux
    /dev/sda8           12502       14593    16803958+  83  Linux
    /dev/sda2 = ext2
    /dev/sda6 = reiserfs
    /dev/sda7 = xfs
    /dev/sda8 = encrypted

    Partition types don't even have to be *close* to the filesystem. An "83" partition could just as easily have an NTFS filesystem on it.

    MikeTbob simply took a guess.

  11. #10
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Quote Originally Posted by HROAdmin26 View Post


    Partition ID *does not equal filesystem.*

    Example:

    Code:
    fdisk -l
    
    Disk /dev/sda: 120.0 GB, 120034123776 bytes
    255 heads, 63 sectors/track, 14593 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x44456654
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1        1913    15361888+   7  HPFS/NTFS
    Partition 1 does not end on cylinder boundary.
    /dev/sda2            1913        3218    10485720    7  HPFS/NTFS
    Partition 2 does not end on cylinder boundary.
    /dev/sda3   *        3219        3231      104422+  83  Linux
    /dev/sda4            3232       14593    91265265    f  W95 Ext'd (LBA)
    /dev/sda5            3232        3362     1052226   82  Linux swap / Solaris
    /dev/sda6            3363        5973    20972826   83  Linux
    /dev/sda7            5974       12501    52436128+  83  Linux
    /dev/sda8           12502       14593    16803958+  83  Linux
    /dev/sda2 = ext2
    /dev/sda6 = reiserfs
    /dev/sda7 = xfs
    /dev/sda8 = encrypted

    Partition types don't even have to be *close* to the filesystem. An "83" partition could just as easily have an NTFS filesystem on it.

    MikeTbob simply took a guess.
    I did think the 83 was the filesystem type, thanks for the clarification.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •