LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-07-2010, 02:42 AM   #1
matrix13
Member
 
Registered: Nov 2006
Location: Kerala, India
Distribution: Arch Linux
Posts: 134

Rep: Reputation: 25
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.
 
Old 05-07-2010, 02:46 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

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

Kind regards,

Eric
 
Old 05-07-2010, 02:49 AM   #3
matrix13
Member
 
Registered: Nov 2006
Location: Kerala, India
Distribution: Arch Linux
Posts: 134

Original Poster
Rep: Reputation: 25
Thanks a lot EricTRA. That will be very helpful.

Thanks and Regards
 
Old 05-07-2010, 03:07 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

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

Kind regards,

Eric
 
Old 09-16-2010, 03:44 PM   #5
zoltanthegypsy
LQ Newbie
 
Registered: Sep 2010
Location: Bainbridge Island, WA, USA
Posts: 1

Rep: Reputation: 0
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.
 
Old 09-16-2010, 05:05 PM   #6
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by EricTRA View Post
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.
 
Old 09-16-2010, 09:01 PM   #7
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
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
 
Old 09-16-2010, 09:20 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by Larry Webb View Post
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.
 
Old 09-16-2010, 09:23 PM   #9
gripip
Member
 
Registered: Jul 2010
Location: India
Distribution: mint9, slackware13.1, minix3
Posts: 48

Rep: Reputation: Disabled
Quote:
Originally Posted by zoltanthegypsy View Post
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.
 
Old 09-17-2010, 05:58 AM   #10
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by syg00 View Post
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.
 
Old 07-30-2012, 03:56 PM   #11
1v1a3x
LQ Newbie
 
Registered: Jul 2012
Posts: 1

Rep: Reputation: Disabled
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 View Post
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
 
Old 09-09-2012, 09:55 PM   #12
MetalChris
LQ Newbie
 
Registered: Sep 2012
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by Larry Webb View Post
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!
 
  


Reply

Tags
grub2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Uninstall grub, currently running Ubuntu live cd linusunis Linux - Software 2 02-03-2010 05:06 PM
Cant boot from Ubuntu live CD, no grub prompt cuco Linux - Laptop and Netbook 1 08-27-2007 07:57 AM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
Ubuntu Linux Live cd Grub re-Installation problem monami Linux - Newbie 1 07-27-2006 12:50 PM
Ubuntu Warty Live CD grub error 21 on boot PBSchmidt Linux - Distributions 2 01-24-2005 11:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration