OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 8:45 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Trying to get syslinux to boot
PostPosted: Mon Sep 05, 2022 8:10 pm 
Offline
Member
Member

Joined: Thu Aug 25, 2022 3:54 pm
Posts: 27
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:
    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?


Top
 Profile  
 
 Post subject: Re: Trying to get syslinux to boot
PostPosted: Tue Sep 06, 2022 10:21 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
Can I see your disk image?


Top
 Profile  
 
 Post subject: Re: Trying to get syslinux to boot
PostPosted: Tue Sep 06, 2022 5:25 pm 
Offline
Member
Member

Joined: Thu Aug 25, 2022 3:54 pm
Posts: 27
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.


Top
 Profile  
 
 Post subject: Re: Trying to get syslinux to boot
PostPosted: Tue Sep 06, 2022 9:03 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
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...


Top
 Profile  
 
 Post subject: Re: Trying to get syslinux to boot
PostPosted: Tue Sep 06, 2022 10:46 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
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...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 36 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group