LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Second hard drive (https://www.linuxquestions.org/questions/debian-26/second-hard-drive-380358/)

DoctorVell 11-05-2005 09:56 PM

Second hard drive
 
Hi there,

I just recently obtained a 40gb hard drive. I went to put it in my system first as a MASTER disk, and tried to boot it up to see what was on it. It gave me an error "PRESS ANYKEY TO REBOOT" so I did, it did the same thing over and over again. So, then I put it as SLAVE disk and put back in my orginal 80gb hard drive (with debian 3.1 unstable version) and the system recognized it as a slave drive with the proper name, size, etc... Well, I am wondering is there a way for me to try and read what is on the drive without destroying the data. I have no idea what is on it (if anything)...I am thinking of incorpating it into my debian system but I just want to make sure there isn't anything important that can be salvaged onto a data DVD.

Thanks...
DoctorVell
:Pengy:

uberNUT69 11-05-2005 10:09 PM

To find out the partitions (if any):
# fdisk -l /dev/hdb
(assuming it's on the same channel as your main drive)
If there were only one partition, it's name would be /dev/hdb1

So, to mount it,
# mkdir /mnt/some_partition
# mount /dev/hdb1 /mnt/some_partition

If there is no boot record (ie. from "press key to reboot") it may be
that the mbr (inc. partition table) has been wiped.
It would be unusual to find a drive that is completely wiped,
so to attempt to recover partitions have a play with gpart.

syg00 11-05-2005 10:19 PM

Quote:

Originally posted by uberNUT69
If there is no boot record (ie. from "press key to reboot") it may be
that the mbr (inc. partition table) has been wiped.
It would be unusual to find a drive that is completely wiped
Agreed - more likely never had a bootloader installed. The above mentioned "fdisk -l" will tell you if it has a valid partition table. Note that if it has been zeroed, fdisk (and cfdisk) will give an "unable to open" message. Try gparted - don't know if Debian approves of that, or if it is on the "no-no" list.

DoctorVell 11-05-2005 10:33 PM

Second hard drive - debian THANKS!
 
Quote:

Originally posted by uberNUT69
To find out the partitions (if any):
# fdisk -l /dev/hdb
(assuming it's on the same channel as your main drive)
If there were only one partition, it's name would be /dev/hdb1

So, to mount it,
# mkdir /mnt/some_partition
# mount /dev/hdb1 /mnt/some_partition

If there is no boot record (ie. from "press key to reboot") it may be
that the mbr (inc. partition table) has been wiped.
It would be unusual to find a drive that is completely wiped,
so to attempt to recover partitions have a play with gpart.

WOW...I did that and it had just Windows installed on it (no idea what version as it wouldn't load)..

THANKS!

DoctorVell 11-05-2005 10:48 PM

Quote:

Originally posted by syg00
Agreed - more likely never had a bootloader installed. The above mentioned "fdisk -l" will tell you if it has a valid partition table. Note that if it has been zeroed, fdisk (and cfdisk) will give an "unable to open" message. Try gparted - don't know if Debian approves of that, or if it is on the "no-no" list.
Here is what I did and the results...
I looked in an .inf file and it said it was NT, so I'm guessing it was my old XP install from a few years back when I had that.

How do I erase the partition and use it for data?

doctorvell:/home/docvell# fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 9537 76605921 83 Linux
/dev/hda2 9538 9729 1542240 5 Extended
/dev/hda5 9538 9729 1542208+ 82 Linux swap / Solaris

Disk /dev/hdb: 40.0 GB, 40037760000 bytes
255 heads, 63 sectors/track, 4867 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 4866 39086113+ 7 HPFS/NTFS

-----------------------

syg00 11-05-2005 11:20 PM

Have a look at this howto - check "man fdisk" as well.

Start with "fdisk /dev/hdb" when you get in, do a "p" and check you are hitting the correct disk.
You will need to delete the current partition (it'll be number 1), then proceed as in the how-to. Up to you whether you use a primary or logical, and the size. If you just want one, I'd make it a primary, and use all the space - just hit enter when prompted.


All times are GMT -5. The time now is 11:00 PM.