-   Linux - General (
-   -   Help creating a tiny custom distro (

matt_heys 01-13-2009 08:36 AM

Help creating a tiny custom distro
Hi peeps.

I was wondering if anybody had some info on creating a custom boot disk.

At work we need to shred our drives on our PC's before we send them back, we were using Autoclave ( which is just a boot disk, shred and some scripts.

It's very old and doesn't support SATA drives, I managed to bodge an updated kernel on it but the shell scripts, fdisk and hdparm still don't support SATA, so it's not as easy as it used to be for my non Linux friendly co-workers.

I would like to create myself a small USB based Linux OS that I can customise myself, one that after it has been booted you can remove the USB key, I am guessing this will be some sort of cross compiling and initramfs based system.

If you have any ideas or even better know of any guides on the internet I would really appreciate it.

I've tried to use uClibc and Buildroot but it seems to be out of date and keeps failing, anyway it would be nice to know how to do it myself, I think LFS is going to be too much but if you think it is the right starting point let me know.

Thanks in advance.

MoonMind 01-13-2009 09:53 AM

Things like that actually exist - and most of them come with all tools needed to customise them further. One of my favourites in this respect is Finnix, but for your purpose SystemRescueCD might work even better. Finnix doesn't offer a GUI like SysRescCD, but it comes with all the tools necessary for system maintenance and is (IMHO) easier to customise (but I'm biased). Both distributions offer methods for USB installation.

If you need something "bigger" (that can still be very small, given the right ingredients), try Ubuntu Customization Kit. You may want to start from a server version with that...

And then, of course, there's DBAN, but that's for shredding exclusively - an older version is still available as a bootable floppy (don't know if that one does SATA, though). And if you're really into boot discs (floppy!), try TOMSRTBT (but that won't work with SATA...).

It'd be also interesting to see how far Puppy Linux or DamnSmallLinux could take you. DSL's more compact, but Puppy offers a lot in terms of system maintenance.


matt_heys 01-13-2009 10:12 AM

Thanks for the reply, very helpful. I tried using the mini cd version of Ubuntu to just put the base operating system on, however after I removed "login" it threw a wobbly and still asked to login. I've done that with Debian in the past and it went straight to bash as root.

I will probably check the customisation kit out anyway as I have just built a MythTV box that could be better.

I will give Finnix a go, my plan is to write a shell script to enumerate the drives give some details of each and then just get people to press 1,2,3... etc so it should do the job I think.

I was looking at DBAN but a home grown solution would be nice as it would be easier to update the Kernel for new hardware as and when required or add different features.

MoonMind 01-13-2009 10:25 AM

You're right about home grown - Debris Linux has a custom installer that works the way you intend to go (a sort of ancient, but efficient "press 1" menu - still an all times favourite, and still in use - like smxi in sidux. That said, I think you'll like Finnix - it's straight to the point, everything you need is there and it's pretty compact - not as small as the mini distros, but it packs more punch in terms of admin tools; it beats Debian proper in that respect, some say it's what a minimal Debian (sid) really should be (but I think Ryan would disagree ;)).

Oh, and another Debian based distro that invites further customisation is grml - it's not as compact as Finnix, but it's very adaptable and packs a real punch. It's a true geek tool, though - which isn't any kind of judgement, just a hint at what awaits you. There are also core versions without much fat available.


oposit 01-13-2009 10:38 AM

PClinux Minime or Puppy Linux can be easily remastered. They're small, easy to use, can start from USB and work with SATA drives. Just try them with actual systems to be sure, add the tools you need, change the look to make easy to find the shred tools, and remaster.

matt_heys 01-14-2009 06:55 AM

Finnix looks good and I like the tutorial on remastering, I may use it for some other stuff I want to do, but you need to keep the CD/USB in whilst using it, when we have 100+ machines to wipe in a weekend that's a lot of CD's to be burnt. I might try and make a Citrix Thin Client boot disk from it :confused: however.

I think in the mean time I am going to read this and and use this to build a busybox based setup and compile shred manually and copy it over.

Puppy & PClinux are too bloated for what I want (seems funny writing that) but I really don't need to have an Xserver running, maybe a Framebuffer (I think that's what it's called) of 1024*768.

I've heard of grml before and will download the ISO and take a look, it might be that I can create a generic recovery tool for my co-workers as well as a specific shredding tool.

All times are GMT -5. The time now is 11:00 AM.