Slashdot Mirror


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?"

84 comments

  1. Stampede GNU/Linux by Anonymous Coward · · Score: 0

    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

  2. A process..? by Anonymous Coward · · Score: 0

    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?

  3. MCC dist anyone? (+ package manager discussion) by Anonymous Coward · · Score: 0

    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.

  4. The Bare Minimum by Marc+Glade · · Score: 1

    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.

  5. i'd just like to point out by ninjaz · · Score: 1
    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...

    Take a look at man update-rc.d, /etc/init.d/skeleton, and /etc/init.d/network

    The basic concept is that the 'real' init script lives in /etc/init.d, and when switching runlevels, init runs the scripts using their symlinks in /etc/rc[new runlevel number].d with either a start or stop argument depending on whether the the name starts with S or K (S == Start, K == Kill)

    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 /etc/init.d/network script.

    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.
  6. Have Fun! by Spruce+Moose · · Score: 1

    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!

  7. start with a full distro by Sourdough · · Score: 1

    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.

  8. I did it... by Anonymous Coward · · Score: 0

    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.

  9. Yada by On+Lawn · · Score: 1

    Share the wealth.... Where are these scripts?
    ^~~^~^^~~^~^~^~^^~^^~^~^~~^^^~^^~~^~~~^~ ~^~

  10. boot disk - hal91 floppy linux by Anonymous Coward · · Score: 0

    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

  11. Err, not easy but... by Anonymous Coward · · Score: 0

    Try the MAKEDEV script or the MAKEDEV-C program :)

  12. get GNU/FreeBSD by Anonymous Coward · · Score: 0

    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.

    Welcome to GNU/FreeBSD :-)

    du -cbs /usr/local
    51363840 /usr/local

  13. is this the best use of my time? by CMiYC · · Score: 1

    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.

    ---

  14. is this the best use of my time? by Anonymous Coward · · Score: 0

    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.

  15. Something like a Distro Howto... by Anonymous Coward · · Score: 0

    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

  16. Bare bone by Anonymous Coward · · Score: 0

    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

  17. Something like (Free)BSD Ports? by Idaho · · Score: 1

    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'
  18. Bootdisk HOWTO by Scott+McGuire · · Score: 1

    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.

  19. RE: A different problem: compiling your own tools by Anonymous Coward · · Score: 0

    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...

  20. Subborn as Hell by On+Lawn · · Score: 1

    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.
    ^~~^~^^~~^~^~^~^^~^^~^~^~~^^^~^^~~^~~~^~~^ ~

  21. is this the best use of my time? by linuchristo · · Score: 1

    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.)

  22. Try FreeBSD! :) by Darius · · Score: 1

    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.

    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 /usr/src/release and type make release

    *really* easy.

  23. surprised to hear of this just now.. by ElecMoHwk · · Score: 1
    I'm surprised there isnt a how-to or something on this. I mean, all distro's can be install in a basic form, with bare minimums, but for years now I've been discussing with friends who have been fishing out the BARE minimum from the installs and repacking the systems to just install their own preferences. I've actually begun to do this with NT even. It now installs with a modified registry, no exchange or messaging or IE, and of course defaults to my own "theme". Since I have a cdr drive, i've also packed a copy of my pqmagic and other drivers that i know i'll need for my standard working environment onto the cd. Anyone know of any pages that have info on tweaking OS's in this nature, from the pre-install stage ?

    ElecMoHwk

    --

    ElecMoHwk
    CEO / Founder Dashin.org

  24. Here's how I did it by Beethoven · · Score: 1

    For maximum learning value, start with a libc5 system and refuse to put anything but glibc on the new partition.

    Create a partition, put in /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.)

    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 /. For those that can't, you have to play games.

    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 /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.

    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 /usr/X11R6 by NFS over a PLIP connection, I realized it was time to install Debian. :-)

  25. Optimizations by Anonymous Coward · · Score: 0

    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...

  26. Have Fun! by Anonymous Coward · · Score: 0

    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.

  27. My wants were somewhat different by enby · · Score: 1

    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.
    // 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 .deb).
    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 .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.
    To get color ls, I snooped around and found the necessary stuff in root's .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.
    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... // 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.
    Well, I got overzealous in my pruning, thinking that /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.

    --
    Legacy hardware/software addict. Midnight hacker, 1960. Codepage 819 in DOS: Total Latin-1 compatibility (no boxes/lines
  28. i'd just like to point out by Red+Leader. · · Score: 1


    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...



  29. I did this last year... by Anonymous Coward · · Score: 0

    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!

  30. Does not matter... by Anonymous Coward · · Score: 0

    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)

  31. Linux Journal...don't remember the issue... by Anonymous Coward · · Score: 0

    ...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...

  32. Barebones Linux? Try NetBSD by hagan · · Score: 1

    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.

  33. tomsrtbt... by SigILL · · Score: 1

    ...is all you need...

    --
    Error: password can't contain reverse spelling of ancient Chinese emperor
  34. ME Too by rcooper · · Score: 1

    I'd like to know how to do this as well.

    --
    You have been assimilated.
  35. Slackware's pretty close.... by Anonymous Coward · · Score: 0

    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...

  36. creating a distribution by Anonymous Coward · · Score: 0

    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

  37. new linux user syndrome: by Anonymous Coward · · Score: 0

    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

  38. How did the Big Boys do it? by Anonymous Coward · · Score: 0

    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

  39. Have Fun! by Anonymous Coward · · Score: 0

    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.

  40. devices.txt / mknod by ninjaz · · Score: 1

    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.

  41. Debian libc5/libc6 by ninjaz · · Score: 1

    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.

  42. Full system on CD, no hard drive by Anonymous Coward · · Score: 0

    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

  43. Err, not easy but... by Anonymous Coward · · Score: 0

    well at least you have to start with something :
    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 : /, /usr, /dev...
    the /dev entries should be the hardest part ; )
    then install some programs like bash and stuff, and install LILO...
    you should look at the redhat installation scripts to see how they work

  44. Oh this is fun! by PD · · Score: 1

    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.

  45. Rolling yer own by yAm · · Score: 1

    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."

  46. Linux kernel by Snoozer · · Score: 1
  47. No Subject Given by Anonymous Coward · · Score: 0

    Actually, I believe "shitload" is one word...

  48. tomsrtbt... by ibis · · Score: 1

    which would be found at http://www.toms.net/rb/.

  49. get GNU/FreeBSD by mattc · · Score: 1
    What exactly is so great that the GNU tools have that the BSD ones don't???? I've ask this to a number of people who prefer the GNU ones and they don't know the answer. The only thing I can see is that the GNU 'ls' command supports ANSI colors. (but this is a feature I don't use)


    -Confused

  50. Disk space for personal distribs. by enby · · Score: 1

    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
  51. yeah, own distrobutions by gavinhall · · Score: 1

    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

  52. RedHat and RPM are your friends. by Anonymous Coward · · Score: 0

    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

  53. yeah, own distrobutions by Anonymous Coward · · Score: 0

    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.

  54. This is easy and fun by Anonymous Coward · · Score: 0

    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/

  55. No Subject Given by Anonymous Coward · · Score: 0

    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.

  56. Linux "Roughcuts" CD from Red Hat by kriston · · Score: 1
    Perhaps you'd like to run around town looking for used Macintoshes, Amigas, and Atari ST's. Then grab a copy of "LInux Roughcuts" from Red Hat. It has the old mkLinux, Yyggradsil(sp), and other Linux kernel distributions for weird architectures for about $26 at Cheap Bytes.

    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

  57. ME Too by dattaway · · Score: 1

    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.

  58. Boot disks/Partitions by vinn · · Score: 1
    I was somewhat interested in this a while back. What I would suggest doing is:
    • Read the Bootdisk HOWTO. Read the section on how the "Pros" do it.
    • Use an existing installation to create a boot and a root disk. Keep experimenting with this boot/root disk combo until you learn the init process pretty well.
    • Then switch over to another partition on your system - hopefully by this point it will be easy since you could just be building your boot/root disks on it from the beginning - by the time you add the lilo entry to boot that partition you should have all your bugs ironed out.
    --
    ----- obSig
  59. Tough by Anonymous Coward · · Score: 0

    Jeffrey Baker wrote:
    > I want to do 'grep regexp `find /` and have it work.

    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

  60. Bootdisk-HOWTO by sphoonk · · Score: 1

    check the bootdisk-howto and thats most all you need to get started.

  61. hmmm by Anonymous Coward · · Score: 0

    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.

  62. I agree - slackware by Anonymous Coward · · Score: 0


    The slackware install process is just a shell script... it's easy to figure out what it's doing.

    Mark

  63. Barebones Linux? Try NetBSD by JoshG · · Score: 1

    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.

  64. Rolling yer own by Anonymous Coward · · Score: 0

    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

  65. The question is why? by awa · · Score: 1

    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.

    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 ;-) 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.

    --
    --Moo
  66. A different problem: compiling your own tools by Anonymous Coward · · Score: 0

    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...

  67. Did it with Slackware. by bwz · · Score: 1

    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
  68. Disk space for personal distribs. by Tas · · Score: 1

    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...

    --

  69. linux starter by TurboTex · · Score: 1

    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.

  70. Tough by Digital+Commando · · Score: 1

    Strictly speaking:

    find / -type f -print0 | xargs -0 grep regexp /dev/null

    The probability is low, but non-zero, that grep might otherwise receive one argument, and not prefix the output with the filename.

  71. You can do it, but REMEMBER THIS! by Anonymous Coward · · Score: 0

    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)

  72. LinuxBSD ??? by stevied · · Score: 1

    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?

  73. A different problem: compiling your own tools by Jeffrey+Baker · · Score: 1

    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.

    I want to do 'grep regexp `find /` and have it work.

  74. Err, not easy but... by gavinhall · · Score: 1

    Posted by Locutus of Borg:

    speaking of making /dev entries. i'm making a linux distro fir a project for my work, how would you go about that? =|)-
    --
    Ben
    IRC: SUidRoot

  75. LinuxBSD ??? by platinum · · Score: 1

    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.

  76. Modern Dist for a Base (RH/Debian) by Robert+Bowles · · Score: 1
    1. Excuse me for a haphazard-howto.
    2. This presents a chicken/egg problem. "From scratch" implies from the source. To build what you need, you'll need a system with a compiler to compile the compiler needed to compile your compiler so you can compile your system. Nevertheless, this is a meaningful goal.
    3. Start with modern (glibc) based distribution. For the sake of argument (no flames, please), say RedHat. (or debian)
      1. Do the most minimal "expert" install possible and boot your machine when done.
      2. Read the rpm man page. Use 'rpm -qa' to list packages then 'rpm -e pkgname' to remove unwanted packages.
      3. Above will surely fail on dependencies. Simply remove those first. Iterate above until almost nothing is left.
      4. In order to have a baseline system, you'll need at least the following: glibc, init, initscripts, bash, mount, bzip2, gzip, tar, textutils, fileutils, sh-utils, util-linux, etc.
      5. In order to build stuff, you'll need a compiler. Install egcs/gcc (whatever x86 boxes use??), binutils, and whatever they need.
      6. If you don't want to install from a cdrom, you'll have to grab stuff from the net, so if you aren't connected, make sure that pppd is working.
    4. You'll be better off trying this if you have two linux machines networked:
      1. One "fully-loaded" with docs/readers, development tools, vi, X, etc.
      2. The other as the subject of your grim experiments.
    5. Perspective: all you really need is '/sbin/init', '/etc/inittab', '/dev' files, and whatever you want init to start.
    --
    /* MAGIC THEATRE
    ENTRANCE NOT FOR EVERYBODY
    MADMEN ONLY */
  77. Trinux? Not for what he wants by Anonymous Coward · · Score: 0

    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.

  78. Bare bone by jcore · · Score: 1

    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!

  79. Slackware by Anonymous Coward · · Score: 0

    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.

  80. new linux user syndrome: by Anonymous Coward · · Score: 0

    No, this is how you learn every nice little detail about your os... just like getting to know your new/first car ;)

  81. slackware my choice by Anonymous Coward · · Score: 0

    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.

  82. LinuxBSD ??? by On+Lawn · · Score: 1

    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).
    ^~~^~^^~~^~^~^~^^~^^~^~^~~^^^~^^~~^~~~^~~^~

  83. You've obviously never used Slackware by Anonymous Coward · · Score: 0

    "it forces you do everything yourself"

    Blatantly false

  84. Barebones Linux? Try NetBSD by Anonymous Coward · · Score: 0

    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