Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub2 migration- no grub2 directory created on install
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2755
Location: Gainesville, Florida

PostPosted: Thu Sep 19, 2013 6:39 pm    Post subject: Grub2 migration- no grub2 directory created on install Reply with quote

I'm migrating to grub2 to test it on an amd64 install on sda8, and my current controlling grub is grub legacy on the MBR from an x86 Gentoo install on sda3, which also chainloads winXP (on sda1) plus several other distros using grub2 on various other partitions just fine.

Anyway, I followed the Installing and Configuring GRUB2 guide, where it says:

Quote:
The next step is to install and configure GRUB2 on your /boot partition without removing GRUB Legacy from your MBR. The example below uses /dev/sda but you must replace it with your boot drive path. The first step installs the necessary GRUB2 files to /boot/grub2, while the second step scans your available kernels and generates a suitable config file to /boot/grub2/grub.cfg.



Apparently, grub2-install --grub-setup=/bin/true /dev/sda8 did NOT create the grub2 directory, and instead just installed grub2 files into the current legacy /boot/grub/ on sda8 where it did create the new i386-pc directory.
Thus when I try to create the new grub.cfg file, it of course reports "No such file or directory."

Code:
amd64 wrc # grub2-install --grub-setup=/bin/true /dev/sda8
Installation finished. No error reported.
amd64 wrc #
amd64 wrc #
amd64 wrc #
amd64 wrc # grub2-mkconfig -o /boot/grub2/grub.cfg
/usr/sbin/grub2-mkconfig: line 223: /boot/grub2/grub.cfg.new: No such file or directory
amd64 wrc #



All the grub2 stuff was created in /boot/grub/i386-pc/, so can I just rename /boot/grub to /boot/grub2, and re-run grub2-mkconfig -o /boot/grub2/grub.cfg, or do need to somehow edit the grub2-mkconfig script and point it to /boot/grub/i386-pc?

Since this guide page was last updated August 15, 2013, I figured it was up-to-date, so I wasn't expecting this little problem. :roll: Or am I just missing something obvious?
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.9.0, kernel 3.15.5-gentoo (USE=experimental "native")
Back to top
View user's profile Send private message
sebB
Apprentice
Apprentice


Joined: 02 Mar 2011
Posts: 197

PostPosted: Thu Sep 19, 2013 7:47 pm    Post subject: Reply with quote

Are you using grub-2.00_p5107-r1?

Quote:
WARN: postinst
│The grub directory has changed from /boot/grub2 to /boot/grub.
│Please run grub2-install and grub2-mkconfig -o /boot/grub/grub.cfg.
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2755
Location: Gainesville, Florida

PostPosted: Thu Sep 19, 2013 8:09 pm    Post subject: Reply with quote

Thanks, sebB.
Yes- I installed grub-2.00_p5107-r1. However I can't find the warning you mention in the gcc output, and the only messages at the end was:
Quote:

>>> Recording sys-boot/grub:2 in "world" favorites file...

* Messages for package sys-boot/grub-2.00_p5107-r1:

* For information on how to configure grub-2 please refer to the guide:
* http://wiki.gentoo.org/wiki/GRUB2_Quick_Start
* Install sys-boot/os-prober to enable detection of other operating systems using grub2-mkconfig.
* Install dev-libs/libisoburn to enable creation of rescue media using grub2-mkrescue.
>>> Auto-cleaning packages...

OK- found it in the ebuild. That seems to generate the grub.cfg OK
Code:
amd64 wrc # grub2-mkconfig -o /boot/grub/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/kernel-genkernel-x86_64-3.6.1-gentoo
Found initrd image: /boot/initramfs-genkernel-x86_64-3.6.1-gentoo
Found linux image: /boot/kernel-3.11.1
done
amd64 wrc #

But I'm wondering why it didn't pickup all my other distros on this disk and generate grub.cfg entries for them (or even the old winXP on sda1), like the other distros' grub2's do when I run "update-config" after a kernel update.

Now to reboot and try chainloading from my sda3 grub legacy into this new grub2 on sd8.

Update: OK- chainloaded successfully from my controlling grub legacy into the grub2 on sda8, but all that's listed is an old 3.6 genkernel created kernel from the original install, and an "Advanced options" menu entry, which upon opening list the new 3.11.1 kernel I build and named kernel-3.11.1 as the grub to docs instructed. So, at least I could get into the sda8 install and the new grub2 with my custom kernel, but I'm still not getting why it's not detecting and generating menu entries for all my other distros.

I guess I could manually create chainloading entries for each distro. My main goal is after 10 years of mostly trouble-free experience to move away from grub legacy to grub2 as the main controlling loader on my main Gentoo install on sda3. Since I constantly build and test custom kernels (without initrd's), grub legacy had served my basic need for easily creating simple menu stanzas, but I guess it's really past time to move on to grub2.

OK- just needed to install os-prober- now grub2-mkconfig -o /boot/grub/grub.cfg detects my other distros. :D
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.9.0, kernel 3.15.5-gentoo (USE=experimental "native")
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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