🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Booting Custom Linux Distro

Started by
3 comments, last by Bregma 13 years, 2 months ago
Hi, I am working on a program that needs to be bootable from a CD (in C language) and then being able to use the basic C libraries (stdio.h, stdlib.h).

I don't want to write any assembly code, and from my searches I've found out that this is easy by using the vmliuz file to boot into linux kernel, so I won't have to code drivers or so.
Could somebody explain me how can I do it?
Advertisement
Why don't you just use a LiveCD or something and set up your program to run automatically in the boot scripts?


Anyways, moving to the Unix forum, as this isn't strictly programming related but more of an OS configuration question.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

You're trying to create your own Linux "live CD". While I can't offer a whole lot of hands-on tutelage, there are many scripts and tutorials to help you do this. Through Google I come up with a couple dozen useful links.
So you mean it would be better to burn a LiveCD with arch on it and have it preconfigured to run my program on booting?
That seems quite complicated, and help would be greatly appreciated.
Could you at least point me on where to look, because I have been googling for a few hours and can't find anything particular.

I don't want to write any assembly code, and from my searches I've found out that this is easy by using the vmliuz file to boot into linux kernel, so I won't have to code drivers or so.
Could somebody explain me how can I do it?

You use isolinux to generate a bootable CD image with a linux kernel (that's yer vmlinuz file) and a root filesystem image (probably a ramdisk image) which contains whatever libraries you need. The init command passed to the kernel on boot will be your program.

It's old tech, been in use for years (at least 11) by most Linux installers, but it does require a bit of knowledge of how OS booting and linux booting in particular works.

Testing usually includes using loopback mounted chroots to verify the runtime environment prior to burning your first coaster.

Stephen M. Webb
Professional Free Software Developer

This topic is closed to new replies.

Advertisement