You are not logged in.
Pages: 1
One of my servers with RAID 1 mirrored boot drives fails to install syslinux:
$ sudo syslinux-install_update -iam
Detected RAID on /boot - installing Syslinux with --raid
Syslinux BIOS install successful
/usr/bin/syslinux-install_update: line 116: warning: command substitution: ignored null byte in input
/usr/bin/syslinux-install_update: line 116: warning: command substitution: ignored null byte in input
/dev/sdz - is a block device. Aborting set_active!
Tracing through the syslinux-install_update shows the line 116 warnings are for /dev/sdy and /dev/sdz, both of which are the target boot drives. The command output is:
$ sudo dd if="/dev/sdy" skip=64 bs=8 count=1 | hexdump
1+0 records in
1+0 records out
8 bytes copied, 5.4741e-05 s, 146 kB/s
0000000 0000 0000 0000 0000
0000008
$ sudo dd if="/dev/sdz" skip=64 bs=8 count=1 | hexdump
1+0 records in
1+0 records out
8 bytes copied, 5.3384e-05 s, 150 kB/s
0000000 0000 0000 0000 0000
0000008
The server has multiple drives configured with software RAID, as per:
$ cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md4 : active raid5 sdv1[3] sdx1[6] sdw1[4] sds1[0] sdt1[1] sdu1[2]
39068958720 blocks super 1.2 level 5, 2048k chunk, algorithm 2 [6/6] [UUUUUU]
bitmap: 0/59 pages [0KB], 65536KB chunk
md3 : active raid5 sdo1[2] sdn1[1] sdh1[0] sdp1[3] sdq1[4] sdr1[6]
39068958720 blocks super 1.2 level 5, 2048k chunk, algorithm 2 [6/6] [UUUUUU]
bitmap: 0/59 pages [0KB], 65536KB chunk
md1 : active raid5 sda1[0] sdc1[2] sdd1[3] sde1[4] sdf1[6] sdb1[1]
39068958720 blocks super 1.2 level 5, 2048k chunk, algorithm 2 [6/6] [UUUUUU]
bitmap: 0/59 pages [0KB], 65536KB chunk
md0 : active raid1 sdz[1] sdy[0]
62522624 blocks super 1.0 [2/2] [UU]
md2 : active raid5 sdg1[0] sdj1[2] sdk1[3] sdi1[1] sdl1[4] sdm1[6]
39068958720 blocks super 1.2 level 5, 2048k chunk, algorithm 2 [6/6] [UUUUUU]
bitmap: 0/59 pages [0KB], 65536KB chunk
unused devices: <none>
File system config:
$ tail -n 5 /etc/mdadm.conf
ARRAY /dev/md0 metadata=1.0 UUID=e08dbb71:dd26740c:8d2fced9:1049e585
ARRAY /dev/md1 metadata=1.2 UUID=fe1baa05:f6c21a83:bf22a40b:d7f21138
ARRAY /dev/md2 metadata=1.2 UUID=66120b33:98975171:c3ffd979:e8bf93eb
ARRAY /dev/md3 metadata=1.2 UUID=2836deaa:09c3d7b6:2892b2a8:83b70d05
ARRAY /dev/md4 metadata=1.2 UUID=38658174:a588e9ae:f50850b3:b4768d8e
$ tail -n 6 /etc/fstab
UUID=55a228df-94c2-44db-b043-fc62e305333e / ext4 rw,noatime,stripe=32,data=ordered 0 1
UUID=2e957428-8e94-4210-be12-5717612a7334 /mnt/p1 ext4 rw,noatime 0 1
UUID=807d60b9-3f0e-468a-9a41-afbfd5f50bd9 /mnt/p2 ext4 rw,noatime 0 1
UUID=07cc7421-eb1c-4643-99ef-4b76627d6cd0 /mnt/p3 ext4 rw,noatime 0 1
UUID=030f33e3-893c-48da-83c4-b7c3f0c6695e /mnt/p4 ext4 rw,noatime 0 1
UUID=76604300-23cf-448e-bf56-601cbd853933 /mnt/nvme ext4 rw,noatime 0 1
$ lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
`-sda1 linux_raid_member original-label:1 fe1baa05-f6c2-1a83-bf22-a40bd7f21138
`-md1 ext4 pool1 2e957428-8e94-4210-be12-5717612a7334 /mnt/p1
sdb
`-sdb1 linux_raid_member original-label:1 fe1baa05-f6c2-1a83-bf22-a40bd7f21138
`-md1 ext4 pool1 2e957428-8e94-4210-be12-5717612a7334 /mnt/p1
sdc
`-sdc1 linux_raid_member original-label:1 fe1baa05-f6c2-1a83-bf22-a40bd7f21138
`-md1 ext4 pool1 2e957428-8e94-4210-be12-5717612a7334 /mnt/p1
sdd
`-sdd1 linux_raid_member original-label:1 fe1baa05-f6c2-1a83-bf22-a40bd7f21138
`-md1 ext4 pool1 2e957428-8e94-4210-be12-5717612a7334 /mnt/p1
sde
`-sde1 linux_raid_member original-label:1 fe1baa05-f6c2-1a83-bf22-a40bd7f21138
`-md1 ext4 pool1 2e957428-8e94-4210-be12-5717612a7334 /mnt/p1
sdf
`-sdf1 linux_raid_member original-label:1 fe1baa05-f6c2-1a83-bf22-a40bd7f21138
`-md1 ext4 pool1 2e957428-8e94-4210-be12-5717612a7334 /mnt/p1
sdg
`-sdg1 linux_raid_member original-label:2 66120b33-9897-5171-c3ff-d979e8bf93eb
`-md2 ext4 pool2 807d60b9-3f0e-468a-9a41-afbfd5f50bd9 /mnt/p2
sdh
`-sdh1 linux_raid_member original-label:3 2836deaa-09c3-d7b6-2892-b2a883b70d05
`-md3 ext4 pool3 07cc7421-eb1c-4643-99ef-4b76627d6cd0 /mnt/p3
sdi
`-sdi1 linux_raid_member original-label:2 66120b33-9897-5171-c3ff-d979e8bf93eb
`-md2 ext4 pool2 807d60b9-3f0e-468a-9a41-afbfd5f50bd9 /mnt/p2
sdj
`-sdj1 linux_raid_member original-label:2 66120b33-9897-5171-c3ff-d979e8bf93eb
`-md2 ext4 pool2 807d60b9-3f0e-468a-9a41-afbfd5f50bd9 /mnt/p2
sdk
`-sdk1 linux_raid_member original-label:2 66120b33-9897-5171-c3ff-d979e8bf93eb
`-md2 ext4 pool2 807d60b9-3f0e-468a-9a41-afbfd5f50bd9 /mnt/p2
sdl
`-sdl1 linux_raid_member original-label:2 66120b33-9897-5171-c3ff-d979e8bf93eb
`-md2 ext4 pool2 807d60b9-3f0e-468a-9a41-afbfd5f50bd9 /mnt/p2
sdm
`-sdm1 linux_raid_member original-label:2 66120b33-9897-5171-c3ff-d979e8bf93eb
`-md2 ext4 pool2 807d60b9-3f0e-468a-9a41-afbfd5f50bd9 /mnt/p2
sdn
`-sdn1 linux_raid_member original-label:3 2836deaa-09c3-d7b6-2892-b2a883b70d05
`-md3 ext4 pool3 07cc7421-eb1c-4643-99ef-4b76627d6cd0 /mnt/p3
sdo
`-sdo1 linux_raid_member original-label:3 2836deaa-09c3-d7b6-2892-b2a883b70d05
`-md3 ext4 pool3 07cc7421-eb1c-4643-99ef-4b76627d6cd0 /mnt/p3
sdp
`-sdp1 linux_raid_member original-label:3 2836deaa-09c3-d7b6-2892-b2a883b70d05
`-md3 ext4 pool3 07cc7421-eb1c-4643-99ef-4b76627d6cd0 /mnt/p3
sdq
`-sdq1 linux_raid_member original-label:3 2836deaa-09c3-d7b6-2892-b2a883b70d05
`-md3 ext4 pool3 07cc7421-eb1c-4643-99ef-4b76627d6cd0 /mnt/p3
sdr
`-sdr1 linux_raid_member original-label:3 2836deaa-09c3-d7b6-2892-b2a883b70d05
`-md3 ext4 pool3 07cc7421-eb1c-4643-99ef-4b76627d6cd0 /mnt/p3
sds
`-sds1 linux_raid_member original-label:4 38658174-a588-e9ae-f508-50b3b4768d8e
`-md4 ext4 pool4 030f33e3-893c-48da-83c4-b7c3f0c6695e /mnt/p4
sdt
`-sdt1 linux_raid_member original-label:4 38658174-a588-e9ae-f508-50b3b4768d8e
`-md4 ext4 pool4 030f33e3-893c-48da-83c4-b7c3f0c6695e /mnt/p4
sdu
`-sdu1 linux_raid_member original-label:4 38658174-a588-e9ae-f508-50b3b4768d8e
`-md4 ext4 pool4 030f33e3-893c-48da-83c4-b7c3f0c6695e /mnt/p4
sdv
`-sdv1 linux_raid_member original-label:4 38658174-a588-e9ae-f508-50b3b4768d8e
`-md4 ext4 pool4 030f33e3-893c-48da-83c4-b7c3f0c6695e /mnt/p4
sdw
`-sdw1 linux_raid_member original-label:4 38658174-a588-e9ae-f508-50b3b4768d8e
`-md4 ext4 pool4 030f33e3-893c-48da-83c4-b7c3f0c6695e /mnt/p4
sdx
`-sdx1 linux_raid_member original-label:4 38658174-a588-e9ae-f508-50b3b4768d8e
`-md4 ext4 pool4 030f33e3-893c-48da-83c4-b7c3f0c6695e /mnt/p4
sdy linux_raid_member archiso:0 e08dbb71-dd26-740c-8d2f-ced91049e585
`-md0 ext4 boot 55a228df-94c2-44db-b043-fc62e305333e /
sdz linux_raid_member archiso:0 e08dbb71-dd26-740c-8d2f-ced91049e585
`-md0 ext4 boot 55a228df-94c2-44db-b043-fc62e305333e /
nvme0n1
`-nvme0n1p1
ext4 nvme 76604300-23cf-448e-bf56-601cbd853933 /mnt/nvme
The relevant syslinux.cfg sections are:
LABEL arch
MENU LABEL Arch Linux
LINUX ../vmlinuz-linux
APPEND root=UUID=55a228df-94c2-44db-b043-fc62e305333e rw
INITRD ../initramfs-linux.img
LABEL archfallback
MENU LABEL Arch Linux Fallback
LINUX ../vmlinuz-linux
APPEND root=UUID=55a228df-94c2-44db-b043-fc62e305333e rw
INITRD ../intel-ucode.img,../initramfs-linux-fallback.img
Suggestions greatly appreciated.
Thanks
Offline
/usr/bin/syslinux-install_update: line 116: warning: command substitution: ignored null byte in input
/usr/bin/syslinux-install_update: line 116: warning: command substitution: ignored null byte in input
I think it is a harmless warning. But let's check where it comes from. Open file /usr/bin/syslinux-install_update at line 116 and add
echo dd if="$1" skip=64 bs=8 count=1
so it will print what exactly command is executing.
/dev/sdz - is a block device. Aborting set_active!
It is the real reason of failure. It comes from set_active() function. Could you please add a print statement to check what is the value of "bootdevs" variable? That variable is initialized in get_boot_devices() function.
Last edited by anatolik (2017-02-12 03:57:02)
Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster
Offline
I think it is a harmless warning. But let's check where it comes from. Open file /usr/bin/syslinux-install_update at line 116 and add
This was in my original post, decoded as dd if="/dev/sdy" skip=64 bs=8 count=1 and the /dev/sdz versions. I piped it to hexdump to show the null characters that bash warned about.
It is the real reason of failure. It comes from set_active() function. Could you please add a print statement to check what is the value of "bootdevs" variable? That variable is initialized in get_boot_devices() function.
Sure, I added printf '%s\n' "${!bootdevs[@]}" to the start of the set_active() function and it rendered:
/dev/sdz
/dev/sdy
These are the boot devices. Looking at the dev_is_part function and adding a print statement in there, it's returning 1 because /sys/block/sdz/dev exists (as does /sys/block/sdy/dev). Here's a full list of files:
$ $ ls -l /sys/block/sdz/
total 0
-r--r--r-- 1 root root 4096 Feb 12 17:25 alignment_offset
-rw-r--r-- 1 root root 4096 Feb 12 17:25 badblocks
lrwxrwxrwx 1 root root 0 Feb 12 17:25 bdi -> ../../../../../../../../virtual/bdi/65:144
-r--r--r-- 1 root root 4096 Feb 12 17:25 capability
-r--r--r-- 1 root root 4096 Feb 12 12:36 dev
lrwxrwxrwx 1 root root 0 Feb 12 11:44 device -> ../../../10:0:0:0
-r--r--r-- 1 root root 4096 Feb 12 17:25 discard_alignment
-r--r--r-- 1 root root 4096 Feb 12 17:25 events
-r--r--r-- 1 root root 4096 Feb 12 17:25 events_async
-rw-r--r-- 1 root root 4096 Feb 12 17:25 events_poll_msecs
-r--r--r-- 1 root root 4096 Feb 12 17:25 ext_range
drwxr-xr-x 2 root root 0 Feb 12 12:28 holders
-r--r--r-- 1 root root 4096 Feb 12 17:25 inflight
drwxr-xr-x 2 root root 0 Feb 12 17:25 integrity
drwxr-xr-x 2 root root 0 Feb 12 17:25 power
drwxr-xr-x 3 root root 0 Feb 12 12:28 queue
-r--r--r-- 1 root root 4096 Feb 12 17:25 range
-r--r--r-- 1 root root 4096 Feb 12 17:25 removable
-r--r--r-- 1 root root 4096 Feb 12 17:25 ro
-r--r--r-- 1 root root 4096 Feb 12 17:25 size
drwxr-xr-x 2 root root 0 Feb 12 12:28 slaves
-r--r--r-- 1 root root 4096 Feb 12 17:25 stat
lrwxrwxrwx 1 root root 0 Feb 12 11:44 subsystem -> ../../../../../../../../../class/block
drwxr-xr-x 2 root root 0 Feb 12 17:25 trace
-rw-r--r-- 1 root root 4096 Feb 12 17:25 uevent
As per the original post's lsblk output, /dev/sdy and /dev/sdz are both partitioned.
Offline
So maybe the problem is that md0 uses full /dev/sdy /dev/sdz disks and there is no any GPT table where syslinux can set "active" bit? I see that all other devices have one partition on it, all devices except those that you use for boot.
If you create /dev/sdy1 and /dev/sdz1 and use it instead of /dev/sdy /dev/sdz then syslinux probably be happier.
Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster
Offline
Thanks, I will repartition and go from there.
Offline
I did a fresh reinstall and all was good. Please consider this solved, and thanks for the assistance.
Offline
Thanks for checking. I modified syslinux and made the error message cleaner.
https://git.archlinux.org/svntogit/pack … 017ed0af81
Last edited by anatolik (2017-02-13 02:54:00)
Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster
Offline
Pages: 1