alex lupu
2017-Sep-11 17:45 UTC
[syslinux] Cannot chainload a formerly working Linux system
Chainloading a Linux system with syslinux fails unexpectedly with the lines: WARN: No MBR magic, treating disk as raw. ERR: Unable to find requested disk / partition combination. boot: coming after the usual lines SyslinuxBOOT .... (in UEFI menu) linuxBLFS (in syslinux menu) SUMMARY (additional gory details available upon request) ~~~~~~~~~ Latest ASUS motherboard, Z270I (UEFI 2.6) SSD with Arch on it. AOK. The "staging" point I use for tests on an SSD with "old" Linux system (BLFS) to be booted with syslinux. SSD (M.2) with Win10. AOK. NOT IN THE PICTURE (afaic). DETAILS (a few I consider basic) ~~~~~~~ - Arch SSD: latest version, kern 4.12.12. 64 bits. /dev/sda. - BLFS SSD: left "frozen" (in good condition) at kern 4.5. 32 bits. /dev/sdb. - syslinux 6.3, installed on /dev/sdb first partition. Works OK (as far as it goes). Device Boot Start End Sectors Size Id Type /dev/sdb1 * 2048 2042239 2040192 996.2M ef EFI (FAT-12/16/32) /dev/sdb2 2042240 3070399 1028160 502M 82 Linux swap / Solaris /dev/sdb3 3072000 244244479 241172480 115G 83 Linux /dev/sdb4 244244480 499196591 254952112 121.6G 7 HPFS/NTFS/exFAT The BLFS system (on sdb3) used to be booted from a Win7 (sdb4), no longer active now (hence the current attempts at booting through syslinux). First sector of sdb3 (with "legacy", 0.97, GRUB STAGE2 used to be copied to Windows, creating a dual boot with Windows through a menu set-up by Windows BCD Editor. File 'EFI/syslinux.cfg': DEFAULT menu.c32 SAY Now booting the kernel from SYSLINUX... LABEL linuxBLFS COM32 chain.c32 APPEND hdX 3 #KERNEL LFSkernel-4.4.5-1 #APPEND root=/dev/sdb3 video=HDMI-A-2:640x480M Notes on file 'syslinux.cfg' above: 1. X=0-5. I also tried (in desperation) higher values for X (to no avail). 2. I chose 0-5 based on the MAP/fs results from UEFI Shell v2.2 run from /dev/sda1. 3. For reference, FS0 -> sda1. FS1 -> sdb1. 4. I tried other values for partition number (also in desperation). 5. The last two lines (LFSkernel and root) are temporarily commented out for readability. syslinux would obviously never have a chance to run them. COMMENTS ~~~~~~~~~~ 1. The first WARN message is particularly mystifying. The MBR of /dev/sdb may have suffered a lot of abuse over the years but a byte examination of it still shows a perfect 4-partition table and the x55AA at the end. (no surprise there; all Arch linux utilities like fdisk -l, hexdump, dd, efibootmgr, etc. work just fine and I can still access any of my files left (in OK condition, btw) on /dev/sdb3. So, it seems, the MBR has managed to clearly retain its magic. 2. Per above, the ERR is also puzzling. Unless syslinux identifies drives and partitions differently than Linux utilities and/or UEFI Shell. Any help on clearing up / troubleshooting the situation will be highly appreciated. Thanks, -- Alex
Shao Miller
2017-Sep-11 19:16 UTC
[syslinux] Cannot chainload a formerly working Linux system
Are you trying to boot via (U)EFI or via BIOS? If you are trying to chain-load, I don't think you want any (U)EFI involvement at all. Is the disk GPT or MBR or a hybrid of the two? I assume you want to boot the third partition. Are you able to examine the boot-code in that partition's first sector? dd if=/dev/sdb3 count=1 | hexdump -C Shao Miller Synthetel Corporation W: https://www.synthetel.com
> Chainloading a Linux system with syslinux fails unexpectedly with the lines: > > WARN: No MBR magic, treating disk as raw. > ERR: Unable to find requested disk / partition combination. > boot: > > coming after the usual lines > SyslinuxBOOT .... (in UEFI menu) > linuxBLFS (in syslinux menu) >(snip)> > File 'EFI/syslinux.cfg': > DEFAULT menu.c32 > SAY Now booting the kernel from SYSLINUX... > LABEL linuxBLFS > COM32 chain.c32 > APPEND hdX 3Why oh why! http://www.syslinux.org/wiki/index.php?title=Comboot/chain.c32#UEFI