[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Partition codes
From: |
Henrik Treadup |
Subject: |
Partition codes |
Date: |
Sat, 26 Oct 2002 02:36:12 +0200 |
Hi
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
#end script
which looks about right. I haven't tried this yet. Probably lots of bash
errors. Thats what you get when writing stuff really late. I'm rambling,
sorry.
Anyway I'm running into the following gedanken problem :( How can I set a
partitions partition code?
The only thing I can find in the documentation is "mkpart part-type ..." where
part-type is one of the following:
ext2, fat32, fat16, HFS, linux-swap, NTFS, reiserfs, ufs
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?
Are the partition codes for all linux fs types just set to 85? Can I just do
"parted $DEVICE --script mkpart primary ext2 0 100" for a xfs partition?
Henrik
--
Henrik Treadup address@hidden
- Partition codes,
Henrik Treadup <=