LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy
User Name
Password
Puppy This forum is for the discussion of Puppy Linux.

Notices


Reply
  Search this Thread
Old 04-27-2012, 09:35 AM   #1
twelvenine
Member
 
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: 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?
 
Old 04-27-2012, 10:00 AM   #2
twelvenine
Member
 
Registered: Sep 2006
Posts: 72

Original Poster
Rep: Reputation: 16
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.
 
1 members found this post helpful.
Old 04-27-2012, 10:04 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Thanks for sharing
 
Old 10-03-2018, 02:48 AM   #4
Anjuchauhan
LQ Newbie
 
Registered: Oct 2018
Posts: 1

Rep: Reputation: 0
sys file

Thanks for this blog.
 
  


Reply



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/ folder....in kernel compile how to enable sys in menuconfig dashang.trivedi Linux - Kernel 1 07-14-2011 05: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 06:01 AM
[SOLVED] Need to manually re-install sys-lib/com_err and sys-lib/ss matsvw Gentoo 4 08-02-2009 11:17 AM
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 08:01 PM
/sys eno_on Linux - General 2 01-09-2005 01:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy

All times are GMT -5. The time now is 05:42 PM.

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