1 (edited by Learning Curve 2010-04-13 09:16:36)

Topic: [SOLVED] Can only format new partition in ntfs or reiser4

I have a Dell dimension which had two 160Gb SATA drives as a RAID.  I now am moving things around and have separated the drives to be used elsewhere.
I used the GParted Live disc to delete the original partitions and create a single partition using the whole drive, showing as 149.01Gb.
I then came to format the new partition and want to use ext3 but every time I try, it errors.
I tried each of the format types listed and the only two which work are reiser4 and ntfs, all of the others error.

During the trial and error process, I started again and tried splitting the drive into two equal partitions.  The result were the same, BUT, the first partition mysteriously gained the label DELLutils.

Is it that Dell, bless them, have put some kind of signature on the drive and that this restricts the format type to ntfs (and reiser4 as a coincidence)?  If this is the case, is there some way I can undo this and then use the format type I want?

Any help would be gratefully received.

Mike

2

Re: [SOLVED] Can only format new partition in ntfs or reiser4

What are the error messages you receive when trying to format?

3

Re: [SOLVED] Can only format new partition in ntfs or reiser4

Hi,
It simply says an error occured, see details for more information.  In the details box I have "expanded" each step which shows only the following;

Format /dev/sda1 as ext3

calibrate /dev/sda1 (ticked)
    path: /dev/sda1
    start: 63
    end: 312496379
    size: 312496317 (149.01 GiB)
set partition type on /dev/sda1 (ticked)
    new partition type: ext3
create new ext3 file system (no entry sign)
    mkfs.ext3 -L ** /dev/sda1
        mke2fs 1.41.10 (10-Feb-2009)
        /dev/sda1 is apparently in use by the system: will not make a file system here!

I don't know why as like I said it will format ntfs and reiser4 under exactly the same conditions.

thanks
Mike

4

Re: [SOLVED] Can only format new partition in ntfs or reiser4

Which version of GParted are you using?  Which Live CD are you using?

Problems with the partition being in use should not occur with the latest GParted Live 0.5.2-1.

5

Re: [SOLVED] Can only format new partition in ntfs or reiser4

gedakc wrote:

Which version of GParted are you using?  Which Live CD are you using?

Problems with the partition being in use should not occur with the latest GParted Live 0.5.2-1.

It is version 0.5.2-1, I downloaded the ISO gparted-live-0.5.2-1.iso from sourceforge.net and have checked the checksum so there should be no corruption or errors.

the machine has an ASRock K7S8X motherboard with Semperon 2600+ chip and 512Mb memory, is running Centos 5.4 (although that is by the by as I'm using live cd), and two hard drives, an IDE system drive and a Seagate ST3160023AS 160Gb SATA drive for data (ex Dell).

Anything else, just let me know,

Mike

6

Re: [SOLVED] Can only format new partition in ntfs or reiser4

When this error occurs, can you open a terminal window and and type in the command:

mount

Then post the results here.

I am curious as to whether the newly created partition is being mounted.  It should be prevented from being mounted by hal-lock, which GParted uses to prevent programs from auto-mounting file systems.

7

Re: [SOLVED] Can only format new partition in ntfs or reiser4

gedakc wrote:

When this error occurs, can you open a terminal window and and type in the command:

mount

Then post the results here.

I am curious as to whether the newly created partition is being mounted.  It should be prevented from being mounted by hal-lock, which GParted uses to prevent programs from auto-mounting file systems.


Hi,
here we go then;

root@debian:~# mount
aufs on / type aufs (rw)
tmpfs on / /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/hdd on /live/image type iso9660 (ro,noatime)
tmpfs on /live/cow type tmpfs (rw,noatime,mode=755)
tmpfs on /live type tmpfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
root@debian:~#

exactly as is, any help?

8

Re: [SOLVED] Can only format new partition in ntfs or reiser4

Hmm... back in comment #3, the message indicated that /dev/sda1 was apparently in use by the system.

create new ext3 file system (no entry sign)
    mkfs.ext3 -L ** /dev/sda1
        mke2fs 1.41.10 (10-Feb-2009)
        /dev/sda1 is apparently in use by the system: will not make a file system here!

From looking through the output of the mount command, I was unable to find any /dev/sda# partition mounted.

I wonder if some previous data on the disk device is causing the problem.

Are you in a position where you could can erase the whole drive, or a whole partition?

If so you could create an unformatted partition, make note of the partition number, and then set the whole partition to zero with the following command:

dd if=/dev/zero of=/path-to-partition-to-erase bs=512

Where /path-to-partition-to-erase is something like /dev/sda1.

After this you could try creating the partitions you want to see if this helps.

9

Re: [SOLVED] Can only format new partition in ntfs or reiser4

gedakc wrote:

Hmm... back in comment #3, the message indicated that /dev/sda1 was apparently in use by the system.

create new ext3 file system (no entry sign)
    mkfs.ext3 -L ** /dev/sda1
        mke2fs 1.41.10 (10-Feb-2009)
        /dev/sda1 is apparently in use by the system: will not make a file system here!

From looking through the output of the mount command, I was unable to find any /dev/sda# partition mounted.

I wonder if some previous data on the disk device is causing the problem.

Are you in a position where you could can erase the whole drive, or a whole partition?

If so you could create an unformatted partition, make note of the partition number, and then set the whole partition to zero with the following command:

dd if=/dev/zero of=/path-to-partition-to-erase bs=512

Where /path-to-partition-to-erase is something like /dev/sda1.

After this you could try creating the partitions you want to see if this helps.


Hi,

As we're both here now I'm letting you know I'm doing it now, so waiting for the zero format to complete.
I do want to use the whole drive and had deleted all partitions right at the beginning then creating a single new partition (#1) I had not created it unformatted before though.

10

Re: [SOLVED] Can only format new partition in ntfs or reiser4

gedakc wrote:

Hmm... back in comment #3, the message indicated that /dev/sda1 was apparently in use by the system.

create new ext3 file system (no entry sign)
    mkfs.ext3 -L ** /dev/sda1
        mke2fs 1.41.10 (10-Feb-2009)
        /dev/sda1 is apparently in use by the system: will not make a file system here!

From looking through the output of the mount command, I was unable to find any /dev/sda# partition mounted.

I wonder if some previous data on the disk device is causing the problem.

Are you in a position where you could can erase the whole drive, or a whole partition?

If so you could create an unformatted partition, make note of the partition number, and then set the whole partition to zero with the following command:

dd if=/dev/zero of=/path-to-partition-to-erase bs=512

Where /path-to-partition-to-erase is something like /dev/sda1.

After this you could try creating the partitions you want to see if this helps.


Hi,

When it had finished I got this;

dd: writing '/dev/sda1': No space left on device
312496318+0 records in
312496317+0 records out
159998114304 bytes (160GB) copied, 3455.58 s, 46.3 MB/s

I then went back into GParted, everything the same, 149.01Gb, same errors, everything except there is now no dell label if I split the drive into two partitions

11

Re: [SOLVED] Can only format new partition in ntfs or reiser4

This problem certainly has me puzzled since I do not know what could have the partition in use.

Would you be able to try again, and when it fails then open a terminal windows and run the following command:

dmesg

I am curious to know if the operating system is reporting any odd actions regarding the drives and the partitions.

12

Re: [SOLVED] Can only format new partition in ntfs or reiser4

gedakc wrote:

This problem certainly has me puzzled since I do not know what could have the partition in use.

Would you be able to try again, and when it fails then open a terminal windows and run the following command:

dmesg

I am curious to know if the operating system is reporting any odd actions regarding the drives and the partitions.

This came back with so much that I can't scroll back to the beginning of the output in the terminal window, it's buffer is full.
I have left out the output that obviously doesn't relate to the drive, ie. ide usb etc. if you want the rest let me know, but there is quite a bit relating to the sda drive so here goes;

[   26.904285] md: md127 stopped
[   26.911865] md: bind<sda>
[   27.753962] fuse init (API version7.13)
[   27.990362] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled
[   27.997865] SGI XFS Quota Management subsystem
[   28.159006] JFS: nTxBlock = 3770, nTxLock = 30165
[ 246.711422]  sda: sda1 sda2
[ 247.224207]  sda: sda1
[ 247.571022]  sda:
[ 247.851573]  sda: sda1
[ 248.309138]  sda: sda1
[ 301.373328]  sda: sda1
[ 321.095339]  sda:
[ 346.972443]  sda: sda1
[ 347.392169]  sda: sda1
[ 395.015048]  sda: sda1
[ 440.973196]  sda: sda1
[ 445.013286]  sda: sda1
[ 479.638183]  sda:
[ 522.252282]  sda: sda1
[ 523.496803]  sda: sda1
[ 596.672461]  sda:
[ 596.853755]  sda: sda1
[ 597.089921]  sda: sda1
[ 613.871681]  sda:
[ 681.108289]  sda: sda1 <>
[ 681.306459]  sda: sda1 < sda5 >
[ 681.559225]  sda: sda1 < sda5 >
[ 710.204118]  sda: sda1 <>
[ 710.353915]  sda:
[ 747.366521]  sda: sda1
[ 747.585904]  sda: sda1
[ 766.782728]  sda: sda1 sda2
[ 767.119597]  sda: sda1 sda2
[ 846.258037]  sda: sda1
[ 846.475817]  sda:
[ 867.871321]  sda: sda1
[ 868.123016]  sda: sda1
[ 903.842606]  sda: sda1
[ 978.744718]  sda: sda1
[ 1000.233272]  sda: sda1
[ 1020.375230]  sda: sda1
[ 1034.430509]  sda: sda1
[ 1090.283099]  sda: sda1
[ 1122.854660]  sda: sda1
[ 1137.621483]  sda: sda1
[ 1153.205978]  sda: sda1
[ 1168.857998]  sda: sda1
[ 1186.456635]  sda: sda1
[ 2585.886314]  sda: sda1
[ 2604.361283]  sda: sda1
[ 2731.397810]  sda: sda1
[ 2747.853579]  sda: sda1
[ 131579.960092]  sda: sda1
[ 131644.110773]  sda: sda1
[ 209921.124485]  sda:
[ 209921.269141]  sda: sda1
[ 209921.472058]  sda: sda1
[ 209955.518833]  sda:
[ 209976.665972]  sda: sda1
[ 221821.798225]  sda:
[ 221904.776636]  sda: sda1
[ 221904.995128]  sda: sda1
[ 221938.608886]  sda:
[ 221989.987461]  sda: sda1
[ 221990.190781]  sda: sda1
[ 222511.823199]  sda:
[ 222644.002313]  sda: sda1
[ 222644.204091]  sda: sda1
[ 222665.013580]  sda: sda1 sda2
[ 222666.292069]  sda: sda1 sda2
[ 222691.176567]  sda: sda1 sda2
[ 222705.751907]  sda: sda1
[ 222705.949173]  sda:
[ 222795.091185]  sda: sda1
[ 250863.387332]  sda: sda1


There you have it, I am fairly new to linux, but not computers, correct me if I'm wrong but if sda has been zeroed and then only 1 partition created using all available free space, surely there shouldn't be any references to sda2 or sda5, only sda1?

before doing this I created the unformatted partition as said and made sure I closed the GParted window, then zeroed the drive in the terminal window, then restarted GParted, tried to format the partition as ext3, then when it failed, I ran dmesg in the terminal window.  Just to clarify in case there may have been something in the method.

13

Re: [SOLVED] Can only format new partition in ntfs or reiser4

It certainly does seem like something is going on with the sda disk device.  As to what is happening, I do not know.

I agree that there shouldn't be any references to sda5 due to the zeroing performed in comment #10.  References to sda2 could arise because when we zeroed the partition above in comment #10,  this would still have left the partition table in the starting sector.  Let's try zeroing that out too if you are okay with loosing all data on the drive.

To zero out the front of the drive, use the following command:

dd if=/dev/zero of=/path-to-disk-device-to-erase bs=512 count=100000

Where /path-to-disk-device-to-erase is something like /dev/sda

Then try your partitioning again.

14

Re: [SOLVED] Can only format new partition in ntfs or reiser4

gedakc wrote:

It certainly does seem like something is going on with the sda disk device.  As to what is happening, I do not know.

I agree that there shouldn't be any references to sda5 due to the zeroing performed in comment #10.  References to sda2 could arise because when we zeroed the partition above in comment #10,  this would still have left the partition table in the starting sector.  Let's try zeroing that out too if you are okay with loosing all data on the drive.

To zero out the front of the drive, use the following command:

dd if=/dev/zero of=/path-to-disk-device-to-erase bs=512 count=100000

Where /path-to-disk-device-to-erase is something like /dev/sda

Then try your partitioning again.

It'll obviously take a little time.  What I also thought of during the day was that when we zeroed the drive it showed a full 160Gb and yet only 149.01 in GParted etc. so to be sure if this doesn't work I will follow up by re zeroing and then without doing anything else shutdown (not restart) and then reboot and carry on from there to be sure that no parameters have been held in memory.  I have learned by bitter experience before that restarting doesn't always do the trick and some changes aren't completed until you fully shutdown.

I'll let you know.

15

Re: [SOLVED] Can only format new partition in ntfs or reiser4

Drive manufacturers list drive sizes as values based on powers of 10 (E.g., 160 GB).
GParted lists drive sizes as values based on computer using powers of 2 (E.g., 149.01 GiB).

Hence
160 GB = 160 x 1000 x 1000 x 1000 = 160,000,000,000 bytes
149.01 GiB = 160 x 1024 x 1024 x 1024 = 149.01 x 1,073,741,824 = 159,998,269,194 bytes

Thus 160 GB = 149.01 GiB (with some rounding errors due to using only 2 decimal precision).  Internally, GParted uses exact values that lie on 512 byte sector values.

16

Re: [SOLVED] Can only format new partition in ntfs or reiser4

gedakc wrote:

Drive manufacturers list drive sizes as values based on powers of 10 (E.g., 160 GB).
GParted lists drive sizes as values based on computer using powers of 2 (E.g., 149.01 GiB).

Hence
160 GB = 160 x 1000 x 1000 x 1000 = 160,000,000,000 bytes
149.01 GiB = 160 x 1024 x 1024 x 1024 = 149.01 x 1,073,741,824 = 159,998,269,194 bytes

Thus 160 GB = 149.01 GiB (with some rounding errors due to using only 2 decimal precision).  Internally, GParted uses exact values that lie on 512 byte sector values.

It's cracked.

I did the new zeroing which reported 51Mb.  Then it error'd as before.
I have just re zeroed the first way returning 160GB then shutdown.  Restarted and formatted the partition as ext3 and it has worked.  It's reporting 2.52Gb used leaving 146.49Gb free so that all seems fine.

I can only assume that somewhere it remembered a parameter maybe as you mentioned earlier about the hal-lock in #7

The other thought I had had during the day which I forgot to mention earlier was that the first thing I did this evening was to try and mount sda1,2,3,4, & 5 to make sure there wasn't anything there.  None of them would mount and sda1 returned the message that it may already be mounted and in use which again was fine.

I don't know if there is anything here useful

17

Re: [SOLVED] Can only format new partition in ntfs or reiser4

Thanks for reporting back, and I am glad that you were finally able to format your hard drive.

Now as to the root cause of the problem....   that is another mystery.

18

Re: [SOLVED] Can only format new partition in ntfs or reiser4

Another user has created a bug report with a problem that is very similar.
Bug 613360 - Gparted 5.1-1 & 5.2-1; will not create Fat32 file system on creating a Partition

19

Re: [SOLVED] Can only format new partition in ntfs or reiser4

gedakc wrote:

Another user has created a bug report with a problem that is very similar.
Bug 613360 - Gparted 5.1-1 & 5.2-1; will not create Fat32 file system on creating a Partition

It could be related, I note the workaround includes a reboot into XP and then back to GParted, it may be that this refreshed the offending memory in the same way as my shutdown.  I have no doubt it will prove to be a right B to find.  I used to work in a computer department where for one thing we wrote software for both standalone and networked PCs in PASCAL and a slight syntax or code error in a subroutine could cause havoc in a variety of situations and be very illusive when trying to find it.

20

Re: [SOLVED] Can only format new partition in ntfs or reiser4

Hi,

A little more info for you, good news and bad depending on how you look at it.

As I had said at the start, this drive was one of a pair in a RAID and that I was separating them.  This obviously meant that I have had a second bite at this cherry.

I took out the drive used above and put it in the machine the second drive was intended for.  I'll copy the files round to suit later.  I did this so that I could repeat the whole process on the same hardware to try and avoid discrepancies.

I first started the machine in CentOS and when into System>Administration>Hardware
I then looked up the details of the drive.  As you will there's masses of it and you can't copy and paste it as I had hoped so I took photos of the screensshowing the whole lot.  If these will be of any use, let me know.

I then restarted into Gparted Live.
This time I noted the existing drive partition configs which were as follows;

Partition / File System / Label / Size / Used / Unused / Flags

/dev/sda1 / fat16 / DellUtility / 62.72 MiB / 7.38 MiB / 55.35 MiB / /
/dev/sda2 / ntfs /  / 146.19 GiB / 13.62 GHiB / 132.58 GiB / boot /
unallocated / unallocated / / 7.84 MiB
/dev/sda3 / fat32 / DellRestore / 2.75 GiB / 2.34 GiB / 419.32 MiB / /

I then deleted all partitions and applied these actions.
I then created the new partition, the whole size available and formatted it as ext3.....successfully

Great news for me the user but bad news for you the developer as it means that there will probably be no gains from the info I collected.

I don't know if it was simply something on the other drive which didn't exist on this one.  As to which drive was which in the original RAID, I'm afraid I don't know so that won't help if that was a factor.

I don't think the fact I applied the deletions before creating the new partition made any difference.  I can't honestly remember now whether I did that first time or not, BUT having had several goes before that effectively happened anyway.

Any help to you?

Mike

21

Re: [SOLVED] Can only format new partition in ntfs or reiser4

Thank you for the additional information.  It does appear strange that the second time you did not encounter any problems at all.  Currently I still do not know why this happened.

22

Re: [SOLVED] Can only format new partition in ntfs or reiser4

Silly I know, but I can't see how to add [SOLVED] to the topic as per the rules, can someone let me know please.

23

Re: [SOLVED] Can only format new partition in ntfs or reiser4

To add [SOLVED] to the topic, edit the initial post, prefix "[SOLVED]" in front of the title, and submit the changes.  wink

24

Re: [SOLVED] Can only format new partition in ntfs or reiser4

gedakc wrote:

To add [SOLVED] to the topic, edit the initial post, prefix "[SOLVED]" in front of the title, and submit the changes.  wink

Thanks, and thanks again for your help, much appreciated,
Mike