Bug 585027 - partition type 0xbf considered as swap
Summary: partition type 0xbf considered as swap
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux-ng
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-22 23:08 UTC by John Reiser
Modified: 2010-06-14 10:19 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-14 10:19:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John Reiser 2010-04-22 23:08:05 UTC
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 23:30:51 UTC
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-23 00:10:47 UTC
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 08:40:29 UTC
(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 15:10:12 UTC
# 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 18:36:42 UTC
(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 10:19:42 UTC
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.