Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Reinstall Gentoo over old install
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
lost_amigo
n00b
n00b


Joined: 27 Aug 2007
Posts: 22

PostPosted: Sun Mar 30, 2008 5:02 pm    Post subject: Reinstall Gentoo over old install Reply with quote

I am wondering about something. I have a aGentoo install that has a messed up grub. What I am wondering is, if I reinstall with the full install CD, will it give me the option to repartition and/or reformat the drive first?
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sun Mar 30, 2008 5:16 pm    Post subject: Reply with quote

I'm not sure how the automated installer would handle an existing Gentoo installation.

If you are only dealing with a messed up grub, fixing it manually should be pretty easy, don't you agree ?
Back to top
View user's profile Send private message
lost_amigo
n00b
n00b


Joined: 27 Aug 2007
Posts: 22

PostPosted: Sun Mar 30, 2008 5:25 pm    Post subject: Reinstalling Gentoo. Reply with quote

Well, to be honest, I am new at this and, I have tried to reinstall the grub but, with my limited knowledge of the install I coulds make things worse.
I have a MSI aboard with an AMD64 processor. Raid 5 with 3 160 gig drives set up as a server.
Here is what I tried...

I boot from the minimal Installation CD
then, I:

Swapon /dev/hda2
mount /dev/hda3 mnt/gentoo
mount /dev/hda1 mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc
chroot /mnt/gentoo/ /bin/bash
env-update
source /etc/profile
grub
root (hd0) returns... Filesystem type unknown, Using whole disk
should I continue? don't know.
haven't done the next command yet....
setup (hd0,0)
quit
Thank you for the speedy reply
Back to top
View user's profile Send private message
lost_amigo
n00b
n00b


Joined: 27 Aug 2007
Posts: 22

PostPosted: Sun Mar 30, 2008 5:28 pm    Post subject: correction to previous post by me. Reply with quote

(hd0) was actually (hd,0)
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sun Mar 30, 2008 6:07 pm    Post subject: Reply with quote

Try doing the grub commands the other way around.
Code:
# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
Back to top
View user's profile Send private message
lost_amigo
n00b
n00b


Joined: 27 Aug 2007
Posts: 22

PostPosted: Sun Mar 30, 2008 7:01 pm    Post subject: Reply with quote

Yes, thank you... this seems to be the correct way. I was told the opposite as you saw.

Now, please bear with me, as I try to explain how I arrived here.

I had just purchased the server in running order. I had started and stopped the system a few times and, then, upon coldbooting I got a message that stated that I had started the system 37 times and that a file check was necessary. the first 25 restarts must have been prior to my purchasing the server. So, I typed (Y) and away it went. When it stopped I restarted it and it hasn''t ran since. I have been talking with the seller and, he has visited the server and, at the last point he had me run the "mkfs -t ext2 /dev/hda1 command. Then, he was going to send me the files to copy to my boot partition but, I haven't heard yet.

When I run the grub commands in reverse as you suggested, I get:

grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no
Error 15: File not found.

So.... now it seems obvious that I need to reconstruct the boot partition.

What do you think? Thank you very much, again
Back to top
View user's profile Send private message
d_adams
Apprentice
Apprentice


Joined: 20 Oct 2003
Posts: 223

PostPosted: Sun Mar 30, 2008 10:41 pm    Post subject: Reply with quote

Lemme see if I can dig this out of memory here. It appears that the boot partition might be hosed up, so you can wipe it (/dev/hda1) clean and start over.

Boot from a minimal cd, whichever one works.
mke2fs /dev/hda1 (go ahead and format it)

mount /dev/hda3 /mnt/gentoo
mount /dev/hda1 /mnt/gentoo/boot

cd /mnt/gentoo
chroot /mnt/gentoo /bin/bash
env-update && source /etc/profile (you should now be in the gentoo environment, marked by a # prompt instead of a $ )

emerge grub (let it reinstall it, then run it by doing the following)

# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

Once that part is done, you'll need to edit the grub.conf file to match the kernel you have.
I'm going on the assumption that the guy who built the server used a standard kernel, not gen-kernel to set up this machine.
So, you need to copy over the kernel from the source tree.

cd /usr/src
ls -l (find out the current kernel version here, remember the version, you'll need it shortly)
cp /usr/src/linux/arch/x86/boot/bzImage /boot
cd /boot
ls (do this to see that the kernel is actually there, it should be bzImage)
mv bzImage 2.6.24-gentoo-r3 (again, assuming the correct kernel, rename it as needed)

cd grub
nano -w grub.conf (you'll need to type or copy/paste this into it, once done, save it by hitting ctrl-x)

Code:
default 0
timeout 10

title=Gentoo 2.6.24-r3
root (hd0,0)
kernel /boot/2.6.24-gentoo-r3 root=/dev/hda3


cd /
exit
umount /mnt/gentoo/boot
umount /mnt/gentoo

reboot

Hopefully this will work for you, assuming that the kernel tree is still there, etc. If I've forgotten anything, someone speak up.
_________________
http://www.1and1.com/?k_id=16196755 click me for cheap linux based web hosting.
Back to top
View user's profile Send private message
lost_amigo
n00b
n00b


Joined: 27 Aug 2007
Posts: 22

PostPosted: Mon Mar 31, 2008 1:06 am    Post subject: hmmmm... Reply with quote

When I try to mount hda3, (mount /dev/hda3 /mnt/gentoo) I get:

EXT3-fs warning: mounting fs with errors, running e2fsck is recommended

This is the first time I have seen this.
I am unsure of the syntax for running "e2fsck" Do you think you could possible point me there?

I appreciate your efforts.
Back to top
View user's profile Send private message
d_adams
Apprentice
Apprentice


Joined: 20 Oct 2003
Posts: 223

PostPosted: Mon Mar 31, 2008 11:05 am    Post subject: Reply with quote

At this point, it sounds like the machine rebooted the hard way without unmounting the filesystem and has gotten a little bit balled up.

You might be in for a fun ride.

I'd go ahead and run e2fsck on hda3 to see if it will fix the errors. There is a very good possibility that you will be learning how to install gentoo firsthand very soon.
If it does get fixed, then follow the previous instructions in my last post. If not, you have 2 options. One, call the vendor and have him fix it. Two, install gentoo yourself.

If it were me, I'd pick option two. You'll learn a LOT more that way
_________________
http://www.1and1.com/?k_id=16196755 click me for cheap linux based web hosting.
Back to top
View user's profile Send private message
notHerbert
Advocate
Advocate


Joined: 11 Mar 2008
Posts: 2228
Location: 45N 73W

PostPosted: Mon Mar 31, 2008 1:10 pm    Post subject: Reply with quote

d_adams wrote:
......you have 2 options. One, call the vendor and have him fix it. Two, install gentoo yourself.

If it were me, I'd pick option two. You'll learn a LOT more that way

Besides lots of the fun of Gentoo IS installing it yourself. Don't miss the experience. :wink:
Back to top
View user's profile Send private message
d_adams
Apprentice
Apprentice


Joined: 20 Oct 2003
Posts: 223

PostPosted: Mon Mar 31, 2008 1:48 pm    Post subject: Reply with quote

I've re-read the whole thread, and there is one other possibilty. You stated that you have a Raid 5 array of 160 gb drives. There is the possibility that the raid set became corrupted and reinstalling will pretty much be the best bet at this point.

Talk with your sales guy that set this box up. If it were me setting this up for a customer, I'd have at least made a stage4 backup of the machine, prior to delivery. I do this on all of my new machine builds for customers as a courtesy, whether its a Linux or Windows box. Linux boxes get a stage 4 burned to a dvd, Windows boxes get an Acronis image made. That way, if the customer hoses the box, I can fix it asap. Basically, it's the same thing Dell, HP, Gateway and many other large OEM's do. I however am a small business owner and I don't like doing repeat work if I'm not getting paid, so I want it to go as fast as possible on recovery.

I'd rather not sit there for hours on end reinstalling a gentoo box if I can help it, much less the numerous reboots of a Windows box. Maybe you got lucky and got a seller that did just what I do and he's got an image ready to go. Maybe not.
_________________
http://www.1and1.com/?k_id=16196755 click me for cheap linux based web hosting.
Back to top
View user's profile Send private message
lost_amigo
n00b
n00b


Joined: 27 Aug 2007
Posts: 22

PostPosted: Mon Mar 31, 2008 3:24 pm    Post subject: thanks... Reply with quote

Thanks for your efforts .... much appreciated. I will probably do some reading and try to re-install it. There were no files on the machine that required saving and, the experience would probably be a good thing.
Again... thanks

by the way...
If I want to reinstall from scratch, can I start from the minimal cd, or full install for that matter, and reformat all of the partitions on the raid system without re-partitioning them? I am using the accusys acs7630 Pata raid 5. If so, where do you suggest I look for the answer?
Back to top
View user's profile Send private message
lost_amigo
n00b
n00b


Joined: 27 Aug 2007
Posts: 22

PostPosted: Tue Apr 01, 2008 1:28 am    Post subject: geeze... Reply with quote

It seems that a notification that there was a new posting on my thread bears no fruit as the link in my mailbox says: : "The topic or post you requested does not exist"

If someone has responded since this morning (Mar31am) could you please resend? Thank you very much
Back to top
View user's profile Send private message
lost_amigo
n00b
n00b


Joined: 27 Aug 2007
Posts: 22

PostPosted: Wed Apr 02, 2008 8:06 am    Post subject: Welll Mr. d_adams..... and Mr. notHerbert.... Reply with quote

I took the leap, I repartitioned my raid5 system and I downloaded and installed the Stage3 tarball and the Portage snapshot, as per the "Gentoo amd64 installation manual". .... for the excitement.... the wild ride, as you suggested. I am presently at item 5d. "Configuring the Compile Option's". I am doing ok till I get here.

The question is: How much of the "make.conf" file is it necessary to change. I am referring to "CHOST, CFLAGS and MAKEOPTS. Are there any standard defaults for these?

As I stated earlier..., my system is an AMD64 running PATA Raid 5, planned for web serving.
Back to top
View user's profile Send private message
cioannou
Tux's lil' helper
Tux's lil' helper


Joined: 16 Oct 2005
Posts: 82
Location: Greece

PostPosted: Wed Apr 02, 2008 8:44 am    Post subject: Reply with quote

Only thing I would suggest is do NOT compile for x86_64, you will get some things not-supported or masked because of this.

Besides, 64bit will only be of use if you use any 64bit CPU intensive application like scientific, statistics, etc. so I suggest you stick to x86.

You can see those flags in the handbook but here are mine (Dual Opteron 244 system)

Code:

CFLAGS="-march=opteron -O2 -pipe"
MAKEOPTS="-j3"
CXXFLAGS="${CFLAGS}"
CHOST="i686-pc-linux-gnu"


As for the web serving stuff, I have put all USE variables in package.use for example:

Code:

dev-lang/php ctype curl sqlite zip xml xmlrpc xmlwriter xpm xsl zip mysql curl ctype gd


This way each package can use its own USE flags without affecting the whole system (where possible).
_________________
If windows fails, who you gonna call? Re-install......
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Wed Apr 02, 2008 3:09 pm    Post subject: Reply with quote

cioannou wrote:
Besides, 64bit will only be of use if you use any 64bit CPU intensive application like scientific, statistics, etc.

Another advantage of running a 64bit OS is that you can address a large amount of RAM without any paging tricks.

Using a kernel with CONFIG_HIGHMEM4G=y incurs a small performance penalty, and CONFIG_HIGHMEM64G=y incurs a somewhat larger performance penalty.
Back to top
View user's profile Send private message
lost_amigo
n00b
n00b


Joined: 27 Aug 2007
Posts: 22

PostPosted: Wed Apr 02, 2008 4:26 pm    Post subject: So...... Reply with quote

Thank you for the notes.... you know, it is not above me to restart my adventure as I am not that far into this yet. I guess, at this point I need to do some reading to get familiar with the masking thing. At this point I can only associate a mask with Haloween. I am wondering, are there any open chat forums that one could go to and perhaps get talked through some of this? I mean, I am not new to PC's but, Linux does beg some answers that, otherwise could take a lot of time. Someone, the other day, suggested that I should try the SMEServer as it was probably the easiest to get up and running. Any thoughts on this?

Thanks again..
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
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