OOOps need help repairing my boot loader (GRUB)

Place to discuss Debian Linux and Debian based distributions
Post Reply
dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

OOOps need help repairing my boot loader (GRUB)

Post by dickinsd » Fri Feb 11, 2005 4:34 pm

OK.

I have had Ubuntu running just about fine for a few days now and I was very happy with it.

I decided to follow someone else's instructions for getting a Knoppix HDD install on my second HDD, and in all fairness their instructions where OK and it did what they said it would, unfortunately they never said anything about dual booting.

Now I got FC3 and XP on another machine and the FC3 install process just picked out XP and Grub does a great job of letting me choose between the OS's.

Unfortunately the Knoppix installer is not quite as clever or I missed the point completely...

When I rebooted my machine after the knoppix installer had finished I had a LILO boot loader which only gave me options for 3 different versions of Knoppix.

I had no way (that I could see) of getting back into Ubuntu. I also did not want to use LILO as a boot loader (perhaps I should have figured out getting my dual boot working under LILO before trying to use grub, I don't know.

Anyway, following yet another persons instructions I went to root in knoppix and typed

grub-install (hd0)

The message I got led me to believe the grub bootloader was working (unfortunately the other instructions did not go any further than typing the above command)

So I restarted to see if I had a grub boot loader I do but it doesn't know how to do anything.

It just sits there at a prompt that says

grub>

I am pretty sure this is all my fault, but can anyone tell me how to fix it?

What have I tried:

booting back in using the knoppix live CD
booting in using the Ubuntu live CD

both give me access to my files but read only so I can't change anything (unless you know how I do this?)

I stuck the Ubuntu install CD back in, but it wants to install from scratch I could not see a repair option anywhere.

-----------

Oh at the grub prompt if I type boot, it tells me to load the kernel first, if I type kernel it tells me to load the path first, I am well in it well over my head here people, would appreciate some words of direction ;)

Dave

dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Post by dickinsd » Fri Feb 11, 2005 5:15 pm

Panic over, half fixed it now.
(Knoppix Live CD allowed me to fix the grub file)
1. Goto knoppix.org, download the knoppix live CD image file, and burn it onto a blank CD. This will enable you to boot into a linux OS, which contains all the tools you'll need to fix the hard drive.

2. Boot the konppix CD.

3. Check your partition table by openning a terminal:
# sfdisk -V -l /dev/hda
this should show the partition table.

4. I recommend to try and re-install grub, for example if your Ubuntu partition is /dev/hda2 and windows /dev/hda1), do this:
# mount /dev/hda2 /mnt/hda2
# grub-install --root-directory=/mnt/hda2 /dev/hda

Ubuntu forums:
http://ubuntuforums.org/showthread.php?t=7004&page=2
well got back into Ubuntu anyway, now just got to add the lines for my knoppix install to the grub

if anyone has knoppix installed to HDD I would like to know what is in your grub file please.

this is what I am going to add to my menu.lst

Code: Select all

title Ubuntu, kernel 2.6.8.1-3-386 
root (hd0,0)
kernel /boot/vmlinuz-2.6.8.1-3-386 root=/dev/hda1 ro quiet splash
initrd /boot/initrd.img-2.6.8.1-3-386
savedefault
boot

title Knoppix, kernel 2.4.27 
root (hd1,1)
kernel /boot/vmlinuz-2.4.27 root=/dev/hdb2 ro quiet splash
initrd /boot/initrd.img-2.4.27
savedefault
boot

title Knoppix, kernel 2.6.9 
root (hd1,1)
kernel /boot/vmlinuz-2.6.9 root=/dev/hdb2 ro quiet splash
initrd /boot/initrd.img-2.6.9
savedefault
boot
the top entry is the ubuntu ref, I just copied that and added the details for knoppix, for some reason there are 2 different kernel with the knoppix install

only thing that worries me is the fact that the initrd.img in the knoppix install are tar.gz files, the Ubuntu install appears to have this file extracted already so not sure if I can just copy it like this?

Dave

dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Post by dickinsd » Fri Feb 11, 2005 5:47 pm

Ok so this may have been another waste of posting space by me.

Have figured out my own mess :oops:

Unless anyone has a better suggestion my additions to the menu.lst worked just fine.

Oh with the exception of this line:

Code: Select all

kernel /boot/vmlinuz-2.4.27 root=/dev/hdb2 ro quiet splash
and

Code: Select all

kernel /boot/vmlinuz-2.6.9 root=/dev/hdb2 ro quiet splash
both need the additional lang=en

e.g

Code: Select all

kernel /boot/vmlinuz-2.4.27 root=/dev/hdb2 ro quiet splash lang=en
Otherwise you get a German desktop - ok if your German, can speak German or are learning German, but not much good otherwise.

Ok sorry for waste of post space :oops:

You never know someone else might make mistake also and need this help (keep telling my self that)

Dave :roll:

chartoo
user
user
Posts: 32
Joined: Mon Mar 22, 2004 5:43 pm
Location: cerebral cortex
Contact:

Post by chartoo » Fri Feb 11, 2005 6:58 pm

both need the additional lang=en
Amen to that, I recently did a Knoppix hard drive install and almost went nuts trying to figure out why everything was in German and what I had to do to fix it.

One of the cool things about a Knoppix hard drive install is that if you choose the Knoppix type install option from the Knoppix installer program all the cheat codes still work as long as you remember to edit the grub menu.list and put them in the boot listing for Knoppix.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Fri Feb 11, 2005 7:09 pm

No waste of space here. Keep wasting space, it will surely help someone down the line. Glad you got it working!

dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Good Bye Knoppix!

Post by dickinsd » Sat Feb 12, 2005 5:44 am

hey thanx for that ;)

Ok after all that though...

An installed version of Knoppix is horrible!

(Or at least the way I installed it)

1: it uses KDE - I hate KDE, although I imagine that this can be changed without toomuch effort.

2: you have this HUGE list of installed apps and drivers that you don't need or want.

3: Using Synaptic seems to only half work.

If I'm doing something wrong, then please tell me.

First off I tried to use the kpackage to remove applications that I did not want, this is a pretty slow process, which only allowed me to remove one package at a time, which not only makes it slow as you have to wait for each package to be removed before you can continue, BUT if you have a package that has dependencies, you can't get rid of it, because you can only select the one package at a time ?????? seriously backwards!

I did an apt-get update followed by apt-get install synaptic

Synaptic appears much the same as any other version of synaptic I have used (I really like this package - thanks for the tip on that one Void) With Synaptic I went through the entire list of installed programs and sellected that programs I did not want and added a couple more that I did want, (oh and got rid of all the drivers for every wireless card and video card out there!)
I was freeing up something stupid like 400+Mb of space and getting rid of maybe 150 packages.

I clicked on apply, and synaptic started doing its stuff, I think it downloaded everything I wanted and then began removing what I didn't want, except it crashed about half way through, not sure what happened, as I was using desktop 2, all of a sudden PC frooze, so I restarted.

When it restarted, I went to synaptic again, and it had downloaded everything I wanted, but had not removed ANY of the preinstalled stuff.

So I went through the list again, it gets about 1/2 way through and throws an error up telling me that there was something wrong with apt (sorry I can't remember now this was around 5am this morning)

So I closed Synaptic and powered down the comp and went to bed.

Just booted it back up and looking at the K menu all of the packages that I want removing are still there!

I wouldn't be so bothered if they did not all appear on the menu, but this menu is bloody huge!

This is my 2nd experience of a bad Knoppix install. Ages ago I tried a knoppix install which produced a very basic Debian setup, I tried to use apt-get and got something wrong as apt-get removed everything from the k menu, I didn't know where to go for help so I installed Fedora, and have used FC ever since, I now have 2 spare HDD's, I have Ubuntu on one (which so far is pretty nice) and Knoppix on the other - Knoppix is going to be replaced before the day is out!

I would ask for help getting rid of the packages I don't want, but I am sick of going through the list - it is a pretty damn big list! So I guess this post will have to go down as my bad experience with Knoppix.

Dave

PS: I still think Knoppix live is probably the best live distro I have used!

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sat Feb 12, 2005 8:24 am

To be honest I have never done a hard drive install of KNOPPIX. Never really saw the point when I could install the real thing (Debian) which I know is going to work. I'm not saying I don't like KNOPPIX because I do. I have used it a lot. In fact I have even created heavily customized versions to be used as a VPN and wireless disk for our work in addition to it's traditional usefulness. I remember at least one other person here that kept beating around the bush with Debian "based" distros and I finally asked why they don't just install Debian and they seemed to be very happy. See Ice9 in this thread:

http://voidmain.is-a-geek.net/forums/vi ... php?t=1284

About half way through the second page is where I finally suggested going with the real thing. I think you'll see how it went. Debian is not for everyone but it's the perfect match for many people. I use it a lot as it is so flexible (distros built for many architectures).

dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Post by dickinsd » Sat Feb 12, 2005 7:14 pm

Yeah thanx for that Void, I think I will get Debian in a while.

I have been wanting to try it for some time now, but have not got to the stage of handing over a mesely £5 or whatever for it, so I have been trying to get the best from the other distros I have.

I will get Debian - I will ! :)

Got Mandrake, I want to try that, but have ran out of computers to try distro's on :cry:

Got XP on main desktop (sorry but I still really like XP (especially for games) also got XP as a dual boot on Laptop with FC3, but only really boot into XP on laptop when I want to check mail, as I really don't seem to get on with thunderbird (any suggestions for good GUI email program?) Got Ubuntu and FC3 on my other desktop - I could install mandrake or debian (if/when i get it) over this FC install - but I REALLY like FC - I don't think anything I have used so far comes close (especially with the addition of the excellent synaptic (thanks again)

My only choice is another disk for my main desktop - the XP machine so that I can use that for a linux distro as well.

I don't know why I am so attached to my FC and ubuntu installs (especially the 2nd FC install) I just am, I like them, they are both set up nicely and are working how I want them to, so I just don't want to mess anything up. (stupid thing is I chucked old parts into 2nd machine for purpose of trying different distros (plus the one I settle on I want to use machine for a web server) I have it working, now I don't want to change anything!

Dave

worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Post by worker201 » Sun Feb 13, 2005 1:52 am

My god, this man actually likes Windows XP? What, are you high? I consider Windows XP to be pure torture. And Thunderbird works just great with it, I don't know what kind of system you are running.

For my discussion of games, see another thread.

dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Post by dickinsd » Mon Feb 14, 2005 5:43 pm

:oops: :oops:

What can I say, I used MS products for first 5 or so years of computer usage, went to uni had to use Unix, thought it was OK, so decided to get what I believed was a free version of unix - linux.

(Caldera easy linux) thought it was pretty damn good, but didn't really work to well for me with network, so returned to windows, was an MS zombie for another year or so, then I started doing java programming under the Solaris OS (or trying to program in java) at uni, and wanted linux again so that I had a similar setup, no messing with MS version of jave etc.

After java assignment, I went straight back to been another MS sheep.

I have tried linux on and off since then, but usually gave up when I got to a problem iwth network or something, then in October/November'04 I decided I wanted to crack Linux (in general) and this time I was gonna stick with it. I tried a couple of distro's, with varying levels of success, I eventually stumbled across Fedora Core2 (about a day before they released FC3 :x ) and pretty much loved it, I have been using Linux perhaps 60-70% of my computer time since then.

I only use Windows to check my mail (as said before (BTW have cracked thunderbird now so that might change) and to play games (oh and a couple of my friends are well into OC'ing machines, and trying to get best benchmark score etc, I occasionally partake (something I could definately live without)))

I Like Win XP, i like the way things just work, and I have used Windows long enough, and suffer from internet paranoia enough to be able to make my machine fairly secure. BUT I do really like linux, I seem to be getting this new friend base of fellow linux users - who are all really great, uber intelligent people - and at the moment I have this insatiable appitite for linux, which is why I keep trying all these other distro's.

I want to do more like have the web server, file server, and everything else, but have recently become a little electricity cost concious, so I keep turning everything off at end of day (not the best thing for a server - especially web server)

Games - to be honest, I don't play them enough to miss them really!

I used to, but at this moment in time, not that bothered.

I do keep looking for an excuse to go completely to linux, I just don't want to say bye to what I know so well, articles like this:

http://netscape.com.com/2100-1009_22-5550205.html

about MS trying to clamp down on bogus copies of XP, :wink: the perfect excuse!

Dave

worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Post by worker201 » Tue Feb 15, 2005 1:02 am

Well, if you use your computer just to check the email, surf the web, and play a little solitaire, Windows won't hurt you too much, as long as you use your head and make a serious effort to attempt security. No real security, just the illusion of security, of course, but you must know that already. You have to use Windows all day every day in order to notice how truly awful it is. After 3 or 4 days, you have to restart, to kill all the dangling processes, since MS processes don't know how to shut themselves down and relinquish memory. You run out of memory, that's why you have to restart. Opening big programs like Photoshop, Illustrator, Premiere, etc exposes you to even more memory mismanagement. Running into this once a week, it's okay to shuffle it off. But if you run into this daily, in an office environment, you will be tearing your hair out. Virus checks every day, license management, programs that you cannot stop from opening a port for their own benefit, and even worse.

Check this out - I was installing some Windows software the other day at work, and the installer asked me to insert a certain cd, which I did. Windows, unaware that I was installing software, brought up its usual "What do you want to do with this cd" dialog, which makes me puke every time I see it. But it managed to grind the installation to a complete halt. I had to kill the installer and start again. That's just not right! I don't consider that to be "it just works". Any sane person has to see that this is not how computers are supposed to work.

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Thu Feb 17, 2005 7:14 pm

<digress>
well i like xandros to be honest. i know it adds nothing to the discussion, but if you are prepared not to be too adventurous with your apt sources, then xandros is as close to "real" debian as you need to be. and compared with debian i'd recommend xandros to a newbie ten times out of ten.
</digress>

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Fri Feb 18, 2005 4:05 pm

Calum wrote
compared with debian i'd recommend xandros to a newbie ten times out of ten.
I think you have to make a difference here between newbie who aren't interested in computers at all and newbies who actually want to learn something.
For the first category I completely agree with you, for the second category however I think that Xandros isn't that good of a choice.
I installed Xandros on several pc's, for people of various motivation and while it was perfect for those who just wanted something that works and didn't care about the lack of choice in software (I know you CAN use debian repos, but with that comes the risk of breaking Xandros software, you'd have to configure apt-pinning to prevent that and this is not what I would call newbie-friendly), it didn't cut it for the newbies to linux who wanted to gradually gain control over their system and actually learn about how things work.

As long as you stay withn the boundaries defined by the Xandros people you're fine, if you happen to step outside the lines it's at your own risk and there's a good chance you will end up with an unusable system.

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Fri Feb 18, 2005 4:52 pm

that's true in my experience, but after experimentation (which is required with all linux distros i have tried) the following sources.list gives you a huge selection of stuff, and does not break your system unless you make a really concerted effort:
deb http://xnv2.xandros.com/2.0/pkg xandros2.0-xn main contrib non-free
deb http://www.archlug.org/apt xandros2 archlug
deb http://www.archlug.org/apt xandros2 zzupp
deb http://xnv2.xandros.com/2.0/pkg unsupported2.0-xn main contrib non-free
those are all xandros specific repositories, but they contain all the stuff you don't get with vanilla xandros, like sylpheed, snes9x, gftp, whatever. i did have to install firefox to /opt myself right enough because xandros insists on retaining an old version of mozilla. the mozilla and kde centric thing is the one beef i'd pick with xandros, and i agree, if you want to use something other than kde, and some recent mozilla then there's no point choosing xandros over debian, but as you say, for a huge number of "it just works" users, xandros is the bollocks compared with debian (ah, that might be a UK only term, btw, it means it's very good, as opposed to just being bollocks which is the opposite).

worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Post by worker201 » Sat Feb 19, 2005 5:28 am

In the US, you would say:

Good: "Xandros is the bomb"
Bad "Xandros is a bomb"

Good: "Xandros is the sh**"
Bad: "Xandros is sh**"

Language is so weird sometimes.

Post Reply