PuppyThis forum is for the discussion of Puppy Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I recently started playing around with puppy and syslinux. I've been trying to get a feel for how the boot process works and the one thing that's confusing me is this ldlinux.sys file. The only information I've been able to find on it is this: http://wiki.answers.com/Q/What_is_ldlinux.sys
Quote:
ldlinux.sys is the name of the bootloader file used in SYSLINUX and ISOLINUX (used for booting Linux off of FAT32 and ISO9660 filesystems, respectively). It is loaded into memory by the BIOS on bootup. The loader then parses the configuration file (syslinux.cfg or isolinux.cfg) to know which kernel to launch, along with parameters to be passed to it.
I don't know if that's accurate, but I decided to try deleting the file from my usb boot disk and booting without it. I figured if it's really responsible for reading the syslinux.cfg file, then things should fail when I try to boot without it. However, everything still worked fine without ldlinux.sys. My logo image still loaded, the boot messages came up, I was even able to boot a kernel.
Can some knowledgeable person please tell me what the purpose of this file is and how it fits into the boot process? Does all of the important syslinux code come from the boot sector and if so, why is this ldlinux.sys necessary?
hey, I think i figured it out. the archlinux wiki had a good explanation:
Quote:
At boot, the computer loads the MBR (/usr/lib/syslinux/mbr.bin). Then the MBR looks for the partition that is marked as active (boot flag). Once found, the volume boot record (VBR) will be executed. In the case of ext2/3/4 and fat12/16/32, the starting sector of ldlinux.sys is hard-coded into the VBR. The VBR will execute (ldlinux.sys). Therefore, if the location of ldlinux.sys changes, syslinux will no longer boot. In the case of btrfs, the above method will not work since files move around resulting in the sector location of ldlinux.sys changing. Therefore, the entire Syslinux code needs to be stored outside the filesystem. The code is stored in the sectors following the VBR. Once Syslinux is fully loaded, it looks for a configuration file, either extlinux.conf or syslinux.cfg. If one is found, the configuration file is loaded. If no configuration file is found you will be given a syslinux prompt.
So, I guess that ldlinux.sys is important after all. The reason everything was fine without it was because the VBR had the starting sector of ldlinux.sys hard coded into it. I was only doing an rm on it so it was getting unlinked, but the VBR still knew where to find it. I opened it up in vi and deleted everything, saved, and tried to boot the usb then. Bam! boot error.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.