LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 04-04-2010, 05:31 AM   #1
smkh
LQ Newbie
 
Registered: Mar 2010
Posts: 15

Rep: Reputation: 2
Smile step by step guide for installing LFS 6.6 on kubuntu 9.10


I recently built LFS 6.6 on Kubuntu 9.10. Altough the book is fully comprehensive, some people might have difficulties during LFS build.
Here is the guide,hope it helps someone!

all things you should type with keyboard is bold

Section 1: Preparing Kubuntu

1-execute terminal : press Alt+F2 -> then type:terminal
2-create password for root user -> $sudo passwd
3-login with root user -> $su root
4-install gawk package -> #apt-get install gawk
5-select gawk as the default executable for awk -> #update-alternatives --config awk
6-install patch package -> #apt-get install patch


Section 2: Create LFS root partition


if you use ubuntu instead of Kubuntu ,you can use gparted for creating LFS partition:
1- execute gparted: press Alt+F2 -> then type: gparted
2- create Lfs partition (3GB minimum) on your hard free space (if you have problem while working with gparted search google, I can't explain everything!)
3- format this partition with ext3 filesystem
if you use kubuntu:
1-execute terminal : press Alt+F2 -> then type:terminal
2-login with root user -> $su root
3-execute cfdisk -> #cfdisk
4-create new partition (3GB minimum) on your hard free space ( if you don't have free space on your hard disk you should resize existing partitions with other programs like parted. if you don't know what to do with cfdisk search google, I can't explain everything!)
5-remember LFS partiton name (mine is /dev/sda7,yours maybe different)
6-format this partition with ext3 filesystem: #mke2fs -jv /dev/sda7
7-follow book instructions for mounting this partition (with root user): http://www.linuxfromscratch.org/lfs/.../mounting.html

Section 3: download required packages

1-execute terminal : press Alt+F2 -> then type:terminal
2-login with root user -> $su root
3-download the packages -> #wget ftp://ftp.lfs-matrix.net/pub/lfs/lfs...es-6.6-rc1.tar
this file contains all the packages mentioned in the LFS 6.6 book except some patch scripts, you should download them separately (see section 3.3)
also the linux kernel in this tar file is Linux 2.6.32.7

Section 4: Final preparations

1-execute terminal : press Alt+F2 -> then type:terminal
2-login with root user -> $su root
3-follow exactly the book instructions on chapter 4 (order of commands are important!)
4-copy packages tar file to your $LFS/sources directory -> cp -v /home/kubuntu/lfs-packages-6.6-rc1.tar /mnt/lfs/sources
5-change to sources directory -> cd /mnt/lfs/sources
5-extract packages tar file -> tar -xvf lfs-packages-6.6-rc1.tar
6-move files to the sources directory -> mv lfs-6.6-rc1-sources/* /mnt/lfs/sources
7-change tools and sources directory ownership -> chown -v lfs $LFS/sources $LFS/tools


Section 5: construct temporary system

1-execute terminal : press Alt+F2 -> then type:terminal
2-login with root user -> $su root
3-export LFS -> $export LFS=/mnt/lfs
4-mounting lfs partition -> #mount -vt ext3 /dev/sda7 $LFS
5-login with lfs user -> $su lfs
6-change to source directory -> $cd /mnt/lfs/sources
7-unpack binutils package -> $tar -xvf binutils-2.20.tar.bz2
8-change directory to binutils package -> $cd binutils-2.20
9-follow book instructions for installing binutils -> http://www.linuxfromscratch.org/lfs/...ils-pass1.html
10-change to source directory -> $cd /mnt/lfs/sources
11-remove binutils-2.20 directory -> $rm -rf binutils-2.20 (this is optional for saving space on your LFS partition)
12-repeat steps 7-11 for remaining packages (replace binutils with the name of the package for example gcc-4.3.3 and so on)

Last edited by smkh; 04-09-2010 at 05:01 AM.
 
Old 04-04-2010, 05:43 AM   #2
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Hi,

since it is not recommended in (K)unbuntu to unlock the root account, I'd like to know why you just didn't
Code:
sudo su -
Did you encounter any problems with the default Ubuntu way of becoming root?
 
Old 04-04-2010, 06:00 AM   #3
smkh
LQ Newbie
 
Registered: Mar 2010
Posts: 15

Original Poster
Rep: Reputation: 2
@crts
No,I didn't know this command, thanks!
 
Old 04-07-2010, 04:27 AM   #4
jet29
LQ Newbie
 
Registered: Apr 2010
Posts: 8

Rep: Reputation: 0
@smkh
I had a little time and started on your procedure, but i've struck a hurdle, i've installed kubuntu 9.1 and start terminal, but after the hawk package is removed the system gets stuck and terminal doesnt work and i cant get to do next commands, since alot of the stufff is removed it also says choose a pam manager and there is nothing to select it also said remove session manager kde or something and if to remove that for which i chose no, any ideas, i restarted but same thing happened again, thanks
 
Old 04-07-2010, 12:57 PM   #5
smkh
LQ Newbie
 
Registered: Mar 2010
Posts: 15

Original Poster
Rep: Reputation: 2
Hello jet29
I'm sorry. this is my mistake.(I edited first post).
although you can omit steps 4-6 of section one and install these packages when you need them.
I recommend you first test above advice on live cd environment and if it works reinstall kubuntu and follow the rest of procedure

Last edited by smkh; 04-09-2010 at 05:02 AM.
 
Old 04-07-2010, 02:52 PM   #6
rtperson
LQ Newbie
 
Registered: Oct 2004
Posts: 1

Rep: Reputation: 0
One word of warning: if you're using regular Ubuntu, be very careful about removing mawk. Most of gnome, including the terminal, relies on mawk being the awk. (I learned this the hard way...)

If in doubt, start an xterm session, install kde, or fiddle with your run levels to boot to a command line. (Ubuntu doesn't use /etc/inittab, though, so you're on your own on this one...)

Last edited by rtperson; 04-07-2010 at 03:26 PM. Reason: Adding info
 
Old 04-07-2010, 03:34 PM   #7
jet29
LQ Newbie
 
Registered: Apr 2010
Posts: 8

Rep: Reputation: 0
@all yes i realised myself after posting and decided to install gawk then remove hawk, and now it said removed minimal hawk etc. thanks anyhow! oh by the way is there anybody out there who lives in the uk and near manchester, who could assist me locally. cheers!
 
  


Reply



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
step by step guide for installing mail server using ubuntu squareanand Linux - Newbie 1 09-25-2009 11:13 PM
Need a step by step guide to installing Adobe Flash 10.0.22.87 texaschick74 Linux - Newbie 6 05-22-2009 12:14 PM
Step by step guide, for installing linux and windows. Throntel Linux - Newbie 2 01-15-2006 03:13 PM
Step by Step Guide to Installing Debian den_santiago Linux - Software 1 08-17-2001 03:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:07 PM.

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
Open Source Consulting | Domain Registration