[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Help, need to get some files off a partition



> 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.
> 
> any help would be appreciated.
> Adam

  At a guess, you need to:

mkdir /mnt/old

  then

mount -t ext2 /dev/hdc1 /mnt/old


  "/mnt/old" can be anything you like
  dhc1 may not be correct:
  hda is the master drive on the first IDE controller (first cable)
  hdb is the slave on the first IDE (often is the CD-ROM)
  hdc is the master on the second IDE controller (second cable)
  hdd is the slave on the second IDE

  If your old drive only had Linux on it then it was probably hda1
  so the new drive will most likely be hdc1 or hdb1

  If your old drive has a windows partition on the front then linux
  probably was hda2 (or if you also had a /boot partition it may
  have been hda5)

  basically you can just try mounting over and over again until it
  works and contains what you are looking for e.g.:

umount /mnt/old
mount -t ext2 /dev/hdc2 /mnt/old
ls /mnt/old

umount /mnt/old
mount -t ext2 /dev/hdc5 /mnt/old
ls /mnt/old

  (each time you try mount there is obviously no point in checking
   the directory if mount fails)

  It would almost certainly be one of:
  hda1 hda2 hda3 hda4 hda5
  hdb1 hdb2 hdb3 hdb4 hdb5
  hdc1 hdc2 hdc3 hdc4 hdc5
  hdd1 hdd2 hdd3 hdd4 hdd5

  but of course I have no idea what your system actually is :-)

  If you STILL cannot get it to work, reply to the list with
  the output of two commands:

df

  and

cat /etc/fstab

-- 
-Cheers
-Andrew

MS ... if only he hadn't been hang gliding!





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]