LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-30-2013, 12:35 PM   #1
d7909
LQ Newbie
 
Registered: Mar 2013
Posts: 3

Rep: Reputation: Disabled
Minimal Linux install just to learn


Hi,

I've been working a while now with Linux and want to learn more. So i've been reading up on kernels compiling and all and am busy installing LFS while typing this.

Usually a couple of questions pop up that I can answer myself by googling it. But some don't:

* When compiling a program, should it always place it's binary in /bin (for instance) or does the user always have to do this himself. (or does it depend on the software)

* While installing LFS, I'm apparently compiling stuff I don't think I need. Theoretically, would it be possible to just compile stuff I need (kernel, bash, busybox) copy it to an SD card for instance, make it bootable and then boot from it?
 
Old 03-30-2013, 01:45 PM   #2
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 4,166

Rep: Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223
The low-level stuff you're compiling in LTS is mostly going to wind up in /bin or /sbin. Applications can go in various places, but many (most?) are not relocatable and their target will be set in the install section of the make file.

I'm no expert on LTS — I soon gave up — but I'd be inclined to follow the instructions to the letter. You may not think you need something, but software can have the strangest dependencies.
 
Old 03-31-2013, 10:33 AM   #3
rabirk
Member
 
Registered: Dec 2012
Location: Maryland, US
Distribution: Debian
Posts: 87
Blog Entries: 8

Rep: Reputation: Disabled
I agree with DavidMcCann. You should follow the LFS instructions as written. They supposedly result in a rather basic Linux system. You won't end up with a lot of unnecessary "stuff." I also haven't made it through the process, but one of these days when I have time and a bit more motivation I'll try again.

If you want to see what a base system is like, you can install the base packages of Slackware (package A), or load ArchLinux. Both are pretty basic until you add stuff on.
 
Old 03-31-2013, 10:47 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
You should follow the LFS manual at least the first time you install it, if you have understood how the basic Linux system that you get works feel free to experiment with it.
If you just want to run a really basic system without going through LFS it is even sufficient to just copy the parts you need from an existing Linux install.
For example, for a minimal special purpose system that I needed to built I just used Slackware's mkinitrd tool to create a basic file-system tree, then copied the programs that I needed into that tree and modified the startup script so that it did what I wanted. Then I just compiled a kernel and gave it the generated tree as inbuilt filesystem.
Another approach could be the Slitaz scratchbook to get a minimal system up and running: http://www.slitaz.org/en/doc/scratchbook/

Last edited by TobiSGD; 03-31-2013 at 10:48 AM.
 
Old 03-31-2013, 03:05 PM   #5
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 470

Rep: Reputation: Disabled
What you have to remember is that a lot of that stuff you are installing you don't need as a user. However it may satisfy a dependance for something you do need. For instance. you'll install quite a few libraries which you may never use before building gcc. But you can't build gcc without them. some linux distros don't even include gcc in the release because if you are using a package manager that just installs binaries, and you aren't a developer. you don't really need it. Bottom line, you may not need some of those programs when you are done, but if you actually want to learn, you should try to learn why they were installed in the first place. You'll have plenty of time to look it up while you are compiling

To answer your other questions.
1. maybe. If you run "make install" the program will install at the prefix defined in the configuration script. This means that if your prefix is /usr all binary files will go to /usr/bin or /usr/sbin
LFS tells you how to set your prefixes. For the most part. Most programs end up where they should without the prefix argument but you should probably follow their instructions.

2. Yes. It is possible, most installs of linux are just that. Precompiled binaries which are somewhat transparently configured.
If you want a minimal setup like this to start from give gentoo a try. With gentoo you download "Stages" basically a really basic set of commands and the package manager which compiles everything on the fly. Next you tweak it so it's bootable, boot in to your os and install whatever you want. In my opinion, if you want to start from bare bones but have a working system in 3 hours, that's the best way to do it.
 
Old 03-31-2013, 07:34 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,398

Rep: Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207
I agree with the others ideas and suggestions.


"* When compiling a program, should it always place it's binary in /bin (for instance) or does the user always have to do this himself. (or does it depend on the software)"

Many people compile stuff still today for many reasons. Where the program is compiled from usually has only to do with access to other tools. One can generally compile any program in any sub directory if they also know how it is used or needs. Many a system has been compiled in wrong locations and then fixed later.


My guess is that LFS is just trying to let you create some of the basic tools one might find in /bin. Simple tools end up there mostly but totally important to the system or user at least. So as to not confuse you, they compile the program where it will reside later.
 
Old 04-01-2013, 06:18 AM   #7
d7909
LQ Newbie
 
Registered: Mar 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks for the answers guys.
Clears things up a bit for me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
minimal linux install fotoguy Linux - Software 17 05-25-2013 01:37 AM
How to install minimal Linux on USB nugroho2 Linux - Newbie 1 10-26-2008 02:04 PM
Gentoo Linux Minimal Install on HP dv9428mr SeanInSeattle Linux - Laptop and Netbook 2 09-03-2007 01:36 AM
suse linux 9.2 minimal install... pedrosl Linux - Software 1 03-26-2005 06:04 AM
Linux minimal install NGraphiX Linux - General 10 08-08-2002 07:56 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration