Can't format partitions

hi

I have a pretty weird problem, which is that I can’t format any partitions anymore.

It started when my laptop suddenly froze and I killed it (I just ran FF, IRC client, Kopete, … and I think the last thing I did was plugging in a USB drive). When I wanted to boot the machine again it gave me a lot of errors that the root and the home partitions are both corrupted.

Repairing the system with the DVD didn’t help at all and finally I removed all the partitions to reinstall the whole system.

During the installation it can create the partitions, but it can’t format them with ext4.

I tried to format the partitions with a live CD and YaST Partioner and the same problem showed up:

“Error Code: -3008”
“/sbin/mke2fs -O dir_index -t ext4 -v '/dev/mapper/cr_sda1”:
ext2fs_mkdir: Attempts to read block from filesystem resulted in short while creating root dir"

I did a smart check and it told me that my hard disk is ok.


# fdisk /dev/sda
Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       13969   112205961   83  Linux 
/dev/sda2           13970       16580    20972857+  83  Linux 
/dev/sda3           16581       16841     2096482+  82  Linux swap / Solaris
/dev/sda4           16842       19457    21013020   83  Linux

I set up 4 partitions 1 /home , 1 root, 1 swap and one empty partition for BackTrack4 (they are in the list above in order)

Using BackTrack4 to format the partitions gave me the same error.

You can only have 4 primary partitions on a drive, that is the max. You can how ever have an extended partition which allows you to add more partition in the extended partition. I think 15 in extended is the limit but I could be wrong. To do this for this disk you pretty much have to start from scratch.

Install swap and root in first and second primary partitions then create an extended with the rest of the disk and add Linux home to the extended. Note this is just a suggestion there are tons of ways to do it.

yeah, but even if there are no partitions at the beginning it gives me the error during the installation with the DVD

You could check to see what tools are available from the manufacturer of your disk for checking and wiping the disk clean.

dvhenry adjusted his/her AFDB on Sun 11 April 2010 02:36 to write:

>
> You could check to see what tools are available from the manufacturer of
> your disk for checking and wiping the disk clean.
>
>

Either try the manufacturers tools like dvhenry says or d/load something
like UBCD:

http://www.ultimatebootcd.com/

This has tools for near enough everything you could need to check your
hardware and software on a pc.

I use the DVD beta version which has also got a mini linux distro on so you
can use FF to browse and search online ( if it supports your hardware )
while you test the disks.

http://www.ultimatebootcd.com/forums/viewtopic.php?t=2131

I would suggest that if you have no other O/S and your system does not have
a restore partition or special boot partition, as laptops have from the
manufacturer then using the appropriate tool for you drive manufacturer on
the UBCD you might need to Low Level format the disk to reset any spurious
errors and bring it back to as it was when made.

I had to low level a friends drive the other day, in his (oldish) system he
had 2 drives on the same IDE cable, one decided to die one booting the
machine and in the process completely wiped the MBR and bootsector of his
other drive, luckily they were just data disks so no real loss ( well it
would have been had he kept regular backups ) :slight_smile:

So I just removed the bad one and did a low level on the good one and he was
up and running again.

Standard disclaimer:

However please do not just jump in and do it straight away, I have known it
to completely b0rk a drive, the software is fine but if the drive has any
hidden partitions or is just slightly customised it can be made unbootable
so please take time to test with the normal tools and checks and formats
first before going down that route I would hate to be the cause of you ending
up with a nice shiny brick/doorstop :slight_smile:

HTH


Mark
Caveat emptor
Nullus in verba
Nil illegitimi carborundum

thanks for your reply. I I don’t know how was able to install BackTrack4 on one of the partitions, but that was it.

I tried UBCD, but it didn’t really work (or I did something wrong). I installed the 4.1.1 version on my USB stick and booted it live, but all the Low Level Format Programs are just editors and don’t do much :disapointed: (or I do something wrong).

Unfortunately I didn’t find any applications from the manufacturer.

Is there a difference between wiping tools and low level formating?

Have you tried Parted Magic?
Downloads

Using Parted Magic an Introduction - openSUSE Forums

Formatting is relatively quick.
A disk wipe can take some time. It basically goes over the entire disk with ones and zeros.

What make and model hard disk

lsscsi

I think most manufactures provide some utilities.

STS301 adjusted his/her AFDB on Sun 11 April 2010 05:16 to write:

>
> thanks for your reply. I I don’t know how was able to install BackTrack4
> on one of the partitions, but that was it.
>
> I tried UBCD, but it didn’t really work (or I did something wrong). I
> installed the 4.1.1 version on my USB stick and booted it live, but all
> the Low Level Format Programs are just editors and don’t do much
> :disapointed: (or I do something wrong).
>
> Unfortunately I didn’t find any applications from the manufacturer.
>
> Is there a difference between wiping tools and low level formating?
>
>

Yep Low level is not used so much now it is normally dome in the factory, it
lays the whole structure onto the platters and different parameters can be
set for offsets and stuff, it is usually the last option if a disk refuses to
play nicely with just a normal format.

The reason I suggested the Beta version of UBCD 5 is that if you prefer it
has the small distro which is a frontend to gparted this give you a lot of
options when dealing with a misbehaving disk like fixing the MFT and such
also you can browse with FF to make sure you do not use the wrong options
and brick the drive.

And also version 5 has some of the more updated manufacturers disk tools.

What make of disk is it?

Seagate, Fuji, Matrox, WD etc…?


Mark
Caveat emptor
Nullus in verba
Nil illegitimi carborundum

It is a Seagate ST9160827AS. I found now tools from Seagate (I searched before on the ASUS page and of course I didn’t find anything there), but they are just available for Windows.

I am going to try the new UBCD and then Parted Magic.

If all else fails, you can pick up a replacement drive to keep the notebook alive and well. Let’s hope you don’t have to go down that route though ok.

Formatting errors as in straight refusal are sometimes a sign of bad info in the partition table like when a partition doesn’t end on a sector boundary (windows has a habit of creating this error). If partitions try to overlap due to this bad info it can stop you from formating a partition since the overlap causes a format error.

I had a ext4 /home suddenly trash followed by / at next boot claiming “can’t find valid ext2 filesystem”. Tried repair tools on DVD with no go. Removed all Linux partitions and re-created them still with no go. Formatting just refused flatly. Totally cleared the drive (no partitions) and powered off (important step on toshiba to clear bios cache). Powered on and re-installed everything without problem (but did switch to more stable ext3 rather than the ext4 which has failed strangely on 4 machines).

http://http://www.seagate.com/ww/v/index.jsp?locale=en-US&name=SeaTools&vgnextoid=720bd20cacdec010VgnVCM100000dd04090aRCRD

SeaTools for DOS,Burn to CD or floppy and boot from that.

@baskitcase: I tried the beta now, but unfortunately it didn’t bring me any further. There are a few tools which I don’t know there exact purpose of and don’t know how to use them. Do you maybe have a tutorial which could help me how to low level format the disk?

@caf4926: Thanks for the link. It is a great distro, but it just provides Gparted which has a every formatting tool else problems.

@techwiz03: How did you wipe your disk?

@dvhenry: Thanks man, I think I overlooked that. I will try it out as soon as I can.

@caf4926: Thanks for the link. It is a great distro, but it just provides Gparted which has a every formatting tool else problems.

Actually, it supplies a bit more.

Programs

“wipe” may be worth a try.

My suggestion of using the manufacturers supplied tools as an initial starting point, is that they know the electronics connected to the disk, and the on disk software built in to run it.

I had a ext4 /home suddenly trash followed by / at next boot claiming “can’t find valid ext2 filesystem”. Tried repair tools on DVD with no go. Removed all Linux partitions and re-created them still with no go. Formatting just refused flatly. Totally cleared the drive (no partitions) and powered off (important step on toshiba to clear bios cache). Powered on and re-installed everything without problem (but did switch to more stable ext3 rather than the ext4 which has failed strangely on 4 machines).

On the other hand my experience with ext3, on only one machine had me reverting to ext2 until ext4 was ready! I’m happy to try ext4 on the others.

In my case, I used a live CD to delete the partitions all of them then removed the live cd and shut off the PC so the bios cache wouldn’t hold any of the previous hdd partition info. To my knowledge only Toshiba and IBM-Lenova use a bios cache that stays active between reboots but a friend told me his compaq also remembers prior partition info so he also has to do a direct power off after a partition table change.

I just tried the manufacturer tool and it failed. It showed me during scans error which it couldn’t repair, but even when I tried to wipe the disk it showed errors and wasn’t even able to do that… :frowning:

I’ll have to try something else to wipe the disk.

@techwiz03: Well I already removed all partitions but it didn’t help anything.

My problem are bad superblocks.

If the manufacturers tool also fails I would say the drive is bad and even a low level format will not bring it back. Bad superblocks will stop any attempt to restore the drive. The drive’s geometry (sectors, clusters, tracks, plattons) can’t be resolved.

Are you serious? I didn’t actually do anything harmful to the disk. I just killed it once, rebooted and then the problems appeared??

You think that you needed to do something? Disk drives die every day. I use a commercial product called Spinrite (Google for it) It will bring back disks where everything else fails if possible. But it is not a free program and the cost is about the same as a new drive.