![]() |
|
#1
|
||||
|
||||
|
Make yourself a bootable Grub 2 rescue CD
Absolute must imho.
__________________
|
|
#2
|
||||
|
||||
|
Can't you just boot from your distro's livecd and perform any repairs from there?
|
|
#3
|
||||
|
||||
|
Quote:
Once you have burned the .iso to CD boot with it. At the grub prompt type configfile /grub.cfg
__________________
|
|
#4
|
|||
|
|||
|
Ocky, GRUB2 is still not standardized, so using a live CD may not necessarily work for all flavors of GRUB2. To be on the safe side, you may want to boot the live CD of your particular distro edition and perform maintenance using that.
That said, Herman is a very knowledgeable dude and his pages are very useful, informative and interesting. It's worth listening to his advice. But i believe that this is for Ubuntu only, and even then, per-edition. For example, GRUB2 has changed from 1.97-beta4 to 1.98-ubuntu5 between karmic and lucid and device mapping file is gone from the grub directory. These small, subtle differences could be dangerous if you do not know fully what you're doing. Mrk
__________________
http://www.dedoimedo.com All your base are belong to us Linux Systems Expert / Systems Programmer, Linux System Administrator, LPIC-1, LPIC-2 (WIP), GSEC, CCHD, CCHA |
|
#5
|
||||
|
||||
|
Mrk,worked really well for me with dual boot Karmic. I had a prob. once with Karmic and simply booted the grub rescue CD, then installed grub 2 from within the live system. All was perfect again. I posted in Ubuntu forums because the command for Karmic is not valid for Lucid. Tested this morning and Herman's new command for Lucid is fine.
I don't have Windows, but realise that your cautionary re: device mapping is called for but surely there is no prob. for (X)Buntu's ?
__________________
|
|
#6
|
|||
|
|||
|
Device mapping is required for booting from other disks, if you have more than one, so that grub can properly identify and associate hd0/1/2/3 to sda/b/c/d. Not strictly related to any particular os, more to make sure the bios order is indeed the grub order.
Mrk
__________________
http://www.dedoimedo.com All your base are belong to us Linux Systems Expert / Systems Programmer, Linux System Administrator, LPIC-1, LPIC-2 (WIP), GSEC, CCHD, CCHA |
|
#7
|
||||
|
||||
|
Quote:
If Grub version = 1.97 use: grub-mkrescue --overlay=/boot/grub Grub2CD.iso If Grub version = 1.98 use: grub-mkrescue --output=rescue.iso /boot/grub With the rescue CD made using the second command I can successfully boot into either Lucid or Karmic despite different vesions of Grub 2 and Karmic is on another internal HDD.
__________________
|
|
#8
|
|||
|
|||
|
I'll check and if it works, add to grub2 tutorial.
Mrk
__________________
http://www.dedoimedo.com All your base are belong to us Linux Systems Expert / Systems Programmer, Linux System Administrator, LPIC-1, LPIC-2 (WIP), GSEC, CCHD, CCHA |
|
#9
|
||||
|
||||
|
Herman has updated his site ...
http://members.iinet.net/~herman546/...l#GRUB2_CD-ROM
__________________
|
|
#10
|
||||
|
||||
|
thanks Ocky for link great stuff .........indeed herman is very knowledgeable person
) |
|
#11
|
||||
|
||||
|
Ocky please can you give a demo of restoring grub i mean grub 1 (menu.lst) i know little bit but grub 2 is still new thing for me
let me get what i understand step 1 grub-mkrescue --output=rescue.iso /boot/grub in ubuntu 10.04 it will make a grub config script and making it bootable cd iso step 2 burn iso in image formate then boot from it and press c to get command mode step 3 from command mode configfile /grub.cfg now why herman (configfile (hd0,1)/boot/grub/grub.cfg) now will it configure grub as the previous one or i need to reinstall the grub then use this to configure it please it would be kind if you give a demo step by step considering newbie in mind its will help others as well ![]() |
|
#12
|
||||
|
||||
|
Quote:
For grub legacy (old grub) I would use a live cd. For grub 2 it's very easy:- (If Grub version = 1.97 use: grub-mkrescue --overlay=/boot/grub Grub2CD.iso If Grub version = 1.98 use: grub-mkrescue --output=rescue.iso /boot/grub) If you have 10.04 which uses grub 1.98 use the command for 1.98 as above. Burn the iso named rescue.iso to CD-RW. Boot from it. At the grub prompt simply type configfile /grub.cfg This will get you your Grub 2 Menu with all the kernels splash image modifications etc. Select the kernel and hit enter to boot into your 10.04 OS Then from within 10.04 you can repair your damaged Grub 2 : sudo grub-install /dev/sdX You could also do this at the grub prompt instead of the above configfile way .. grub> linux (hd0,1)/vmlinuz root=/dev/sdX grub> initrd (hd0,1)/initrd.img grub> boot ... Replacing the (hd0,0) and sdX with the appicable disk/partition descriptions for your setup.
__________________
Last edited by Ocky : May 4th, 2010 at 02:57 PM. |
|
#13
|
||||
|
||||
|
Quote:
thanks Ocky thanks very much this is exactly what i was looking for |
|
#14
|
||||
|
||||
|
Forgot to mention. After the grub-install command, remember to run either:-
sudo grub-mkconfig -o /boot/grub/grub.cfg (or) sudo update-grub in Terminal.
__________________
|
|
#15
|
||||
|
||||
|
I was wondering...will this iso that's created work on both 32 and 64 bit systems or is it specific to either?
This iso could be a hassle free solution should grub2 corruption ever occur. Thanks for this, Ocky.
__________________
Ubuntu Precise (Cinnamon DE) 12.04 32bit on one laptop, Ubuntu Precise Gnome Fallback 12.04 32bit on another laptop, Ubuntu Precise (Cinnamon DE) 12.04 64bit on our main Desktop, and Xubuntu 12.04 64bit on our spare Desktop. "I wish I knew as much as I think I do"...
|
|
#16
|
||||
|
||||
|
Quote:
Regards. Edit: Just remember when there has been a kernel update, make a new recue cd so that you can boot into the OS with the latest kernel.
__________________
Last edited by Ocky : May 5th, 2010 at 09:09 AM. |
|
#17
|
||||
|
||||
|
Now mentioned in the Ubuntu forum's Grub Guide. http://ubuntuforums.org/showthread.php?t=1195275
Quote:
Then:- grub-mkrescue --output=rescue.iso /boot/grub Tried it no problems. At prompt type configfile /grub.cfg
__________________
|
|
#18
|
|||
|
|||
|
This am I found and used these very handy instructions to repair my Mint 10's Grub 2. The difference for me is my non-standard location of Grub 2 ( I was fooling around carelessly
), as I like it on the root partition (sdg6 for me), rather than the standard beginning of sdg. Instead of: #grub-install /dev/sdg I used #grub-install /dev/sdg6 --force (--force because of the warning it's not recommended to install it to a partition. I use dual-boot with Win7, and setup the Linux Grub 2 entry in EasyBCD so I can choose which O/S I want to boot from. |
| « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|
|