LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-05-2005, 09:56 PM   #1
DoctorVell
Member
 
Registered: Aug 2004
Location: San Antonio, Texas USA
Distribution: LinuxMint 21
Posts: 33

Rep: Reputation: 15
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
 
Old 11-05-2005, 10:09 PM   #2
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
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.
 
Old 11-05-2005, 10:19 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
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.
 
Old 11-05-2005, 10:33 PM   #4
DoctorVell
Member
 
Registered: Aug 2004
Location: San Antonio, Texas USA
Distribution: LinuxMint 21
Posts: 33

Original Poster
Rep: Reputation: 15
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!
 
Old 11-05-2005, 10:48 PM   #5
DoctorVell
Member
 
Registered: Aug 2004
Location: San Antonio, Texas USA
Distribution: LinuxMint 21
Posts: 33

Original Poster
Rep: Reputation: 15
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

-----------------------
 
Old 11-05-2005, 11:20 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
Reiser file system / Hard Disk/ Hard Drive Problems Oxyacetylene Linux - Software 4 10-10-2005 02:24 PM
2 hard drive in system mirror 1st hard drive sburns76247 Linux - General 2 12-21-2004 01:47 AM
Grub to access new hard drive and old multi os hard drive ? gedi1 Linux - Hardware 0 06-03-2004 12:01 PM
STUCK--Trying to copy old Hard Drive to new Hard Drive. Please Help tsw Linux - Newbie 8 05-26-2004 02:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 03:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration