View Full Version : GRUB2 many questions
martyfelker
26th August 2011, 03:06 AM
Just isntalled Fedora 16 and it looks good. I did however have to install the bootloader to the MBR. Either I will need to be able run "update-grub" and add Ubuntu, openSUSE and Windows 7 to the GRUB menu or find a way to to install grub to /dev/sdb2 - a primary partition. / is mounted on a LVM Volume. I just looked around and even if I were to hand edit /etc/default/grub what do I do to change the menu? Many questions about GRUB2. Can anybody point me to the latest Fedora docs? Could I copy /etc/default/grub from Ubuntu or openSUSE? If I copy the "update-grub" command will it work? The /etc/grub.d/30_Os-prober file exists.:confused:
smr54
26th August 2011, 03:39 AM
Heh, that's one problem we've been discussing on the testing list---update-grub is an Ubuntu command. You will need to run
grub2-mkconfig -o /boot/grub/grub.cfg
I have a little page, a work in progress really, so that I won't have to look it up each time.
http://home.roadrunner.com/~computertaijutsu/grub2.html
It's very incomplete at present, only covers adding other distros to the menu, and making changes to things like the timeout and the rhgb quiet.
See if it helps though, it should aid you in adding the other systems.
martyfelker
30th August 2011, 11:03 PM
As far as I can I can determine the correct command should be grub2-mkconfig -o /boot/grub2/grub.cfg. I have successfully update that file and the custom.cfg so I can verify at the moment but somebody asked me the correct correct to correct.
tox
31st August 2011, 01:09 AM
As far as I can I can determine the correct command should be grub2-mkconfig -o /boot/grub2/grub.cfg. I have successfully update that file and the custom.cfg so I can verify at the moment but somebody asked me the correct correct to correct. i believe that is the correct command, as shown in one of my Links ( the archlinux one i think )
---------- Post added at 10:09 AM ---------- Previous post was at 10:07 AM ----------
i think there is a command called update-grub2 though that maybe a DEbian command i dunno if its a all Distro grub2 command
stoat
31st August 2011, 01:50 AM
i think there is a command called update-grub2 though that maybe a DEbian command i dunno if its a all Distro grub2 command Fedora used to have the update-grub2 command. I played with Fedora's grub2 in Fedora 12 and 13. Fedora 12 had the update-grub2 command. In Fedora 13, it was gone and I used grub2-mkconfig. There was a README somewhere amongst the grub2 stuff that listed the commands and other interesting stuff about Fedora's grub2. The Fedora 13 README did not mention anything about update-grub2. Maybe Fedora is going ahead without it for some, likely interesting, reason. In the end I guess it doesn't really matter as long as people eventually find out. The update-grub command apparently uses grub-mkconfig anyway.
When I used Debian, it had the generic update-grub command. So did Ubuntu, of course. To me at the time, Fedora appeared to be doing this grub2-whatever stuff by itself.
tox
31st August 2011, 02:28 AM
i'll have to have a look at the ReadMe file on it to see if it still exists
martyfelker
2nd September 2011, 02:43 AM
There is no question anymore. Whether or no it conforms with the documentation the following command is what works in Fedora 126 Alpha 1
grub2-mkconfig -o /boot/grub2/grub.cfg
I have removed all files from the /boot/grub directory and the GRUB2 command installs the latest keren ...rc4.. if all the ...rce3.. are deleted from /boot.
Like many other I just tweak the grub.cfg file by removing the rhgb and quiet parameters from the generated file so I can what's happening. Actually this has another great side effect as the weird screen before the gdm login screen no longer appears.
Marty
stoat
2nd September 2011, 01:49 PM
Whether or no it conforms with the documentation the following command is what works in Fedora 126 Alpha 1
grub2-mkconfig -o /boot/grub2/grub.cfgIt conforms. I don't think anyone said otherwise. In fact, the erstwhile update-grub2 worked by running grub2-mkconfig. Besides, that command most often will be run automatically during kernel updates. Most of us will not need to run it manually any more often than we had to edit legacy GRUB's grub.conf or menu.lst (which for me isn't often). I guess my point is maybe that's why the Fedora thinkers dropped update-grub2.
I have removed all files from the /boot/grub directory and the GRUB2 command installs the latest keren ...rc4.. if all the ...rce3.. are deleted from /boot.If you are referring to kernels in /boot, you should consider using yum to uninstall them instead. Deleting just files related to a kernel in /boot leaves behind millions of bytes related to its modules. But maybe I misunderstood what you meant.
Like many other I just tweak the grub.cfg file by removing the rhgb and quiet parameters from the generated file so I can what's happening.Right, but it won't survive the next grub2-mkconfig command which will create a new grub.cfg and add those right back. There is a place to do that in /etc/default/grub and have grub2-mkconfig do it how you want it. To me, if we are going to manually edit grub.cfg, then there isn't much reason even to bother with GRUB 2.
fpmurphy
10th September 2011, 05:56 PM
Right, but it won't survive the next grub2-mkconfig command which will create a new grub.cfg and add those right back. There is a place to do that in /etc/default/grub and have grub2-mkconfig do it how you want it. To me, if we are going to manually edit grub.cfg, then there isn't much reason even to bother with GRUB 2.
I have been using GRUB2 for some time and have found that the only way to avoid problems is to simply manually edit grub.cfg rather than have some script generate it for me.
DBelton
11th September 2011, 06:59 AM
If you manually edit the grub.cfg, will grub automatically pick up the changes? Or does something else need to be done as well?
I do realize that if you manually update the grub.cfg, then the changes will get overwritten if grub2-mkconfig is run again.
bscwuenn
12th September 2011, 01:13 PM
Yor are not supposed to manually change grub.cfg and yes the next time you run the update utility the file is overwritten.
DBelton
12th September 2011, 01:29 PM
not supposed to change something in linux is just an open invitation for someone to change it :D
I'm certain that in my tweaking and changing things, I have modified some file that is not supposed to be manually changed before. :lol:
zuchov
12th September 2011, 03:12 PM
not supposed to change something in linux is just an open invitation for someone to change it :D
I'm certain that in my tweaking and changing things, I have modified some file that is not supposed to be manually changed before. :lol:
Same here chap. I am not comfortable with GRUB 2, and have a hard time see the benefits of it. One machine of mine runs multiple OS's with Ubuntu 11 installed as lat of them. Kernelupdates on the other OS's always render myself changing the grub.cfg manually. I mean, even if it's script generated, every single menuentry is pretty straight forward, isn't it?
DBelton
12th September 2011, 03:52 PM
I guess I am just used to changing /boot/grub/grub.conf and rebooting. The changes are seen without having to run anything else.
Actually, I see more benefits to using grub than with grub2..
fpmurphy
12th September 2011, 04:28 PM
If you manually edit the grub.cfg, will grub automatically pick up the changes? Or does something else need to be done as well?
Yes. Nothing else needs to be done.
Either stick to manually editing grub.cfg or to the long-winded and official way. Do not try to mix both methods.
---------- Post added at 11:28 AM ---------- Previous post was at 11:16 AM ----------
One machine of mine runs multiple OS's with Ubuntu 11 installed as lat of them. Kernel updates on the other OS's always render myself changing the grub.cfg manually.
What you describe is the core fundamental design flaw with GRUB2. Each OS is expected to run its own grub-mkconfig to generate grub.cfg from grub configuration files that only exist within a particular OSes filesystem. Each OS, by default, has no knowledge of the other OSes GRUB configuration files.
I mean, even if it's script generated, every single menuentry is pretty straight forward, isn't it?
Yes, that is true.
smr54
12th September 2011, 06:34 PM
There is also the custom.cfg which can be put into /boot/grub2 and will not be overwritten by updates.
DBelton
12th September 2011, 06:41 PM
and then there are the files in /etc/grub.d and then the files in /etc/defaults...
So that when there is a boot problem, you have no idea where to start looking.
grub was much more straight forward than grub2 is.
I do understand that grub probably was getting outdated and maybe not able to handle some of the newer hardware, etc... But there has to be something simpler than grub2. Plus grub2 doesn't seem to allow installation into a partition instead of the master boot record.
ryptyde
12th September 2011, 10:43 PM
Grub2 doesn't list my Windows XP install in the boot menu. Have "os-prober" installed and when run as root it lists the WinXP OS.
When using the legacy grub in F15 and prior the Windows OS was always listed as "Other" now with grub2 it is a no-show. Is it just my install or has anyone else seen this.
I thought grub2 was supposed to recognize other OS's or is that just "sales hype" :)
phil
DBelton
13th September 2011, 01:50 AM
there was a bug the grub2 they originally had with F16.. The current version detects Windows XP and adds it to the boot menu.
You can re-run the grub2-mkconfig and it should add it for you now.
grub2-mkconfig -o /boot/grub/grub.cfg
ryptyde
13th September 2011, 05:06 PM
there was a bug the grub2 they originally had with F16.. The current version detects Windows XP and adds it to the boot menu.
You can re-run the grub2-mkconfig and it should add it for you now.
grub2-mkconfig -o /boot/grub/grub.cfg
I had tried that earlier with no luck and then it dawned on me that I needed
to add a 2 to grub and then reran "grub2-mkconfig -o /boot/grub2/grub.cfg" and Windows XP shows now. :)
Thanks for getting me going in the right direction.
phil
DBelton
13th September 2011, 09:07 PM
%$^#*#*(*&@^@^@&*^!!!!!!
Danged grub to grub2 changes! :lol:
Yes, I did leave the "2" off of the folder name.. Sorry about that. :(
tox
14th September 2011, 12:30 AM
I had tried that earlier with no luck and then it dawned on me that I needed
to add a 2 to grub and then reran "grub2-mkconfig -o /boot/grub2/grub.cfg" and Windows XP shows now. :)
Thanks for getting me going in the right direction.
phil
you may wanna bookmark one of my links in my sig, the Archlinux one which tells you all you need to know about how to configure Grub2
ryptyde
14th September 2011, 01:14 AM
you may wanna bookmark one of my links in my sig, the Archlinux one which tells you all you need to know about how to configure Grub2
I did check out your tutorial and it also had "grub-mkconfig -o /boot/grub/grub.cfg" instead of "grub2-mkconfig -o /boot/grub2/grub.cfg" :doh:
phil
tox
14th September 2011, 01:22 AM
I did check out your tutorial and it also had "grub-mkconfig -o /boot/grub/grub.cfg" instead of "grub2-mkconfig -o /boot/grub2/grub.cfg" :doh:
phil
well its quite logical that you type grub2 since that is what your usin g and not grub which is the legacy grub version
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.