LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 07-19-2006, 02:26 AM   #1
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
how does a bootable CD work?


I've been playing around with various bootable CD's (Slackware install, Slax, Knoppix) and I'm curious what all goes into booting an iso file system. I'm having a bit of a problem figuring it out by just simply poking though the files.

I see that it uses an initrd so I did some reading on that and figured out how to modify it by mounting the image, but how does the boot actually start? How do the files in the /boot directory for the CD work, and how can I modify them?

Specifically: (Example from Slax Live CD)
/boot/isolinux.bi_
/boot/isolinux.bin
/boot/splash.lss
/boot/splash.cfg
or any others that can not be opened in a text editor.

These are all binary files, and I'm not sure how they are created, what goes into them, and how I can tinker with them. The last one is the only non binary file, but all it contains is
Code:
^L^Xboot/splash.lss
^O0f Welcome to YOUR Live CD. Hit Enter to continue booting or press F1 for help...
It looks like splash.lss is the Slax graphic at boot, but I couldn't open it in any image editor. I'm also unsure what the ^ (control?) characters are and do.

The same basic boot srtucture applies to the Slackware install CD as well, the files are just named a little differently.

All the stuff I've read on the topic just say to "use the files from <insert already existing boot cd here>", but what if I wanted to just create one from scratch?

Can any one share any knowledge, links, or topics that you think might ease my curiosity?

Thanks in advance!
...drkstr
 
Old 07-19-2006, 02:56 AM   #2
Daga
Member
 
Registered: Apr 2006
Location: A comfy chair...
Distribution: Slackware
Posts: 110

Rep: Reputation: 15
The boot process is actually started with some special information in the CD structure. You might look up "El Torito" on Google.

Also look at the creation script for the CD. In the script I use for compiling the Backpack Programmer's LiveCD, here is the line that calls mkisofs to create a bootable .iso image:

mkisofs -o "$1" -v -J -R -D -A "$CDLABEL" -V "$CDLABEL" \
-no-emul-boot -boot-info-table -boot-load-size 4 \
-b boot/isolinux.bin -c boot/isolinux.boot .

isolinux.bin is the bootable floppy image that is used to start the boot and give the user some options before loading linux.
 
Old 07-19-2006, 09:33 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,377
Blog Entries: 3

Rep: Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477
Quote:
Originally Posted by drkstr
All the stuff I've read on the topic just say to "use the files from <insert already existing boot cd here>", but what if I wanted to just create one from scratch?

Can any one share any knowledge, links, or topics that you think might ease my curiosity?

Thanks in advance!
...drkstr
Hi,

You could use pat's README.TXT on the install cd1.

Slackware-10.2-install-d1.iso/isolinux/README.TXT

Shows how to create a bootable slackware cd. You could dissect this for reference.
 
Old 07-19-2006, 10:18 AM   #4
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
Quote:
The boot process is actually started with some special information in the CD structure. You might look up "El Torito" on Google.
Thanks for the advice. I found http://en.wikipedia.org/wiki/El_Torito_(CD-ROM_standard) which seems to be a pretty good starting point. In itself there was not much information, but if I follow the links around, there is a wealth of kowledge to explore. I'll have to poke though a bit and post back when I know enough to ask more "intelegent" questions.

Quote:
isolinux.bin is the bootable floppy image that is used to start the boot and give the user some options before loading linux.
I tried mounting it as a loop device, but it was complaining about not specifying the file system. Maybe I will get some more info on this when I start poking around the above link.

Quote:
Hi,

You could use pat's README.TXT on the install cd1.

Slackware-10.2-install-d1.iso/isolinux/README.TXT

Shows how to create a bootable slackware cd. You could dissect this for reference.
Thanks for the responce. This was actually the first thing I read. I was hoping to get a little bit more detailed information on the actuall files worked, then how to put them together to make a CD boot. I allready got my CD to boot, now I want to know why it boots.

thank you everyone for their input!
...drkstr
 
Old 07-19-2006, 10:37 AM   #5
jimX86
Member
 
Registered: Mar 2006
Distribution: Slackware64 14.1
Posts: 231
Blog Entries: 1

Rep: Reputation: 34
You might also want to check out the syslinux site.

http://syslinux.zytor.com/iso.php
 
Old 07-19-2006, 01:17 PM   #6
folkenfanel
Member
 
Registered: Sep 2004
Location: formerly Fanelia and Zaibach
Distribution: Slackware-current with KDE 4.8.5
Posts: 303

Rep: Reputation: 36
Thumbs up http://www.linux-live.org/

Hi there

This is a project to make live Linux LiveCD/LiveUSB scripts:

http://www.linux-live.org/

SLAX is made from these scripts so I think they should work.
 
Old 07-19-2006, 03:13 PM   #7
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
Quote:
You might also want to check out the syslinux site.

http://syslinux.zytor.com/iso.php
Thank you for the link. This has some good material on it. I am going to go through it and see what I can find out.

Quote:
Hi there

This is a project to make live Linux LiveCD/LiveUSB scripts:

http://www.linux-live.org/

SLAX is made from these scripts so I think they should work.
Thanks for your reply. I am actually familiar with the linux-live scripts, and have played around with them a bit trying to figure out how it all works. Unfortunately, the linux-live package uses an already existing /boot directory for the CD (located in linux-live*/cd-root/boot). I was unable to figure out how these files are created by poking though the scripts since they just copy the files over when creating the isofs.

Thanks again for all the info!
...drkstr
 
Old 07-19-2006, 03:51 PM   #8
Daga
Member
 
Registered: Apr 2006
Location: A comfy chair...
Distribution: Slackware
Posts: 110

Rep: Reputation: 15
Quote:
Originally Posted by drkstr
Thanks for your reply. I am actually familiar with the linux-live scripts, and have played around with them a bit trying to figure out how it all works. Unfortunately, the linux-live package uses an already existing /boot directory for the CD (located in linux-live*/cd-root/boot). I was unable to figure out how these files are created by poking though the scripts since they just copy the files over when creating the isofs.
linux-live uses the isolinux image to boot (same site that was given for syslinux above). I'm not sure that it is a format you could mount -- I haven't tried.
 
Old 07-19-2006, 06:22 PM   #9
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
OK, I did some reading, and here are my questions:

isolinux.bin is an image of a bootable floppy created by SYSLINUX. I create a bootable floppy with
Code:
syslinux [-s] [-o offset] /dev/fd0
where the [] are optional. Now to finish the boot floppy, you can add a configuration file to the root directory of the floppy. ( http://syslinux.zytor.com/faq.php#config ) And any image files you want to use during the boot.

Here is were I get a little confused. The isolinux uses the same type of configuration files from the boot floppy to boot the CD. Is the isolinux.bin an image of the floppy with all of it's helper files contained in the image, or do I place the same configuration files I would normally put on the floppy into the boot directory of the CD, and just rename them to conform to the isolinux standard? (IE: SYSLINUX.CFG = isolinux.cfg and so forth )

Also,
what are these characters used for in the slax isolinux.cfg
^L^X
^O0f
Are these some kind of special characters? Is there a chart any where that lists all of them and what they do?

Thanks for all the help, sorry for all the questions!
...drkstr
 
Old 07-19-2006, 06:53 PM   #10
Daga
Member
 
Registered: Apr 2006
Location: A comfy chair...
Distribution: Slackware
Posts: 110

Rep: Reputation: 15
Quote:
Originally Posted by drkstr
isolinux.bin is an image of a bootable floppy created by SYSLINUX. I create a bootable floppy with
Code:
syslinux [-s] [-o offset] /dev/fd0
where the [] are optional. Now to finish the boot floppy, you can add a configuration file to the root directory of the floppy. ( http://syslinux.zytor.com/faq.php#config ) And any image files you want to use during the boot.
The best I can offer for that is the second question on this page: http://syslinux.zytor.com/iso.php#how


Quote:
Originally Posted by drkstr
Also,
what are these characters used for in the slax isolinux.cfg
^L^X
^O0f
Are these some kind of special characters? Is there a chart any where that lists all of them and what they do?
Yes, and yes. They are control characters and are used to clear the screen, set screen colors (you only have 16 to play with), and other handy tasks. There is a a topic in the FAQ for syslinux covering this called "What is the DISPLAY File Format?". Here is a direct link:

http://syslinux.zytor.com/faq.php#format
 
Old 07-19-2006, 07:36 PM   #11
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
Quote:
Yes, and yes. They are control characters and are used to clear the screen, set screen colors (you only have 16 to play with), and other handy tasks. There is a a topic in the FAQ for syslinux covering this called "What is the DISPLAY File Format?". Here is a direct link:
I guess I missed this part when I read though it. Thanks for the info.

Quote:
The best I can offer for that is the second question on this page: http://syslinux.zytor.com/iso.php#how
Thanks for all your help. This was actually the page I got all my information from. I was able to get a good understanding of what all the files are used for, but it doesn't really describe what the isolinux.bin is exactly (it just says to copy it). When I get home, I'm going to see if I can figure out how to mount the isolinux.bin as an image of a floppy disk so I can take a peek inside the and hopefully this will answer my questions. I'm not quite sure how to do this exactly, though I'm sure it's not to hard to figure out since I know the file system of the image (FAT).

Thanks again for taking the time to nudge me in the right direction. I'll post back with what I find out.

...drkstr

Last edited by drkstr; 07-19-2006 at 07:38 PM.
 
  


Reply


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
bootable cdimage->bootable hdpartition? titusind Linux - General 1 11-22-2005 12:16 AM
Bootable CD isolinux+mkisofs does not work Kocil Linux - Hardware 0 10-04-2004 06:43 AM
Installing Slackware with non-bootable CD or bootable floppy (but not both) TiddlyPom Slackware 2 03-22-2004 05:15 PM
how do bootable CDs work rvijay17 Linux - General 1 06-29-2003 12:50 PM
Bootable floppies, and CD's.. how to get them to work. Stephanie General 1 01-15-2002 05:34 PM


All times are GMT -5. The time now is 11:40 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration