Trying to get syslinux to boot

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
SomeGuyWithAKeyboard
Member
Member
Posts: 27
Joined: Thu Aug 25, 2022 3:54 pm

Trying to get syslinux to boot

Post by SomeGuyWithAKeyboard »

I'm trying to get syslinux to boot off of a drive. I'm trying to make something similar to floppinux except with more kernel features. I want to actually be able to run compiled gcc programs, view partitions on other drives and possibly get usb drivers for flash drive functionality. It needs to be able to support legacy bios booting as well.

I cannot get syslinux to boot for the life of me. Everything I do boots in qemu just fine but nothing boots on real hardware. I've tried it on a socket 3 ms4144, a dell pentium 4, a X99 motherboard and like every laptop I have. The bios doesn't even recognize it as a bootable device. Even if I use plop boot manager to force boot from a partition that I 100% know has syslinux, it STILL doesn't boot.

The steps I have taken are as follows:
  • 1. format a fresh drive with a fast32 partition and an ext2 partition. Make sure it's using mbr (I've also tried fat16 instead, doesn't make a difference in results)
    2. do "sudo syslinux --install /dev/sdc1" (or wherever my drive's fat16/32 boot partition it. This is the point where qemu will successfully boot from /dev/sdc. Note I've also tried the -s and -r options. This makes no difference)
    3. copy the linux kernel BzImage to the root of /dev/sdc1
    4. create a file called syslinux.cfg at the root of /dev/sdc1 with the following content:

    Code: Select all

    DEFAULT lin
        LABEL lin
          LINUX /bzImage
          APPEND rw loglevel=5 root=/dev/sda2
    5. use fdisk to apply the bootable flag (option a) to the partition syslinux is installed on
    6. insert media into computer of choice. Watch in amazement as it refuses to even attempt to boot.
    7. I also tried writing mbr.bin and then altmbr.bin to dev/sdc as seen here. That makes no difference. But if I use dd to write that to "dev/sdc1" (the fat32 partition), I get "boot error" when trying to boot with qemu.
You would think that getting such a thing to even work on something as old as a pentium 4 or socket 3 is probably not possible. Yet there is floppinux and this project. I even downloaded and wrote the images from both those projects to a drive and it even works on my socket 3 486 pc. These both have syslinux and they BOTH boot on exactly the same hardware that I'm trying to get my syslinux concoction to work so it has to be possible somehow.

Does anyone have any ideas?
Octocontrabass
Member
Member
Posts: 5513
Joined: Mon Mar 25, 2013 7:01 pm

Re: Trying to get syslinux to boot

Post by Octocontrabass »

Can I see your disk image?
SomeGuyWithAKeyboard
Member
Member
Posts: 27
Joined: Thu Aug 25, 2022 3:54 pm

Re: Trying to get syslinux to boot

Post by SomeGuyWithAKeyboard »

You know, I should have put more thought into how I was going to share this but here's a compressed xz image of what I've got here. Your browser will probably complain because I don't have https or know what hoops you have to jump through to get a domain to not get flagged as malware.

Note that there's some problem with kernel refusing to touch busybox for some reason which results in init not starting but I'm sure it's not as difficult of a problem to fix as the "it'll only boot on qemu" problem that I've been stuck on.
Octocontrabass
Member
Member
Posts: 5513
Joined: Mon Mar 25, 2013 7:01 pm

Re: Trying to get syslinux to boot

Post by Octocontrabass »

SomeGuyWithAKeyboard wrote:These both have syslinux and they BOTH boot on exactly the same hardware that I'm trying to get my syslinux concoction to work so it has to be possible somehow.
When you say "exactly the same hardware" does that include the disk you're using? And if so, what kind of disk?

Since you're able to get other images to boot, I assume you've already checked the boot order...
Octocontrabass
Member
Member
Posts: 5513
Joined: Mon Mar 25, 2013 7:01 pm

Re: Trying to get syslinux to boot

Post by Octocontrabass »

Okay, I managed to get your image on a USB flash drive and... it boots. Your kernel seems to be missing the necessary drivers to access the root filesystem over USB though.

I can't imagine why it wouldn't work for you. The only thing that stood out to me was the insane geometry in the partition table (255 heads, 2 sectors per track) but I can't see how all of your test machines would fail in exactly the same way over that...
Post Reply