PDA

View Full Version : Grub not working after Gentoo Install



jcr1
03-01-2005, 02:39 PM
My Gentoo install seemed to go quite well if a bit time consuming.

However, when I did a reboot, I got an error message, which read;

"GRUB Loading stage 1.5

GRUB loading, please wait....
Error 17"

I can't get into anything (of course) & one way out would be to re-install Libranet so I could get it's boot loader to at least get onto my computer (I'm doing this off my laptop). But that seems a shame as I would be losing 4 hours work (not to mention the agro from others for wasting so much time).

My setup is; Win XP on my first harddrive - hda1, NTFS on hdb1 & Linux boot hdb2, Linux Swap hdb3 and linux (root) hdb4.

I got the message that Grub installed successfully and I thought it would over write the Libranet Grub.
I am aware of how Grub treats partitions ((hd0, 0) for hda1, (hd1, 1) for say hdb2 etc.) and Ifeel pretty sure I got this part of it right; but if not how can I get into Linux to get it right, if there is a way and also how can I get into Windows so I can do day to day stuff. As I said I could destroy what I've done but that would be a shame.
Advice here would be sure appreciated.

Chilling_Silence
03-01-2005, 03:51 PM
Boot the LiveCD.
mount /dev/hdb4 /mnt/gentoo
mount /dev/hdb2 /mnt/gentoo/boot
mount --bind /dev/ /mnt/gentoo/dev
mount none -t proc /mnt/gentoo/proc
chroot /mnt/gentoo /bin/bash
env-update && source /etc/profile
grub
root (hd1,1)
setup (hd0)
quit

Now you want a kernel entry looking like this in /boot/grub/grub.conf:
title=Gentoo Linux 2004.3 kernel-2.6.10
root (hd1,1)
kernel /kernel-2.6.10-build1 root=/dev/hdb4

Save it, then run:
exit
umount /mnt/gentoo/proc /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo
shutdown -r now

Good luck


Chill.

jcr1
03-01-2005, 11:10 PM
Thanks Chill, I really appreciate your help; but for me, no go, it doesn't work.
So instead of stressing myself out I'll have another go on another day.

jcr1
05-01-2005, 12:15 PM
I really want to install Gentoo.
But this Grub business is giving me grief & time is an issue too. If I get called away, for whatever reason and the computer is inaccesible because Grub is not working or I have to get back to Windows to do day-to-day stuff then I really wouldn't want to demolish what I'd done so far by reinstalling, partially, Libranet so that I can use it's Grub to get into Windows.
So, where would be the best place to get a Windows XP Pro SP2 boot, startup disk. Then I could sort Grub at my leisure, without having to destroy my Gentoo install (the handbook is great), knowing that I can use the computer if I have to.
:help:

Chilling_Silence
05-01-2005, 02:13 PM
Just boot the WinXP Install CD and go into Recovery mode, and type:
fixboot
fixmbr

This will clear the MBR so it'll boot WinXP and no grub at all :)

Chilling_Silence
05-01-2005, 02:27 PM
Forgot to mention that from there you can just use the instructions mentioned before to try again with Grub.

No re-emerging grub or anything, just chroot into the linux installation and run through the steps.

Should you reboot and get errors, give me a yell, Id be happy to ssh into it. You can then just restart with the WinXP CD and run the fixboot/fixmbr and you're back to Doze :)

jcr1
05-01-2005, 07:02 PM
Excellent, thanks again Chill.
I'll give it another go tonight and finish in the morning - it's supposed to be raining tomorrow so no one will be expecting me to go out & help them. :)

Chilling_Silence
05-01-2005, 07:07 PM
On the down side - If its raining then the rest of the houshold is also at home.... Fights over use of it ;)

jcr1
06-01-2005, 12:26 AM
8 mins past midnight & I've got it installed and Grub working :D
There could be a few things I'll have to fix - configure though.
rp-pppoe being one of them. I'll need my internet connection (of course) as I think it will better to use Portage to get the pacckages I need (want) rather than download a heap to burn to a cd. Does this sound a better idea to you Chill?
Now, what about X windows, do I need to do much in this area? I like to see KDE in all its glory. I guess my main things would be (for starters anyway) KDE, Firefox & Thunderbird, Open Office, The Gimp, Cups.. the list goes on.

If its raining tomorrow, the others can use the laptop; or better still clean out the calf sheds and workshop :stare:

Thanks heaps Chill, but I might need to keep badgering this forum 'till I get it all set up... but today, progress.

jcr1
06-01-2005, 07:56 AM
Might not be as good as I first thought.
This is what I got at bootup;

*Checking root filesystem...
fsck: fsck. ReiserFs: not found
fsck: Error 2 while executing fsck. ReiserFS for /dev/ROOT

fsck. ext3: No such file or directory while trying to open /dev/BOOT /dev/BOOT:
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

* Fsck could not correct all errors, manual repair needed [!!]

I set the boot partition with ext3 and root with ReiserFS so I'm puzzled as to why ext2 is mentioned.
This sounds real bad to me and I'm wondering whether I should go for another install (yet again) which might not be too bad seeing as I can get Grub working now.
What do you think? Is it fixable without getting too drastic?

Chilling_Silence
06-01-2005, 08:18 AM
You didnt read the whole Install Handbook and modify your fstab did you? ;)

Boot the LiveCD, mount your rootfs on /mnt/gentoo and nano /mnt/gentoo/etc/fstab and make it look like:
/dev/hda1 /boot ext2 noauto,noatime 1 1
/dev/hda2 / reiser4 noatime 0 0
/dev/hda3 none swap sw 0 0


Obviously you'll set your filesystem tye and /dev entries differently thou.

THEN it should be good :) Sounds like Grub is all installed fine :-)

Cheers


Chill.

BTW - You can add the following to your grub.conf file:
splashimage=(hd1,1)/grub/splash.xpm.gz

jcr1
06-01-2005, 11:20 AM
[QUOTE=Chilling_Silence]You didnt read the whole Install Handbook and modify your fstab did you? ;)

Actually I was sure I did? But I'll have a look at it in case I didn't save it properly or something

:confused:

jcr1
06-01-2005, 01:48 PM
Sure enough, while i'd made some settings in fstab, I hadn't done the job properly. It's a lot better boot up now; except I still get a message that says;

fsck: Error 2 while executing fsck,reiser4 for /dev/hdb4

I guess it's progress as reiser4 is associated with hdb4, but it's kinda dodgy to my way of thinking.
I set the fstab to exactly the way you set it out Chill.

The other thing is my wireless internet connection.
It configured fine off the live cd, but I'm having a bit of trouble to get it going from the installation. I installed rp-pppoe as per the instructions but the messages I get is; adsl-start.....timed out
adsl-status: link is down (can't read pppoe PID file
/var/run/pppoe.conf-adsl.pid.pppoe)

I have looked for the file (quoted above in brackets) but there's nothing in /var/run like it.
:o

jcr1
06-01-2005, 03:27 PM
Just a thought; when I cd into /var or /usr or /etc & ls. It's all there, so am I worrying too much, 'cause they'd all be in the root partition.
Actually the boot is fairly good, as far as I can tell and I get [ok] for all the different stages. The only thing is that error message I quoted in the previous post, but even that gets an [ok] out on the right hand margin.

So, if thats the case, I've got Gentoo & all I need to do now is get my internet working so I can start installing the goodies. :D

Chilling_Silence
06-01-2005, 07:27 PM
Your root isnt reiser4.... What is it?!

Replace reiser4 with "ext3" or "reiserfs" depending on what you used.


Chill.

jcr1
06-01-2005, 10:13 PM
>Your root isnt reiser4.... What is it?!

>Replace reiser4 with "ext3" or "reiserfs" depending on what you used.

Got it at last, of course its reiserfs. I had that in fstab originally then for some reason altered it to reiser4 :annoyed: But now its fixed and the boot went well.
Got the cleanly mounted message and no error messages, beautiful :thumbs:
Sorry to waste your time over that stupid mistake of mine, Chill.
The good thing coming out of this is I'm getting used to using Nano.

Could you give me a hand getting my ADSL set up; it set up fine off the live cd but I can't get it to work off the new installation.
I have 2 network devices; eth0 is the one for ADSL, well actually it's wireless internet, but up to the device I guess its the same. My previous post, about 2 back covers it; in /etc/conf.d/net I had iface_eth0="dhcp" , dhcpcd_eth0="-HD" , iface_eth0="up". But it didn't work, so I just used iface_eth0="up" and it still won't work. So I'm kinda at loss as to what to do next.

Chilling_Silence
06-01-2005, 11:03 PM
Okay, Basically you didnt emerge dhcpcd which is the DHCP client daemon.
Re-read the end parts of the Handbook. It tells you that while still in the chroot'ed environment you need to emerge dhcpcd.
At the moment you wont have internet so you _have_ to do it off the LiveCD.

I'll bet by now you're getting used to running the above mentioned commands to chroot into your install ;)


Chill.

jcr1
07-01-2005, 10:46 AM
Still can't get internet.
I booted the live cd and then did;
mount /dev/hdb4 /mnt/gentoo
then;
chroot /mnt/gentoo /bin/bash
then;
emerge dhcpcd
This appeared to work well & finished with the message;
* Important: 1 config files in /etc need updating

I presume that the file in /etc is /etc/conf.d/net, which I've already configured using nano with;
iface_eth0="dhcp"
dhcpcd_eth0="-HD"
iface_eth0="up"

I wonder why when I use adsl-status I get the following message;
adsl-status: link is down (can't read pppoe PID file
/var/run/pppoe.conf-adsl.pid.pppoe)

Do I have to create this file? I wonder, and what would I put in it?

The internet works fine off the live cd, so nothing wrong with my card (also ran ifconfig eth0).

Chilling_Silence
07-01-2005, 12:36 PM
Okay, so how exactly does this work? Is it just a DHCP address you need? If so, then:
dhcpcd
You may even be able to:
rc-update add dhcpcd default

For information about what config file needs updating, run:
etc-update

Just BE CAREFUL WITH etc-update coz it can cause a LOT of grief if you dont know what you're doing. I usually just ignore it (naughty I know).

Try just running dhcpcd as root.


Chill.

jcr1
07-01-2005, 02:37 PM
Oh dear, this is not good.
had a look at etc-update, definitely said that /etc/ppp/pppoe.conf needed updating, but I couldn't see what, so I exited, as far as I know I didn't alter anything, but now its got worse as when I run ifconfig eth0 it can't find my network card, whereas previously at least this worked.

Chilling_Silence
07-01-2005, 04:23 PM
Run:
lsmod
cat /proc/pci


Chill.

jcr1
07-01-2005, 05:51 PM
Nothing seems to work. Althoughthe internet works fine off the livecd.

I wonder if I should do a clean install :confused:

There must be a way to get that network card back.

Chilling_Silence
07-01-2005, 05:53 PM
No, I wouldnt do a clean install.

So how exactly are you connecting? Via a DHCP Assigned IP Address to a Router?
What happens when you run dhcpcd as root from your installation (Not off the LiveCD)? ifconfig shows...???

Otherwise, try:
ifconfig eth0 192.168.0.234
echo "nameserver 192.168.0.1" > /etc/resolv.conf
route add default gw 192.168.0.1

Modify the IP addresses to suit and see if it'll work with a static IP.


Chill.