Bug 585027 - partition type 0xbf considered as swap
partition type 0xbf considered as swap
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: util-linux-ng (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Karel Zak
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-22 19:08 EDT by John Reiser
Modified: 2010-06-14 06:19 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-14 06:19:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Reiser 2010-04-22 19:08:05 EDT
Description of problem: The graphical installer custom partition editor shows a partition type of 0xbf as swap.  0xbf is Solaris [a Solaris "pool" that includes ZFS and others] and NOT swap.  0x82 is the only partition type that is shared between Solaris and Linux swap.


Version-Release number of selected component (if applicable):
anaconda-14.4

How reproducible: every time


Steps to Reproduce:
1. install OpenSolaris to a primary partition using unallocated disk space
2. graphical fresh install rawhide for Fedora 14 from DVD
3. choose basic disks, custom layout
  
Actual results: Solaris partition type 0xbf is labeled as "swap"


Expected results: Solaris partition type 0xbf is labeled as "Solaris" only, and NOT as "swap"


Additional info:
Comment 1 David Lehman 2010-04-22 19:30:51 EDT
We don't pay any attention to the "type" of the partition. udev (via blkid) tells us the device contains swap space, so we show it as swap space. If blkid is mistaken you should reassign this bug to util-linux-ng so they can resolve the problem.
Comment 2 John Reiser 2010-04-22 20:10:47 EDT
Re-assigning to util-linux-ng-2.17.2-3.fc13.x86_64.  blkid has bad assignment of partition Id 0xbf as swap.  fdisk has it correct as Solaris-and-not-swap.  Contrast with partition Id 0x82 in following fdisk output:

# blkid /dev/sdb3
/dev/sdb3: UUID="2d087b96-3f11-4554-9cca-b9560e2487f4" TYPE="swap"
# rpm -qf /sbin/blkid
util-linux-ng-2.17.2-3.fc13.x86_64
# rpm -qf /sbin/fdisk
util-linux-ng-2.17.2-3.fc13.x86_64
#fdisk /dev/sdb
Command: p
Disk /dev/sdb: 164.7 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00070159

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          51      409626   83  Linux
/dev/sdb2              52        7885    62926605    7  HPFS/NTFS
/dev/sdb3   *       13242       15852    20971520   bf  Solaris
/dev/sdb4            7886       13241    43022070    5  Extended
/dev/sdb5            7886        8017     1060258+  82  Linux swap / Solaris
/dev/sdb6            8018       10629    20980858+   0  Empty
/dev/sdb7           10630       13241    20980736+  83  Linux
Comment 3 Karel Zak 2010-04-23 04:40:29 EDT
(In reply to comment #2)
> Re-assigning to util-linux-ng-2.17.2-3.fc13.x86_64.  blkid has bad assignment
> of partition Id 0xbf as swap.  fdisk has it correct as Solaris-and-not-swap. 
> Contrast with partition Id 0x82 in following fdisk output:

The libblkid does not care about partition types at all. It looks for filesystem/raid superblocks.

Maybe you had a swap area on the device and OpenSolaris didn't removed the old swap signature from the device, or so...

> # blkid /dev/sdb3
> /dev/sdb3: UUID="2d087b96-3f11-4554-9cca-b9560e2487f4" TYPE="swap"

Please, try 

  # blkid -p -o udev /dev/sdb3

You can also directly check the swap signature, for example my disk:

  # hexdump -C -s 4086 -n 10 /dev/sda3
  00000ff6  53 57 41 50 53 50 41 43  45 32                    |SWAPSPACE2|
Comment 4 John Reiser 2010-04-23 11:10:12 EDT
# blkid -p -o udev /dev/sdb3
ID_PART_TABLE_TYPE=dos
ID_FS_UUID=2d087b96-3f11-4554-9cca-b9560e2487f4
ID_FS_UUID_ENC=2d087b96-3f11-4554-9cca-b9560e2487f4
ID_FS_VERSION=2
ID_FS_TYPE=swap
ID_FS_USAGE=other

# hexdump -C -s 4086 -n 10 /dev/sdb3
00000ff6  53 57 41 50 53 50 41 43  45 32                    |SWAPSPACE2|

So the partition does have a SWAPSPACE2 label.  However, why does fdisk get a better answer (Solaris-and-not-swap) but blkid get fooled (swap)?  Both fdisk and blkid are from the same package util-linux-ng-2.17.2-3.fc13.x86_64.
Comment 5 Karel Zak 2010-04-23 14:36:42 EDT
(In reply to comment #4)
> However, why does fdisk get a better answer (Solaris-and-not-swap) but blkid 
> get fooled (swap)? 

The fdisk reports type of partition, blkid reports filesystem name. The type of filesystem is independent on type of partition.

Note, you can remove the swap signature by wipefs(8) command.
Comment 6 Karel Zak 2010-06-14 06:19:42 EDT
Closing, I guess the problem was resolved (explained).

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