[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error scripting parted using the mkfs command

From: Joel Granados
Subject: Re: error scripting parted using the mkfs command
Date: Mon, 4 May 2009 13:10:02 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, Apr 30, 2009 at 12:44:16PM -0700, Nathan Boettcher wrote:
> I have been trying to use parted to help automate the creation of a disk 
> image that I can then write to a card/disk/etc.  I use sfdisk to partition 
> the image due to parted's inability to update/create the partition table (or 
> at least I can't figure out how to do it with parted)...part of which is the 
> disk geometry that's needed.  Then I am trying to use parted to set up an 
> ext2 filesystem on the first partition.  Here's an abbreviated example:
> 1) dd if=/dev/zero of=test.dd -> create an empty image that we can then 
> partition and fill
> 2) sfdisk ... test.dd -> creates 2 partitions, both set to ext2
> 3) parted -s test.dd mkfs 1 ext2 -> an attempt to make an ext2 filesystem on 
> partition 1
> Problem is, parted throws the exception that it's going to destroy the data 
> and aborts the operation rather than continuing due to the -s flag.  I have 
> tried every way I can think of to throw a confirmation to parted so it will 
> continue and create the filesystem, but it just won't do it.
> Can someone tell me why it's failing and how I can get it to work?  I've been 
> searching and hammering on this for 2 days already.  I am using parted 1.8.5 
> as it is the only one that will compile on the linux system I'm using.  If 
> this issue is fixed in a later release, I can see about upgrading the 
> dependencies.

I'm guessing you should update to 1.8.8, current release.  That has a
bunch of fixes.  You should update and create the partitions with
parted.  _only_ the partitions.  For filesystem related stuff you should
use utilities like mkfs.ext2 and relatives.

hope it helps.

> Thanks,
> -Nathan
> _______________________________________________
> bug-parted mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-parted

Joel Andres Granados
Brno, Czech Republic, Red Hat.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]