[Parted-maintainers] Bug#299906: parted: mistakes ext2 for fat

A Mennucc mennucc1@debian.org, 299906@bugs.debian.org
Thu, 17 Mar 2005 14:18:59 +0100


On Thu, Mar 17, 2005 at 12:41:39PM +0100, Sven Luther wrote:
> On Thu, Mar 17, 2005 at 12:21:51PM +0100, A Mennucc wrote:
> > On Thu, Mar 17, 2005 at 11:37:36AM +0100, Sven Luther wrote:
> > > On Thu, Mar 17, 2005 at 10:36:07AM +0100, A Mennucc wrote:
> > > > Package: parted
> > > > Version: 1.6.21-1
> > > > Severity: important
> > > > I have a USB memory stick; I have created one partition on it;
> > > > the current layout is 
> 
> > btw: I doubt there is any vfat data around : I filled 
> > the partition with my data almost completely
> 
> The magic marker for fat partition is probably kept, it is just one sector,
> and probably living outside the ext2 accessible data or something.
> 
> > > How do you create the ext2 partition anyway ? 
> > 
> > with  'cfdisk /dev/sda' ; then I did 'mkfs.ext2 /dev/sda1'
> 
> If you had created the ext2 filesystem with parted, it would probably have
> clobbered the old fat on it, not sure though.

before I used cfdisk, the usb stick was 'partionless' :
 /dev/sda itself was one big fat partition
 
> > my usb stick works perfectly well with : 
> > fdisk, cfdisk , mount, etc etc 
> 
> Sure, but you can't use those for resizing.

that is currently my problem

> Something more clever could
> (and maybe should) be done, but this is a post-sarge issue which we need to
> convince upstream of, and would probably require a not-so-small redesign.
> Maybe for parted 1.7 or something.

Unless other people get bitten while 
installing sarge. We will see.
 
> > parted is the only program being fouled
> 
> Because the other blindly follow the partition table. Now if you had changed
> the partition type in the partition table erroneously, parted would not be
> fouled, but the others would, so ...

I see it the opposite way . The other tools use the standard 
approach of looking at the type, and they work OK.

parted tries to be smarter than the rest, and fails. 

so this is a bug in parted 

the best behaviour should be:
1) parted looks at the type in the partition table
2) parted looks inside the partition and tries to guess
3) if the two guesses do not match, parted asks politely

-

thanks a lot for the discussion

a.

-- 
Andrea Mennucc
 "Ukn ow,Ifina llyfixe dmysp acebar.ohwh atthef"