Answers to: How Linux gets installedhttp://linuxexchange.org/questions/59/how-linux-gets-installed<p>Hi,</p> <p>Suppose I get a Kernel source code and try to compile it on Linux which is not having gcc compiler then it will not get compiled for sure b'coz kernel needs gcc for compilation. My question is then how a Linux gets installed on raw hard disk which in not having gcc pre-installed. I also believe gcc can't be installed on raw hard disk (not sure and never tried). So, it is also not the case that Linux installs gcc first and then do the rest later. </p> <p>Can any one explain how the thing works from lower level point of view. </p>enMon, 03 May 2010 17:25:03 -0400Answer by Shashi Ranjanhttp://linuxexchange.org/questions/59/how-linux-gets-installed/184<p>As per my understanding of Linux installation on any hard drive is very easy. If we see the installation process carefully then we'll find that installation comes into two phases. First phase of installation provides one pre compiled kernel and initial ramdisk. Ramdisk contains all those module necessary to work with file system and kernel starts booting process and the second stage provides all the softwares to be installed as part of OS. If we are using CD/DVD rom then we can easily see precompiled kernel and ramdisk under images folder in the installtion CD/DVD. If we are using PXE boot then we first provide these two through tftp server. I hope this is a logical answer.</p>Shashi RanjanMon, 03 May 2010 17:25:03 -0400http://linuxexchange.org/questions/59/how-linux-gets-installed/184Answer by Yaro Kasearhttp://linuxexchange.org/questions/59/how-linux-gets-installed/182<p>Er...</p> <p>Actually, the Linux kernel doesn't really need GCC specifically. Not anymore. These days there are plenty of compilers avalable.</p> <p>And you don't even need GCC specifically to build anything on Linux.</p> <p>As for which came first, GCC did, although it is frequently debated about its quality before Linux came along. That, of course, is not a subject for this web site.</p> <p>I think it'd serve well to point out that almost everything in the GNU toolchain has a comparable non-GNU Free/Open Source replacement available. GCC is replaced commonly with EGCS, for example, and HAS replaced GCC as the default in systems such as Debian.</p>Yaro KasearMon, 03 May 2010 16:52:30 -0400http://linuxexchange.org/questions/59/how-linux-gets-installed/182Answer by Network Systems Engineerhttp://linuxexchange.org/questions/59/how-linux-gets-installed/115<p>what is your linux platform ???</p>Network Systems EngineerThu, 22 Apr 2010 07:20:33 -0400http://linuxexchange.org/questions/59/how-linux-gets-installed/115Answer by fancyladhttp://linuxexchange.org/questions/59/how-linux-gets-installed/98<p>For most distros when you install Linux everything is already pre-compiled so you don't need gcc at all to install the kernel or anything else. You only need gcc if you want to compile source code into binary yourself. </p>fancyladSun, 18 Apr 2010 14:44:56 -0400http://linuxexchange.org/questions/59/how-linux-gets-installed/98Answer by portamenteffhttp://linuxexchange.org/questions/59/how-linux-gets-installed/91<p>i think what he was asking was "what came first, the chicken or the egg?" The answer is the compiler. Linux kernel compiled originally on another system. Don't know what system Torvalds used. He compiled the first kernel and installed it. Gcc is older than Linux. It was originally done at Berkley. If you can read this message, you have a machine that will compile. Not sure why. You can use Gcc on Windows, Linux, Solaris, ATT Unix, Mac, BSD etc....</p>portamenteffSat, 17 Apr 2010 17:50:18 -0400http://linuxexchange.org/questions/59/how-linux-gets-installed/91Answer by jdacklehttp://linuxexchange.org/questions/59/how-linux-gets-installed/90<p>Linus Torvalds based his Linux kernel on Minix. He wasn't actually working on a blank-no-software-installed computer (or even just one machine for that matter)...</p>jdackleSat, 17 Apr 2010 17:43:47 -0400http://linuxexchange.org/questions/59/how-linux-gets-installed/90Answer by Timmihttp://linuxexchange.org/questions/59/how-linux-gets-installed/88<p>For the newbies who come here, thinking this was actually a question on how to install Linux, go check out the following versions of Linux: </p> <p><a href="http://www.knoppix.org/" rel="nofollow">Knoppix</a> </p> <p><a href="http://Linuxmint.com" rel="nofollow">Mint-ubuntu</a></p> <p>Both will autoinstall, autodetect and configure all your hardware. Bliss. </p>TimmiSat, 17 Apr 2010 12:44:26 -0400http://linuxexchange.org/questions/59/how-linux-gets-installed/88Answer by Anonymoushttp://linuxexchange.org/questions/59/how-linux-gets-installed/79<p>Hi,</p> <p>Thanks all for your answers.Ya, gcc came much earlier then Linux. Still I have some question like while we put Installation media say DVD and start installation process. What it does first of all. Is it install gcc and go for kernel installation process or it does something else. </p> <p>Also can we install gcc on a raw disk.</p>AnonymousFri, 16 Apr 2010 06:44:51 -0400http://linuxexchange.org/questions/59/how-linux-gets-installed/79Answer by Paulhttp://linuxexchange.org/questions/59/how-linux-gets-installed/72<p>Don't forget, linux is really just the kernel, and gcc doesn't necessarily need the linux kernel to run.</p> <p>You could for example recompile the gcc compiler for Windows, and then from Windows cross compile the linux kernel.</p> <p>The build environment does not need to be the same as the environment you are trying to build.</p>PaulThu, 15 Apr 2010 14:07:22 -0400http://linuxexchange.org/questions/59/how-linux-gets-installed/72Answer by Web31337http://linuxexchange.org/questions/59/how-linux-gets-installed/66<p>gcc was available before linux. you may wish to read <a href="http://en.wikipedia.org/wiki/Linux_kernel" rel="nofollow">http://en.wikipedia.org/wiki/Linux_kernel</a> and links from there :)</p>Web31337Thu, 15 Apr 2010 12:30:09 -0400http://linuxexchange.org/questions/59/how-linux-gets-installed/66Answer by Anonymoushttp://linuxexchange.org/questions/59/how-linux-gets-installed/63<p>Hi, <strong>I am not asking about the installation process etc ........</strong> As Titus already pointed out I am more into how it all started ?? The question can be generalised for any OS. I tried to look into ULK for system startup but it only talks about how system gets bootup not installed </p>AnonymousThu, 15 Apr 2010 10:34:00 -0400http://linuxexchange.org/questions/59/how-linux-gets-installed/63Answer by Titushttp://linuxexchange.org/questions/59/how-linux-gets-installed/62<p>I think question was how it all started :) . How linus installed first linux. when he did not have gcc how he compiled linux :).</p>TitusThu, 15 Apr 2010 10:04:33 -0400http://linuxexchange.org/questions/59/how-linux-gets-installed/62Answer by Web31337http://linuxexchange.org/questions/59/how-linux-gets-installed/61<p>You need a LiveCD to be able to build linux kernel &amp; coreutils, etc from sources. LiveCD has all above. I prefer using either Gentoo Install CD or Slackware DVD for that(last one is easy for me because I already have it on disc) for that.</p> <p>Also I am a Gentoo Linux user, I've built it from stage 3(meaning I have gcc, coreutils and some other basic soft already compiled), my current kernel is 2.6.33.2 from kernel.org.</p>Web31337Thu, 15 Apr 2010 09:32:44 -0400http://linuxexchange.org/questions/59/how-linux-gets-installed/61Answer by Thorhttp://linuxexchange.org/questions/59/how-linux-gets-installed/60<p>Hi,</p> <p>Ok, this one is easy...but first: welcome to the pack. If you ask THIS question, you're possibly V-E-R-Y new to Linux, so, again: welcome!</p> <p>Installing Linux...the easy way.</p> <p>Get a distro. Flip to this page (ftp://ftp.belnet.be/mirror/) and select one. I use Fedora, but you are free to choose. If you are that new, though, go for Ubuntu. Download the ISO's. Can you burn a DVD? Cool, get the one big one. No DVD's? Like me, then, get one ISO per CD-rom. Burn the CD-s/DVD. Any package can do that. Install. Put the DVD/first CD in the drive and reboot, follow instructions.</p> <p>It seems that what you are trying to do is build a Lambo from scratch. Well, "Linux from scratch" lets you do just that, but it IS tuff, be warned. Better just use what's already out there, most of us do...</p> <p>Now, however, you are on the right path here assuming gcc is needed somewhere. It is. To recompile a kernel. Wanna give that a whack? No sweat, it is easy, just follow the steps outlined here : <a href="http://www.cyberciti.biz/tips/compiling-linux-kernel-26.html" rel="nofollow">http://www.cyberciti.biz/tips/compiling-linux-kernel-26.html</a> and you're off. But Linux needs to have been installed already...</p> <p>At install, the installer will ask to prep the drive, let it use the pre-configured settings, they "fit most sizes" - it will (re) format the drive for you. If there is no surface at all - then you'll need to low-level format the thing first.</p> <p>Let the pack know how this turns out!! Happy to have you in the group!!</p> <p>Thor</p>ThorThu, 15 Apr 2010 09:31:58 -0400http://linuxexchange.org/questions/59/how-linux-gets-installed/60