LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-07-2014, 01:16 PM   #1
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Building a bootable iso


I made bootable Linux floppies a lot back in the day. Today I'm trying to make a bootable ISO for virtualbox. Doesnt have to have anything special, just a kernel, boot loader and busybox.

I've tried the ole slitaz cookbook, pocket linux, and LFS, and so on.. trying to grab the simplest instructions to do so, but im coming up short.

Here is what I'm using to create an ISO with those three things,. and it creates an ISO that causes a permanent reboot loop in Virtualbox.

http://paste.ubuntu.com/7981712/

Anyone out there able to create an old style bare minimum ISO for virtualbox? And what 20 or so commands did you use to do so? Perhaps a history dump? Or a pointer to a known good installation walkthrough that actually works.

Last edited by szboardstretcher; 08-07-2014 at 01:17 PM.
 
Old 08-07-2014, 03:10 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
You don't exactly create a bootable iso for virtualbox. Just make a bootable hard drive.

But, if you wanted, you could create a two track build. Track one would be cd loader and track two would be information. Most people would take a stock kernel and use it and then get some build of busybox. Use some track one from a different system.

It may be easier to take puppy and strip out what you don't want. The .sfx file (might have different name) is some version of a compressed file that you can open on a puppy distro. I've used this to edit the LPS disto.
 
Old 08-07-2014, 03:15 PM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Original Poster
Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
The ISO created in that command list would be in CDROM format.

I'd like to stick to commands, and using the default source of each of the projects - Linux, Syslinux and Busybox. This is something that at one time was very simple. In DOS it was "sys a:\" to copy DOS over, for linux it was more involved,. maybe 10 commands or so.

I don't believe that utilizing another distro is going to be helpful. I have CentOS ready to go,. How do I make a bootable ISO?

Ill show the obvious stuff. This is what I have so far, but whats next?
  • Install dev tools
  • Make working directory
  • Download/decompress Sources (Kernel, Syslinux, Busybox)

Code:
 yum -y update
    yum -y groupinstall 'Development tools'
    yum -y install wget bc genisoimage
    reboot
    mkdir -pv /mini/source
    mkdir -pv /mini/build
    cd /mini/source
    wget https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.02.tar.xz
    wget ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-3.11.1.tar.xz
    wget http://www.busybox.net/downloads/busybox-1.22.1.tar.bz2
    wget http://www.osage.k12.ia.us/mediacenter/creative-commons-logo-640-80.jpg
    tar xvf busybox-1.22.1.tar.bz2
    tar xvf syslinux-6.02.tar.xz
    tar xvf linux-3.11.1.tar.xz

Last edited by szboardstretcher; 08-07-2014 at 03:38 PM.
 
Old 08-07-2014, 04:38 PM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Original Poster
Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
I have made a github project concerning this.

https://github.com/boardstretcher/mi...er/the_code.sh

Please contribute anything you would like, in order to get it working. After searching for HOURS and HOURS, I've come to the conclusion that we have accidentally forgotten how to make a simple Linux boot disk from scratch. Before you start posting links to 'working' how-tos, understand that I have actually sat here and tried them, line by line. They do not work anymore.

Please help me close the gap and get this thing working. Not only for myself (I've become an idiot), but for the community of beginners that ask this quite often.

Between myself and the other LQ contributors we should be able to mock up a 20 command script to create one, and bring bootable Linux "floppies" to the next generation.

Thank you all!

Last edited by szboardstretcher; 08-07-2014 at 04:44 PM.
 
Old 08-07-2014, 09:41 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
http://www.novell.com/documentation/...l/ch07s06.html

http://www.syslinux.org/wiki/index.php/ISOLINUX


You really can't make bootable floppies in Linux since the kernel won't fit even on a cheated floppy. Versions of BSD offer a way to split the kernel so maybe a BSD based Debian might boot.
 
Old 08-07-2014, 10:37 PM   #6
bryanl
Member
 
Registered: Dec 2003
Posts: 97

Rep: Reputation: 35
The problem you've got is that the boot process isn't (and really never was) all that simple.

First problem is getting the firmware to be able to read the media and load some defined part of it into memory and then transfer execution to that chunk of memory. The actual process is different depending upon media and on the connection between the hardware and the computer.

Floppy disks were usually rather simple one step items. With hard drives, partitions came into the picture and the first sector of the disk had a table to identify them and a short chunk of code that could find the right code on the selected partition to load and execute that.

GRUB handles this with Linux as it includes the firmware readable code and a second stage find the system and execute code along with some other goodies. It could be installed on a floppy but (as noted above) it would need to be set to find the system on larger media.

UEFI and GPT make things a bit more interesting as the partition table isn't as simple and limited location on disk table and the firmware is able to read certain types of file systems in a partition to find code that will boot the system.

For CD-ROMS, look up the El Torito format and it's history. Booting a CD isn't as simple as it might seem, either. Note that most CD's and DVD's are formatted in UDF and that can also be interesting to work with on boot.

check out a http://kevinboone.net/boot.html for a good summary of the PC boot process.

There are some programs out there that will simplify the process for you. They are usually intended for burning CD's and DVD's. There are other programs that turn this around and will convert a bootable ISO image to a hard drive bootable image as used in USB flash drives, for instance. These usually on work with a selected set of bootable systems where they know what to use as an executable kernel and where that kernel is stored in the image. I've also seen some backup programs that create bootable DVD's to hold the backup but these usually have trouble keeping up with the march of 'progress' in the Linux side of things.

There's a lot of legacy stuff in this topic and it can be a good way to learn about a part of technology development that was critical yet often just taken for granted.
 
1 members found this post helpful.
  


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
How to modify ISO image or How to create Bootable ISO images.. sampappachan_nyc Linux - Software 2 01-22-2014 03:42 PM
What the hell is a bootable ISO and a bootable USB-stick? duplex Linux - Software 15 11-23-2012 08:00 PM
[SOLVED] If I dd copy a bootable usb drive to an iso will the iso be bootable? mgallatin Linux - Software 5 03-23-2011 04:46 PM
how to make non bootable iso file and iso via linux command line?? npubudu Linux - Newbie 2 02-01-2009 11:31 PM
i edited the fedora9.iso files... how do i create bootable iso now? Yaniv-Fer Linux - General 3 11-04-2008 02:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:29 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