Differences between version 22 and revision by previous author of GrubNotes.
Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History
Newer page: | version 22 | Last edited on Tuesday, September 11, 2007 2:16:34 pm | by IanMcDonald | Revert |
Older page: | version 18 | Last edited on Wednesday, March 1, 2006 10:48:12 am | by RaymondBurgess | Revert |
@@ -1,11 +1,14 @@
!! I need to reinstall grub in my master boot record
-Boot off a liveCD, and chroot(8) into your main root partition.
+Boot off a liveCD, and [
chroot(8)]
into your main root partition.
__Remember that grub numbering starts at 0:__ __/dev/hda1__ becomes __(hd0,0)__, etc.
Run 'grub'. Issue =root (hdx,x)= if you know where your __/boot__ directory is, or use =find /boot/grub/stage1= to find it if you don't. Then issue =setup (hdx)= to install GRUB in the master boot record of drive hdx, or =setup (hdx,x)= to setup inside a partition.
+
+Alternatively on many modern distros you can use [grub-install(8)] to do this e.g.
+ grub-install /dev/hda
!! I get a grub> prompt on boot
This means [GRUB] can't find your config file. You can still boot into the system by issuing appropriate commands.
@@ -24,8 +27,12 @@
If that still doesn't work, it's possible that [GRUB] is looking in the wrong place for your config. If you installed [GRUB] using something like =grub-install --root-device=/boot '(hd0)'= it will install to __/boot/grub/__ etc, however if your __/boot__ is on a separate partition (as I described in the example above) then it's fairly likely that [GRUB] is looking in __/boot/boot/grub/__ for __menu.lst__ -- and not finding it.
Easiest fix (it stops this happening again in the future, so perhaps the best fix?) is to symlink __/boot__ into __/boot__ by doing =ln -s /boot /boot/=. You should now be able to cd into __/boot/boot/grub__ and it'll have your __menu.lst__ there.
+
+!! Adding a new kernel to grub
+
+If you're building your own kernels or doing KernelDevelopment then you need to manually edit the files for [grub(8)] or on many distros you can run [update-grub(8)]. One thing to note is that if you rearrange hard drives you need to edit the menu.lst file to tell it which drive is which and the kernel options before running [update-grub(8)]. The lines needed have a hash symbol in front of them which makes them look like a comment only, but they are not a comment at all!!
!! Using a different kernel for the next reboot only
<pre>
@@ -83,4 +90,10 @@
* [WinGRUB | http://grub4dos.sourceforge.net/]
* [GRUB installer for Windows | http://www.geocities.com/lode_leroy/grubinstall/]
* [GRUB for DOS | http://grub.linuxeden.com/] - Bridging DOS/Windows to Unix/Linux
* [Comparison of GRUB and LILO|http://www-128.ibm.com/developerworks/library/l-bootload.html?ca=dgr-lnxw01LILOandGRUB]
+* [GRUB FAQ | http://www.gnu.org/software/grub/grub-faq.en.html]
+* [GRUB Manual | http://www.gnu.org/software/grub/manual/html_node/]
+* [GRUB wiki | http://autistici.org/grub/]
+* [Linux+Win9x+Grub HOWTO | http://www.tldp.org/HOWTO/Linux+Win9x+Grub-HOWTO/]
+* [Multiboot with GRUB Mini-HOWTO | http://www.tldp.org/HOWTO/Multiboot-with-GRUB.html]
+* [APC guide to dual-booting Vista/XP/Linux | http://apcmag.com/5162/the_definitive_dual_booting_guide_linux_vista_and_xp ]