[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Help, need to get some files off a partition
- From: Arend Meetsma <arend meetsma org>
- To: enigma-list redhat com
- Subject: Re: Help, need to get some files off a partition
- Date: Thu, 31 Jan 2002 16:18:43 -0700 (MST)
On Thu, 31 Jan 2002, Adam Niemirowski wrote:
>
> Hello,
>
> We had a RH7.1 system get hacked and it messed up the files so that we
> can't boot up the system. We can boot off the CD and go into rescue mode
> and see the files in sysimage. Is there a way I can install RH on a new
> drive, put the old drive as a slave and mount the partitions so I cam copy
> some files off the old partion?
>
> I have a new system setup right now with the old drive as a slave but I
> don't know how to activate the old drive to access it. It does not show
> up in fstab.
Hi Adam,
All you have to do is figure out what drive number you are trying to
mount, make a temp mount point, and mount it...
Figure out what drive number:
Is it IDE? If it is, it must be one of:
hda .. Primary Master
hdb .. Primary Slave
hdc .. Secondary Master
hdd .. Secondary Slave
You said it was slave, so it must be either hdb or hdd.
You have to figure out how many partitions are on your drive. Let's assume
that your drive is hdb. Then if you had three partitions they would be
located at:
/dev/hdb1
/dev/hdb2
/dev/hdb3
/sbin/fdisk will tell you what partitions you have. For example:
[root NIS /mnt]# /sbin/fdisk -l /dev/hdb
Disk /dev/hdb: 255 heads, 63 sectors, 1661 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 1 200 1606468+ 83 Linux
/dev/hdb2 201 550 2811375 83 Linux
/dev/hdb3 551 601 409657+ 82 Linux swap
/dev/hdb4 602 1661 8514450 5 Extended
/dev/hdb5 602 984 3076447 83 Linux
/dev/hdb6 985 1112 1028159+ 83 Linux
/dev/hdb7 1113 1661 4409842 83 Linux
[root NIS /mnt]#
Make a temp mount point in the mnt directory:
as root:
[root NIS /]# cd /mnt/
[root NIS /mnt]# mkdir temp
[root NIS /mnt]#
And mount whichever partition you want:
[root NIS /mnt]# mount /dev/hdb1 temp
[root NIS /mnt]# l temp
total 168
drwxr-xr-x 19 root root 4096 Jan 28 00:08 .
drwxr-xr-x 6 root root 4096 Jan 31 16:06 ..
drwxr-xr-x 2 root root 4096 Dec 10 22:57 bin
drwxr-xr-x 2 root root 4096 Jan 28 00:02 boot
drwxr-xr-x 15 root root 81920 Jan 28 00:08 dev
drwxr-xr-x 46 root root 4096 Jan 31 16:11 etc
drwxr-xr-x 2 root root 4096 Jul 3 2001 home
drwxr-xr-x 2 root root 4096 Jun 21 2001 initrd
drwxr-xr-x 7 root root 4096 Jan 27 23:55 lib
drwxr-xr-x 2 root root 16384 Jul 3 2001 lost+found
drwxr-xr-x 2 root root 4096 Mar 2 2001 misc
drwxr-xr-x 6 root root 4096 Jan 31 16:06 mnt
drwxr-xr-x 2 root root 4096 Aug 23 1999 opt
drwxr-xr-x 2 root root 4096 Jul 3 2001 proc
drwxr-x--- 15 root root 4096 Jan 31 16:06 root
drwxr-xr-x 2 root root 4096 Jan 27 22:02 sbin
drwxr-xr-x 2 root root 4096 Jan 20 17:50 tmp
drwxr-xr-x 2 root root 4096 Jul 3 2001 usr
drwxr-xr-x 19 root root 4096 Jan 27 21:45 var
[root NIS /mnt]#
when you are done, unmount the filesystem:
[root NIS /mnt]# umount temp
[root NIS /mnt]#
Hope this helps,
Arend
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]