FS#44349 - [util-linux] sfdisk from util-linux 2.26.1-3 is broken

Attached to Project: Arch Linux
Opened by Dale Blount (dale) - Thursday, 26 March 2015, 15:45 GMT
Last edited by Anatol Pomozov (anatolik) - Monday, 30 March 2015, 15:46 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Anatol Pomozov (anatolik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: I noticed that I can't do a new install today using DOS and MBR via syslinux.

syslinux-install_upgrade -iam reports:

"FAILED to Set the boot flag on /dev/sda1"

After adding debug to the script, I traced it back to sfdisk thinking the disk is in use.


Steps to reproduce:



[root@dale dale]# pacman -S util-linux
resolving dependencies...
looking for conflicting packages...

Packages (1) util-linux-2.26.1-3

Total Installed Size: 8.55 MiB
Net Upgrade Size: 0.19 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [######################] 100%
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
(1/1) checking available disk space [######################] 100%
(1/1) upgrading util-linux [######################] 100%
[root@dale dale]# syslinux-install_update -i -a -m
Syslinux BIOS install successful
FAILED to Set the boot flag on /dev/sda1
[root@dale dale]# pacman -U /var/cache/pacman/pkg/util-linux-2.25.2-1-x86_64.pkg.tar.xz
loading packages...
warning: downgrading package util-linux (2.26.1-3 => 2.25.2-1)
resolving dependencies...
looking for conflicting packages...

Packages (1) util-linux-2.25.2-1

Total Installed Size: 8.36 MiB
Net Upgrade Size: -0.19 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [######################] 100%
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
(1/1) checking available disk space [######################] 100%
(1/1) downgrading util-linux [######################] 100%
[root@dale dale]# syslinux-install_update -i -a -mSyslinux BIOS install successful
Boot Flag Set - /dev/sda1
Installed MBR (/usr/lib/syslinux/bios/mbr.bin) to /dev/sda
[root@dale dale]#
This task depends upon

Closed by  Anatol Pomozov (anatolik)
Monday, 30 March 2015, 15:46 GMT
Reason for closing:  Fixed
Additional comments about closing:  syslinux 6.03-3
Comment by Anatol Pomozov (anatolik) - Thursday, 26 March 2015, 16:24 GMT
I can repro this problem. At the end syslinux-install_update script runs followin command: "sudo sfdisk /dev/sda -A 1"

And here is its output:

Welcome to sfdisk (util-linux 2.26.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Checking that no-one is using this disk right now ... FAILED

This disk is currently in use - repartitioning is probably a bad idea.
Umount all file systems, and swapoff all swap partitions on this disk.
Use the --no-reread flag to suppress this check.

sfdisk: Use the --force flag to overrule all checks.





I guess we need to update syslinux install script
Comment by Anatol Pomozov (anatolik) - Thursday, 26 March 2015, 16:29 GMT
It looks like util-util changed meaning of 'sfdisk -A' flag. It used to be:
-A, --activate[=device_or_number]
Switch on the bootable flag.

Now it became:
-A, --append
Don't create a new partition table, but only append the specified partitions.

We need to change syslinux script to use
-a, --activate device [partition-number...]
Switch on the bootable flag.
Comment by Anatol Pomozov (anatolik) - Thursday, 26 March 2015, 16:50 GMT
I pushed a new version of syslinux to [testing] (syslinux-6.03-3). Please check it and let me know if it works as expected.
Comment by Dale Blount (dale) - Thursday, 26 March 2015, 16:58 GMT
Confirmed this fix works for me.

Loading...