Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#55250 - [syslinux] syslinux-install_update fails when using /dev/loop0 with gpt partitions
Attached to Project:
Arch Linux
Opened by elionne (elionne) - Wednesday, 23 August 2017, 13:04 GMT
Last edited by Anatol Pomozov (anatolik) - Saturday, 20 January 2018, 22:19 GMT
Opened by elionne (elionne) - Wednesday, 23 August 2017, 13:04 GMT
Last edited by Anatol Pomozov (anatolik) - Saturday, 20 January 2018, 22:19 GMT
|
DetailsDescription:
When I use syslinux-install_update on a local image file attached to /dev/loop0 it fails with : /usr/bin/syslinux-install_update: line 116: warning: command substitution: ignored null byte in input sfdisk: toggle boot flags is supported for MBR only # added log FAILED to Set the boot flag on /dev/loop0p1 My partitions are gpt and attached respectively to /dev/loop0p{1,2,3} Additional info: * syslinux (6.03-7) Steps to reproduce: I want to use syslinux-install_update to add a boot loader to a local image file. I use the following script # First I create an image file: truncate -s 3G disk.img # Create 3 gpt partitions for the system cat <<EOF | sfdisk disk.img label: gpt start=2048, size=100M, bootable, name=boot size=+500M, name=swap, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F name=root EOF losetup --partscan /dev/loop0 disk.img The last command attaches my partitions to /dev/loop0p{1,2,3}. After creating my Archlinux install on root I want to install syslinux as bootloader, so: mount /dev/loop0p3 archlinux mount /dev/loop0p1 archlinux/boot syslinux-install_update -c archlinux -i -a -m But it fails with the above errors. I fix the problem by patching function "get_disk" with the following patch. --- a/syslinux-install_update 2017-08-23 14:23:28.109304021 +0200 +++ b/syslinux-install_update 2017-08-23 14:24:57.451532689 +0200 @@ -60,7 +60,7 @@ case "$part" in *[[:digit:]]p[[:digit:]]*) - local disk="${part%%p${partnum}}" # get everything before p1 + local disk="${part%%p[[:digit:]]}" # get everything before p1 ;; *) local disk="${part%%[[:digit:]]*}" |
This task depends upon
I tried the following example in bash:
part=/dev/loop0p1
echo ${part%%p[[:digit:]]} # > /dev/loop0
echo ${part%%p[[:digit:]]*} # > /dev/loo
I think, because loop finish with a 'p' the last match not work. But with a single '%' it works.
part=/dev/loop0p11
echo ${part%p[[:digit:]]*} # > /dev/loop0
part=/dev/loop0p1
echo ${part%p[[:digit:]]*} # > /dev/loop0
part=/dev/loop11p11
echo ${part%p[[:digit:]]*} # > /dev/loop0
I'm sorry if what I'm saying is obvious. Just to be sure.