[syslinux] extlinux troubles....

Ady Ady ady-sf at hotmail.com
Mon Nov 12 11:16:01 PST 2018

About point "0", no answer(?). If you perform the commands to install 
the bootloader on sdb(1) and _then_ you overwrite the files/blocks when 
you copy from sda(1), you are effectively cancelling the installation 
of the bootloader.

> 1. ext4
> mke2fs -b 4096 -m 5 -t ext4 -O^uninit_bg -r 1 -v /dev/sdb1
> sdparm --command=sync /dev/sdb
I asked you for the version of mkfs too, and there is a reason. See:

> 2. 150G
> 3. gdisk /dev/sdb
> x
> a
> 2
> w
> y
> sdparm --command=sync /dev/sdb
By any chance, is this new HDD a "4k-only" (or similar) device (i.e. 
strictly 4096 bytes per sector)? Or, instead, is it capable of 
showing/working as a 512-bytes per sector device?

> 4. mount /dev/sdb1 /mnt/sdb1
> cd /mnt/sdb1
> extlinux -i /mnt/sdb1/boot
You haven't posted the command that creates the "boot" directory under 
"sdb1". Was this directory actually created? You seem to be using 
"/mnt/sdb1/" as working directory when you execute the installer, and 
you unmount it while in such status. Additionally, I would suggest, 
again, to read the official wiki, where the suggested directory to 
installing EXTLINUX (SYSLINUX), especially for troubleshooting, is not 
(just) "boot". Have you attempted creating a directory such as 
"/mnt/sdb1/boot/extlinux/"? Have you tried installing the bootloader on 
such directory (instead of "boot")? See:

> umount /mnt/sdb1
> sync;sync;sync
> sdparm --command=sync /dev/sdb
> cat gptmbr.bin >/dev/sdb1
Using CAT is not the best method when troubleshooting. Unmount 
everything under "sdb" and/or" "sdb1" and use "dd". See:

(remember to use the correct "*mbr*.bin" file)

> sync;sync;sync
> sdparm --command=sync /dev/sdb
> 5./mnt/sdb1/boot/extlinux.conf
>    setup up a hard link too
>    cd /mnt/sdb1/boot;ln extlinux.conf syslinux.conf
For troubleshooting purposes, I would suggest avoiding the use of 
(hard/soft/whatever) links, if they are not essential at this stage. 
Once all works as expected, you can add complexities. Additionally, I 
remind you, again, that "syslinux.conf" is not the correct name (there 
should be no letter "o" there).

> 6. Yes, this machine is ancient and has never been booted in EFI mode.
> I checked the documentation, which does not cover my use case (install
> from sda to sdb, then boot that sdb as sda later).
You keep saying that you install "from sda to sdb", but according to 
the steps you posted you don't seem to be working specifically from 
"sda"; only _you_ might perhaps know where the "extlinux" command is 
executed from.

> And before you ask, the messages from the system as it is now are
> (this is all in text mode):
> SYSLINUX 4.07 EDD 2013-07-25 Copyright (C) 1994-2013 H. Peter Anvin et al
> ERROR: No configuration file found
> No DEFAULT or UI configuration directive found!
> boot:
"ERROR: No configuration file found" "hints" (with a caveat, keep 
reading) that the directory to which EXTLINUX is initially booting 
in/to (i.e. the working directory at boot time) does not really contain 
"extlinux.conf" nor "syslinux.cfg". OTOH, this "hint" is particularly 
relevant when using the "recommended" installation directories, and not 
so much when using other installation directories.

> If I type in a directory name like boot or bin, it says
> Invalid or corrupt kernel image
> If I type in a file name, it says
> Could not find kernel image
Syslinux has no way to understand that you are typing a directory, or a 
file name, or whatever. I don't know what you are trying to achieve 
with such action(s).

> The kernel really is at /boot/vmlinuz-4.19, and I re-mounted /dev/sdb1
> from a boot off of /dev/sda to check this.
> I am trying to verify either that it is impossible to install extlinux
> to /dev/sdb from /dev/sda and then later boot that /dev/sdb as
> /dev/sda using extlinux, or get working instructions to do it.
Perhaps you should copy "ls.c32", "pwd.c32", "rosh.c32", and even all 
the c32 modules, to the same location where you are installing the 
bootloader. When you see "ERROR: No configuration file found", you 
could try typing:

boot: ls.c32 [enter]
boot: pwd.c32 [enter]
boot: linux.c32 /absolute/path/to/your/kernel

There is a chance that such investigations could provide some clues. At 
any rate, the prior suggestions (e.g. using a recommended directory, 
and correct file names, reading the wiki...) should probably be the 
first changes in your procedure(s).

For troubleshooting, I would also suggest putting your kernel under the 
same directory in which the bootloader is being installed (and modify 
the configuration file accordingly). Once things work as expected, you 
can perform additional changes.

If you need more help, please post the results of the suggestions I 
mentioned above, and the content of your extlinux.conf file.


PS: If you would be so kind, please avoid top-posting when writing to 
mailing list. TY.

More information about the Syslinux mailing list