[Top][All Lists]

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

Determining partition OS; moving from sfdisk to parted

From: Sean McAfee
Subject: Determining partition OS; moving from sfdisk to parted
Date: Fri, 8 Oct 2010 12:53:13 -0700

Hi all--

I'm trying to modify some scripts that use sfdisk to get information about partition tables to use parted instead.  Unfortunately, certain sfdisk concepts don't seem to translate cleanly, or perhaps at all, to parted.

For example, the script tries to determine whether a given partition is associated with Linux by isolating the line in sfdisk's output corresponding to that partition, and checking for the string "Linux".  Similarly, it checks for an NTFS partition by checking for the string "HPFS/NTFS".  Finally, it tries to "mount all partition types except things that are going to fail" (according to a comment), and it finds those partitions by excluding from sfdisk's output lines containing the strings "swap", "Empty", "Linux raid", "extended", "LVM", and "Hidden".

Are these tests expressible at all by parsing parted's output?

Thanks in advance for any help.

reply via email to

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