mount problem

duock

Verified User
Joined
Jan 22, 2006
Messages
20
hey guy

i just upgrade my hard disk 200gb to 400gb, and i need restore my backup files. but how to do it??? i know all my files is in hda but how i mount it??

[root@serv dev]# mount hda
mount: can't find /dev/hda in /etc/fstab or /etc/mtab
[root@serv dev]# mount hda /mnt
mount: you must specify the filesystem type
[root@serv dev]#
[root@serv dev]#

can u teach me how to do??

thanks you :mad:
 
You can't mount /dev/hda because it's not a partition; it's a drive. And it's probably not the name of your backup drive anymore; your backup drive used to be called /dev/hda but it's probably called /dev/hdb now.

First check to see the partitions. If you promise to be careful you can run fdisk on a mounted drive (but don't use any commands that will write to the drive or you'll break it.
Code:
# fdisk /dev/hdb
Then once you're in fdisk, the p command will give you a list of all the partitions. Then the q command will exit.

Then you must mount the partitions individually.

Let's say you've got three partitions, and one of them (/hda2) is the swap partition:
Code:
# cd /mnt
# mkdir hda1
# mkdir hda3
# mount /dev/hda1 ./hda1
# mount /dev/hda3 ./hda3
Don't just use the cp command; it'll mess up the permissions and ownership something awful.

There are several command line options you can pass to cp, or you can use tar with piping, to keep the ownerships and permissions right when you do the move. The instructions are beyond the scope of this response; google is your friend.

When you're done moving what you need to move, you can unmount the backup drive:
Code:
# cd /mnt
# umount /dev/hda1
# umount /dev/hda3

Jeff
 
Back
Top