Help with grub?

Quick to answer questions about finding your way around Linux Mint as a new user.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
NoClue!
Level 3
Level 3
Posts: 163
Joined: Sun Apr 01, 2007 1:51 am
Location: Chicago

Help with grub?

Post by NoClue! »

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Husse

Post by Husse »

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 :)
User avatar
newW2
Level 5
Level 5
Posts: 821
Joined: Fri Apr 06, 2007 10:24 am
Location: USA

Post by newW2 »

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
NoClue!
Level 3
Level 3
Posts: 163
Joined: Sun Apr 01, 2007 1:51 am
Location: Chicago

Post by NoClue! »

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
newW2
Level 5
Level 5
Posts: 821
Joined: Fri Apr 06, 2007 10:24 am
Location: USA

Post by newW2 »

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
NoClue!
Level 3
Level 3
Posts: 163
Joined: Sun Apr 01, 2007 1:51 am
Location: Chicago

Post by NoClue! »

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.
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 »

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
newW2
Level 5
Level 5
Posts: 821
Joined: Fri Apr 06, 2007 10:24 am
Location: USA

Post by newW2 »

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
NoClue!
Level 3
Level 3
Posts: 163
Joined: Sun Apr 01, 2007 1:51 am
Location: Chicago

Post by NoClue! »

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.
Husse

Post by Husse »

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
User avatar
gabhla
Level 1
Level 1
Posts: 26
Joined: Sun Feb 25, 2007 6:36 pm

Post by gabhla »

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.
Husse

Post by Husse »

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
User avatar
NoClue!
Level 3
Level 3
Posts: 163
Joined: Sun Apr 01, 2007 1:51 am
Location: Chicago

Post by NoClue! »

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!
Husse

Post by Husse »

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
User avatar
NoClue!
Level 3
Level 3
Posts: 163
Joined: Sun Apr 01, 2007 1:51 am
Location: Chicago

Post by NoClue! »

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!
baomike
Level 1
Level 1
Posts: 40
Joined: Sat Jun 16, 2007 4:55 pm

booting various distro

Post by baomike »

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.
User avatar
newW2
Level 5
Level 5
Posts: 821
Joined: Fri Apr 06, 2007 10:24 am
Location: USA

Post by newW2 »

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.
dsmturbo
Level 1
Level 1
Posts: 4
Joined: Fri Jul 06, 2007 1:45 pm

Post by dsmturbo »

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.
User avatar
NoClue!
Level 3
Level 3
Posts: 163
Joined: Sun Apr 01, 2007 1:51 am
Location: Chicago

Post by NoClue! »

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
newW2
Level 5
Level 5
Posts: 821
Joined: Fri Apr 06, 2007 10:24 am
Location: USA

Post by newW2 »

Went to the D-Linux forum and found this:

http://www.epron.com.br/ingles/viewtopi ... light=grub
Locked

Return to “Beginner Questions”