how to install grub2 on the linux mint partition
I boot up linux mint from CentOS 6.1 bootloader with a line:
Quote:
so that the linux mint bootloader (grub2) can be installed on /dev/sda3 = (hd0,2) I would like then to boot Linux Mint by adding a chain load line in the CentOS 6.1 grub.conf. Question: What command should I issue on Linux Mint ? Usually on normal older grub, I simply type grub, then I type root (hd0,2) setup (hd0,2) and things are done. But what are equivalent commands on grub 2 ? Thanks. I hope the instructions are easy to follow. |
I just did
Quote:
|
strange thing is that from /dev/sda,
I see an entry: /dev/sda3 ext4 / 40G-LM14 ... So /dev/sda3 is indeed ext4 and not ext2. |
ext[34] report as ext2 in various situations - not a problem (as such - merely confusing).
grub-install accepts a "--force" keyword. Use it with care. |
In your initial post, you indicate that you boot Mint from CentOS. If it boots, why change it? The title line in the entry you posted shows Mint on sda3 yet your kernel line points to: root (hd0,5) which is sda6?? Why do you think Grub files are not installed on Mint? Did you select not to install a bootloader? Usually the default is the mbr of the primary disk but that can obviously be changed during the installation of the system. You could try the suggestions at the link below:
http://members.iinet.net/~herman546/...to_a_Partition Or, create a mount point then mount the partition and run the command below from the Mint CD as CentOS doesn't have Grub2, obviously, that is if the Mint partition actually is sda3: Quote:
|
Thanks !
yancek: Good eye and good questions. 1. Why change it ? I have CentOS 6.1 installed before newer OS Linux Mint 14. So I do not want to disturb the usual way of booting. 2. I have installed the bootloader to Linux Mint 14 /dev/sda3 (not MBR) during installation but chainload from CentOS won't boot Linux Mint. I still remember I almost used up all my knowledge to get it boot directly using vmlinuz and initrd.img. 3. sda3 is my linux Mint partition. However, I cannot put (hd0,2) in CentOS grub.conf since Linux Mint just won't boot directly. I have hit this problem and solved it in the Fedora forum, but the easiest solution is to copy out vmlinuz and initrd.img files to CentOS /boot directory. A bit troublesome but it always work. (finger crossed..) I am going to try the --force and see if it works. But then note 2 seems to suggest it might not work. Anyway, I am going to give a try and report back. |
anyway, sometimes I just tar the working linux mint from CentOS in one machine and clone on a different machine. It is fun and practical (don't have to install all over again, need to fix graphic problem though initially) if you ask me why.
|
The methods I've seen which always work for me to boot a Grub2 system from Grub Legacy:
Quote:
|
My test box. A old IBM M41 with 2 internal IDE hard drives Mutibootiung gru2 distros on grub legacy and even puppy frugal.
Code:
timeout 10 Vector is on 2nd partition of 1st hard drive. Grub was installed to root "/". Vector uses grub 2. MacPup Puppy 529 is installed on 2nd hard drive. Partition 1. Puppys bootloader is installed to root "/" Semplice is installed on 2nd hard drive. Partition 2. Grub is installed to root "/".Uses grub 2 also. Hope that clears things up for you . I use blkid and fdisk -l for finding identifiers and using them where needed in grub legacy. Pup frugal install gives/generates a .txt file you can copy inside text to your bootloader to boot puppy in what ever bootloader you are using. Because. Both grub legacy and grub 2 do not pick up on Puppy Linux frugal installs. So it has to ne done by hand. At least in my experience. Anyways, that is how I boot 2 internal ide drives with multiboot on a old POS IBM M41 that still chugs along just fine. Floppy drive and all. So if I was in your shoes. I would reinstall mint grub boot loader and tell it I want on root instead of mbr or whatever else and then chainload it after finding out in centos where (hdx,x) was for Mint install. |
I tend to have a second or third install use it's own boot partition
A bit more work , but it also is a safety back up if something really goes bad if you update one of the os's ( in my case SL6.4 ) i have to rebuild grub2 in OpenSUSE 12.3 for the change to take effect in the suse grub2 menu ( it is the system default ) your Mint install should auto detect "other/alien " OS's and set up grub2 to chainload them |
Now on my Dell computer,
Quote:
But my since this system is copied from elsewhere, the /boot/grub/grub.cfg is completely not working, how do I fix it ? I believe this is copied from the first installation on DELL on /dev/sda7 but I have to move it to /dev/sda3 since the disk space allocated to /dev/sda7 is too small. It could also possibly be that I got this from the /dev/sda7 of another Lenovo machine. But anyhow, I need to make progress in this grub2 direction. Why is grub.cfg so complicated than grub.conf of grub legacy ? Any chance to fix it easily or I have to go through line by line to change ? How do I create few basic lines to just boot using grub2 ? Quote:
|
Quote:
You have 9 entries in your grub.cfg file. Have you scrolled down on the boot menu and tried the different options for CentOS. I notice the first two entries for CentOS are for 5.1 while the next three are for 6.1. Note that on the first two entries, the uuid begins with: 7c96a27d..., while the next three have a uuid beginning with: 9b987cdb... Have you tried them all? I would suggest running the blkid command to see what the correct uuid entries are. The last two entries for CentOS 6.1 show it on sda6 (hdo, msdos 6) while the first two entries for 5.2 show sda3 and the first 6.1 entry also shows sda3. Where is it? Or where are they. Grub Legacy counts hard drives as well as partitions from zero, Grub2 counts hard drives from zero and partitions from one. |
This is all that's needed for /boot/grub/grub.cfg, if you have a simple setup. Change it to your needs.
Code:
# Timeout for menu |
yancek: I guess my short answer is that I try to learn grub2. Thanks for your comments.
Lennie: Thanks. This is what I have been looking for. Do I edit /boot/grub/grub.cfg directly ? Quote:
Of course I will still try out your suggestion ! Thanks. |
If you change /boot/grub/grub.cfg directly, and then run os-prober (as will be done when you get an update to the kernel in Mint), it will be overwritten. On my multiboot systems I prefer to have a separate partition for grub, and manually add entries for all distros. (I don't even have grub (or any bootloader) installed in most distros.)
Here you can read about grub2, and how to add a script in /etc/grub.d. |
All times are GMT -5. The time now is 09:07 AM. |