Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 453799 - Unable to toggle the 'swap' flag
Summary: Unable to toggle the 'swap' flag
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: parted
Version: 5.2
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Hans de Goede
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2008-07-02 15:24 UTC by David Kovalsky
Modified: 2014-03-31 23:44 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-10-07 07:20:45 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description David Kovalsky 2008-07-02 15:24:26 UTC
I'm tryinto to toggle the 'swap' flag, but parted refuses to accept it. See
reproducer below.

(parted) p

Model: DELL PERC 6/i (scsi)
Disk /dev/sda: 4998GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  107MB   107MB   primary  ext2         boot
 2      107MB   21.1GB  21.0GB  primary  ext3
 3      21.1GB  37.7GB  16.6GB  primary  ext3

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

        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
(parted) toggle 3 swap
Flag to Invert?  boot/hidden/raid/lvm/lba/palo/prep? swap
Flag to Invert?  boot/hidden/raid/lvm/lba/palo/prep?

[root@bordell ~]# uname -a
Linux bordell.englab.brq.redhat.com 2.6.18-92.1.6.el5xen #1 SMP Fri Jun 20
02:51:52 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
[root@bordell ~]# rpm -q parted

Comment 1 Joel Andres Granados 2008-11-05 17:46:46 UTC
In the code it does not appear swap as a valid dos flag to set on msdos labels(parition tables).  It appears as valid for dvh and mac.
This is stated in the code but does not appear to be in the man pages or in the help command.  It be good to place a comment there.

It be also good to write the info node for toggle command.
thx for the report

Comment 2 Hans de Goede 2009-10-07 07:20:45 UTC
This was just (as in yesterday) fixed in Fedora, so it will be fixed in RHEL-6. Given that the changes required are non trivial (not really hard either), and that we are limited on manpower, and that this bug has existed for over a year without any interest from other reporters / users, I'm going to close this as wontfix.

Note You need to log in before you can comment on or make changes to this bug.