View previous topic :: View next topic |
Author |
Message |
bedtime n00b
Joined: 19 Dec 2012 Posts: 71
|
Posted: Thu Dec 27, 2012 11:06 pm Post subject: Install grub 'easily' during initial install |
|
|
Disclaimer: I'm a newbie but I've tried this method and it's worked well for me. I highly recommend you read this guide to decide if this tip is appropriate for your situation: http://wiki.gentoo.org/wiki/GRUB2
* Edit - the grub2 install steps have been changed! *
I can vouch for myself that this method works for me when I followed the Gentoo Handbook on an x86 install iso:
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1
Whilst doing your initial install and having reached the step where you're going to install the bootloader:
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1#book_part1_chap10
Instead of installing grub and trying to figure out where you installed the kernel and where all the other kernels are located on your drive, we'll skip past this step and install grub2 and all this will be automagically done for us; no stress.
We want grub2 to be able to find multiple OS's so we need to add this line to /etc/portage/make.conf :
Code: | GRUB_PLATFORMS="pc multiboot" |
We'll add a few useful flags as they are not included by default:
Code: | echo "sys-boot/grub mount device-mapper" >> /etc/portage/package.use |
Now we can install grub2:
Code: | emerge --ask sys-boot/grub:2 |
In order for grub2 to be able to locate other OS's in your system we need to install os-prober:
Code: | emerge --ask sys-boot/os-prober |
To install grubby to BOIS we'll need to mount our boot partition:
Code: | # mount /boot
# grub2-install /dev/sda |
This is where magic happens:
Code: | # grub2-mkconfig -o /boot/grub2/grub.cfg |
If you are upgrading from Grub Legacy then you can delete the old grub files:
Continue on with step '10.d. Rebooting the System':
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1#reboot
Enjoy!
* EDIT - Additional Information *
But I want to add KMS (kernel modes setting), how do I do it?
Edit your grub2 file:
Code: | nano /etc/default/grub |
.. and simply add your KMS parameters to this line:
Code: | GRUB_CMDLINE_LINUX="" |
My parameters are i915.modeset=1, so mine looks like this:
Code: | GRUB_CMDLINE_LINUX="i915.modeset=1" |
Now we'll update grubbers so this information sticks:
Code: | grub2-mkconfig -o /boot/grub2/grub.cfg |
Next reboot your KMS parameters will be executed. No more manually entering them each time you boot up.
I've just changed my kernel. How do I update grub2 so it can find the new kernel?
After you've made the appropriate changes to the kernels, just run this command to update grub:
Code: | grub2-mkconfig -o /boot/grub2/grub.cfg |
During bootup I have an error concerning 'Device Mapper Support'. What can I do to fix this?
You need to make sure that you've enabled 'device mapper support' in your kernel. Sorry, but you'll need to edit your .config to include these drivers and recompile your kernel:
Device Drivers -->
- Multiple devices driver support (RAID and LVM)
[ x ] Device mapper support |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|