[syslinux] Unable to find linux kernel on ext4, filesystem-related root cause assumed

H. Peter Anvin hpa at zytor.com
Tue Oct 10 12:55:29 PDT 2017


On 10/10/17 12:28, Manuel Wagesreither via Syslinux wrote:
> Dear all,
> 
> I'm working on a shell script which is producing a bootable image file. It contains a populated MBR and a single file system (ext4) which again contains a debootstrabed debian stable distribution.
> 
> Unfortunately, I'm experiencing problems with the bootability of the produced image. When selecting the installed system at the boot prompt, Syslinux responds with something like "couldnt load vmlinuz: File or directory not found".
> 
> The syslinux.cfg is located at the root of the said file system. The linux kernel and the initrd are relocated from their initial location at /boot to the file system root as well and are correctly referenced in syslinux.cfg.
> 
> Now the strange thing:
> The problem only occurs when said relocation happens through `mv` command:
> `rm /tmp/generate-image/mount/initrd.img /tmp/generate-image/mount/initrd.img.old /tmp/generate-image/mount/vmlinuz /tmp/generate-image/mount/vmlinuz.old`
> `mv /tmp/generate-image/mount/boot/initrd.img-4.9.0-4-amd64 /tmp/generate-image/mount/initrd`
> `mv /tmp/generate-image/mount/boot/vmlinuz-4.9.0-4-amd64 /tmp/generate-image/mount/vmlinuz`
> 
> The problem does NOT occur when relocation is implemented using `cp`:
> `rm /tmp/generate-image/mount/initrd.img /tmp/generate-image/mount/initrd.img.old /tmp/generate-image/mount/vmlinuz /tmp/generate-image/mount/vmlinuz.old`
> `cp /tmp/generate-image/mount/boot/initrd.img-4.9.0-4-amd64 /tmp/generate-image/mount/initrd`
> `cp /tmp/generate-image/mount/boot/vmlinuz-4.9.0-4-amd64 /tmp/generate-image/mount/vmlinuz`
> 
> This was hard to believe for me, but it was actually reproducible using qemu. The fact that all steps are executed through shell script rule out any user-introduced errors.
> 
> I'm posting my bash shell script (which contains syslinux.cfg) below. You are invited to execute it yourself.  I'm also eager to share my generated 1024MiB-sized image which can be mounted through losetup or booted-from using qemu.
> 
> In the syslinux-wiki, it was mentioned that there are known bugs with the current syslinux version. Is a list available? Are there any known limitations regarding ext4 support? Is the underlying code of ldlinux.sys available? I wasn't able to find it in the syslinux source tree.
> 
> Used versions:
> extlinux 6.03
> QEMU emulator version 2.8.1(Debian 1:2.8+dfsg-6+deb9u2)
> 
> Help or advice is much appreciated,
> best regards,
> Manuel
> 

Please try the latest 6.04-preX or even better, if you have the ability,
build it from the git tree and test.

	-hpa



More information about the Syslinux mailing list