Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

Fiordland Stage 1 Install Guide Ver. 2.0 (updated)

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
70 posts
  • 1
  • 2
  • 3
  • Next
Author
Message
warrens
Apprentice
Apprentice
User avatar
Posts: 243
Joined: Tue Jan 04, 2005 11:19 pm
Location: Don't Tread On Me!

Fiordland Stage 1 Install Guide Ver. 2.0 (updated)

  • Quote

Post by warrens » Sat Jan 06, 2007 2:38 am

Fiordland Stage 1 Install Guide
~x86 and GCC 4.x.x
Building Gentoo Linux From Scratch Style



Since the Gentoo Documentation team has deprecated Stage 1 and 2 there has been somewhat of an uproar in the Gentoo community. As I followed this I did some research on what is done in bootstrap.sh and discovered that the tool chain is not properly built. While it works fairly well it seems to me to that it could be done better, so the reason for this guide. We will build Gentoo from the ground up using the portage tools to build the system in the same manor as "Linux From Scratch", hereafter referred to as LFS. This will give us a properly built tool chain for a good foundation for the rest of our system.

WARNING: This is an advanced install method for advanced users. This method use the ~x86 branch, so be aware that you could run into some broken packages.
THIS IS NOT A GENTOO SUPPORTED INSTALL, SO DO NOT
BOTHER THE DEVELOPERS WITH ANY PROBLEMS ENCOUNTERED
WHILE FOLLOWING THIS GUIDE.


This Install is based upon a Stage 1 tarball. The main reason for using a Stage 1 tarball is that it provides a minimal installation environment for building our system, which should give us a cleaner environment in which to build the tool chain. During the installation bootstrap.sh will NOT be used, instead we will emerge the system following as closely as portage allows chapter 5 & 6 of the Linux From Scratch book to build the base system. There some dependency requirements in portage that will require some changes in the build process, but these are minor.

First thing we need to do is get either the Gentoo Minimal Installation CD or the Gentoo Universal Installation CD from http://gentoo.osuosl.org/releases/x86/2007.0/installcd, and then burn it to a CD. My recommendation is to use the Minimal CD as it is a smaller download. Use this CD to boot your computer.

1 Setup the network.

First thing to check is that your NIC is setup correctly.

First try ifconfig

Code: Select all

ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0D:56:32:6B:31
          inet addr:192.168.1.6  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20d:56ff:fe32:6b31/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:534293 errors:0 dropped:0 overruns:0 frame:0
          TX packets:907104 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:364028765 (347.1 Mb)  TX bytes:116194376 (110.8 Mb)
          Interrupt:11

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
If you have a listing like above, then your good to go. If not, then run the net-setup utility. You may have to modprobe the driver for you NIC to get networking to work.

Now ping www.google.com. If it works, then we are ready to proceed to the next step.

2 Prepare your hard disk.

Now to partition the hard disk. Use fdisk or cfdisk for this. I would recommend the following partition layout for a Linux only workstation:

Code: Select all

/dev/hda1  /boot
/dev/hda2 /
/dev/hda3 /home
/dev/hda4 swap
However partition your hard disk to best meet your needs if this layout does not.

Now format your filesystems:

Code: Select all

mkreiserfs /dev/hda1
mkreiserfs /dev/hda2
mkreiserfs /dev/hda3
Do this for each of your partitions.

Mount the filesystems:

Code: Select all

mount /dev/hda2 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/hda1 /mnt/gentoo/boot

We do not need to mount the /home partition at this time.

3 Install Stage 1 and portage.

Now enter the Gentoo partition:

Code: Select all

cd /mnt/gentoo
Now we are ready to download our stage tarball.

Code: Select all

wget http://gentoo.osuosl.org/releases/x86/2007.0/stages/stage1-x86-2007.0.tar.bz2
also download

Code: Select all

wget http://gentoo.osuosl.org/releases/x86/2007.0/stages/stage1-x86-2007.0.tar.bz2.DIGESTS 
Now check the integrity of our download:

Code: Select all

md5sum -c stage1-x86-2007.0.tar.bz2.DIGESTS
Unpack the Stage 1 tarball:

Code: Select all

tar xvjpf stage1-x86-2007.0.tar.bz2

Download a portage snapshot:

Code: Select all

wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2
Unpack Portage

Code: Select all

tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr
Make sure you have the correct profile set, as the Stage one profile default profile is
/usr/portage/profiles/default-linix/x86/no-nptl. I am using the /usr/portage/profiles/default-linux/x86/2007.0 profile for my machine.

Code: Select all

rm -f /etc/make.profile
ln -s /usr/portage/profiles/default-linux/x86/2007.0 /etc/make.profile
Now to configure the /etc/make.conf file. Here is the listing for the first part of the build:

Code: Select all

CHOST="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
CXXFLAGS=${CFLAGS} 
ACCEPT_KEYWORDS="~x86"
MAKEOPTS="-j2"
PORTAGE_NICENESS=3
AUTOCLEAN="yes"
FEATURES="distlocks sandbox userpriv usersandbox"
USE="nptl nptlonly bootstrap -fortran -multislot"

The first part of the build uses gcc-4.1.1 which is part of the Stage 1 tarball, so we need to use the more mild CFLAGS and CXXFLAGS to build with. After we finish the first part of the build we will change the CFLAGS and CXXFLAGS to what we will use to build the system with. Set the -march flag to match your arch. According to /usr/portage/profiles/use.desc entry on the bootstrap USE flag:

bootstrap - !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used during or
iginal system bootstrapping

Since step 8 bootstraps the the tool chain it makes sense to use it here. The -multislot USE flag eliminates the need to use gcc-config to change the default compiler. ( It worked on two test builds on my test machine. YMMV,) We will remove the bootstrap and -multislot flags before starting step 9.

With gcc 4.x.x we have to add the -fortran flag for the first two make.conf files or gcc will fail to build. This flag will be removed befor starting step 10.

4 Chrooting.

First copy the dns info.

Code: Select all

cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
Mount proc.

Code: Select all

mount -t proc none /mnt/gentoo/proc
Mount /dev

Code: Select all

mount -o bind /dev /mnt/gentoo/dev
copy /proc/mounts

Code: Select all

cp /proc/mounts /mnt/gentoo/etc/mtab
Chroot into our build environment.

Code: Select all

chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
5 Set the date and time.

Now set the correct time as this is important to our build. We can't set the time zone symlink at this time a zone info is not part of the Stage 1 tarball. We will set the symlink later. The format of the date command is MMDDHHMMYYYY, where MM is the month, DD is the day, HHMM is the time, and YYYY is the year. For January 05, 2007, 11:45 AM:

Code: Select all

date 010511452007
6 Update the portage tree

Code: Select all

emerge --sync
7 Setup user locales (optional)

Setting user locales is now easier. my /etc/local.gen is listed below

Code: Select all

# This file names the list of locales to be built when glibc is installed.
# The format is <locale>/<charmap>, where <locale> is a locale from the
# /usr/share/i18n/locales directory, and <charmap> is name of one of the files
# in /usr/share/i18n/charmaps/. All blank lines and lines starting with # are
# ignored. Here is an example:

en_US.UTF-8 UTF-8
en_US ISO-8859-1
ja_JP.EUC-JP EUC-JP
ja_JP.UTF-8 UTF-8
ko_KR.EUC-KR EUC-KR
ko_KR.UTF-8 UTF-8
zh_TW.EUC-TW EUC-TW
zh_TW.UTF-8 UTF-8
zh_TW BIG5
zu_ZA.UTF-8 UTF-8
zu_ZA ISO-8859-1
When glibc is emerged only those locals listed in local.gen will be generated. This saves some time in building our system.

Steps 8 and 9 replace bootstrap.sh.

8 Start building The system.

8.1 LFS chap. 5, part 1

The build order according to LFS is: binutils, gcc, linux-headers, and glibc. So here is our first build packages:

Code: Select all

emerge --nodeps --oneshot binutils gcc-config libstdc++-v3 gcc linux-headers glibc
Check that gcc-4.1.2 is our default compiler.

Code: Select all

gcc-config -l
 [1] i686-pc-linux-gnu-4.1.2 *
As of this time the x86 and ~x86 branches use the same gcc version, so the next two code section are not needed. They remain for when there is a new gcc in ~x86.

If your gcc-config -l show different from above then,

Code: Select all

gcc-config 6
env-update
source /etc/profile
Before we emerge the next list of packages we need to remove the old gcc.

Code: Select all

emerge -P gcc
Ok back to the important stuff.

8.1.1 Set the Time Zone Symlink.

First we need to get the /usr/share/zoninfo data so:

Code: Select all

emerge --oneshot timezone-data
This example displays the available time zone selections:

Code: Select all

# ls /usr/share/zoneinfo
There are various directories for more location specific time zones under this directory, so pick the one that best meets your needs. Since I live in Fort Worth I will do the following to set the time zone symlink for my location:

Code: Select all

# rm /etc/localtime 
# ln -s /usr/share/zoneinfo/CST6CDT /etc/localtime 
# date
Fri Jan  6 09:38:02 CST 2006


8.2 LFS chap. 5 part 2

Now we are ready for the second part of our build were we will recompile the tool chain against itself and add other tools to the system.

Before we start the next phase of building we will change our /etc/make.conf file to reflect how we want our system:

Code: Select all

CHOST="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -fforce-addr -fomit-frame-pointer -ftracer -pipe"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
ACCEPT_KEYWORDS="~x86"
MAKEOPTS="-j2"
PORTAGE_NICENESS=3
AUTOCLEAN="yes"
FEATURES="distlocks sandbox userpriv usersandbox"
USE="nptl nptlonly -fortran -X -tk"
The reason for the -X and -tk flags is that they are enabled by default, and break the next step of our build.

The next step is to complete LFS Chapter 5 portion of our install. LFS builds the following packages: tcl, expect, dejagnu, gcc, binutils, gawk, bzip2, gzip, diffutils, findutils, make, grep, sed, gettext, gpm, ncurses, patch, tar, texinfo, bash, m4, bison, flex, util-linux, and perl.

Tcl, expect, and dejagnu are used by LFS to run the test suites, as we will not run the test suites they wll not be built. This part will take a while to complete, so it may make a good time to go to Starbucks for some expesso.

Code: Select all

emerge --nodeps --oneshot =sys-devel/autoconf-2.13 autoconf autoconf-wrapper automake  gcc binutils gawk bzip2 gzip diffutils findutils make grep sed gettext gpm ncurses patch tar sys-apps/texinfo bash bash-completion m4 bison flex util-linux gdbm perl
If you are wondering about sys-apps/texinfo in the listing, it is that there are two ebuilds by this name at this time. They are:
app-xemacs/texinfo
sys-apps/texinfo
Autoconf-2.13 is a must have dependency of expect. Gpm is a must have dependency of ncurses.

Since we are not building Xorg at this time we need to specify sys-apps/texinfo for portage to know which texinfo to build.

9. Emerge the LFS chap. 6 packages.

Now acording to LFS Chapter 6 we would build linux-headers, man-pages, glibc, binutils, gcc, coreutils, zlib, mktemp, iana-etc, findutils, gawk ncurses, readline, m4, bison, less, groff, sed, flex, gettext, inetutils, iproute, perl, texinfo, autoconf, automake, bash, file, libtool, bzip2, diffutils, kbd, e2fsprogs, grep, grub, gzip, hotplug, man, make, module-init-tools, patch, procps, psmisc, shadow, sysvinit, tar, udev, and util-linux.



Start the emerge.

Code: Select all

emerge -e --oneshot linux-headers man-pages glibc binutils gcc coreutils zlib findutils gawk ncurses sys-libs/readline vim m4 bison less groff sed flex gettext perl sys-apps/texinfo autoconf automake bash file libtool bzip2 diffutils kbd reiserfsprogs grep gzip hotplug man make module-init-tools patch procps psmisc shadow sysklogd sysvinit tar udev util-linux
Mktemp, iana-etc, and inetutils appear not to be in portage, so they are not part of the merge. Since I prefer lilo to grub I replaced grub with lilo in the emerge list. If you prefer to use grub go ahead and build grub. Make sure that you use the empty tree option when you emerge these packages so that all dependencies will be pulled in.
At this point you can edit you make.conf file to build your system how you like.

Code: Select all

CHOST="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -fforce-addr -fomit-frame-pointer -ftracer -pipe"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
ACCEPT_KEYWORDS="~x86"
MAKEOPTS="-j2"
PORTAGE_NICENESS=3
AUTOCLEAN="yes"
FEATURES="distlocks sandbox userpriv usersandbox"
USE="nptl nptlonly< anyother USE flags that you want>"
#CCACHE_SIZE="512M"
10 Complete the build

Now to complete the building of our system and prepare for for building the kernel run:

Code: Select all

emerge -e system
When this completes you will have a system that is completely ~x86 built from scratch.

Now we need to build some other useful utilities before we build the kernel. Feel free to use another bootloader, system logger, or editor if you want. I am using lilo as my bootloader, syslogd for my system logger, and vim as my editor.

Code: Select all

emerge xinetd fcron sysfsutils dhcpcd gentoolkit acpid ntp sysklogd vim lilo
Then:

Code: Select all

rc-update add net.eth0 default 
rc-update add fcron default 
rc-update add xinetd default 
rc-update add sshd default 
rc-update add hotplug default  
rc-update add acpid default 
rc-update add ntp-client default
rc-update add sysklogd default
Section 11 is taken straight from BobP's "Stage 1/3 Install Guide" with only slight change to fit this guide.



11 Eliminate system clock skew

Code: Select all

ntpdate -b -u pool.ntp.org

12 Build the kernel

Now we are ready to build the kernel. I use the vanilla-sources in this guide, however you can use any other kernel sources you like.

Code: Select all

emerge gentoo-sources
Make sure the /usr/src/linux points to the correct directory.

Code: Select all

ls -l /usr/src
total 4
lrwxrwxrwx  1 root root   22 Jan  5 11:17 linux -> linux-2.6.19-gentoo-r2
drwxr-xr-x 20 root root 4096 Jan  5 17:49 linux-2.6.19-gentoo-r2
Enter the /usr/src/linux directory and run menuconfig

Code: Select all

cd /usr/src/linux
make menuconfig
After you finish configuring the kernel, build it.

Code: Select all

make && make modules_install && make install
Making the system bootable

14 Now to make your system bootable.

Edit /etc/fstab to match your partition layout.

Code: Select all

/dev/hda1		/boot			reiserfs	noauto,noatime		1 2
/dev/hda2		/				reiserfs	noatime,notail		0 1
/dev/hda3		/home			reiserfs	noatime        	0 1
/dev/hda4		none				swap		sw				0 0
/dev/cdroms/cdrom0	/mnt/cdrom	iso9660	noauto,ro			0 0
/dev/fd0		/mnt/floppy		auto		noauto			0 0
proc			/proc			proc		defaults			0 0
shm			/dev/shm	tmpfs			nodev,nosuid,noexec	0 0

Edit /etc/lilo.conf

Code: Select all

boot=/dev/hda
prompt
timeout=50
default=gentoo

image=/boot/vmlinuz
	label=gentoo
	read-only
	root=/dev/hda2
Install Lilo

Code: Select all

/sbin/lilo
Set the root password.

Code: Select all

passwd root
You are ready to boot into your new system.

Code: Select all

exit
cd
umount /mnt/gentoo/proc /mnt/gentoo/dev /mnt/gentoo/boot /mnt/gentoo
reboot
Don't forget to remove the install cd from your CDROM.





Thanks:
BobP for the Stage 3/1 Install that helped inspire this guide.

The folks over at Linux From Scratch for the book that provided the final
inspiration for this guide.

The Gentoo developers that made portage flexible enough to pull this off.

Copyright (c) 2005-2007 Steven Warren. Released under the Creative Commons Attribution-ShareAlike license version 2.5.
Last edited by warrens on Sat Jun 09, 2007 5:25 pm, edited 10 times in total.
[The bigger the government, the smaller the citizen.

Don't tread on me!!!

The best government is the government that governs least.
Top
Conan
Guru
Guru
Posts: 360
Joined: Tue Nov 02, 2004 1:26 am

  • Quote

Post by Conan » Sat Jan 06, 2007 5:15 am

MY HEAD ASPLODED

In all seriousness, wtf were you thinking when you wrote this? Calling this advanced is kind of like calling gnome useful.
Top
nesl247
Veteran
Veteran
Posts: 1614
Joined: Tue Jun 15, 2004 7:21 pm
Location: Florida
Contact:
Contact nesl247
Website

  • Quote

Post by nesl247 » Sat Jan 06, 2007 5:44 am

Conan wrote:MY HEAD ASPLODED

In all seriousness, wtf were you thinking when you wrote this? Calling this advanced is kind of like calling gnome useful.
Seriously, was that required.. You could have said it a lot nicer, or not at all..
Top
azdruid
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 75
Joined: Sun Feb 19, 2006 8:22 pm

  • Quote

Post by azdruid » Sat Jan 06, 2007 5:58 am

Hey, thanks a lot! This is quite the useful guide; bonus points for not using a wealth of ricer flags.

Do have a question though; don't you think it might be cool to try this with ICC? That'd be extending just about as far into the realm of Unsupported as it's possible to get! ;)
Top
Conan
Guru
Guru
Posts: 360
Joined: Tue Nov 02, 2004 1:26 am

  • Quote

Post by Conan » Sat Jan 06, 2007 3:42 pm

nesl247 wrote:
Conan wrote:MY HEAD ASPLODED

In all seriousness, wtf were you thinking when you wrote this? Calling this advanced is kind of like calling gnome useful.
Seriously, was that required.. You could have said it a lot nicer, or not at all..
Yes it was. It's bad enough when people who have some idea of what they are doing write a install guide, it's worse when the author doesn't.
Top
Conan
Guru
Guru
Posts: 360
Joined: Tue Nov 02, 2004 1:26 am

  • Quote

Post by Conan » Sat Jan 06, 2007 3:43 pm

azdruid wrote:Hey, thanks a lot! This is quite the useful guide; bonus points for not using a wealth of ricer flags.

Do have a question though; don't you think it might be cool to try this with ICC? That'd be extending just about as far into the realm of Unsupported as it's possible to get! ;)
Ricer cflags are not determined by the quanity, but by the quality.
Top
nesl247
Veteran
Veteran
Posts: 1614
Joined: Tue Jun 15, 2004 7:21 pm
Location: Florida
Contact:
Contact nesl247
Website

  • Quote

Post by nesl247 » Sat Jan 06, 2007 3:44 pm

Conan wrote:
nesl247 wrote:
Conan wrote:MY HEAD ASPLODED

In all seriousness, wtf were you thinking when you wrote this? Calling this advanced is kind of like calling gnome useful.
Seriously, was that required.. You could have said it a lot nicer, or not at all..
Yes it was. It's bad enough when people who have some idea of what they are doing write a install guide, it's worse when the author doesn't.
I'm sorry but what gives you the right to say his guide isn't worth posting. It might be useful to some people. So please, keep such useless comments to yourself. And stop double posting damnit.
Top
Conan
Guru
Guru
Posts: 360
Joined: Tue Nov 02, 2004 1:26 am

  • Quote

Post by Conan » Sat Jan 06, 2007 4:07 pm

It offers so many bad suggestions that it would only be useful to people who didn't know any better, at which point they would get a bad idea of what gentoo really is, and badmouth gentoo. It's guides like these that start sites like funroll-loops.org, and for good reason.
Top
amne
Bodhisattva
Bodhisattva
User avatar
Posts: 6378
Joined: Sun Nov 17, 2002 6:00 pm
Location: Graz / EU

  • Quote

Post by amne » Sat Jan 06, 2007 5:03 pm

All right folks, time to chill out a bit, thanks.
Dinosaur week! (Ok, this thread is so last week)
Top
warrens
Apprentice
Apprentice
User avatar
Posts: 243
Joined: Tue Jan 04, 2005 11:19 pm
Location: Don't Tread On Me!

  • Quote

Post by warrens » Sat Jan 06, 2007 5:14 pm

Conan wrote:It offers so many bad suggestions that it would only be useful to people who didn't know any better, at which point they would get a bad idea of what gentoo really is, and badmouth gentoo. It's guides like these that start sites like funroll-loops.org, and for good reason.
I thought that Gentoo is about choice. You get to choose how to build your system, what packages are built or not built, and what compile time options you want to use. You even have the choice to use or not use this guide, the choice is yours and yours alone, nobody can make these choices for you.

I wrote this guide because it works and has given me the fastest and most STABLE Linux system, so far, in hopes that it would be of help to others. Use or don't use this guide that is YOUR choice, it makes no difference to me.
[The bigger the government, the smaller the citizen.

Don't tread on me!!!

The best government is the government that governs least.
Top
Conan
Guru
Guru
Posts: 360
Joined: Tue Nov 02, 2004 1:26 am

  • Quote

Post by Conan » Sat Jan 06, 2007 6:18 pm

Yes, its about choice. It is my choice to point out to unsuspecting users how bad a choice this guide is.

1. emerge -e LIST OF PACKAGES <--- wtf?
2. emerge --nodeps LIST OF PACKAGES <--- wtf?
3. USE="multislot" to get around gcc-config <-- wtf? read the documentation please, thats a really bad idea.
4. Randomly swapping gcc3.4 and 4.1 in the same sentance without any clarification
5. Cflags...

Should I go on? You are not doing anything logical here, you are making it up as you go along without justification, and it will break things.
Top
Belliash
Advocate
Advocate
User avatar
Posts: 2503
Joined: Wed Nov 24, 2004 1:39 pm
Location: Wroclaw, Poland
Contact:
Contact Belliash
Website

  • Quote

Post by Belliash » Sat Jan 06, 2007 7:50 pm

oh, ...

I've ever compiled gentoo from stage1 and never emerged system :P
It's enought to build toolchain and world and everything works great for me... 8)

This guide is, .. is, ... i don't know how to call it :P
Asio Software Technologies
Belliash IT Weblog
Top
warrens
Apprentice
Apprentice
User avatar
Posts: 243
Joined: Tue Jan 04, 2005 11:19 pm
Location: Don't Tread On Me!

  • Quote

Post by warrens » Sun Jan 07, 2007 12:28 am

Conan wrote:Yes, its about choice. It is my choice to point out to unsuspecting users how bad a choice this guide is.

1. emerge -e LIST OF PACKAGES <--- wtf?
2. emerge --nodeps LIST OF PACKAGES <--- wtf?
3. USE="multislot" to get around gcc-config <-- wtf? read the documentation please, thats a really bad idea.
4. Randomly swapping gcc3.4 and 4.1 in the same sentance without any clarification
5. Cflags...

Should I go on? You are not doing anything logical here, you are making it up as you go along without justification, and it will break things.
Let me start with your 4th point. That was just an error in editing while updating from the previous version of this document.

Points 2 & 1: --nodeps enforce the desired build order that is the same as that used in the "Linux From Scratch" book. Portage uses a different build order than LFS and I wanted the LFS build order. I would like to of had the packages that are part of your point 1 the same way, but adding all of portages hard dependencies to make it work were not worth the effort.

Point 3: The use of -multislot serves my purpose here very well. I do not want multisloted toolchain items at the first stage of the build. I want the new toolchain items to be used immediately after they are built.

Point 5: The Cflags and CXXflags are the same as those used in the "Stage 1/3 Guide" by BobP and they have worked very well, both in Stage 1/3 and Fiordland.

The logic of this guide rest first and foremost on "Linux From Scratch" with some changes to make it work with portage. I firmly believe that "Linux From Scratch" has a more logical build order for the base system than Gentoo does, but without a package manager LFS is a royal pita to maintain. So, in a nutshell, Fiordland is Gentoo built Linux From Scratch style.
[The bigger the government, the smaller the citizen.

Don't tread on me!!!

The best government is the government that governs least.
Top
vipernicus
Veteran
Veteran
User avatar
Posts: 1462
Joined: Mon Jan 17, 2005 10:35 pm
Location: Your College IT Dept.
Contact:
Contact vipernicus
Website

  • Quote

Post by vipernicus » Sun Jan 07, 2007 4:24 pm

Why don't you bootstrap?
Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Top
baigsabeeh
Guru
Guru
User avatar
Posts: 520
Joined: Wed Sep 28, 2005 7:51 pm
Location: North Brunswick, NJ

  • Quote

Post by baigsabeeh » Sun Jan 07, 2007 4:46 pm

Conan wrote:Yes, its about choice. It is my choice to point out to unsuspecting users how bad a choice this guide is.

1. emerge -e LIST OF PACKAGES <--- wtf?
2. emerge --nodeps LIST OF PACKAGES <--- wtf?
3. USE="-multislot" to get around gcc-config <-- wtf? read the documentation please, thats a really bad idea.
4. Randomly swapping gcc3.4 and 4.1 in the same sentance without any clarification
5. Cflags...

Should I go on? You are not doing anything logical here, you are making it up as you go along without justification, and it will break things.
1. Is there a problem with rebuilding the system. Why do you need a list of packages anyway?
2. Is there something wrong with this? He does say to rebuild the system, so the dependencies are pulled then. No sense in wasting more time trying to pull dependencies when it has to be done again anyway.
3. Nothing wrong with that. Remember, there are ways to recover an older compiler if your system does get hosed. It's another way of doing things.
4. Don't see any mention of it.
5. What about them? They look fine to me, but anything would like fine to me considering I use Conrad flags.
Last edited by baigsabeeh on Sun Jan 07, 2007 11:16 pm, edited 1 time in total.
BSD > SysV > Linux
BSD FTW!
Top
warrens
Apprentice
Apprentice
User avatar
Posts: 243
Joined: Tue Jan 04, 2005 11:19 pm
Location: Don't Tread On Me!

  • Quote

Post by warrens » Sun Jan 07, 2007 8:57 pm

Conan wrote: Should I go on? You are not doing anything logical here, you are making it up as you go along without justification, and it will break things.
Why should you go on?? You do not know what you are talking about. This is the second update of this guide, version 1 is here and version 1.1 is here.

I have been running Fiorldand on two computers, one a laptop, for a year now. Both machines have been more stable than at any other time since I started using Linux, way beyond what I expected. So my more aggressive CFLAGS and CXXFLAGS have not broken anything that I use.

The fact that all the different Linux distros exist proves that there is more than one valid way to build a Linux system. Next time take time to actually read the guide before you trash it.
[The bigger the government, the smaller the citizen.

Don't tread on me!!!

The best government is the government that governs least.
Top
vipernicus
Veteran
Veteran
User avatar
Posts: 1462
Joined: Mon Jan 17, 2005 10:35 pm
Location: Your College IT Dept.
Contact:
Contact vipernicus
Website

  • Quote

Post by vipernicus » Mon Jan 08, 2007 8:17 am

Maybe for accuracy's sake, you might want to find out what support LFS uses by default for each of the packages that is brought in, and if it differs from Gentoo's defaults, you can build a custom package.use/ . By doing this you can avoid the --no-deps, which as we both know, should probably be avoided.

Also, -X is default, unless you too early on specify 2006.1/desktop. If you specify 2006.1/ , you will only get minimal default flags.

Another note, why are you avoiding using bootstrap.sh, or even a modified one?

It's a great idea, and everything looks good, other than a few non-acceptable methods.
Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Top
warrens
Apprentice
Apprentice
User avatar
Posts: 243
Joined: Tue Jan 04, 2005 11:19 pm
Location: Don't Tread On Me!

  • Quote

Post by warrens » Tue Jan 09, 2007 1:44 am

vipernicus wrote:Maybe for accuracy's sake, you might want to find out what support LFS uses by default for each of the packages that is brought in, and if it differs from Gentoo's defaults, you can build a custom package.use/ . By doing this you can avoid the --no-deps, which as we both know, should probably be avoided.

Also, -X is default, unless you too early on specify 2006.1/desktop. If you specify 2006.1/ , you will only get minimal default flags.

Another note, why are you avoiding using bootstrap.sh, or even a modified one?

It's a great idea, and everything looks good, other than a few non-acceptable methods.
My primary reason for not using bootstrap.sh that is included with Gentoo is given in the first paragaph of the guide. To more clearly illustrate the differencies I have following the package order of bootstrap.sh and LFS Chap.5:

boostrap.sh -p gives:

Code: Select all

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-kernel/linux-headers-2.6.19
[ebuild   R   ] sys-apps/texinfo-4.8-r5
[ebuild   R   ] sys-devel/gettext-0.16.1
[ebuild   R   ] sys-devel/binutils-2.17
[ebuild   R   ] sys-devel/gcc-4.1.1-r3  USE="bootstrap* -fortran* -gtk*"
[ebuild   R   ] sys-libs/glibc-2.5
[ebuild     U ] sys-apps/baselayout-1.12.8-r2 [1.12.8-r1] USE="bootstrap*"
[ebuild   R   ] sys-libs/zlib-1.2.3-r1
LFS Chap5 builds:

Code: Select all

Binutils
GCC
Linux-Libc-Headers
Glibc
Tcl
Expect
DejaGNU
GCC
Binutils
Ncurses
Bash
Bzip
Coreutils
Diffutils
Findutils
Gawk
Gettext
Grep
Gzip
M4
Make
Patch
Perl
Sed
Tar
Texinfo
Util-linux
As can be seen that bootstrap.sh and the bootstaping part of LFS are very different. I don't think that a custom package.use would be of much help here. The other problem I encountered is that dependacy handling is done by the ebuilds rather than bootstrap.sh or emerge. The only other solution that I know of would require custom ebuilds that would have to be changed during the build, which also have been a major maintenance headache. It proved to be easier to handle this with custom make.conf files for each major step of the build and using emerge --nodeps solved my problems with dependancy handling at this stage of the build. It is not elegant and it may not be the best solution for what I wanted to accomplish, but it does allow me to install Gentoo the way I wanted to.
[The bigger the government, the smaller the citizen.

Don't tread on me!!!

The best government is the government that governs least.
Top
vipernicus
Veteran
Veteran
User avatar
Posts: 1462
Joined: Mon Jan 17, 2005 10:35 pm
Location: Your College IT Dept.
Contact:
Contact vipernicus
Website

  • Quote

Post by vipernicus » Tue Jan 09, 2007 7:41 am

Maybe you can create a new profile so that your system package only includes packages selected for LFS, and modify the bootstrap.sh. I think your goal should be an LFS system + portage. Presently it is Gentoo system + extras included in LFS + portage. Seems like it kind of defeats the purpose.
Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Top
warrens
Apprentice
Apprentice
User avatar
Posts: 243
Joined: Tue Jan 04, 2005 11:19 pm
Location: Don't Tread On Me!

  • Quote

Post by warrens » Tue Jan 09, 2007 4:48 pm

vipernicus wrote:Maybe you can create a new profile so that your system package only includes packages selected for LFS, and modify the bootstrap.sh. I think your goal should be an LFS system + portage. Presently it is Gentoo system + extras included in LFS + portage. Seems like it kind of defeats the purpose.
I really like what you are saying. The only problems I have is that my bash scripting skills suck big time and I have no clue about building a custom system profile. :oops: That is the biggest reason that Fiordland is still just a guide and not a drop-in replacement for bootstrap.sh.

edit:
What should happen is build the LFS packages for the stage 1 portion and progress from the resulting stage 2 to stage 3 as normal with emerge -e system. Really a Gentoo system built on top of a LFS foundation.
[The bigger the government, the smaller the citizen.

Don't tread on me!!!

The best government is the government that governs least.
Top
vipernicus
Veteran
Veteran
User avatar
Posts: 1462
Joined: Mon Jan 17, 2005 10:35 pm
Location: Your College IT Dept.
Contact:
Contact vipernicus
Website

  • Quote

Post by vipernicus » Wed Jan 10, 2007 2:40 am

warrens wrote:
vipernicus wrote:Maybe you can create a new profile so that your system package only includes packages selected for LFS, and modify the bootstrap.sh. I think your goal should be an LFS system + portage. Presently it is Gentoo system + extras included in LFS + portage. Seems like it kind of defeats the purpose.
I really like what you are saying. The only problems I have is that my bash scripting skills suck big time and I have no clue about building a custom system profile. :oops: That is the biggest reason that Fiordland is still just a guide and not a drop-in replacement for bootstrap.sh.

edit:
What should happen is build the LFS packages for the stage 1 portion and progress from the resulting stage 2 to stage 3 as normal with emerge -e system. Really a Gentoo system built on top of a LFS foundation.
Thanks for actually considering my comment.

It's actually much easier than you think.

cat /usr/portage/profiles/default-linux/packages.build

Also, look around at the other default settings included in your standard system.
Note: /x86 adds in more, and is linked to default-linux through ../, and /desktop is the same way.

If you really want to be serious, you wouldn't start with a Gentoo stage 1, you'd create a basic LFS system in a chroot using the LFS guide, compile in portage or paludis and dependencies, setup a modified profile including the minimal LFS as your system. Then you clean it up, tar it up, and have it used as your guide's stage 1. This way you can actually start with and come out with a true LFS system + package manager.

What you do, is start out with the LFS guide, and when it gets to the point of using a package manager, build in either portage or paludis, and then rebuild the TC. You could either use a modified bootstrap.sh or emwrap.sh. If you document your every step, you could come out with a guide with 2 parts. Portage Linux From Scratch or Fiordland Gentoo Stage 1 to Stage 3 Guide.
Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Top
warrens
Apprentice
Apprentice
User avatar
Posts: 243
Joined: Tue Jan 04, 2005 11:19 pm
Location: Don't Tread On Me!

  • Quote

Post by warrens » Wed Jan 10, 2007 5:19 am

Let me see if I have this straight. First build LFS as per the LFS book + the dependencies for portage, rebuild the TC, rewrite package.build to only include the LFS packages, add modified bootstrap.sh or emwrap.sh, and then tar up as Fiordland-2006.1-x86-stage_1.tar? Somewhere I will also need to add baselayout into the system, though not sure where to include it. Also am I correct in thinking that my modified package.build would need to be in /usr/portage/profiles/LFS with /etc/make.profile linked to that directory?

This sound really good if I understand you correctly. I would like to see Fiordland become a more widely used installation method and this might just make it easy enough that more people would try it.
[The bigger the government, the smaller the citizen.

Don't tread on me!!!

The best government is the government that governs least.
Top
vipernicus
Veteran
Veteran
User avatar
Posts: 1462
Joined: Mon Jan 17, 2005 10:35 pm
Location: Your College IT Dept.
Contact:
Contact vipernicus
Website

  • Quote

Post by vipernicus » Wed Jan 10, 2007 2:45 pm

warrens wrote:Let me see if I have this straight. First build LFS as per the LFS book + the dependencies for portage, rebuild the TC, rewrite package.build to only include the LFS packages, add modified bootstrap.sh or emwrap.sh, and then tar up as Fiordland-2006.1-x86-stage_1.tar? Somewhere I will also need to add baselayout into the system, though not sure where to include it. Also am I correct in thinking that my modified package.build would need to be in /usr/portage/profiles/LFS with /etc/make.profile linked to that directory?

This sound really good if I understand you correctly. I would like to see Fiordland become a more widely used installation method and this might just make it easy enough that more people would try it.
You could either add baselayout into the system, einit, init-ng, or you could use the init-scripts that LFS uses, and create an overlay in /usr/local/overlays/fiordland. E-Mission Guide uses /usr/local/overlays/emission/profiles/default-linux/x86/emission-2006.0 and links it to the /etc/make.profile. You can also put it in /etc/portage/profiles/fiordland, which is Gentoo's recommended location.

Really, if I were you, I'd create the profile and for paludis. http://paludis.pioto.org/
Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Top
micr0c0sm
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 148
Joined: Sat Oct 29, 2005 9:36 pm
Location: New York
Contact:
Contact micr0c0sm
Website

irc channel

  • Quote

Post by micr0c0sm » Wed Jan 10, 2007 3:58 pm

#fiordland on freenode for further forum ?
Top
rmh3093
Advocate
Advocate
User avatar
Posts: 2138
Joined: Wed Aug 06, 2003 10:36 pm
Location: Albany, NY

  • Quote

Post by rmh3093 » Wed Jan 10, 2007 4:11 pm

Code: Select all

cd /mnt/chroot_dir
install -dv {sbin,bin,dev,home,lib,etc,boot,mnt,proc,sys,var/lock,var/log,var/run,var/tmp}
ln -s var/tmp tmp

Code: Select all

cd /tmp
svn co svn://busybox.net/trunk/busybox

Code: Select all

cd busybox
make menuconfig
make busybox
  • NOTE: set prefix to /mnt/chroot_dir or what ever you need

Code: Select all

cd busybox
make install
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Top
Post Reply

70 posts
  • 1
  • 2
  • 3
  • Next

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic