[syslinux] Can Syslinux install another USBstik ?

H. Peter Anvin hpa at zytor.com
Wed May 17 10:27:00 PDT 2017

On 05/01/17 01:36, eas lab via Syslinux wrote:
> When a USBstiked-syslinux starts, it's the PC's firmare that's reading
> the USB ?.
> But once the USBsyslinux takes over, has IT also got a USB driver?
> So that USBsyslinux can install a different USBstik/partition?
> Ie. boot with stikA to install & run stikB:partition5 ?
> ------------ Is the following sound logic?
>> Do zero out the partition table first so you don't "inherit" any
>> badness ("dd if=/dev/zero of=/dev/sdx bs=512 count=1 conv=sync").
>> Actually before destroying the partition table, I'd zero out the
>> beginning of all and any partitions ("dd if=/dev/zero bs=1024k
>> count=10 conv=sync of=/dev/sdxX" x Y) first, as we are in starting
>> from scratch mode. (If there were RAID/GPT involved I'd zero out
>> the end of partitions/disk respectively too.)
> .
> CPU reading a memory location is not like human reading from paper.
> <zero> bytes are no more "nothing" than any of the other possible
> 255 values.
>   Of course the system can be programed:
>    IF <there are more than N consecutive zero-bytes> THEN .....
> but, that's unlikely ?

The system will not invoke a boot sector that doesn't contain the 55 AA
magic number at offset 510.  Unfortunately some operating systems won't
recognize a partition table without the magic, which is very problematic.

The bytes CD 18 (INT 18h) at the beginning of a boot sector is supposed
to tell the BIOS that "this device isn't bootable, try the next one";
unfortunately not all BIOSes handle that correctly (although most recent
ones do.)


More information about the Syslinux mailing list