How to re-install Grub?

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

How to re-install Grub?

Postby altairz » Sat Nov 14, 2009 23:59

I installed windows after I had installed Sabayon. So now, windows has taken over grub.
How can I re-install the grub bootloader, so that I can choose between Sabayon and windows?
altairz
Simple Hen
 
Posts: 59
Joined: Mon Oct 26, 2009 18:02

Re: How to re-install Grub?

Postby catalyst » Sun Nov 15, 2009 1:24

If you installed sabayon from dvd then there is a repair facility on the disc, just boot with the disc mounted & select repair installation option. You will be given 2 options, 1. repair installation : 2. repair grub only. select 2. & go thru the same process you did for the original install.

cheers: catalyst64
Desktop HP Pavilion a1040a
Intel P4: 515J processor: 2.93 Ghz: 1.5 Gb ram
2 x sata HDD
ATI Radeon X300 SE PCI-Ex
Sabayon-9 Gnome x86
Laptop HP Pavillion dv6-7031tx Netbook
Intel core i7 3610 2.3 Ghz
Nvidia GeForce GT 630m
Sabayon-9 Kde
catalyst
Simple Hen
 
Posts: 63
Joined: Thu Aug 20, 2009 3:55
Location: Gladstone, Tasmania, Australia

Re: How to re-install Grub?

Postby dave_p_b » Sun Nov 15, 2009 17:13

Hi. It's quite easy. Just boot up off of the Sabayonlinux dvd and login. Open up a konsole and type "su" followed by the password "root". Next mount the partition that your Sabayonlinux boot folder is on. E.g. "mount /dev/sda2 /mnt/floppy" and then enter the command "grub-install --root-directory=/mnt/floppy /dev/sda". That should be it. You can check and edit the grub file by entering "dbus-launch kwrite /mnt/floppy/boot/grub/grub.conf" to check what the grub boot menu will look like. After, just reboot the computer and cross your fingers ;-). All the best. Dave
dave_p_b
Old Dear Hen
 
Posts: 607
Joined: Fri Dec 15, 2006 1:39
Location: Exeter, UK

Re: How to re-install Grub?

Postby Zebedee » Mon Nov 16, 2009 22:59

Hi,

i hope its ok if i add a slightly different but very similar question to this thread. The solutions posted above would both result in the sabayon bootloader being installed to the mbr. I am trying to figure out though, how to install the sabayon bootloader to the root partition of sabayon (on my system /dev/sda7).

The command "grub-install --root-directory=/mnt /dev/sda7" causes a "device not found" error message. Is there any other way? Alternatively if i can't chainload sabayon through its own bootloader, i might add a custom menuentry to the grub2 bootloader that i am currently using. Unfortunately even this doesn't work, i just can't find the correct boot parameters that would allow sabayon to boot.

Any help on this would be appreciated.
Zebedee
Baby Hen
 
Posts: 2
Joined: Sun Nov 15, 2009 15:56

Re: How to re-install Grub?

Postby dave_p_b » Tue Nov 17, 2009 1:28

Hi. I think you might of read my grub-install command wrong. It was "grub-install --root-directory=/mnt/floppy /dev/sda". Note: there is a space in between /mnt/floppy and /dev/sda. The /mnt/floppy part of the argument is where the Sabayonlinux's /boot folder is located and the /dev/sda part is where grub is installed (i.e. The MBR). If you don't want to install grub to the mbr then you should use the "grub-install" arguments --root-directory=/mnt/floppy and the last part of the argument should be /dev/sda7. Remember, you need to do this from the Sabayonlinux live install dvd and you need to mount your Sabayonlinux partition using this command: "mount /dev/sda7 /mnt/floppy". Do the mount command in a root konsole and before you issue the grub-install command. The grub command should look like "grub-install --root-directory=/mnt/floppy /dev/sda7". Note: I'm sending this from my mobile and don't have my laptop to check the commands so i hope i've got it right. All the best. Dave. P.s. Your grub-install argument "--root-directory=/mnt/dev/sda7" wouldn't have worked unless you had mounted your Sabayonlinux partition into a folder called "/mnt/dev/sda7". Plus you hadn't entered the second argument of "/dev/sda7" so it would have install grub in the default mbr "/dev/sda". ;-)
dave_p_b
Old Dear Hen
 
Posts: 607
Joined: Fri Dec 15, 2006 1:39
Location: Exeter, UK

Re: How to re-install Grub?

Postby Zebedee » Tue Nov 17, 2009 21:32

Thanks for the answer, but in my grub-install command there is a space between /mnt and /dev/sda7 . It differs from your command only in that i did not use the /floppy subfolder. But i did mount /dev/sda7 to /mnt before issuing the grub-install command so that should not be important... even so it gives an error message..?
Zebedee
Baby Hen
 
Posts: 2
Joined: Sun Nov 15, 2009 15:56


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 6 guests