Ask Slashdot: Creating a "Personal" Linux Distribution?
Craigthulu asks:
"I would like to install Linux from the ground
up without using a specific
(i.e. someone else's) distribution (except a
root/boot combination to get things initially
copied). I want to do this so that I become
intimately familiar with what exactly is on
my computer rather than rely on a bunch of
(probably extraneous) software packaged up by
someone else. Hopefully, this completely
DIY method will force me to learn
everything How do I go about finding out
what I need as a bare minimum? Is there a
distribution that would actually meet these
critieria?"
I just did this, sort of. I started out with Stampede GNU/Linux, installed only the nessesary things, rewrote the initscripts (I like BSD-style), and then compiled the apps I normaly use, and now I have a nice system that I have complete control over and it's not bloated with stuff I never use (like Redhat-systems tend to have). The Stampede package system is quite nice, it somehow make you fell like you have total control over it, you can rip out parts of a package without breaking the package database etc. So my vote goes to Stampede GNU/Linux!
www.stampede.org
Someone correct me if I'm hideously wrong but couldn't you do something similar to the following:
#1. Grab the source for the minimal apps you'll need to make the box go (gcc, glibc, binutils, bash, some network stuff, pico, file system tools)
#2. Compile the gcc, don't install it. Use that gcc bin to compile the glibc. Using the new libraries (carve up ld.so.conf so that old libs aren't accessible), recompile gcc. Then proceed to compile everything else.
#3. Make yourself a ramdisk out of all of that compiled crap, make it look all nice (proper dirs, some scripts, etc) *This is the step I'm not so sure about*
#4. dd it to a disk, as well as a slackware bootdisk. The slack disk will boot, then ask you for a ramdisk. Should you not be able to stick in your own disk at that point? The system *should* boot. Mount up your harddrive and start copying stuff.
#5. Pray it works.
I know this is amazingly sketchy, I just kinda made it up (: Suggestions, etc? If this kind of thing works, maybe we'll make a HOWTO out of it?
This is basically what the MCC distribution was like back around '93 or so.
If I decided to rebuild everything from scratch I think I would create a minimal boot disk. Copy over a package management tool of some sort. Install a compiler from a package, and then build everything else under the package manager, even if I installed in non-standard directories. Even setting aside the management of installed files, having a decent configuration management system in place to be able to consistently rebuild software from scratch in a controlled way is extremely useful. If you don't care so much about consistency and reproduceability then ignore the advice above.
There a many mini distributions of Linux out there that contain the bare minimum of what you need to get the system up and running. You can also take a look at what is contained in the A disk set of slackware. www.linux.org also contains a list of distributions including a lot of the minuature one.
Take a look at man update-rc.d,
The basic concept is that the 'real' init script lives in
For something such as soundon, you don't need to run it with 'stop', so you can either make it have do nothing for stop, or not even look, such as in the
Regarding the printer configuration, the way I've done it in debian is to use the apsfilter package along with gs-aladdin. If your printer is supported by gs-aladdin, it should be relatively painless, as there are simple scripts that run to ask you about your printer & set things up.
Heh. I remember SLS - they joys of buying boxes of floppies and copying disk images onto them. (-:
Linux has come a long way since the 0.99 days!
I would install a full distribution (take your pick--RedHat, Debian, SuSE, Slackware...), then use that to compile everything for your personal distribution. Either put it together on a separate computer or on a different partition if you're low on spare computers. :)
Just a warning: I started doing this, and never finished. It takes a long time. There's just a lot of grunt work to do.
With just Slackware boot disks, I compiled nearly everything on my own. It was a bitch, it was a long drawn out fiasco, but it was worth it. I learned a lot. If you have a second machine, I'd do it on that, because depending on your skill level you may need to get on the net to ask people for help.
good luck.
Share the wealth.... Where are these scripts?~ ~^~
^~~^~^^~~^~^~^~^^~^^~^~^~~^^^~^^~~^~~~^
i've saved a bunch of stuff off my system after screwing up LILO before with this... just mounted the drives and was on my way...
:-)
i'm not a guru, an admin, a user... just a complete newbie... forgive me if my solution to a screwed up OS is format c:
nick
Try the MAKEDEV script or the MAKEDEV-C program :)
The FreeBSD bin packet is all you need to get FreeBSD running. It contains much stuff (more than one needs for a bare bone packet), but it is fun to replace all the shit BSD tools with GNU equivalents.
:-)
/usr/local /usr/local
Welcome to GNU/FreeBSD
du -cbs
51363840
its called a hobby. its no different than the people who take apart their car and put it back together. Or the people who build their own car for that matter.
Besides, the question was not about you, it was about someone else.
---
It's a mentality. If it might be better, then why not try? Doing this, in theory, means that everything is optomized bins, good for speed. But more then that, it's truly YOUR Linux box at that point. Very good feeling, that one where you just built it all from ground zero.
I have something like a distribution step-by-step
howto on my FTP site. It was originally written
for installing Linux on a Flash chip, but I have
used it also as a guide to build a custom Linux
system. Check it out at:
ftp://ftp.kinetic.org/pub/G ruppe-Sechs/flash-disk/README.txt
~Jay
I did this once for fun. Just create a new partition and start installing all necessary things onto it.
Note that most GNU packages support a INSTALL_PREFIX variable. After compilation :
make install INSTALL_PREFIX=/mynewdistro
will install everything on your new partition.
If you do not know how all things play together, have a look at the mini distros (e.g. linux router project or tomsrbt). The following pieces should be enough to be able to boot:
- kernel
- init
- some boot scripts (keyboard layout, clock -r)
- libc
- most programs from util-linux
And for working:
- bash
- GNU fileutils, textutils, termutils, sh-utils, texinfo
Wouldn't a system like the FreeBSD ports be very cool to do this kind of thing?
I'm thinking about trying that OS for the same purpose (learning more about basic OS things and the like, compiling all of your own stuff, so you know what you've got on your machine)
NO flamewars on this subject, *please*, it is just an idea......
Every expression is true, for a given value of 'true'
I have/had similar plans, though I still haven't gotten around to it. I planned on starting with the bootdisk HOWTO from the Linux Documentation Project.
This is not a problem with the tools.
You are running into the maximum command line length...a program cannot change this.
But, this is an old problem solved with the 'xargs' program. xargs reads arguments from stdin then chops up the arguments into sets of less than the max path length and then runs your program for each subset.
i.e. your example would be:
find / | xargs grep regexp
-OR-
find itself has many funky options (i.e. like running a program on every file found, such as grep) that can do many jobs...
Amen,
^ ~
I'm tired of having unknown problems and not knowing where to start. Ivan for how extreme he is has a really good point. There is so much freedom from knowing everything that is going on. That to me embodies the concept of owning your own distribution, just like a well marked up textbook that you've gone over a hundred times means you finally own the textbook.
having said that I realize it would be the beginning of unknown problems but it would also be the beginning of the end. These are things my mother doesn't need to know, but for some reason i think i do. Just stubborn too I guess.
^~~^~^^~~^~^~^~^^~^^~^~^~~^^^~^^~~^~~~^~~
I concede that starting from scratch/source is probably a very effective way to learn the details of my system. I also understand that a big advantage of open-source sw is that all the details are available for my learning should I ever need to do so. but is learning almost everything there is to know about GNU/Linux really a wise investment of my time/attention? a better investment than learning a little more about the concept of entropy, for example? or learning to waltz? a better use of my time than learn about the concept of the 'network externality' (one of the most imporant concepts in economics and helpful for understanding Microsoft. is it not better to know the basics of dentistry, psychology, consumer law, mental health (stress and the immune system, depression), and computers than to know a lot about computers and almost nothing about the other things? (I tried to pick things that most people will find useful at some time or another.)
If you are using i386, then FreeBSD is actually a nice place to start for a custom installation since it starts off small, and has the release engineering to enable you to actually make a distribution.
/usr/src/release and type make release
Case in point, we had a setup which needed a large collection of custom patches to work. I added these patches to the system, checked it built, then decided I'd like a CD (like the ones Walnut Creek sells) of the result so I could install it easily). Basically all I did was check in the source into a new cvs repo, then cd
*really* easy.
ElecMoHwk
ElecMoHwk
CEO / Founder Dashin.org
For maximum learning value, start with a libc5 system and refuse to put anything but glibc on the new partition.
/tmp /mnt /dev /proc (any others?). Also you may need to create /bin /sbin /var /usr if no package is bold enough to do it during installation. Give /tmp the correct permissions. Run /dev/MAKEDEV in your new /dev dir. (Look at MAKEDEV for bonus points.)
/. For those that can't, you have to play games.
/usr/local on the original system and building a gcc that used it. I may have played with the gcc specs file too, I don't remember.
/usr/X11R6 by NFS over a PLIP connection, I realized it was time to install Debian. :-)
Create a partition, put in
Then have a look at ftp://ftp.gnu.org/pub/gnu/. You can get most of the packages you need there (including glibc). You don't need a boot disk, you can just use lilo. Lilo, things like mount, and a few other Linuxy packages are not on the GNU site, you need to find them on ftp://metalab.unc.edu/. I remember using util-linux and smallutils (hate GNU false, which returns true when given the --version option).
Build and install enough to get a development environment. This includes at least glibc, gcc, binutils, make, sed, sh-utils, bash, (diff?), fileutils(?), grep, gawk. I am surely forgetting some. But if I told you everything, there would be no challenge, would there?
As someone else pointed out, most GNU packages can be installed onto a new system whose root is not mounted on
If you do have a purely libc5 system to start with, you will have to figure out how to build packages that will work with your new glibc libraries. It is possible to figure out how to do this. The glibc2 faq is helpful. I did it by installing glibc2 under
Always worry about what permissions and ownership the files and directories have.
If you get lost along the way, give up. About three weeks after my installation, when I found myself mounting
BeroLinux is one man's recompile of RedHat with optimzations turned on... It was mentioned recently on /. Of course, RedHat 6 will presumably have them all anyway...
PGCC ( no, not the portland group) pentium-optimising version of egcs gives great results on my system (which is actually an AMD K6-2, but what the hey)
it's at http://www.goof.com
Incidentally, can anyone recommend the best settings for the K6-2 ? I've just been experimenting, and there's a definite speed up pretty much no matter what (the kernel 2.2.2 recompile really made a difference, as did the Mesa+glut recompile) - It's just I don't fancy getting the profiler warmed up...
It's come a LOT farther since 0.12, which was where I started putting together Linux systems, and I don't remember how many times I started over from scratch before SLS came out. Back then half the time when you upgraded the Kernel you had to upgrade gcc and half the supporting programs.
Partly for the heck of it, and partly to try to learn how, so I might be better prepared to get Linux going on legacy machines, I decided to try to get a minimal Debian running on my legacy Vectra (386/16N, 8/52 MB). With only 52 MB of HD space to play with, and wanting to keep a minimal DOS partition going, I allocated 36 MB + 4 MB swap to Linux. .deb). .gz form. (Later, found that to read them with any degree of convenience (from mc), I had to load the whole groff package; rm'd almost all of the groff fonts and tmac (for my purposes!).) Others to remove are many keytables, variants of joe. You need to keep /devascii/ in Fonts to let mc show you [man.gz] pages. No point in trying to remove /proc/kcore; for one, you can't do it (easily, if at all); and two, it isn't taking up any HD (or RAM?) space. It's something clever to learn about. You must keep base-files, findutils, mawk, and diff, apparently. .bashrc, iirc; copying it to the user's .bashrc seemed to work, but there are probably better ways! I was booting from floppy, and wanted to try to rearrange matters for a dual boot. // Also use a Dvorak layout, normally in DOS via the MS GA0650.EXE package, an excellent piece of work; bug-free if the apps. programmers do things normally. Linux supported Dvorak very nicely. Created a set of aliases to mount and unmount my DOS partition and floppies, also "mkext2fs" on a floppy. /libs/modules/2.0.34/ (iirc) had stuff I could delete, based on its names. Yikes! Good way to *fatally cripple* Linux! At about this time, I also installed a used '387... Anyhow, my Linux partitions are now almost useless. (I allowed a measly 4 MB for swap, figuring that was better than none.) Tomsrtbt, the Debian rescue disk, the Debian boot disk, and attempts to reinstall Debian all seem to find the existing Linux, and get stuck toward the end of the boot sequence at "INIT: version 2.xx booting". Hangs forever. I might need to redo from scratch, although pruning and reconfig. would take a while. Now that I've unwittingly sabotaged my Linux partition(s), it's really nice to know there's lread, a DOS/Win pgm. (Linuxberg): Speaks ext2fs. It lists ext2 dirs; can also read files from them into DOS (but watch long filenames!), and even write from DOS to ext2 files. Unfortunately, I probably don't have the specific files in DOS file format to fix my Linux.
// I have a shell account, which meant I could do away with almost everything related to networking and PPP; planned to use minicom. Anyhow, cleaned house in the DOS partition, backed up, defragged, and used (iirc) FIPS to keep DOS and create new partitions. FIPS has great docs, as I recall. Used DOS telecomm to d/l Debian Base images, and their root.bin and drivers disk images, and maybe their boot disk image as well. Lesson #1: Even though the sizes of the disk images seem to fit onto a floppy, *Don't* use DOS xcopy to transfer from HD to floppy! You *must* use a RaWrite! (RaWrite 3.0 didn't work on mine; there are several.) I think I kept the big Base file on HD, btw.
Followed the Debian installation instructions, and used dselect to remove and add things I wanted. dselect is a pain; also really slow on a 16MHz 386. Try to use apt (?), a new Debian installer. Nevertheless, dselect had one redeeming feature (no, not a bug): It keeps track of all dependencies: What you else you must get but don't have. Well, give it another pat on its huge back: It can actually find the packages you're looking for, even though you had to squeeze the devil out of the original filenames for the packages. Seems that keeping ".deb" will do it, and anything reasonable is OK if it fits the MS-DOS 8.3 format. (I tried to keep key letters as well as all digits if possible; also, of course, delete all dots except that before
Had an exhaustive look at the files (recommended!), and found what I had. I'd recommend installing Midnight Commander immediately, at this stage. Found tons of all-but-useless files in the localization area, some even in triplicate, more or less! Think I also reluctantly ditched all the man pages, saving those in
To get color ls, I snooped around and found the necessary stuff in root's
Debian apparently omitted the support code/files for vga=ask, which I found to be a Big Drag, because I really like 50-line VGA; I can see more at once. 25-line displays are great for 6 people at once, but I'm a loner. Had an exhaustive look at the console fonts, and got rid of those that I didn't want. Found that resizecons didn't work, because the necessary videomode files were missing, but setfont could give me more lines; mc still gave me a full screen's window, as did joe. Needed to do a ^L to clean house fairly often, but that was worth the extra lines.
Also (eventually) had good luck with gpm (mouse) and zgv, the image viewer. Didn't get minicom going yet...
Well, I got overzealous in my pruning, thinking that
Legacy hardware/software addict. Midnight hacker, 1960. Codepage 819 in DOS: Total Latin-1 compatibility (no boxes/lines
that i think this is a really good thread. i've noticed the degridation of the posts lately, and that i'm glad there are still pleasant, helpful people who think before they comment.
as to the problem at hand, i can't help much. i've been running debian for around six months now, and love it. i still haven't set up my printer for my system - it just works in WordPerfect under its HP LaserJet series II emulation (it's an old IBM 4019E, non postscript).
i also haven't figured out debian's boot scripting process. i don't get the different run levels. i want to put things like OSS 'soundon' in my boot scripts. that's why i was reading. sounded like people might know of resources to learn about this (starting basically, and working to more advanced info) - but alas, scripts seem to be a common weak point in the understanding of their systems...
It's not that hard if you know what all the dev gear does. Here are the first things you will need to get installed:
kernel
lilo
c library
init
termcap or ncurses
bourne shell or bash
init scripts
gettyies
c compiler
make
Once you have all that compiled and properly installed on a new partition, boot into it and compile everything else. It took me about 2 or 3 weeks to have a usable system. It should be quicker for anyone now, as glibc is standard so you wont have to hack at all the code to get it compiled.
Good luck!
If you want to roll your custom *nix distribution it really does not matter which initial system to use. You can start with Debian base (7 floppies?) + libc6-dev + gcc + make, or use the same setup with slackware or *BSD. And definetely not RedHat (it installs lots of junk whether you want it or not)
...but there was an article written by, I think, Alessandro Rubini on roll-your-own init files. Seems to me like this may be something fun to look at too...
I was about to mention that one could take
a barebones distribution of BSD as an
example of what you need for a small
distribution. Other examples would include
going back and looking at the old MCC
distributions. otherwise consider
what tasks you need done:
* a shell (sh compatible preferably)
* shell utils (GNU)
* fdisk
* ext2 utils (mkfs, fsck)
* editor (vi and/or emacs)
* network utils (ifconfig, route, telnet, ping)
* inetd/xinetd/etc
* network server daemons (telnetd, samba, httpd,etc)
* mail system (qmail, sendmail, postfix)
* shared libraries (libc/glibc)
* compiler/linker/assembler (gcc+binutils+.a's)
* xwindows (xfree)
that would be roughly what i would start
with, and it shouldn't be that big.
...is all you need...
Error: password can't contain reverse spelling of ancient Chinese emperor
I'd like to know how to do this as well.
You have been assimilated.
Slackware can be built up bit by bit from a very minimal system.
Or, you could build up from trinux, if you're truely insane...
I did a similar thing about a month ago as your talking about now. What you'll need to get started is a
relatively large suite of programs and an existing distribution capable of compiling. The main
packages you will need are:
libc5 (or glibc2)
binutils
shadow (for passwords and logins)
grep
flex
gcc (or egcs)
make
bash
gzip, bzip and tar
gawk
groff
ld
modutils
procps
sh-utils
sysklogd
sysvinit
util-linux
text-utils
I think thats it... The hardest part I found was getting the init program to work. My kernel wouldn't
I dont think there is anyone who hasnt had this idea when first starting to use Linux, I know i had it. The idea is very simmilar to "New Driver's Syndrome" in which a new driver wants to go everywhere as soon as he gets his license. This nrew driver sees every movie (spending endless ampounts of money) and eating alot of ice cream. I refuse to let myself go down these meaningless paths, just because i have huge impulses to do so. And besides all you probably learn more trying to understrand what is done within a specific distribution. In building your own you completely ignore all the beautiful details. Just my humble opinion
How did Slackware, RH, Stampede, Debian, etc... create their distributions? Did they borrow from other distributions. Or did they go to all the various sites that had the GNU tools, kernel, and make the entire thing from scratch. A howto on this would be cool. Even if I didn't do it, I'd learn alot from the complicated process and all the steps needed to create the final animal called GNU/Linux (or Linux for short...)
Mike
Wow, it's a good way to learn something, but as someone that has done it several times because there was no option let me tell you, it can be a real pain. However it is an excellent learning experience.
One of the happiest days of my life was when I downloaded the last of the disks in the first SLS distribution and installed it. From there I switched to Slackware after SLS died, then finally RedHat about a year ago.
You should have a look at the devices.txt with the kernel, as it explains the major/minor numbers to use.. And, man mknod will show you how to actually make the devices from those #'s.
If you've got a Debian system, you can install the altgcc package, then compile libc5 things by calling i486-linuxlibc1-gcc and i486-linuxlibc1-g++ where you would normally just call gcc. There are 'oldlibs' package sections that contain libc5 libraries, along with -altdev headers to go with them.
I'm not sure how well other distros support this, but if you're willing to spend the time, you could maintain a libc5/libc6 development environment on your own, too.
I made a script that will copy a bare minimum of
files from a funcioning Debian system to a boot
disk. A copy of the full system is put on a
cd (and the boot floppy to make a bootable cd).
The boot floppy boots to an initrd file system.
After it comes up, the cd is mounted, and the
rest of the needed files are either copied or
linked to the ram file system. This gives a
full system, emacs, X, etc. I use 12 meg for
the root ram file. Mark -- Blunier@concentric.net
well at least you have to start with something : /, /usr, /dev... /dev entries should be the hardest part ; )
a bootdisk with a linux kernel, an HD image with bash and stuff (you can use the debian bootdisk it's very good)
then you have to format your partitions from the bootdisk, and create a tree :
the
then install some programs like bash and stuff, and install LILO...
you should look at the redhat installation scripts to see how they work
This is a cool way to learn about Linux.
I'd just get a kernel onto a blank filesystem, lilo the kernel so it boots, and then get sash and make it the init program.
That's about as small as I can think of. You can build your system from there. Have fun.
If tits were wings it'd be flying around.
What timing for this question! I just finished wedging a slackware distro (3.3) onto an ancient laptop (Gateway Nomad 486/25 4M RAM, 30M ext2 partition). Tried to roll my own for most of it, since I couldn't get any of my RH boot disks to load. Luckily, I still had a collection of old Linux CD around and found that I could get slack up and running.
Now I have a question, since I am running a libc5 system on the laptop and running glibc on my other system, how do I compile binaries for the laptop? Do I need to just keep a copy of libc5 and compile against that? Do I need to recompile libc? What would the gcc switches be for something like this?
Anyway, its fun when you finally get the thing breathing. I felt like Dr Frankenstein when it booted and gave me a prompt.
Chris
Chris
So Buddha walks into a pizza parlor and says: "Hey, make me one with everything."
A good starting point would be ftp.cs.Helsinki.FI/pub/Peo ple/Torvalds_Linus/v2.2/
Actually, I believe "shitload" is one word...
which would be found at http://www.toms.net/rb/.
-Confused
I see lots of comment about, and provision for, installing into systems with only limited RAM (such as 4 MB), but surprisingly little about installing onto HDs that have limited space. The small distribs., true, do take up minimal space, but when you want to roll your own, more or less, it seems that the big emphasis is on accommodating minimal RAM, forgetting about minimal HD space. Or, am I confusen?
Legacy hardware/software addict. Midnight hacker, 1960. Codepage 819 in DOS: Total Latin-1 compatibility (no boxes/lines
Posted by Daniel Bendorf:
Yeah I think there at least needs to be a distro that includes glibc 2.1, kern 2.2.x, xfree86 3.3.3.1, and updates regualry, i mean like the DAY teh stuff comes out. If anyone is interested it might me a cool project. I would like to be involved. I have tried making my own distro, but I do not have enough linux knowledge, so I have failed, twice. heh, but I will someday make a kickass distro that has 'bleeding edge' junk
Assuming that your reason for building your own distribution is that you are reasonably happy with a main-stream distribution such as RedHat but realize that it is out of date the moment it was burned to Disc, you probably want to start with that distribution. If you are using RedHat, I suggest:
1. Learn kickstart. Install mkkickstart (on the disc) and read its documentation. (The file it produces is not ready to run.)
2. Read the comps file on the disc to see what RedHat considers a "bare" installation. This would be Base. Examine if for stuff you don't need.
3. Chase down updates of all the stuff you will need. Many of these will be newer releases.
4. Put the new releases on Zip or consider burning a disc that mimics RedHat or simply updates it. You could mess with RedHat's installer but kickstart will save you the trouble.
5. Roll your own binaries once you REALLY know what's going on the system. (I'm not there yet...)
Michael Dexter
dexter@ambidexter.com
Well, it sounds like your talking about Stampede GNU/Linux, it's using glibc 2.1, kernel 2.2.1 etc... and packages are updated/added almost every day.
This is an easy and fun thing to do. Here is how I did it for the first time:
1) Bott with Slackware disks, installing aaabase package, and gcc tools.
2) Build egcs then libc/glibc.
3) Get whatever you want and build it and install it.
It's fun!
Ross Vandegrift
coolio@tmbg.org
http://www.erols.com/vandegrift/
I was actually thinking of doing the same thing, but decided not too because it would take a shit load of time to do and maintain. I might however rebuild a great deal of my system from source rpms using egcs 686 optimaztaions to get a bit of speed boost.
And if you can't find an old Mac or Amiga lying around, there's always NetBSD or Slackware.
Yours in pain,
Kris
Kriston J. Rehberg
http://kriston.net/
Kriston
I'd like to know how to do this as well.
If you really want to start from scratch, start from the kernel:
http://www.kernel.org
from there you can get the basics, like the kernel, init, gnu utilities, and roll your own expert distribution. Most of the documentation is in the tarballs and source code itself and is quite good.
It is a lot of work, but very educational.
----- obSig
Jeffrey Baker wrote: /` and have it work.
> I want to do 'grep regexp `find
You can't. Backticks or $(...) won't handle filenames
which contain whitespace. You need to use something like:
find / -type f -print0 | xargs -0 grep regexp
check the bootdisk-howto and thats most all you need to get started.
Well being well-rounded is widely considered to be a positive trait-take Leonardo Da Vinci THE Renaissance Man. But if one is only familar superficially with many concepts, they aren't very useful, save for being good at Jeopardy. Real working expertise is needed to make things work, to make the world go round. It would be difficult to be an expert on all of the things you mentioned, so we should applaud this ambitious individual for at least striving to become an expert in one field. Perhaps he will move on from there.
The slackware install process is just a shell script... it's easy to figure out what it's doing.
Mark
I'd have to agree with this. NetBSD is a nice, bare-bones system which requires you to learn quite a lot about the system. I installed it on an old 486 just for fun and ended up having quite a good time.
Hey man me too I installed a old ver of slack on my laptop which is a NCR 3150 486 with 4 mb of ram worked from the bottom up now the system is great and fast too belive it or not you just need to not run useless stuff that you are not going to use.
If anyone has the clocks for the LCD panel on the NCR 3150 i would love for you to send me a copy
phreak@cyberwar.com
Most of the above answers seem right: it's tough and time consuming, you're better off with a second machine, you should start with a minimal install, etc.
;-) What did I earn? Lots of patience, tons of small code-hacks, and optimized binaries. Was it worth it? I do not really know. I'm happy with it, but I wouldn't advise anyone to do the same unless they had very special requirements.
I just did that (over the last two weeks!) moving a very basic Slcakware 3.6 to glibc 2.1/kernel 2.2.2. I've compiled *everything* (binutils, diffutils, all kinds of libraries, Xwindows) and I _am_ quite happy with the results. So much that I'll start canning up stuff into an unofficial glibc based Slackware if and when I get the time.
Now, the question is if it's really worth it. I mean, I _could_ have installed RedHat 5.2+updates. I'm sure I would have finished in much less time. Why did I do it? I'm stubborn as hell. And I _do_ have another machine to work on as stuff compiles into 3-4 am every night
--Moo
Try This:
find / -name FileSpec -exec "grep regexp {} \;"
The {} is the file upon which find has just matched. The backslash is to protect the shell from interpreting the semicolon that the grep statement needs...
About three years ago I installed Slackware. Since then everything I've installed has been by compiling the sources. My dist wasn't my own then, just a hacked Slackware, today it is. The minimum you need is kernel + utils (util-linux and GNU file-util and GNU text-util) + shell + make + gcc and some way to get the sources (ftp to prep.ai.mit.edu, tsx-11.mit.edu and metalab.unc.edu).
;-)
;-) ;-)
Warning: It takes a lot of time to stay bleeding-edge this way, but if that turns you on it's the best way to stay more bleeding-edge than anybody else
When I start to trust -mregparm in gcc I might redo it all with my own ABI
Has it ever occurred to you that God might be a committee?
Has it ever occurred to you that God might be a committee?
--- Jubal Harshaw
I havn't actually done a system myself, but I would imagine that the DIY method would require a pretty large ammount of HD space, at least while things were being compiled and setup...
--
I would say that Tomsrtbt is the smallest way to start. One Floppy and building blocks for everything. Even has ftp to get those new tarballs. While meant to be a rescue system, it will go on a harddrive and allow one to start building.
Strictly speaking:
/dev/null
find / -type f -print0 | xargs -0 grep regexp
The probability is low, but non-zero, that grep might otherwise receive one argument, and not prefix the output with the filename.
If you want to do it properly you may need these tips:-
1) After collecting your tarball, get Debians debianisation diff and dissect it (hell, get them both from the same place). You can find some gems in there (e.g. bleeding edge security patches, fresh man pages). You may also want to check patchlets in rpm's.
2) Write down in a small text file everthing non-obvious ("Oh I'm sure I'll remember that" = write it down NOW!!), and preferably all the commands, you used to create and install the package.
This may sound like (spit!) 'Documentation', but believe me, it may save you HOURS if not DAYS when you next install/upgrade/wipe-and-restart, especially if you like to tweak the obscure compilation options, and you won't have to re-absorb README*, INSTALL, NEWS etc. (You DO read those first don't you?!)
3) After it has installed, run a 'find / -cmin -10 >/tmp/list'. This will show you EXACTLY whats changed, and after a bit of cleaning up serves as a complete file list that you can store along-side the packages' recipe file.
With a bit of shell scriptery this will tell you which packages overwrote each other (e.g gdb and its personal readline lib). You're only ever a zgrep away from finding out where '/usr/bin/fgpps' came from.
That's most of rpm without the hassle!
As most of todays core packages consist of './configure --listofopts;make install' the above costs very little to do, and generates great peace of mind and time savings.
Be aware - making your own personal Linux distribution can take a fair amount of time, and bleeding edge package installation is no longer possible; too many things changing too quickly.
Good Luck!
(Exausted bleeding edge package installation masochist)
Sounds interesting... Have you ported whatever libc the *BSD systems use to Linux, that sort of thing? Might be a good way around glibc-2.1 licensing issues. Anywhere to get some info?
I have been having a different itch lately. I want to compile all of my own tools (ls, grep, find, etc). The current set of tools sucks, when I do bigish file system things, I always wind up with directories that I can't list or delete.
/` and have it work.
I want to do 'grep regexp `find
Posted by Locutus of Borg:
/dev entries. i'm making a linux distro fir a project for my work, how would you go about that? =|)-
speaking of making
--
Ben
IRC: SUidRoot
For a Linux distribution, Slackware gets as minimal as they come. If you are comfortable with *nix systems, then {Free,Net,Open}BSD systems have good minimal installations and are about as standard as they come.
If you are wanting to really 'Roll Your Own,' experience is probably your best bet. There are many dependencies between various libraries and system binaries which you should be aware of. For a good overview, check out FreeBSD's 'make world' which does a source-level rebuild of the base operating system.
As a side-note, I have been working on a source-level Linux distribution based off the free *BSD systems; not a task to be taken lightly since the Linux operating system is quite fragmented when it comes to system-level binaries.
/* MAGIC THEATRE
ENTRANCE NOT FOR EVERYBODY
MADMEN ONLY */
Trinux is a very useful tool for a portable, BYO linux - mainly for testing network setups. I seriously doubt whether anyone would want to base their machine on it for day to day usage. You are barking up the wrong tree here.
This is definitely the way to do it. Just make a new partition, check it, mkfs.ext2 on it, and start hucking stuff on to it (well, I guess hucking isn't the best word to use in this case, but...) Once you have it mounted you can copy over the device files that you need, compile a kernel and bash, and try getting the kernel to boot (it will start up bash once it cannot find an init program). Then you can get an init program compiled, etc. Although setting up a distro first is much easier, it sort of defeats the whole purpose of creating your own linux/GNU system. This way you get a very up to date and highly customized system to begin with (you'll notice that this "low-level" stuff is really where distrobutions differ). The only major sticking point I found was getting a shadow password suite installed. Oh yeh, and being able to read through source code in order to find out why those cryptic error messages are being generated helps too...good luck!
Slackware would be the distribution of choice
for you since it forces you to do everything
yourself. Don't install any other the optional
packages and you can do even more yourself.
No, this is how you learn every nice little detail about your os... just like getting to know your new/first car ;)
I used slackware..
Ive got scripts to rebuild a system over night now, took a while to do, but it works no hassle now. Compiles pgcc first, then glibc2.0 (2.1 just wont work here), then pgcc again. after that, the system goes to the rest of the tools. Very neat. I would distribute everything, if it wasnt so system specific. just install a few things from series "a", compiler, libc, and go from there.
Andrew.
Email me,
~
I'm working on about the same thing but in concept so far. I have a computer suitable for testing/development. Also you might want to check with Rock Linux man. (Or maybe you are Rock Linux man).
^~~^~^^~~^~^~^~^^~^^~^~^~~^^^~^^~~^~~~^~~^
"it forces you do everything yourself"
Blatantly false
NetBSD installs FULLY into about 40mb, comes with the bare minimum of a working UNIX system. It also runs on 15+ platforms. It really makes you learn the ins and outs sysadmin skills. I've always felt that Linux is WAY over featured, but then again, they've got a different audience. The other things the overfeaturing does is make way for more security holes. With NetBSD, you know exactly whats in your system because you INSTALLED it. There's SOOO much stuff in most Linux distros it will make your head spin trying to keep track of it all.
Luck
natez