Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 407393 - sys-boot/grub-2.00_beta1 - system reboots after "Loading Linux x.x.x-gentoo"
Summary: sys-boot/grub-2.00_beta1 - system reboots after "Loading Linux x.x.x-gentoo"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-08 09:10 UTC by Casper Ti. Vector
Modified: 2012-03-11 20:03 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Casper Ti. Vector 2012-03-08 09:10:29 UTC
After upgrading sys-boot/grub from 2.00_beta0 to 2.00_beta1, and running `grub2-install /dev/sda', the computer reboots every time after printing `Loading Linux x.x.x-gentoo' and before any boot message is printed by the kernel.


Reproducible: Always

Steps to Reproduce:
1. emerge '=sys-boot/grub-2.00_beta1'
2. grub2-install /dev/sda
3. reboot

Actual Results:  
The computer keeps rebooting after printing `Loading Linux x.x.x-gentoo' and before any boot message is printed by the kernel.


Expected Results:  
The specified kernel should be booted as usual.


The computer boots as expected if nothing else is done except for the upgrade of sys-boot/grub from 2.00_beta0 to 2.00_beta1, or 
only `grub2-mkconfig -o /boot/grub2/grub.cfg' is run.

*** Following is the output of `emerge --info grub' ***

Portage 2.1.10.49 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.14.1-r2, 3.2.9-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.2.9-gentoo-x86_64-Intel-R-_Pentium-R-_Dual_CPU_T2370_@_1.73GHz-with-gentoo-2.1
Timestamp of tree: Thu, 08 Mar 2012 08:15:01 +0000
app-shells/bash:          4.2_p20
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/cmake:           2.8.7-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.9.2
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.11.3
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5.1
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2-r1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2::caspervector
Repositories: gentoo gentoo-zh gentoo-haskell caspervector
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build n"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fakeroot fixlafiles metadata-transfer news parallel-fetch parallel-install protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersync"
FFLAGS=""
GENTOO_MIRRORS="http://mirrors.ustc.edu.cn/gentoo http://mirror.bjtu.edu.cn/gentoo"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_GB"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--human-readable --timeout 15"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/gentoo-zh /var/lib/layman/haskell /usr/local/portage"
SYNC="rsync://rsync.cn.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cxx dbus dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fontconfig fortran gdu gif gnutls gpg gpm gtk gtk3 iconv ipv6 jpeg lcms libedit libnotify mad maildir mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf png policykit ppds pppd qt3support qt4 readline sdl session smp socks5 spell sse sse2 sse3 ssl ssse3 startup-notification svg sysfs system-sqlite tcpd threads tiff truetype udev unicode usb vaapi vorbis x264 xcb xft xinerama xml xorg xulrunner xv xvid zlib zsh-completion" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

=================================================================
                        Package Settings
=================================================================

sys-boot/grub-2.00_beta1 was built with the following:
USE="(multilib) nls -custom-cflags -debug -device-mapper -efiemu -libzfs -mount -sdl -static -truetype" GRUB_PLATFORMS="pc -coreboot -efi-32 -efi-64 -emu -ieee1275 -multiboot -qemu -qemu-mips -yeeloong"
CFLAGS=""
LDFLAGS=""
Comment 1 Jakub Caban 2012-03-08 11:03:31 UTC
Exactly same situation here.

As a workaround:
1. downgrade to _beta0
2. grub2-install
3) upgrade back to _beta1
Comment 2 Martin Väth 2012-03-08 11:30:23 UTC
It seems that the "linux" command is broken in beta1.
Using "linux16" instead of "linux" works here.
Comment 3 Casper Ti. Vector 2012-03-08 11:59:57 UTC
(In reply to comment #1)
> Exactly same situation here.
> 
> As a workaround:
> 1. downgrade to _beta0
> 2. grub2-install
> 3) upgrade back to _beta1

This workaround worked for me (I forgot to mention this when writing the report).
Thanks anyway :)
Comment 4 nE0sIghT 2012-03-08 14:55:56 UTC
Same with efi-64 platform
Comment 5 Mike Gilbert gentoo-dev 2012-03-08 15:28:30 UTC
I don't seem to be having this problem myself with the pc platform.

Could someone experiencing the problem report it upstream please?

http://www.gnu.org/software/grub/grub-bugs.html
Comment 6 Francisco J. Vazquez 2012-03-08 18:32:48 UTC
(In reply to comment #2)
> It seems that the "linux" command is broken in beta1.
> Using "linux16" instead of "linux" works here.

Thanks, that fixed it for me, too. Beta1 is b0rked.
Comment 7 Maciej Piechotka 2012-03-09 09:40:21 UTC
I am also affected

(In reply to comment #1)
> Exactly same situation here.
> 
> As a workaround:
> 1. downgrade to _beta0
> 2. grub2-install
> 3) upgrade back to _beta1

As I understend I should not call grub2-install for beta1?
Comment 8 Jakub Caban 2012-03-09 09:42:17 UTC
(In reply to comment #7)
> I am also affected
> 
> (In reply to comment #1)
> > Exactly same situation here.
> > 
> > As a workaround:
> > 1. downgrade to _beta0
> > 2. grub2-install
> > 3) upgrade back to _beta1
> 
> As I understend I should not call grub2-install for beta1?

That's exactly the point.
Comment 9 Mike Gilbert gentoo-dev 2012-03-09 15:17:34 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > As I understend I should not call grub2-install for beta1?
> 
> That's exactly the point.

There is really no point in upgrading back to beta1 in that case.

Again, this issue is much more likely to be resolved if someone would work with the upstream developers. I can't produce the problem, so I won't be able to perform any testing they may request.
Comment 10 Mike Limansky 2012-03-09 15:29:56 UTC
(In reply to comment #8)
> That's exactly the point.

So it means that an old bootloader will be used with new scripts?

I expect same problem on and64 system. linux16 command fixes the issue for me.
Comment 11 Michael Hampicke 2012-03-10 00:20:55 UTC
I can confirm this bug on x86_64 in UEFI mode, downgrading to beta0 solved the issue.
Comment 12 Justin Lecher gentoo-dev 2012-03-10 08:27:53 UTC
So who is up to give a report to upstream?
Comment 13 Mike Limansky 2012-03-10 09:02:58 UTC
(In reply to comment #12)
> So who is up to give a report to upstream?

BTW, could you clarify, is it's an official grub builds, because I cannot find it on GNU FTP server: ftp://ftp.gnu.org/gnu/grub/ ?
Comment 14 Tibor Vago 2012-03-10 11:27:34 UTC
Same problem here. More info.

I have GPT partition table on PC platform with hibrid MBR for Windows shit:

$ sudo gdisk /dev/sda
GPT fdisk (gdisk) version 0.6.13

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): r

Recovery/transformation command (? for help): o
MBR disk identifier: 0xCA4B4C51
MBR partitions:
Number   Boot    Start (sector)  Length (sectors)       Type
   1                        1         159380927         0xEE
   2       *        159380928         134223012         0x07

Disk size is 976773168 sectors (465.8 GiB)

Recovery/transformation command (? for help): p
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 0FBA7D64-E9D6-4B9E-A7E1-E04F0AD7B575
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 1-sector boundaries
Total free space is 28 sectors (14.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40            4096   2.0 MiB     EF02  BIOS boot partition
   2            4104          135175   64.0 MiB    FFFF  Linux filesystem
   3          135176        16771859   7.9 GiB     FFFF  Linux filesystem
   4        16771860       150994934   64.0 GiB    A500  
   5       150994935       159380927   4.0 GiB     8200  Linux swap
   6       159380928       293603939   64.0 GiB    0700  Microsoft basic data
   7       293603940       310375799   8.0 GiB     FFFF  Linux filesystem
   8       310375800       976773119   317.8 GiB   FFFF  Linux filesystem

Recovery/transformation command (? for help):


Maybe this help to reproduce the problem to anyone.
Comment 15 Tibor Vago 2012-03-10 11:48:01 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > So who is up to give a report to upstream?
> 
> BTW, could you clarify, is it's an official grub builds, because I cannot
> find it on GNU FTP server: ftp://ftp.gnu.org/gnu/grub/ ?

It is an alpha/beta release and U can find here: ftp://alpha.gnu.org/gnu/grub/
Comment 16 Tibor Vago 2012-03-10 13:16:02 UTC
Workaround: build kernel with CONFIG_RELOCATABLE
Comment 17 Justin Lecher gentoo-dev 2012-03-10 14:11:46 UTC
(In reply to comment #16)
> Workaround: build kernel with CONFIG_RELOCATABLE

doesn't work here.
Comment 18 Tibor Vago 2012-03-10 14:23:22 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > Workaround: build kernel with CONFIG_RELOCATABLE
> 
> doesn't work here.

Your part table is GPT or MBR?
Comment 19 Justin Lecher gentoo-dev 2012-03-10 14:24:39 UTC
(In reply to comment #18)
> (In reply to comment #17)
> > (In reply to comment #16)
> > > Workaround: build kernel with CONFIG_RELOCATABLE
> > 
> > doesn't work here.
> 
> Your part table is GPT or MBR?

GPT, I am using UEFI/GPT/GRUB2 setups. And this is reproduced on two amd64 systems.
Comment 20 Tibor Vago 2012-03-10 14:29:44 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > (In reply to comment #17)
> > > (In reply to comment #16)
> > > > Workaround: build kernel with CONFIG_RELOCATABLE
> > > 
> > > doesn't work here.
> > 
> > Your part table is GPT or MBR?
> 
> GPT, I am using UEFI/GPT/GRUB2 setups. And this is reproduced on two amd64
> systems.

If I right your system platform is not PC but UEFI. Are you set GRUB_PLATFORMS="efi-64" at emerge grub?
Comment 21 Justin Lecher gentoo-dev 2012-03-10 14:32:20 UTC
That's right.
Comment 22 Tibor Vago 2012-03-10 15:05:02 UTC
(In reply to comment #21)
> That's right.

I inspect the differences between beta0 and beta1.
Your grub2 setup was works well with beta0?
Comment 23 Justin Lecher gentoo-dev 2012-03-10 15:40:30 UTC
yes it does. Did you find any meaningful changes?
Comment 24 Tibor Vago 2012-03-10 16:54:45 UTC
(In reply to comment #23)
> yes it does. Did you find any meaningful changes?

I don't think so.(In reply to comment #23)
> yes it does. Did you find any meaningful changes?

I don't think so. Can U please try the trunk version of grub2?

I see some relevant commits in trunk:
----------------------------------------------------------
2012-03-07  Vladimir Serbinenko  <phcoder@gmail.com>
      * grub-core/loader/i386/linux.c (prot_init_space): New variable.
        (allocate_pages): Improve dprintf.
        (grub_cmd_linux): Fill prot_init_space. Fix improper usage of
        code32_start. Fill code32_start and kernel_alignment in params.
        (grub_cmd_initrd): Use prot_init_space.
----------------------------------------------------------
and:
----------------------------------------------------------
2012-03-10  Vladimir Serbinenko  <phcoder@gmail.com>
      * grub-core/loader/efi/chainloader.c (grub_cmd_chainloader): Use
        "out of memory" error messagge.
----------------------------------------------------------
Comment 25 Tibor Vago 2012-03-10 17:50:59 UTC
=grub-9999 works for me now.
Comment 26 Justin Lecher gentoo-dev 2012-03-11 10:41:07 UTC
Mike,

did you backport the fixes or removed the version in question?
Comment 27 Mike Gilbert gentoo-dev 2012-03-11 17:50:53 UTC
Beta 2 is now in the tree. Please test.
Comment 28 Jakub Caban 2012-03-11 19:07:39 UTC
(In reply to comment #27)
> Beta 2 is now in the tree. Please test.

Beta 2 solved the issue for me.

Did the grub2-install and rebooted with no problems at all.
Comment 29 Mike Gilbert gentoo-dev 2012-03-11 19:23:54 UTC
Thanks. If anyone else still experiences this bug with beta 2, please speak up and I will reopen this.
Comment 30 SpanKY gentoo-dev 2012-03-11 20:03:32 UTC
(In reply to comment #26)

this version isn't keyworded, so fixes upstream qualify as fixed here