Created attachment 272179 [details, diff] Patchfile for live grub Hi, I migrated my computers to use grub2 so i updated the ebuild a bit to be technically correct and do what it is supposed to do. 0) migrate to EAPI=4 1) use only one line inherit 2) wrap all lines to be 80 chars or less 3) pass paralel make with -j30 4) fix installation of default settings to proper place 5) in postinst phase update grub.cfg from menu.lst if found otherwise just update from the grub.d folder. 6) display elog information pointing to guide (for now archlinux as we dont have any) And I would be interested in your opinions about those FIXME and NOTE I wrote in there.
1.99-rc2 has been released a month ago, how come rc1 ebuild hasn't been bumped? ran into needing this for btrfs /boot.
*** Bug 369439 has been marked as a duplicate of this bug. ***
Created attachment 275285 [details, diff] patch from grub-1.99_rc1 to grub-1.99
It would be very desired to have grub bumped to 1.99, i was unable to boot from a btrfs root partition (no separate /boot) and apparently grub2 gained that "ability" just from version 1.99_rc2 and the latest (except 9999) is rc1 so i was left cold unable to boot.
So test the grub from my dev overlay and report if it works or not. I just tested it on my machines and it is in sabayon package. So if people confirm it works maybe base system will get me allowance to commit it.
i've been doing stuff with 1.99_rc1 and 1.99_rc2 for a while on x86, with no apparent issues. including the btrfs /boot thing.
I think there should be a build dependency on bison, as it is not guaranteed to be installed (it's not part of the system set anymore, on my system at least). Bug 377371 is related.
Seems to have worked but the there were warnings about prestripped files and unrecognized ./configure options. 1.99 rc1 and rc2 have a bug which breaks booting memtest for me(refs: Ubuntu bug #683904, Arch linux bug #22993).
Tomáš why do you need subshell here: + if ( use extras ) mkdir -p ${S}/grub-extras/${i} cd ${S}/grub-extras/${i} this should be quoted. ./autogen.sh why autotools eclass fails here?
(In reply to comment #9) > Tomáš why do you need subshell here: > + if ( use extras ) > > mkdir -p ${S}/grub-extras/${i} > cd ${S}/grub-extras/${i} > this should be quoted. > > ./autogen.sh > > why autotools eclass fails here? Bad idea to review the attachment as way more work was really done in the overlay :) Also the extras code is done by Dmitry not by me :P The ebuild by me is this: http://git.overlays.gentoo.org/gitweb/?p=dev/scarabeus.git;a=blob;f=sys-boot/grub/grub-9999.ebuild Anyway the autogen.sh is required because it is doing more stuff than just eautoreconf, and if you notice src_prepare phase it sed the autoreconf in there and runs eautoreconf afterwards so it gets executed properly.
(In reply to comment #10) > (In reply to comment #9) > Bad idea to review the attachment as way more work was really done in the > overlay :) It's good idea roll it forward (at least mark attachment as old) to make bug more useful. It's your bug, not mine ;) 7 if [[ ${PV} == "9999" ]] ; then 8 EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub/" 9 LIVE_ECLASS="autotools bzr" 18 inherit mount-boot eutils flag-o-matic toolchain-funcs ${LIVE_ECLASS} 19 unset LIVE_ECLASS Why don't inherit inside if block and drop this unset? 40 for i in ${GRUB_PLATFORMS}; do 41 IUSE+=" grub_platforms_${i}" 42 done 43 unset i With printf "grub_platforms_%s " $GRUB_PLATFORMS you'll get the same without cycle and unset. 84 grub_run_phase() { 85 local phase=$1 86 local platform=$2 87 [[ -z ${phase} ]] && die "${FUNCNAME}: Phase is undefined" 88 [[ -z ${platform} ]] && die "${FUNCNAME}: Platform is undefined" It's better to do one check on the number of parameters passed to function. 90 [[ -d "${WORKDIR}/build-${platform}" ]] || \ 91 { mkdir "${WORKDIR}/build-${platform}" || die ; } Probably it's good idea to drop check for directory existence and just mkdir -p "${WORKDIR}/build-${platform}" 94 echo ">>> Running ${phase} for platform \"${platform}\"" 95 echo ">>> Working in: \"${WORKDIR}/build-${platform}\"" Here and below, einfo ? 97 grub_${phase} ${platform} || die 167 grub_src_compile() { 168 default_src_compile 169 } What is this? I guess this should be dropped. 242 cat <<-EOF >> "${D}"/lib*/grub/grub-mkconfig_lib 243 GRUB_DISTRIBUTOR="Gentoo" 244 EOF EOF should be with the same indentation as cat. Any way for one line it's better to use echo. I'm sure there are more things but I have to run :)
(In reply to comment #11) > > 7 if [[ ${PV} == "9999" ]] ; then > 8 EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub/" > 9 LIVE_ECLASS="autotools bzr" > > 18 inherit mount-boot eutils flag-o-matic toolchain-funcs ${LIVE_ECLASS} > 19 unset LIVE_ECLASS > > Why don't inherit inside if block and drop this unset? Multiple inherit lines are considered ugly. So I actually rather use this approach. > > 40 for i in ${GRUB_PLATFORMS}; do > 41 IUSE+=" grub_platforms_${i}" > 42 done > 43 unset i > > With printf "grub_platforms_%s " $GRUB_PLATFORMS you'll get the same without > cycle and unset. > > 84 grub_run_phase() { > 85 local phase=$1 > 86 local platform=$2 > 87 [[ -z ${phase} ]] && die "${FUNCNAME}: Phase is undefined" > 88 [[ -z ${platform} ]] && die "${FUNCNAME}: Platform is undefined" > > It's better to do one check on the number of parameters passed to function. Yep sounds sane, will do :) > > 90 [[ -d "${WORKDIR}/build-${platform}" ]] || \ > 91 { mkdir "${WORKDIR}/build-${platform}" || die ; } > > Probably it's good idea to drop check for directory existence and just > mkdir -p "${WORKDIR}/build-${platform}" Ack > > 94 echo ">>> Running ${phase} for platform \"${platform}\"" > 95 echo ">>> Working in: \"${WORKDIR}/build-${platform}\"" > > Here and below, einfo ? I tried not to polute the build and rather use the output like ">>> Unpacked to..." as it does not look so disruptive in the log yet it is simple to find. > > 97 grub_${phase} ${platform} > > || die The phases die themselves so no need for die. > > 167 grub_src_compile() { > 168 default_src_compile > 169 } > > What is this? I guess this should be dropped. It is required as you don't want the default phase to be overriden, alternative would be to write there emake || die. > > 242 cat <<-EOF >> "${D}"/lib*/grub/grub-mkconfig_lib > 243 GRUB_DISTRIBUTOR="Gentoo" > 244 EOF > > EOF should be with the same indentation as cat. Any way for one line it's > better to use echo. Good spot :) > > I'm sure there are more things but I have to run :) Thanks a lot, if you will be bored again, feel free to review it again :)
Hi! I added your overlay and tried the ebuild, but it got stuck in "error no such disk" and reverted to grub rescue > I reverted the install and went back to grub-1.99_rc1 and thankfully it worked =) Or actually I haven't tried yet, I'm just testing it through qemu, but I'll try it now!
did you use the 9999 ebuild? if so, disable the nls useflag (for 9999 --disable-nls should be hardcoded, really (unless someone desperately wants to implement the locale mess as specified in the README in the po directory.)) if not, check if the locale directory in /boot/grub is populated, or just kill the whole locale stuff in the grub.cfg that made the "no such disk" error go away for me.
(In reply to comment #14) > did you use the 9999 ebuild? if so, disable the nls useflag (for 9999 > --disable-nls should be hardcoded, really (unless someone desperately wants to > implement the locale mess as specified in the README in the po directory.)) > if not, check if the locale directory in /boot/grub is populated, or just kill > the whole locale stuff in the grub.cfg > > that made the "no such disk" error go away for me. That is a good question, cause i rather disable the nls on my machine. So maybe the nls useflag should actually disappear and we should make sure that it is always in english.
No, I was using the 1.99 ebuild, I figured it was a bit more safe to use a released and stable version. Perhaps not ;) Regarding locales, me being Swedish I of course think that it's good to be able to change to different languages, but I think getting grub 2 up'n'running on Gentoo in a stable fashion is way more important. Baby steps, right? As long as it's UTF-8 (or other Unicode), I'm happy! I'm a dvorak user, so the ability to change key-mappings is also very welcome.
In main tree.
Also i figured out what caused the no-such-disk and fixed it so the version in main tree should not suffer with it anymore.
Awesome work! Saw your new changes in the Grub2 changelog (had to check it out since some versions were missing, etc), great that you've accepted maintenance responsibility for grub2!