Help with grub?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Help with grub?

Postby NoClue! on Wed Jul 04, 2007 2:20 pm

Could someone point me to a tutorial on grub that walks you through the entire process of adding multiple linux os? Grub picks up windows but I have many computers I would like to install 4 or 5 distros on. Thanks!

I need from square one, I don't even know were to start and the grub site blows if your a newbie. I'm tired of wiping distros because I don't know grub.
User avatar
NoClue!
Level 3
Level 3
 
Posts: 163
Joined: Sun Apr 01, 2007 1:51 am
Location: Chicago

Linux Mint is funded by ads and donations.
 

Postby Husse on Wed Jul 04, 2007 3:04 pm

This is really interesting if you are a nerd like me....
First off - you don't wipe a distro because grub gets damaged.
It's not grub that picks up what you have installed but rather the installer, and the standard varies considerably. The debian based distros I've installed has behaved well - the others not.
I've written an article in the wiki about it
http://www.linuxmint.com/wiki/index.php ... _your_grub
So you could install and if grub gets destroyed use that to repair. Then look into the newly added distro and its menu.lst to see how it should be invoked and add that to the menu.lst of the distro you just installed grub to
That does not have to be the one you intend to use mostly - you could grub any ... sorry grab any :)
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19710
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Postby newW2 on Wed Jul 04, 2007 3:14 pm

NoClue wrote"
I'm tired of wiping distros because I don't know grub.

Can you tell us what you mean by the above? I read about others that have experienced some problems initially with grub, and I have as well. It wasn't just us newer folks either.

For example PCLinuxOs caused me to nearly as you say wipe my distro's after installing. The problem was solved by reading and taking the good advice of scopre123. All I had to do was edit the menu list in the boot/grub/ directory. I also had some fun with Fedora 7. I finally just reformatted and started again. Then someone on this forum wrote that F7 stores the grub menu list info in a different location.

So give a better description of the problem: what distributions are you trying to multi-boot with, etc. The answers are not always exactly the same. Similar enough though that you will soon be a pro and not a nOOb.

In the mean time I'll look for those links that I referred to above.

newW2

//// edit /////
here are a couple of links that may help get you stared

http://www.linuxmint.com/forum/viewtopi ... 7720#17720 (this is the scorpe123 post that woke me up to understand what was wrong)

Then there is this one on the wiki:

http://www.linuxmint.com/wiki/index.php ... _your_grub (it may help round out some things).

Good luck and write back, just give some more info so everyone knows where to start. :D

hey I could have ticked a couple more points toward the next level ... naw me. :lol:
User avatar
newW2
Level 6
Level 6
 
Posts: 1081
Joined: Fri Apr 06, 2007 10:24 am
Location: USA

Postby NoClue! on Wed Jul 04, 2007 3:42 pm

I have not seen a damaged grub........yet. I can partition a hard drive and install multiple os's but I don't know how to edit grub so I can boot all of them. I end up wiping the entire hd and installing one os at a time which is becoming RIDICULOUS. I have not found anything with a clear (beginner oriented) explanation of this.
User avatar
NoClue!
Level 3
Level 3
 
Posts: 163
Joined: Sun Apr 01, 2007 1:51 am
Location: Chicago

Postby newW2 on Wed Jul 04, 2007 3:58 pm

Are you saying you have partitioned to run more than one distribution?

Something prepared as detailed in this post?

http://www.linuxmint.com/forum/viewtopi ... =1949#1949

scorp123 wrote:
OK, let's talk about a simplified scheme where you indeed put all the OS into one single " / " root filesystem, e.g. you don't want to create separate /boot and /usr partitions, but you create a separate /home so you can keep your data. Let's also assume you want to have multiple distributions on the same harddisk, e.g. they will all share your /home partition (you could still use different user names if needed):

I'd then suggest to put your root filesystems to the front of the harddisk as the grub or lilo boot loaders might have troubles if you place them towards the end. Windows XP doesn't have this problem apparently, so I assume a Windows partition can be anywhere on the disk.

Also, let's again take a 100 GB disk as basis. So I'd partition like this:

/dev/hda1 -- 8 GB, e.g. LinuxMint 2.0 "Barbara"
/dev/hda2 -- 8 GB, e.g. SuSE 10.2
/dev/hda3 -- extended partition, includes the rest of the harddisk
/dev/hda5 -- Windows XP, e.g. 50 GB
/dev/hda6 -- /home, e.g. 30 GB
/dev/hda7 -- swap, whatever is left of the harddisk (around 4 GB)

With a partitioning scheme like this you could constantly format /dev/hda1 and /dev/hda2 again and again and install any distribution you want to try.
User avatar
newW2
Level 6
Level 6
 
Posts: 1081
Joined: Fri Apr 06, 2007 10:24 am
Location: USA

Postby NoClue! on Wed Jul 04, 2007 5:04 pm

A little off topic but great info.....got me thinking about my partitioning scheme.

Here's the problem: I have a linux distro installed (distro A) when I install another distro (distro B) it puts its own grub in and when I boot I only get the grub for distro B with no option for distro A.....................so I get pissed and wipe everything and end up moving on to distro C.

I even tried to quit distro hopping because of this but it only lasted for a couple of weeks. I started to put on weight and got really cranky.
User avatar
NoClue!
Level 3
Level 3
 
Posts: 163
Joined: Sun Apr 01, 2007 1:51 am
Location: Chicago

Postby scorp123 on Wed Jul 04, 2007 8:06 pm

NoClue! wrote: Here's the problem: I have a linux distro installed (distro A) when I install another distro (distro B) it puts its own grub in and when I boot I only get the grub for distro B with no option for distro A.....................so I get pissed and wipe everything and end up moving on to distro C.
A well-behaving distro shouldn't do that :? You could of course edit the "menu.lst" file and add the relevant parts of distro A's "menu.lst" to distro B's (so that distro A shows up again in GRUB) .... but as I said: you shouldn't have to do this. It seems whatever distro you tried out did assume that it was the "only" Linux on your system. :?
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby newW2 on Wed Jul 04, 2007 9:20 pm

As Husse said in his post:
It's not grub that picks up what you have installed but rather the installer, and the standard varies considerably. The debian based distros I've installed has behaved well - the others not.


I still can only imagine your partition layout, and then guess what may be happening. And I hope to avoid throwing salt in the wound of frustration - been there, done that; read all about it too many times. Not good for either of us. :)

You can only have 4 primary partitions: hda1 - hda4 or if you have SATA drives they are labeled sda1 - sda4. hda5 (or sda5) and above need to be an extended partition.

Please list how you have partitioned your drive(s):
1) where the root "/" partition is located for the Linux distro's (A, B, C), if you have windows installed what partition it lives on, whether you have a separate /home partition, size of the drive. Sorry I'm a visual learner and I need to get a picture. :)

2) what Linux distributions are you trying to install on the same machine.

If you are installing two Debian based distro's like Ubuntu and Mint you should not have a problem with grub identifying Ubuntu, Mint, and windows and listing them for selection in the grub window at boot-up.

Where I had my problem the first time was mixing a Mint and PCLinuxOS distribution (PCLOS is a Mandrake derivative). When this happened I had to open my computer and browse to boot/grub/menu.lst make edits to add Mint back into the menu.lst .

Ok I can just hear you saying how. In my case I was really new to Linux, but I had another machine with Mint installed on it, so I copied the menu list from that machine, moved it over to the problem box desktop, opened terminal and typed:

sudo gedit/boot/grub/menu.lst

The text editor opened the menu.lst file.

Then I open the menu.lst file on my desktop (just double clicked) copied the Mint menu list commands in grub and pasted them into the menu.lst file that I opened with sudo, saved the file when done closed it and rebooted. When the grub menu presented I had Mint and PCLOS selections. There are other ways to do this, but hey a nOOb does what a nOOb has to do.

Note: the menu list items will be:

title Linux Mint, kernel 2.6.20-16-generic
root (hd#,#)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=############ ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault

title Linux Mint, kernel 2.6.20-16-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=########## ro single
initrd /boot/initrd.img-2.6.20-16-generic

where #### depends on your machine.

Someone like Husse or scorp123 could have typed a shorter more appropriate how to. Sorry for the long post.

Btw here's one of the first how to posts that I read when setting up multi boot machines.

http://linuxgazette.net/136/lazar.html
User avatar
newW2
Level 6
Level 6
 
Posts: 1081
Joined: Fri Apr 06, 2007 10:24 am
Location: USA

Postby NoClue! on Wed Jul 04, 2007 10:46 pm

Now that you mention it I think every instance involved either mandriva free 07, pclos 07 or sam 07. I don't think I have tried to install multiple debian distros on the same box yet. All of my windows d/b installs have been with mint or ubuntu (both installed flawlessly) they are the only distro I have enough confidence in to share with a critical windows install. I think I'm starting to see a pattern here and all roads are leading to debian base. I've had other issues with those distros especially fc7 (locked down a partition so bad I thought I was going to have throw out the hd) it's now on my list of distros to avoid at all costs.

Thanks for the info.
User avatar
NoClue!
Level 3
Level 3
 
Posts: 163
Joined: Sun Apr 01, 2007 1:51 am
Location: Chicago

Postby Husse on Thu Jul 05, 2007 5:43 am

I think that now that you are beginning to learn a bit more the above can be summarized in
Install and don't give a damn about grub
Reboot into the new distro
Look up the menu.lst of the distro that controlled your grub prior to install
Copy the relevant parts of that to the present menu.lst
Reboot and you can choose all distros again.

You could also copy the relevant part of the new distro's menu.lst to the menu.lst of the distro that controlled your grub prior to install and after that repair grub as described in the wiki.

It's bloody annoying that some installers leave you to have to do this
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19710
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Postby gabhla on Thu Jul 05, 2007 6:41 am

PCLOS grub doesn't play nice with other distros. I would expect the same would apply to SAM and Mandriva. On the other hand, I've noticed (thru a few years of trial and error) grub on Debian based distros (the Ubuntus, Mepis, Sidux and Mint) seem to do a much better jub of detecting other distros. I try to have Mint's grub install in the the mbr, which means installing Mint last.

In my opinion, based on my experience, PCLOS and Mint are probably the two best distros - period. But, I enjoy trying out different flavors of Linux (one of the joys of Linux) - so I try to bookend my distros with PCLOS first, everything else and Mint last.
User avatar
gabhla
Level 1
Level 1
 
Posts: 26
Joined: Sun Feb 25, 2007 6:36 pm

Postby Husse on Thu Jul 05, 2007 1:23 pm

which means installing Mint last

Oh well if you like to reinstall all the time :)
I wrote a howto in the wiki
http://www.linuxmint.com/wiki/index.php ... _your_grub
just because of this type of problem.
If you know this you could install any distro (unless it refuses to boot off a grub) and then edit the relevant menu.lst and repair grub and use that menu.lst.
This is not newbie or even nerd friendly, but it works
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19710
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Postby NoClue! on Thu Jul 05, 2007 10:24 pm

You guys were right! I jumped on one of my boxes with pclos installed and threw dreamlinux (morphix,debian base) on it and pclos showed up in the new grub menu.........NICE!

So as a general rule of thumb install order shoud be:

1. windows
2. anything forked from mandriva or is that redhat (I'm not clear on this)
3. anything forked from debian.

Would this generalization hold true ........... say 80% of the time?

Bye the way I'm still looking for that GRUB FOR GOOBIERS tutorial. hehehe!
User avatar
NoClue!
Level 3
Level 3
 
Posts: 163
Joined: Sun Apr 01, 2007 1:51 am
Location: Chicago

Postby Husse on Fri Jul 06, 2007 6:10 am

Install order something like that - yes :)
But then you decide to swap one distro for another and then the knowledge of grub you seem to have gained comes to use
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19710
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Postby NoClue! on Fri Jul 06, 2007 11:56 pm

Well, well, well...............if it isn't one thing it's another. After installing dreamlinux, updating it, configuring it and attempting to restart it neither distro will start x................got any ideas? I really want to try to work through this as I'm growing tired of my current "SCORCHED EARTH" mis-behaving distro policy.
If it's any help both distros share the same home and swap partition.

At least the grub worked good. LoL!
User avatar
NoClue!
Level 3
Level 3
 
Posts: 163
Joined: Sun Apr 01, 2007 1:51 am
Location: Chicago

booting various distro

Postby baomike on Sat Jul 07, 2007 12:25 am

If I had this problem , I would install LILO. The apt-get thing has it.
There is a HOWTO on imbiblio (Linux Documentation Project.)
http://en.tldp.org/HOWTO/LILO.html
it is simple , and can be put in the MBR.

Now how to keep other distros from over writing ???
A brute force method might be:
install it from a live CD and write it to the MBR after installation of distro.
You would have to manually configure it (/etc/lilo.conf)
but lilo is pretty basic.

boot = /dev/hda # or your root partition. hda write to MBR hda1 to partition
delay = 10 # delay, in tenth of a second (so you can interact)
vga = 0 # optional. Use "vga=1" to get 80x50
#linear # try "linear" in case of geometry problems.

image = /boot/vmlinux # your zImage file
root = /dev/hda1 # your root partition
label = Linux # or any fancy name
read-only # mount root read-only

other = /dev/hda4 # your dos partition, if any
table = /dev/hda # the current partition table
label = dos # or any non-fancy name

ALWAYS run the lilo command after changes to lilo.conf
otherwise you are shooting blanks.
baomike
Level 1
Level 1
 
Posts: 34
Joined: Sat Jun 16, 2007 4:55 pm

Postby newW2 on Sat Jul 07, 2007 12:33 am

Looks like xorg got honked. I'll assume you are in TTY mode with a $ prompt. Enter your username then enter. You will be asked for your password. Enter it (you will not see any asterisks). Then enter the following command:

sudo dpkg-reconfigure xserver-xorg

This will bring up the X configuration utility. Answer the questions. When done and you are returned to the $ prompt in TTY. Enter:
sudo reboot.
User avatar
newW2
Level 6
Level 6
 
Posts: 1081
Joined: Fri Apr 06, 2007 10:24 am
Location: USA

Postby dsmturbo on Sat Jul 07, 2007 1:25 am

I am a Linux newbie here as well, and what I have found works for me (most of the time) is installing grub to the root of the partition of the Linux flavor I just installed. Then I just copy over the relevant items from menu.lst to my main boot loader grub.

PCLinux has so far been the only one that kinda pooched my boot, but I fixed it with the grub repair instructions posted elsewhere.

I am going to nuke Ubuntu and play with Mint. At the moment I am testing Mepis (I like it), PClinux (good as well) and soon Mint.

All these are on a machine with Vista on main drive, a data drive and then a separate Linux drive partitioned into 7.
dsmturbo
Level 1
Level 1
 
Posts: 4
Joined: Fri Jul 06, 2007 1:45 pm

Postby NoClue! on Sat Jul 07, 2007 1:14 pm

Thanks for the info. I tried to reconfigure x following the instructions and that didn't work. This hard drive is gonna get an enema.

Question...how can one distro screw up x for another distro? Prior to installing dream I did shrink the home partition to make room for dream and used the same home partition for both distros.

Note to self: don't mix pclos with dreamlinux.

Maybe there is a good reason pclos is called (the distro hopper stopper)...........it has a good defense. (just kidding)
User avatar
NoClue!
Level 3
Level 3
 
Posts: 163
Joined: Sun Apr 01, 2007 1:51 am
Location: Chicago

Postby newW2 on Sat Jul 07, 2007 2:15 pm

Went to the D-Linux forum and found this:

http://www.epron.com.br/ingles/viewtopi ... light=grub
User avatar
newW2
Level 6
Level 6
 
Posts: 1081
Joined: Fri Apr 06, 2007 10:24 am
Location: USA

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot], glhallway, Google Adsense [Bot], PatH57, pcpunk and 36 guests