Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing Gentoo 2004.3: Stage 1 NPTL on a Stage 3 Tarball
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 16, 17, 18  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3059
Location: Korea

PostPosted: Sat Mar 26, 2005 9:22 pm    Post subject: Reply with quote

thebigslide wrote:
I like the idea of using sfdisk to setup the partition table.


Here's how you'd do it.

To store everything for your partition table:
Code:
dd if=/dev/(your_disk) of=mbr.save count=1 bs=512
sfdisk -d /dev/(your_disk) > partitions.save


Then to restore them:
Code:
dd if=mbr.save of=/dev/(your_disk)
sfdisk /dev/(your_disk) < partitions.save


The dd command saves the first 512 bytes which will get the table of primary partitions. Then the sfdisk command saves the rest.

Of course this automated way of doing it assumes you already have a set partition table you want saved from an old configuration and the storing part must be done in a running system.

But if with each of your installs the partition scheme stays the same this is a saver.


Last edited by slycordinator on Mon Mar 28, 2005 7:19 am; edited 1 time in total
Back to top
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3355
Location: Jackass! Development Labs

PostPosted: Sat Mar 26, 2005 9:29 pm    Post subject: Reply with quote

:roll:
_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3059
Location: Korea

PostPosted: Sat Mar 26, 2005 10:22 pm    Post subject: Reply with quote

Why the ( :roll: ) ? Would you have preferred this to be in the troubleshooting thread? I was just showing a way to make his script more automated.

And I had just remembered how you'd do it so I posted it.
Back to top
View user's profile Send private message
hielvc
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2805
Location: Oceanside, Ca

PostPosted: Sun Mar 27, 2005 6:25 pm    Post subject: Reply with quote

thebigslide the one problem I see with your script is the
Quote:
emerge gcc-config glibc binutils gcc --oneshot && gcc-config i686-pc-linux-gnu-3.4.3 && source /etc/profile
On my box when gcc hickuped a couple of days ago its was caused by
Code:
ls /usr/lib/gcc-lib/i686-pc-linux-gnu/
3.3.3/  3.3.5/  3.4.3@  3.4.3-20050110/
because gcc-config was pointing to 3.4.3 instead of 3.4.3-20050110. This is one of the re-occuring probs with updateing gcc.
_________________
An A-Z Index of the Linux BASH command line
Back to top
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3355
Location: Jackass! Development Labs

PostPosted: Mon Mar 28, 2005 3:18 am    Post subject: Reply with quote

slycordinator wrote:
Why the ( :roll: ) ?

i'm just eagerly waiting for the new script to be posted. :wink: its getting hard to keep holding my breath!
_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
Back to top
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3355
Location: Jackass! Development Labs

PostPosted: Mon Mar 28, 2005 3:20 am    Post subject: Reply with quote

:arrow: Stage 1/3 Guide for 2005.0 Now Available; Experimental

Click Here.
_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3059
Location: Korea

PostPosted: Mon Mar 28, 2005 6:48 am    Post subject: Reply with quote

Bob P wrote:

i'm just eagerly waiting for the new script to be posted. :wink: its getting hard to keep holding my breath!


I've edited it to include the stuff I mentioned before:

Code:

#!/bin/bash
##Do\ Bob\'s\ Install

instdisk=sda
fstype=reiserfs
fsnum=sda1

# If you want to manually create partition scheme uncomment next line
#fdisk /dev/$instdisk

# If you want to use a previously saved configuration for your partition scheme
# Uncomment the next 2 lines (also change the file names to suit your saved config)
#dd if=mbr.save of=/dev/$instdisk
#sfdisk /dev/$instdisk < partitions.save


mkfs.${fstype} /dev/${fsnum}
mount /dev/$fsnum -t $fstype /mnt/gentoo

cd /mnt/gentoo
tar xvjpf ~/gentoo-stage3-x86-2004.3.tar.bz2
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
cp /etc/resolv.conf etc/resolv.conf
touch etc/portage/package.{use,keywords,mask,unmask}
mkdir usr/portage;chown portage:portage usr/portage

cat <<- EOF >> etc/portage/package.use
sys-libs/glibc userlocales
sys-kernel/ck-sources symlink
sys-apps/shadow pam
EOF

cat <<- EOF >> etc/portage/package.keywords
sys-devel/gcc ~x86
sys-devel/gcc-config ~x86
sys-libs/libstdc++-v3 ~x86
sys-libs/glibc ~x86
EOF

cat <<- EOF >> etc/portage/package.mask
>sys-devel/gcc-3.4.3-r1
>sys-devel/gcc-config-1.3.9
>sys-libs/libstdc++-v3-3.3.4
>sys-libs/glibc-2.3.4.20050125
EOF

rm etc/make.conf;touch etc/make.conf
cat <<- EOF >> etc/make.conf
USE="nptl gtk -pam -ipv6 mmx sse 3dnow 3dnowex -nls ssl"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -mcpu=athlon-xp -O2 -s -w -pipe -fomit-frame-pointer"
CXXFLAGS="\${CFLAGS}"
PKGDIR=${PORTDIR}/packages
PORT_LOGDIR=/var/log/portage
FEATURES="autoclean userpriv usersandbox sandbox"
EOF

mkdir usr/local/portage;chown portage:portage usr/local/portage
mkdir var/log/portage;chown portage:portage var/log/portage

cat <<- EOF >> etc/locales.build
en_US/ISO-8859-1
en_US.UTF-8/UTF-8
EOF

touch nptl-update;chmod +x nptl-update
cat <<- EOF >> nptl-update
#!/bin/bash
env-update && source /etc/profile
ln -sf /usr/share/zoneinfo/Canada/Central etc/localtime
emerge sync
emerge -C linux-headers && emerge linux26-headers
emerge gcc-config glibc binutils gcc --oneshot && gcc-config 2 && source /etc/profile

rm /etc/make.conf && touch /etc/make.conf
cat <<- EOTF >> etc/make.conf
USE="nptl pthreads ithreads gtk python X -pam xml xml2 zlib -ipv6 mmx ssl 3dnow 3dnowex -nls chroot sftplogging"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O2 -s -w -pipe -fomit-frame-pointer -momit-leaf-frame-pointer -ftracer -mtune=athlon-xp"
CXXFLAGS="\${CFLAGS} -fvisibility-inlines-hidden"
LDFLAGS="-Wl,-O1"
PKGDIR=\${PORTDIR}/packages
PORT_LOGDIR=/var/log/portage
PORTDIR_OVERLAY=/usr/local/portage
PORTAGE_NICENESS=3
FEATURES="autoclean userpriv usersandbox sandbox distlocks ccache"
CCACHE_SIZE="2G"
EOTF
emerge --nodeps ccache
emerge glibc gcc binutils portage glib --oneshot && emerge -e world;env-update;source /etc/profile
EOF

chroot . /nptl-update
echo "Install a bootloader, logger, cron, kernel and reboot"
echo "The author suggests grub, syslog-ng, vixie-cron and ck-sources-2.6.10-ck6"
/bin/bash


I also changed the gcc-config command from gcc-config i686-pc-linux-gnu-3.4.3 to gcc-config 2. I believe that'll fix the problem hielvc noted.

edit: Fixed a typo
2nd edit: Fixed make.conf creation


Last edited by slycordinator on Tue Apr 05, 2005 1:13 am; edited 1 time in total
Back to top
View user's profile Send private message
Schietschijf
n00b
n00b


Joined: 04 Jan 2005
Posts: 36
Location: Mortsel, Antwerp, Flanders

PostPosted: Tue Mar 29, 2005 9:43 pm    Post subject: Reply with quote

hello, first of all, I want to thank Bob for this guide! It is really wonderfull and even easier than the gentoo installation guide :p

Second, I want to tell that i did this guide but with the stage3 tarball for the amd64 2005.0. Still it's following the guide but there are only 2 differences I think.

This stage (stage3 for amd64 of the 2005.0 release) already contains gcc 3.4.x, so its al little bit shorter for amd64 users...
Second difference is that linux26-headers doesn't exist anymore in 2005.0, it's now linux-headers version 2.6.x...

That's all that was different, except from my graphical card..

Once again thank you for this guide!

[edit]
Ow, yes, also in my make.conf i did for the CFLAGS -march=athlon64 -mtune=athlon64 and all the rest stays the same...
[/edit]
_________________
56k ruleD !
Back to top
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3355
Location: Jackass! Development Labs

PostPosted: Wed Mar 30, 2005 6:14 am    Post subject: Reply with quote

glad to hear that you've had good luck.

BTW, we have a thread specifically for using this method with 2005.0. if anyone is interested in using this guide with 2005.0, please look there. we're limiting this thread to 2004.3.

thanks! :wink:
_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
Back to top
View user's profile Send private message
plonka2000
Apprentice
Apprentice


Joined: 02 Dec 2004
Posts: 160
Location: UK, Surrey

PostPosted: Wed Mar 30, 2005 8:53 am    Post subject: Reply with quote

Just marking this, as I always come back to it so much... :wink:
_________________
-Do not be afraid of what is different.
-Do not be afraid of being different.
-After all, ignorance is not an excuse.

Using Gentoo and Windows XPee.

Check my site here
Back to top
View user's profile Send private message
ruach
n00b
n00b


Joined: 28 May 2004
Posts: 67
Location: Utah

PostPosted: Thu Mar 31, 2005 7:39 pm    Post subject: Its alive !!! Reply with quote

Despite my miserable failed attempts to get this to work with 2004.3 on Athlon-MP, I'm NOW large and in-charge on my Pentium 4 Dell C640. Thanks for the sweet tutorial Bob P! :D

Maybe I'll go try that Athlon again... ;)
_________________
For much wisdom is much grief and he that increaseth knowledge increaseth sorrow. Eccl 1:18
Back to top
View user's profile Send private message
whabee
n00b
n00b


Joined: 08 Mar 2005
Posts: 42

PostPosted: Thu Mar 31, 2005 9:59 pm    Post subject: Reply with quote

Great guide bob I followed it on a clean stage 3 install of 2005.0 on a P4 3.0/Intel D865GLCL and it worked flawless, was the fastest and cleanest install of gentoo I ever did and I have done about 30 to date, I love to test and break stuff. Only problems I had were typo errors on my part. :oops:
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3059
Location: Korea

PostPosted: Mon Apr 04, 2005 8:00 pm    Post subject: Reply with quote

I noticed a problem (that I don't know how to fix) with the script made earlier by myself and thebigslide.

Here's a section of it:
Code:
rm etc/make.conf;touch etc/make.conf
cat <<- EOF >> etc/make.conf
USE="nptl gtk -pam -ipv6 mmx sse 3dnow 3dnowex -nls ssl"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -mcpu=athlon-xp -O2 -s -w -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
PKGDIR=${PORTDIR}/packages
PORT_LOGDIR=/var/log/portage
FEATURES="autoclean userpriv usersandbox sandbox"
EOF


After running this section of code, you get /etc/make.conf with the following:
Code:
USE="nptl gtk -pam -ipv6 mmx sse 3dnow 3dnowex -nls ssl"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -mcpu=athlon-xp -O2 -s -w -pipe -fomit-frame-pointer"
CXXFLAGS=""
PKGDIR=/packages
PORT_LOGDIR=/var/log/portage
FEATURES="autoclean userpriv usersandbox sandbox"


because when that script is run it looks at CFLAGS as a variable. So when it sees ${CFLAGS} it evaluates that to " " since it's an undefined variable.

edit: Well the way to fix it is to explicitly set CXXFLAGS without a reference to CFLAGS if you want an automated script.
Back to top
View user's profile Send private message
pijalu
Guru
Guru


Joined: 04 Oct 2004
Posts: 365

PostPosted: Mon Apr 04, 2005 8:33 pm    Post subject: Reply with quote

slycordinator wrote:

...
Code:

cat <<- EOF >> etc/make.conf
USE="nptl gtk -pam -ipv6 mmx sse 3dnow 3dnowex -nls ssl"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -mcpu=athlon-xp -O2 -s -w -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
PKGDIR=${PORTDIR}/packages
PORT_LOGDIR=/var/log/portage
FEATURES="autoclean userpriv usersandbox sandbox"
EOF

...


IMHO, escaping the $ should do the trick for CFLAG and PORTDIR

Code:

cat <<- EOF >> etc/make.conf
USE="nptl gtk -pam -ipv6 mmx sse 3dnow 3dnowex -nls ssl"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -mcpu=athlon-xp -O2 -s -w -pipe -fomit-frame-pointer"
CXXFLAGS="\${CFLAGS}"
PKGDIR=\${PORTDIR}/packages
PORT_LOGDIR=/var/log/portage
FEATURES="autoclean userpriv usersandbox sandbox"
EOF
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3059
Location: Korea

PostPosted: Tue Apr 05, 2005 1:12 am    Post subject: Reply with quote

That worked perfectly, thanks. Editing the script as such.
Back to top
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3355
Location: Jackass! Development Labs

PostPosted: Tue Apr 05, 2005 12:23 pm    Post subject: Reply with quote

:arrow: 2005.0 version of the Guide is now stable and has been posted in Documentation Tips & Tricks:

https://forums.gentoo.org/viewtopic-t-319349.html
_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... 16, 17, 18
Page 18 of 18

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum