Need advice with making a customized linux distribution (From scratch or pre-existing distro?)

0

I'm working on an application on a bootable USB drive that runs at startup (doesn't give the user access to anything but this program). I figured I'd utilize an existing distribution, strip it of anything superfluous, and find a way to launch the application from the get go. I'd like to keep it as small as possible as it'll be residing on a USB drive and I don't need all that much. I have no experience in/with any Linux distribution what-so-ever. I have also looked at Linux From Scratch as a possibility as well as others but I could use some more seasoned ideas as to what distribution y'all might suggest I look into. Ultimately, I need high level access for Keyboard/Mouse input, Hard Drive Access (At least reading [Writing can be done exclusively to the USB drive itself]), and access to Direct Rendering Manager (or equivalent). All with a license that must allow commercial use. The application itself will be in C(++ if possible but that's not a necessity).

Additional Noteworthy Information?: I plan on coding it all on Windows using Visual Studios as my IDE, utilizing VisualGDB, CMake, and VM Virtual Box. As a total "noob" to Linux, I figured this would be the most productive avenue to take as opposed to diving in to coding on Linux as well.

Additional Additional Notes: Stackoverflow users offered up some suggestions such as TinyCore Linux, Damn Small Linux, and Debian.

tl;dr: I need a distribution that provides high level: Keyboard input, Hard Drive Access, Rendering, can be booted from a USB, and has a license open for commercial use. Thoughts?

Cole Stanchfield

Posted 2014-01-17T22:14:18.010

Reputation: 3

Are you asking for a recommendation for a distribution or a method for creating your own? The former is not really allowed here on SuperUser. But the latter might get a response. – Julian Knight – 2014-01-17T22:57:44.840

Well as someone who has not delved into Linux at all, information on a great "barebones" distro that has what I need would be GREATLY appreciated. But I was looking for an answer from someone with more experience than myself (most everyone) as to if it'd be faster to make my own or utilize a pre-existing one. Stackoverflow users directed me here saying the question was more appropriate to be asked here. I appologize if I was misled =S – Cole Stanchfield – 2014-01-18T01:54:12.800

Personally, I'm not criticising, I am happy to recommend but there are those who might object. – Julian Knight – 2014-01-18T18:14:01.193

Answers

0

OK, happy to advise on home-grown vs standard distro's.

Standard EVERY time. Don't even both to think about rolling your own. As a beginner to Linux, even when experienced, the effort required to maintain it would be far to high.

Instead take one of the recognised bare-bones distro's. My own favourite would be Debian as it is stable, small and efficient. But it has excellent support and has stood the test of time. Also, if you know Debian, working with any of the Debian based uber-distributions such as Ubuntu is straight-forwards.

Julian Knight

Posted 2014-01-17T22:14:18.010

Reputation: 13 389

Thank you very much for the feedback. I looked at Debian but the version of it I grabbed from Unetbootin had an extremely complicated boot sequence which wouldn't work for us. We need one that you can just plug and play so to speak. Ended up choosing a barebones version of Puppy though I haven't actually gotten to tearing it apart quite yet. Only really need to just strip a few features so that the user can't close or lose context/"alt+tab" out of a full-screen program that runs immediately at startup. This has already been an interesting experience jumping in head first. Thanks again Julian! – Cole Stanchfield – 2014-03-11T00:04:15.993

No problem Cole, glad I could at least give you an idea or two. Not sure what about the Debian boot you found complex? Maybe it was doing some hardware checking? It should be pretty straight-forwards. I'd probably go for creating a simple VirtualBox disk image and installing Debian minimal to get a feel for how things go. Most of the big distro's maintain minimal versions I think. – Julian Knight – 2014-03-11T22:19:00.623

It was probably a user error on my end grabbing a particularly bad Debian distro to test it out. The one I grabbed had a LOT of extremely complex hardware questions it required to be filled before it would finish booting. I mean, it was asking about memory chunks and sectors on the partitions. I was probably grabbing a version of the distro that I shouldn't have been. For development I'm simply coding in VS on a windows machine with the project in a network shared folder which I then compile on a machine running Knoppix 7.2. It's a simplistic/inefficient set up but it works. – Cole Stanchfield – 2014-03-12T23:54:45.340

The distro we end up using isn't concrete yet so I'll give Debian another look now that I know a bit more. The 3 biggest selling points for them though are: Size, Boot Simplicity, and Licensing. The end product is going to be embedded in our makeshift version of the OS and distributed on USBs so it has to be viable for commercial redistrobution with the least limitations as possible (as per request by our client). The slacko version of puppy I found had few (relatively speaking) stipulations so. And, PS. If Debian is anything like Knoppix (I believe Knoppix is derivative of it) I will like it – Cole Stanchfield – 2014-03-13T00:00:51.770

Sounds like you are well on the way. I'd say that the great benefit of Debian is its widespread support and it acts as a common standard for many other distro's as you've already seen. It might not quite be the simplest but it embodies many of the best standards. – Julian Knight – 2014-03-13T20:41:38.523

0

I'm a little late, but the meta-distribution Gentoo would be a great choice. Based on my own experience, I'd call it "Linux From Scratch made easy", and it has some of the best documentation I've ever seen.

You start with a very small set of pre-compiled programs for your CPU architecture which can immediately be recompiled if wanted, it has a package manager that worries about dependencies and allows you to customize every aspect of how programs are compiled, and you also get to compile your own kernel, which is incredibly helpful for small and/or embedded systems. You can also compile drivers outside of the kernel so you can support almost all hardware imaginable while only loading the drivers you need, keeping the system tiny and fast during run time. Gentoo also uses Open RC by default, which is very simple and incredibly customizable.

Unfortunately, there's a very steep learning curve (even for those experienced with Linux), but the documentation is some of the best I've ever seen and you would basically be able to build your own distro without worrying about package management and dependencies.

user195213

Posted 2014-01-17T22:14:18.010

Reputation:

It is a bit late but I'll definitely give it a look see for in the future. A shame to as it at least sounds like exactly what we were searching for. I came across Gentoo in my searches but with all the choices out there I only gave it a passing glance. I'm still a severe novice so I'll try digging around in Gentoo. – Cole Stanchfield – 2015-06-23T04:02:08.107

I'd give you a vote up but I don't have the superuser reputation to do so. :S – Cole Stanchfield – 2015-06-23T04:04:46.610

@ColeStanchfield That's ok. If you do end up giving Gentoo a try, expect to make plenty of mistakes and to do a lot of learning for at least a week. It took me a while before I was able to make some changes to the kernel, recompile, reboot the system remotely, and actually have it come back online consistently. However, the trade-off is speed and performance. I can reboot my desktop and get back to a fully responsive GUI in under 30 seconds, and I can do a brand-new install of Gentoo on a machine in about 30 minutes, and it normally uses around 12MB of RAM before installing anything else. – None – 2015-06-23T19:37:25.397