[Top][All Lists]

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

Re: Partition codes

From: Andrew Clausen
Subject: Re: Partition codes
Date: Sat, 26 Oct 2002 09:49:28 +1000
User-agent: Mutt/1.4i

On Sat, Oct 26, 2002 at 02:36:12AM +0200, Henrik Treadup wrote:
> I would like to a scripted partitioning of my harddrive (The first step in 
> doing a scripted install of Gentoo :D  ) I've decided to go with parted since 
> the project is very much alive and there are some nice things like SWIG 
> integration on the horizon. Nice work :)


> I've come up with the following script to do the partitioning:
> #start script
> DEVICE= /dev/hda
> # Create new msdos disklabel/partition table
> parted --script mklabel msdos
> #Create boot sector
> parted $DEVICE --script mkpart primary ext2 0 100
> # Create swap partition
> parted $DEVICE --script mkpart primary linux-swap 100 512
> # Create the root partition
> parted $DEVICE --script -- mkpart primary ext2 612 -0

Looks about right.

> What if I want to create any of the following partitions: ext3, xfs, Compaq 
> Diagnostic Partition (partition code 0x12)? Or any other weird partition 
> type? Is there a way to directly set a partitions partition code?


mkpart ext3, xfs, etc. should work properly.  Compaq diagnostic isn't
supported properly, sorry.

> Are the partition codes for all linux fs types just set to 85?

0x83 IIRC.  Yes.  Except LVM/Raid, IIRC.

> Can I just do  
> "parted $DEVICE --script mkpart primary ext2 0 100" for a xfs partition?

You can put xfs there if you want.  But both will work, right.

I personally think partition types should be abolished.
Linux can-and-does figure out the fs by probing.  It ignores partition
types.  (Except LVM, etc.)


reply via email to

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