Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> how to mount HD on dedicated server?
post Mar 21 2009, 11:11 AM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 1
Joined: 21-March 09
Member No.: 14,224

Hey all,

I have a dedicated test server (based on Linux 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'm 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
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
mount: you must specify the filesystem type

I tried to get the filesystem by:
rescuecd:~# df -T /dev/hda
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
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
Go to the top of the page
+Quote Post
post Mar 22 2009, 09:38 AM
Post #2

Its GNU/

Group: Support Specialist
Posts: 1,797
Joined: 23-January 03
Member No.: 360

/dev/hda represents the entire drive and can not be mounted. Now the drive is probably divided into one or more partitions which can be determined from the fdisk command.
fdisk -l (that is a small L) Post the output.

There is no standard but typically one has /boot, / and swap partitions. Anything that has an ID 82 or labeled as a swap partition can ignore for the moment. At this time there is basically no way to tell what partition is which. Partition numbers 1-4 are primary and anything >4 is a logical partition. If a partition type is shown as extended then it is in a nutshell a container for logical partitions and can be ignored at this point also.

Now depending on the kernel version many filesystems are temporary (tmpfs) like /dev which are created at boot time but does not represent the physical drive. Your actual filesystems on the hard drive are probably ext3. Use the following to determine the filesystem type:

file -s /dev/hda1 (use the partitions numbers from the output of the fdisk command)

You can mount them like the following example. Make sure you create a directory for each partition as well as using the correct partition number and filesystem type.
mount -t ext3 /dev/hda1 /mnt/hd1

You can mount any filesystem anywhere in the tree. I can not tell what the current work directory was from you post but at the moment it does not matter. You can use the cd command to change it to /mnt like
cd /mnt

If my current working directory was /var then the command "mkdir mnt/hd" will create a directory /var/mnt/hd versus "mkdir /mnt/hd"

I hope my quick explanation made some sense.
You can find more information on the web
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 20th October 2017 - 09:25 AM