#128 Issue closed: mkswap fails for RHEL/CentOS 5

Labels: bug

cal-s opened issue at 2012-07-23 12:59:

/USR/layout/prepare/GNU/Linux/14_include_swap_code.sh sets the mkswap command as "mkswap -U" . However, this fails for RHEL/CentOS5, whose mkswap command doesn't accept "-U" as an argument

dagwieers commented at 2012-07-23 22:24:

Yes, I can confirm that on RHEL5/CentOS-5 blkid provides UUID information, but that mkswap cannot create swap partitions with a specific UID.

The solution here is to check the mkswap version using our features framework and based on the version add the -U option where possible. Only during broad distribution tests we can be sure this implementation suffices.

  • RHEL6: mkswap (util-linux-ng 2.17.2) does have -U
  • RHEL5: mkswap (util-linux 2.13-pre7) does not have -U
  • RHEL4: mkswap from util-linux-2.12a does not have -U

According to the util-linux changelog (http://www.kernel.org/pub/linux/utils/util-linux/v2.14/v2.14-rc1-ChangeLog) this was added since v2.14-rc1 (or probably better to use versions newer than 2.13.1.1).

dagwieers commented at 2012-07-24 13:20:

Please test and reopen ticket if issue still exists.

cal-s commented at 2012-07-26 14:44:

As of rear-1.13.0-156-gc350905, i have not seen a repeat of this error


[Export of Github issue for rear/rear.]