Trying to get syslinux to boot
Posted: Mon Sep 05, 2022 8:10 pm
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:
Does anyone have any ideas?
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:5. use fdisk to apply the bootable flag (option a) to the partition syslinux is installed onCode: Select all
DEFAULT lin LABEL lin LINUX /bzImage APPEND rw loglevel=5 root=/dev/sda2
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.
Does anyone have any ideas?