![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Karmic Koala Testing and Discussion (CLOSED) Ubuntu Karmic Koala is in development, use only for testing purposes!!! This forum is for the discussion of Ubuntu Karmic Koala. Karmic is in development and will be out in October 2009. Please note: Ubuntu Developers do not usually read the forums, to report a problem found in Karmic please report the bug in Launchpad. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Skinny Extra Sweet Ubuntu
![]() Join Date: Aug 2008
Location: South East Montana
Beans: 3,202
Ubuntu 8.04 Hardy Heron
|
GRUB 2 Introduction
DON'T PANIC
There is a lot of great information on grub2 on this forum. I wrote this up to give folks a flying start. This will not make you an expert but it will, hopefully, get you headed in the right direction. A lot of people have trouble, right after installation, with other OS' being missing from the menu. The first thing to do for this is go to your terminal and; Code:
sudo update-grub EDIT (10-28-09) There is another way to update grub; Code:
sudo grub-mkconfig END EDIT Grub2 is completely different from grub-legacy. If you are using grub2 be prepared to learn something new. The menu that you see on the screen when you boot up comes from the /boot/grub/grub.cfg file. The /boot/grub/grub.cfg file is generated everytime “update-grub” is run. This is run everytime you get a kernal update and many times when you get a grub update. It does not make sence to edit this file. Grub.cfg is generated by scripts in /etc/grub.d. 00_header gets the ball rolling and gets your timeout and hidden menu information for the menu. 05_debian-theme sets up how your menu looks on the screen. 10_linux is the one that gives you the menu entry for the OS that you are on. 20_memtest86+ is what sets the memtest on your menu. 30_os-prober is what is responcible for finding the rest of your OS'. 40_custom is designed so that you can make custom entries. Grub2 gets its time out information and sets up a hidden menu for you in /etc/default/grub. If you need to edit a menu entry that does not work do not mess with grub.cfg. It is silly to do so. It will be over written. Go to /etc/grub.d and add to the 40_custom file. For instance; 30_os-prober does not generate a functional menu entry for my Mandriva installs. So I have a custom entry that works every time and comes right up on the menu every time. It is not over written because it is regenerated every time that “update-grub” is run. Code:
menuentry "linux-nonfb (on /dev/sda12)" {
insmod ext2
set root=(hd0,12)
search --no-floppy --fs-uuid --set c23ad2ca-67a5-4a42-8fcc-3baa6d8e454e
linux /boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=c23ad2ca-67a5-4a42-8fcc-3baa6d8e454e resume=UUID=59fe476e-6d4f-e390-ced9-f29328538dfc
initrd (hd0,11)/boot/initrd.img
}
Code:
menuentry "Mandriva-Gnome" {
linux (hd0,12)/boot/vmlinuz
initrd (hd0,12)/boot/initrd.img
}
I use a slightly different entry for grub2 Ubuntu installs; Code:
menuentry "Kinky-Grub2-A2 on sda10 2.6.31-11-generic" {
set root=(hd0,10)
linux /vmlinuz root=/dev/sda10 so quiet splash
initrd /initrd.img
}
Your custom entries must be in the proper form. The first thing to do is start your favorite text editor (I use gedit). Go to preferences and set it so that there is NO test wrapping. Then, in your 40_custom file put in an entry such as; Code:
echo "Adding Kinky-Grub2-A2 on sda10 (2.6.31-11-generic)" >&2
cat << EOF
menuentry "Kinky-Grub2-A2 on sda10 2.6.31-11-generic" {
set root=(hd0,10)
linux /vmlinuz root=/dev/sda10 so quiet splash
initrd /initrd.img
}
EOF
If you save this file as 06_custom it will appear at the top of menu you see on the screen. If you save it as 40_custom it will appear at the bottom of menu you see on the screen. Now, what is the advantage of this rigamarole compared to grub-leagacy. Well, if you have three OS' on your drive and you set up a custom menu you do not need any other menu entries at all. So you change the permissions on 10_linux, 20_memtest86+, 30_custom so that they are not executable. They will not run when “update-grub” is run and so the onoy thing on your menu is your custom entries. There is nothing that can mess with these entries except you. You must remember to run; Code:
sudo update-grub Here are some links, some more useful than others, that I have collected. Some grub2 links; http://members.iinet.net/~herman546/p20.html http://ubuntuforums.org/showthread.php?t=1195275 http://grub.enbug.org/ http://grub.enbug.org/Manual http://grub.enbug.org/CommandList https://wiki.ubuntu.com/Grub2#Adding...0to%20Grub%202 https://wiki.ubuntu.com/Grub2#Recove...20via%20LiveCD http://members.iinet.net/~herman546/p20/GRUB2%20CLI%20Mode%20Commands.html#cli_loopback http://members.iinet.net/~herman546/p20/GRUB2%20Splashimages.html http://ubuntuforums.org/showthread.php?t=1287602 http://ubuntuforums.org/showthread.php?t=1287967 In case grub2 is just too much, you may want to take a look at this; http://ubuntuforums.org/showthread.p...ght=kansasnoob Some other links that are just interesting and may help or inspire some one; http://ubuntuforums.org/showpost.php...9&postcount=16 http://ubuntuforums.org/showthread.p...98#post8100252 http://ubuntuforums.org/showthread.php?t=1288604 HAVE FUN
__________________
Dell 480 XPS 3G ram Quad Core 2.40GHz, Radeon HD 2400 PRO, Audigy1, 3x320G HDD, 320G External, [ubuntu] Grub2 introduction Last edited by ranch hand; November 13th, 2009 at 11:13 AM.. |
|
|
|
|
#2 |
|
Caveat Emptor !
![]() |
Re: Grub2 introduction
Good post.
I can just see the absolute beginners forum after karmic being flooded with grub2 queries. Especially dual and multibooters.
__________________
Regards Phil.. (Don't PM for help, post a thread) RestrictedFormats Medibuntu Backports Grub2 64bit Rocks |
|
|
|
|
#3 |
|
Chocolate-Covered Ubuntu Beans
![]() Join Date: Mar 2006
Location: Narcoossee , Florida , US
Beans: 2,266
Ubuntu Development Release
|
Re: Grub2 introduction
make that a sticky both here and on the beginners forum , nice work ranchhand
__________________
if it ain't broke you haven't tweaked it enough |
|
|
|
|
#4 |
|
A Carafe of Ubuntu
![]() Join Date: May 2009
Location: Land of Lincoln
Beans: 108
Ubuntu 9.10 Karmic Koala
|
Re: Grub2 introduction
hi!
i'm testing 9.10 on a dell mini 9 running only 9.10 is there any reason for me to enter sudo update-grub? please advise and thanks for your help! KegHead |
|
|
|
|
#5 | |
|
Skinny Extra Sweet Ubuntu
![]() Join Date: Aug 2008
Location: South East Montana
Beans: 3,202
Ubuntu 8.04 Hardy Heron
|
Re: Grub2 introduction
Quote:
When you update, watch the details when the updates are installed. You can do this in any update method that you use. Update grub gets run a lot. Most grub2 updates and all kernal updates have update-grub run.
__________________
Dell 480 XPS 3G ram Quad Core 2.40GHz, Radeon HD 2400 PRO, Audigy1, 3x320G HDD, 320G External, [ubuntu] Grub2 introduction |
|
|
|
|
|
#6 | |
|
Skinny Extra Sweet Ubuntu
![]() Join Date: Aug 2008
Location: South East Montana
Beans: 3,202
Ubuntu 8.04 Hardy Heron
|
Re: Grub2 introduction
Quote:
I really like this grub but it is going to be rough.
__________________
Dell 480 XPS 3G ram Quad Core 2.40GHz, Radeon HD 2400 PRO, Audigy1, 3x320G HDD, 320G External, [ubuntu] Grub2 introduction |
|
|
|
|
|
#7 | |
|
Skinny Extra Sweet Ubuntu
![]() Join Date: Aug 2008
Location: South East Montana
Beans: 3,202
Ubuntu 8.04 Hardy Heron
|
Re: Grub2 introduction
Quote:
Thank you for your kind words. I have fooled with it for a while. I hope we can avoid having 8 million treads all on the theme of "where is my menu.lst" and "just edit your grub.cfg file".
__________________
Dell 480 XPS 3G ram Quad Core 2.40GHz, Radeon HD 2400 PRO, Audigy1, 3x320G HDD, 320G External, [ubuntu] Grub2 introduction |
|
|
|
|
|
#8 |
|
Way Too Much Ubuntu
![]() Join Date: Nov 2008
Location: Brazil
Beans: 310
Ubuntu 9.10 Karmic Koala
|
Stick it!
Thanks, ranch.
The other post about grub2 is good too and I followed it to create extra entries in my menu (Puppy frugal install, which wont be automatically detected). 50_.., 51_.., like that. I couldn't get the 40_custom to work (it says it can hold several menu entries in it) but since it's working ok the way it is, that's ok. Yes, grub2's system is much more flexible. It's nice that you posted a lot of links too. |
|
|
|
|
#9 |
|
Dark Roasted Ubuntu
![]() |
Re: Grub2 introduction
Nice one ranch hand!
|
|
|
|
|
#10 |
|
A Carafe of Ubuntu
![]() Join Date: May 2009
Location: Land of Lincoln
Beans: 108
Ubuntu 9.10 Karmic Koala
|
Re: Grub2 introduction
hi!
thanks for the info ranch hand! i'll follow this tread for more info1 KegHead |
|
|
| Bookmarks |
| Tags |
| grub grub2 boot |
| Thread Tools | |
| Display Modes | |
|
|