LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-12-2007, 08:14 PM   #1
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Rep: Reputation: 55
Lost a partition, cant format hdd!! Help


Lost one partition and then crash, now all I see on fdisk of 16ogb is 15gb... How do I get my hdd back so I can clean it?
 
Old 09-12-2007, 09:23 PM   #2
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Rep: Reputation: 30
Have you tried cdfisk ?

Quote:
Originally Posted by NightSky View Post
Lost one partition and then crash, now all I see on fdisk of 16ogb is 15gb... How do I get my hdd back so I can clean it?
cfdisk will give you a much better overview of your hard disk:
Code:
                                      cfdisk 2.12p

                                  Disk Drive: /dev/hda
                            Size: 40020664320 bytes, 40.0 GB
                  Heads: 255   Sectors per Track: 63   Cylinders: 4865

    Name         Flags        Part Type   FS Type            [Label]         Size (MB)
 ---------------------------------------------------------------------------------------
    hda1         Boot          Primary    NTFS                                 5272.41
    hda2                       Primary    Linux ext2                           1019.94
    hda3                       Primary    Linux ReiserFS                       7567.26
    hda5         Boot          Logical    Linux ReiserFS                        542.87
    hda6                       Logical    Linux swap                           1077.52
    hda7                       Logical    Linux ReiserFS                       4293.60
    hda8                       Logical    Linux ReiserFS                       6284.12
    hda9                       Logical    Linux ReiserFS                      13958.31






     [Bootable]  [ Delete ]  [  Help  ]  [Maximize]  [ Print  ]  [  Quit  ]
     [  Type  ]  [ Units  ]  [ Write  ]

                      Toggle bootable flag of the current partition


usually, your primary hard disk is the default and known as /dev/hda, however in your case it might be: cfdisk /dev/hdd

from your description there's nothing on your hard disk worth saving so just delete the partitions you have and create a whole new scheme. for slackware you'll need at least two partitions (one for root another for swap). check out my thread on how to do a good partition break down (see my signature)

- perry

Last edited by perry; 09-12-2007 at 09:30 PM.
 
Old 09-12-2007, 11:34 PM   #3
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Original Poster
Rep: Reputation: 55
Can't repartition only have 15gb /dev/hdg1

Everything else is gone... don't care about losing anything
just alot of time and effort and my hdd. Need some sleep.
 
Old 09-13-2007, 03:04 AM   #4
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
try test disk if you have lost your partition tables.


What you have posted seems so vague that I can't really help you out.
 
Old 09-13-2007, 07:56 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Quote:
Originally Posted by NightSky View Post
Everything else is gone... don't care about losing anything
just alot of time and effort and my hdd. Need some sleep.
Hi,

Your sig shows the disk as a ATA 160 seagate. Get the diagnostic disk from their web site, that is if you don't have it already. Run it.

You could use the ranish Partition Manager to assist you. If you had copied the fdisk output then you would have the blocks for each partition to assist in the restore if possible.

If the drive is not trashed then you should be able to recover if you want to spend some time with it. Otherwise just use the utilities to repartition and format the drive.
 
Old 09-13-2007, 01:07 PM   #6
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Original Poster
Rep: Reputation: 55
Thanks onebuck

The hdd is new and I just want to recover the space. If I boot with Slackware install disks Setup sees all the partitions but when I reboot nothing works and if I try fdisk it doesn't see anything but root directory.

If I can get into the 15g root directory how can I I format
from there? I don't know what utilities u are referring to
am looking at partition manager and segate disk now.
 
Old 09-13-2007, 04:56 PM   #7
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Original Poster
Rep: Reputation: 55
Cfdisk only sees 15g root as does fdisk, given that this is a dualboot how to I get Dban to run on the slackware hdd? I can use install disk to boot onto linux hdd. Can't seem to mount fd01. FYI seagate diagnostic sees Slackware hdd from Dos partition and all 6partitions but provides no tools to reformat linux.
 
Old 09-13-2007, 06:08 PM   #8
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Please post the actual commands you are running and the actual output of those commands, as your descriptions are somewhat ambiguous (for example, when you say hdd do you mean /dev/hdd or "hard disk drive", what do you mean fdisk only "sees" the root partition, etc).

Brian
 
Old 09-13-2007, 07:30 PM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Quote:
Originally Posted by NightSky View Post
The hdd is new and I just want to recover the space. If I boot with Slackware install disks Setup sees all the partitions but when I reboot nothing works and if I try fdisk it doesn't see anything but root directory.

If I can get into the 15g root directory how can I I format
from there? I don't know what utilities u are referring to
am looking at partition manager and segate disk now.
Hi,

If you boot the install cd1 and you see the partitions using fdisk then just write the partition table from fdisk with the 'w' command. Then reboot to update the partition table. Reboot with the cd1.

You can then format the partition(s);

Code:
~#mke2fs -c -j -L MyPart1 /dev/hda1    #change to your /dev
                                       #-c check bad block 
                                       #-j journaled ext3
                                       #-L Label
~#mkswap -c /dev/hda2                  #creat swap, don't turn on
You can format all your partition(s) in this manner. I like to reboot after the write of the partition table to update it(old habit).
I will format all my partitions before a install. The reason is to check the hd space and label the partition(s).

You can use the ranish manager to do restore if a IPL(Initial Program Loader) or SPL (Secondary Program Loader) has a problem. It could be worth a try if you had something you must recover.
 
Old 09-13-2007, 07:59 PM   #10
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Original Poster
Rep: Reputation: 55
My hard drive is:
15gb /dev/hdg1 /
40gb /dev/hdg2 /home
E /dev/hdg3 5gb
1gb /dev/hdg5 /swap
2gb /dev/hdg6 /tmp
2gb /dev/hdg7 /var
40gb /dev/hdg4 /home
I boot slackware with install Cd1 I can login as root. At command# fdisk /dev/hdg1
In fdisk program display: It says that I have a 15.2gb hard drive and when I enter P
Fdisk displays no partitions.

I tried cfdisk /dev/hdg1 with the same results. Now since the Slackware12 install cd1 boots right up and Slackware12 Setup has no problem reading the partitions posted here I just kept doing slow formats till I thought it safe to reinstall. I have reinstalled. My question now is: can someone please show me howto look up my partition table so I can see what is there, without entering the fdisk program?
onebuck, can you tell me how I can printout my partition table? Thank you all for your patience with this old lady.
 
Old 09-13-2007, 08:24 PM   #11
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Rep: Reputation: 30
Lightbulb

Quote:
Originally Posted by NightSky View Post
My hard drive is:
15gb /dev/hdg1 /
40gb /dev/hdg2 /home
E /dev/hdg3 5gb
1gb /dev/hdg5 /swap
2gb /dev/hdg6 /tmp
2gb /dev/hdg7 /var
40gb /dev/hdg4 /home
I boot slackware with install Cd1 I can login as root. At command# fdisk /dev/hdg1
In fdisk program display: It says that I have a 15.2gb hard drive and when I enter P
Fdisk displays no partitions.

I tried cfdisk /dev/hdg1 with the same results. Now since the Slackware12 install cd1 boots right up and Slackware12 Setup has no problem reading the partitions posted here I just kept doing slow formats till I thought it safe to reinstall. I have reinstalled. My question now is: can someone please show me howto look up my partition table so I can see what is there, without entering the fdisk program?
onebuck, can you tell me how I can printout my partition table? Thank you all for your patience with this old lady.
this is a little off topic, but what if you have another system, what you could do is use a graphical partitioner like gparted. i just found out today that vector linux's live cd standard edition 5.8 has gparted already to go. just boot off your cdrom and run gparted from there.

the reason i recommend this approach, is that if there is anything wrong with your hard disk, gparted will be the first to find out for sure. you'll find it on it's desktop via right-mouse click!

worth a shot!

- perry
 
Old 09-13-2007, 08:56 PM   #12
lordwolf
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 45

Rep: Reputation: 15
check out your command, you should have typed "fdisk /dev/hdg" and not "fdisk /dev/hdg1".... or is it a typo?
 
Old 09-13-2007, 09:36 PM   #13
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Quote:
Originally Posted by NightSky View Post
My hard drive is:
15gb /dev/hdg1 /
40gb /dev/hdg2 /home
E /dev/hdg3 5gb
1gb /dev/hdg5 /swap
2gb /dev/hdg6 /tmp
2gb /dev/hdg7 /var
40gb /dev/hdg4 /home
I boot slackware with install Cd1 I can login as root. At command# fdisk /dev/hdg1
In fdisk program display: It says that I have a 15.2gb hard drive and when I enter P
Fdisk displays no partitions.

I tried cfdisk /dev/hdg1 with the same results. Now since the Slackware12 install cd1 boots right up and Slackware12 Setup has no problem reading the partitions posted here I just kept doing slow formats till I thought it safe to reinstall. I have reinstalled. My question now is: can someone please show me howto look up my partition table so I can see what is there, without entering the fdisk program?
onebuck, can you tell me how I can printout my partition table? Thank you all for your patience with this old lady.
Hi,

Quote:
I boot slackware with install Cd1 I can login as root. At command# fdisk /dev/hdg1
You should do a 'fdisk /dev/hdg'. You want to work with the device not the partitions on the device.

Quote:
excerpt from 'man fdisk'

fdisk - Partition table manipulator for Linux

SYNOPSIS
fdisk [-u] [-b sectorsize] [-C cyls] [-H heads] [-S sects] device

fdisk -l [-u] [device ...]

fdisk -s partition ...

fdisk -v

DESCRIPTION
Hard disks can be divided into one or more logical disks called parti-
tions. This division is described in the partition table found in sec-
tor 0 of the disk. .... read the rest
You should use the 'man' to get information!

The following;
Quote:
15gb /dev/hdg1 /
40gb /dev/hdg2 /home
E /dev/hdg3 5gb
1gb /dev/hdg5 /swap
2gb /dev/hdg6 /tmp
2gb /dev/hdg7 /var
40gb /dev/hdg4 /home <-- is this a typo?
You are allowed four primary partitions. If your logical partitions are hdg5,hdg6,hdg7 then I assume that hdg4 is the extended partition with 40 GB allocated.

Boot the install cd1 and do a 'fdisk -l >myfdisk'. Post the output 'myfdisk' so we can get a true picture. The command from cli 'fdisk -l' will print the partition information to the screen for you. By redirecting the output to the file 'myfdisk' you will have a means to show us the correct partition information.

If you want to print the information then direct the output to your printer, that is if it is setup. If your machine supports usb then mount a flash and direct it by; 'fdisk -l >/mnt/flash/myfdisk' from the cli.
Then you should be able to move the flash to a working system to post the file.
 
Old 09-13-2007, 10:05 PM   #14
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Quote:
Originally Posted by perry View Post
this is a little off topic, but what if you have another system, what you could do is use a graphical partitioner like gparted. i just found out today that vector linux's live cd standard edition 5.8 has gparted already to go. just boot off your cdrom and run gparted from there.

the reason i recommend this approach, is that if there is anything wrong with your hard disk, gparted will be the first to find out for sure. you'll find it on it's desktop via right-mouse click!

worth a shot!

- perry
Hi,

And it was pointed out to you that the Slackware 12 install cd has the parted available to the user.
 
Old 09-13-2007, 11:14 PM   #15
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Quote:
Originally Posted by NightSky View Post
At command# fdisk /dev/hdg1
In fdisk program display: It says that I have a 15.2gb hard drive and when I enter P
/dev/hdg1 is the first partition on your harddrive. /dev/hdg is the whole hard drive. If you enter "fdisk /dev/hdg1" you are referring only to the first partition. If you enter "fdisk /dev/hdg" (which is what you should do) you should see all the partitions.

Brian
 
  


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
HDD partition recovery - HDD works but no partitions are accessible? stevod333 Linux - Software 6 10-01-2009 05:24 AM
HDD partition lost. xandros DVD + me = lost data lein Linux - General 18 05-22-2007 05:47 AM
HDD/Partition Format. TuxToaster Debian 6 09-15-2004 01:55 PM
How to format & mount 2nd hdd after FedCor1 has been installed on 1st hdd? clay394 Fedora 1 05-18-2004 01:50 PM
cannot format hdd quickk Linux - Hardware 6 07-20-2003 03:33 PM

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

All times are GMT -5. The time now is 07:32 AM.

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