LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Lost a partition, cant format hdd!! Help (https://www.linuxquestions.org/questions/slackware-14/lost-a-partition-cant-format-hdd-help-584291/)

NightSky 09-12-2007 08:14 PM

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?

perry 09-12-2007 09:23 PM

Have you tried cdfisk ?
 
Quote:

Originally Posted by NightSky (Post 2890206)
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

NightSky 09-12-2007 11:34 PM

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.

duryodhan 09-13-2007 03:04 AM

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.

onebuck 09-13-2007 07:56 AM

Quote:

Originally Posted by NightSky (Post 2890305)
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.

NightSky 09-13-2007 01:07 PM

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.

NightSky 09-13-2007 04:56 PM

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.

BCarey 09-13-2007 06:08 PM

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

onebuck 09-13-2007 07:30 PM

Quote:

Originally Posted by NightSky (Post 2890870)
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.

NightSky 09-13-2007 07:59 PM

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.

perry 09-13-2007 08:24 PM

Quote:

Originally Posted by NightSky (Post 2891208)
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

lordwolf 09-13-2007 08:56 PM

check out your command, you should have typed "fdisk /dev/hdg" and not "fdisk /dev/hdg1".... or is it a typo?

onebuck 09-13-2007 09:36 PM

Quote:

Originally Posted by NightSky (Post 2891208)
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.

onebuck 09-13-2007 10:05 PM

Quote:

Originally Posted by perry (Post 2891226)
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.

BCarey 09-13-2007 11:14 PM

Quote:

Originally Posted by NightSky (Post 2891208)
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


All times are GMT -5. The time now is 09:43 AM.