Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Puppy
User Name
Puppy This forum is for the discussion of Puppy Linux.


  Search this Thread
Old 04-27-2012, 10:35 AM   #1
Registered: Sep 2006
Posts: 72

Rep: Reputation: 16
ldlinux.sys? what does it do?

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:
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?
Old 04-27-2012, 11:00 AM   #2
Registered: Sep 2006
Posts: 72

Original Poster
Rep: Reputation: 16
hey, I think i figured it out. the archlinux wiki had a good explanation:
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.
1 members found this post helpful.
Old 04-27-2012, 11:04 AM   #3
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Thanks for sharing


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
system not display /sys/ kernel compile how to enable sys in menuconfig dashang.trivedi Linux - Kernel 1 07-14-2011 06:00 AM
What is the prime difference between Sys 3,Sys V and System7 version of UNIX vinnie_vinodh Other *NIX 2 11-16-2010 07:01 AM
[SOLVED] Need to manually re-install sys-lib/com_err and sys-lib/ss matsvw Gentoo 4 08-02-2009 12:17 PM
Is a Linux sys w/o any passwd's as secure as a microsoft windows sys w/no passwd? t3gah Linux - Security 4 04-22-2005 09:01 PM
/sys eno_on Linux - General 2 01-09-2005 02:36 PM > Forums > Linux Forums > Linux - Distributions > Puppy

All times are GMT -5. The time now is 12:43 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration