how to use parted get partition_type


 
Thread Tools Search this Thread
Operating Systems Linux how to use parted get partition_type
# 1  
Old 09-06-2010
how to use parted get partition_type

I want to use GNU parted for disk partition, but I also hope to get the partition type id by parted. SmilieI can get it from fdisk -l, but I don't know how the parted can get it. The print of the "parted print" only include fstype flags and so on, I hope some help. Thank you.
My English is not so good, I feel so sorry. Smilie
# 2  
Old 09-06-2010
parted mashes partition types and partition flags all together into one 'flag' variable. This may be because parted can edit several partition types, while fdisk is mostly just for MSDOS-type partition systems. If you want to see that kind of low-level detail in the system, use fdisk.

Code:
(parted) help toggle                                                      
  toggle [NUMBER [FLAG]]                   toggle the state of FLAG on partition
        NUMBER

	NUMBER is the partition number used by Linux.  On MS-DOS disk labels,
        the primary partitions number from 1 to 4, logical partitions from 5
        onwards.
        FLAG is one of: boot, root, swap, hidden, raid, lvm, lba, hp-service,
        palo, prep, msftres, bios_grub, atvrecv, diag

This User Gave Thanks to Corona688 For This Post:
# 3  
Old 09-06-2010
Thank you very much for your help. I have resolved this question, the parted analyze the partition type value from MBR or EBR or others, put the value into serval intuitive message by itself, I can acconting the "Type","File system" and "Flags" to get the message I need. I don't know it's right or wrong what I say, thank you again ^_^
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Partition with parted

Hello folks, I have 2.4TB san storage i want to make 4 partition each having 600GB. I use fdisk but not possible to do this because of fdisk limitation. So i tried parted but it make 2.4TB one partition but with parted not possible to make 4 partition having 600GB, may be i m doing wrong, can... (6 Replies)
Discussion started by: learnbash
6 Replies

2. UNIX for Dummies Questions & Answers

Fdisk v/s parted

Just started understanding linux filesystem and partition utilities. I was going though some video tutorials by CBT nuggets and the author was cursing fdisk as fuzzy tool and recommending to use parted instead. In our job environment i have seen almost every one using fdisk utility for... (1 Reply)
Discussion started by: pinga123
1 Replies

3. SuSE

SuSE parted problem

Hello, So, I burned the 5 cds of SuSE 10.1, and would really like to begin installation. But when I get to the partitioning phase, I get an error message saying the first hard drive is unreadable by parted, and that I'll have to use Yast instead. It also tells me I wont be able to move delete... (0 Replies)
Discussion started by: Mudrack
0 Replies
Login or Register to Ask a Question