Linux From ScratchThis 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.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I guess simply enough, the easiest way, if there are only two partitions on the machine (not including swap), would be after the LFS partition is working solid just rm -rf the original distro, then copy all the source from your LFS's /usr/src/
right onto that partition, edit /etc/fstab to add the old mother hen partition as /usr/src/, reboot and enjoy.
You might think this would make for too much space under /usr/src... think about the size of X, KDE, or Gnome, all from source... er, yeah. Plenty of playroom.
Suppose I had another hd which I have in another machine and use for windows, I could take it out put it into my Linux box temporarily load Mandrake on that and use the blank one to install $LFS and use all the disk space, would that work?? I suppose it would wouldnt it.
My problem is this. The 3.1 book states that you shouldnt use a single partition but then goes on and gives you instructions as though you are using a single aprtition, but i,m not and i,m not sure how to mount my filesystem.
I,m going to use the following
Do I just tell mandrake that the $LFS partition is / and carry on as normal? and when i create the filesystem will everything configure automatically? or do I have to configure each partition manually, putting the correct file system on the correct partition?
I hope I explained that properly.
btw i.m using two hd,s now for this install, so I can utilise the $LFS hd to its maximum.
Nah, your just going to have to mount everything a number of times. For instance, say / is /dev/hdc1 and /usr is /dev/hdc2. This is going to be a bit of a pain in the arse
mount /dev/hdc1 /mnt/lfs
make the basic what, 8, 10 directories...etc, usr, blah blah, they're in the book.
mount /dev/hdc2 /mnt/lfs/usr
again for /var and /home
Oh, and the one not-so-intuitive leap that the book requires you to make on your own... you'll have to format your swap partition on your own with mkswap /dev/hdcx (I waited until the end because I just wanted to use the mkswap I had built from source :P, er, and I forgot.)
After you have the right partitions mounted on the right points, you may want to NOT turn the machine off for however many days its going to take to finish. It would be an annoyance to have to do all of that all over again. You'll have to make sure to get your /etc/fstab right at the very end though...
Its really just a minor variation on the whole LFS schema.
Please ignore the last post as I have now created and mounted all my partitions and everything is fine, but I have another problem which all of you should have come across if i,m right.
I,m at present creating my dilesystem but I dont think the code from the book is right....
cd $LFS &&
mkdir -p bin boot dev/pts etc/opt home lib mnt proc root sbin tmp var opt &&
for dirname in $LFS/usr $LFS/usr/local
mkdir bin etc include lib sbin share src var
ln -s share/man man
ln -s share/doc doc
ln -s share/info info
mkdir dict doc info locale man nls misc terminfo zoneinfo
cd $LFS/var &&
mkdir -p lock log mail run spool tmp opt cache lib/misc local &&
cd $LFS/opt &&
mkdir bin doc include info lib man &&
cd $LFS/usr &&
ln -s ../var/tmp tmp
my problem is with the forth line
for dirname in $LFS/usr $LFS/usr/local
$LFS/usr/local doesnt exist and never will exist with the code above, what did everybody else do, ignore it or create it manually?
Mandy, being a great big pain in the arse, seems not to have installed for you: a compiler!
Grab the RPM for it off of one... der what am I talking about, I have a mandy box, use one of the auto-installers and drop gcc on there. Unfortunately I think Mandy ran with the compiler kgcc, which is just the KDE groups knockoff version. I compiled kernels with it before so you should have no foreseeable problems. I hope.
Hopefully you won't be missing anything else. Glibc is almost definately on there... I hope. If you find that you're constantly getting missing dependencies and want to throw your arms up, you might be better off either a) re-installing mandrake and saying yes to anything that says 'developer' (because that's what you are now :P), or find a copy of Slack 8.0, say no to X, GTK, EMACS, and KDE, and install evrything else. That second part is really just personal preference.
Nope, no meed to move it. assuming all of your files are in one directory eg. /lfs/usr/src (or something) you just go with the destructions. On page 32 "Installing GCC-2.95.3 the very first line patches the files. You'll notice how it says patch -Np1 -i ../gcc-2.95.3-2.patch &&
The ../ is what tells patch to look in the previous directory, so's all you have to do is leave it there and you'll be good.
I,m now just about to start installing gcc in chapter 6 and everything is going good so far woohoo
Anyway, a quick question? The packages that I have allready installed, what should I be doing with the source files, should I delete them now or use them to reinstall again, except for linux files which I should leave alone...... is this correct, I just need someone to confirm it or not.
btw I made files from 0-9 a-z to put the source files in, wish I hadnt now lol