LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to install GRUB only from Ubuntu 10.04 Live CD (https://www.linuxquestions.org/questions/linux-software-2/how-to-install-grub-only-from-ubuntu-10-04-live-cd-806437/)

matrix13 05-07-2010 02:42 AM

How to install GRUB only from Ubuntu 10.04 Live CD
 
My GRUB2 has been corrupted after booting into Windows7. I am not able to install the legacy GRUB from Ubuntu 8.04 Live CD becoz the current file system is Ext4.

How to install GRUB2 only from the Ubuntu 10.04 live CD? Will this make me able to boot both windows and linux?
I have only one hard drive and Linux is in sda8.

EricTRA 05-07-2010 02:46 AM

Hello,

Have a look at this tutorial on GRUB2 Recovery using LiveCD.

Kind regards,

Eric

matrix13 05-07-2010 02:49 AM

Thanks a lot EricTRA. That will be very helpful.

Thanks and Regards

EricTRA 05-07-2010 03:07 AM

Hi,

You're welcome, if you have problems applying the commands or they result in errors, feel free to post here.

Kind regards,

Eric

zoltanthegypsy 09-16-2010 03:44 PM

I'm probably living in the past, but this is why I boot using legacy grub installed to a FAT32 partition outside any OS. It's easy to manipulate menu.lst from anywhere, and an OS re-install doesn't foul up the boot files.

Of course, the MBR can get overwritten, but that's why I keep a live CD linux image in the 1st partition of another drive (in a FAT32 partition) that can be booted direct from BIOS and used to fix grub or most anything else.

I could have used a normal install there (on the 2nd drive) but then I couldn't manipulate _that_ menu.lst from any OS.

There's got to be a better - and safer - way to skin this cat with grub2, but I haven't found it yet...

Z.

Larry Webb 09-16-2010 05:05 PM

Quote:

Originally Posted by EricTRA (Post 3960098)
Hello,

Have a look at this tutorial on GRUB2 Recovery using LiveCD.

Kind regards,

Eric

I believe this option does not apply to 10.4.1. There is no boot option in the installation process. I am working on a way to install grub2 in root partition.

Larry Webb 09-16-2010 09:01 PM

You say your linux is on sda8 and if it is the one you want to boot from this should work from terminal

sudo mount /dev/sda8 /mnt

sudo grub-install --root-directory=/mnt /dev/sda

sudo umount /mnt

exit

reboot

syg00 09-16-2010 09:20 PM

Quote:

Originally Posted by Larry Webb (Post 4099861)
I am working on a way to install grub2 in root partition.

grub-install will allow you to install into a partition, but issues warning messages. grub2 uses a block list (along the lines of lilo) and this may become invalid in a partition.
Works o.k. for me on the systems I have done it on.

The block list forcing a rerun of the lilo command all the time was why I gave up on lilo. grub2 isn't quite as bad.

gripip 09-16-2010 09:23 PM

Quote:

Originally Posted by zoltanthegypsy (Post 4099815)
I'm probably living in the past, but this is why I boot using legacy grub installed to a FAT32 partition outside any OS. It's easy to manipulate menu.lst from anywhere, and an OS re-install doesn't foul up the boot files.

Of course, the MBR can get overwritten, but that's why I keep a live CD linux image in the 1st partition of another drive (in a FAT32 partition) that can be booted direct from BIOS and used to fix grub or most anything else.

I could have used a normal install there (on the 2nd drive) but then I couldn't manipulate _that_ menu.lst from any OS.

There's got to be a better - and safer - way to skin this cat with grub2, but I haven't found it yet...

Z.

I too use grub legacy. I find grub2 very confusingly complex.

Larry Webb 09-17-2010 05:58 AM

Quote:

Originally Posted by syg00 (Post 4100019)
grub-install will allow you to install into a partition, but issues warning messages. grub2 uses a block list (along the lines of lilo) and this may become invalid in a partition.
Works o.k. for me on the systems I have done it on.

The block list forcing a rerun of the lilo command all the time was why I gave up on lilo. grub2 isn't quite as bad.

As you know from my past posts I used to be an old grub legacy booster. I decided it was time to jump into grub2 and it is giving me fits. I am having a hard time forgetting old ways. I just forced grub2 into a partition and was proud that it worked once on restart but failed a second time. Have to do more work today.

1v1a3x 07-30-2012 03:56 PM

Thank you Pro !
 
Larry!
I've registered here just to say you "THankS A loT!"

Your solution is awesome! It works for me and get my system back /0x90

Quote:

Originally Posted by Larry Webb (Post 4100003)
You say your linux is on sda8 and if it is the one you want to boot from this should work from terminal

sudo mount /dev/sda8 /mnt

sudo grub-install --root-directory=/mnt /dev/sda

sudo umount /mnt

exit

reboot


MetalChris 09-09-2012 09:55 PM

Quote:

Originally Posted by Larry Webb (Post 4100003)
You say your linux is on sda8 and if it is the one you want to boot from this should work from terminal

sudo mount /dev/sda8 /mnt

sudo grub-install --root-directory=/mnt /dev/sda

sudo umount /mnt

exit

reboot

Thanks Larry! That was quick and painless!


All times are GMT -5. The time now is 06:22 AM.