Mailing List Archive

Grub not working anymore (but boot does)
Entirely by accident, I updated my ancient version of grub. Once I found
out I said to myself that it would be better to update the boot stages
but this is what happens:

~ # grub
grub: asmstub.c:215: grub_stage2: Assertion `simstack_alloc_base !=
((void *) -1)' failed.
Aborted

I hadn't run grub in AGES, so I can't say what/when it broke. The good
news is the machine still boots but I'm not in a reliable condition.

equery l grub
* Searching for grub ...
[IP-] [ ] sys-boot/grub-0.97-r16:0

Relevant kern.log:
Nov 30 09:55:45 phantom kernel: [61181.759120] REISERFS warning (device
sda3): jdm-20002 reiserfs_xattr_get: Invalid hash for xattr
(user.pax.flags) associated with [1919251317 2019651630 0x616c662e UNKNOWN]
Nov 30 09:55:45 phantom kernel: [61181.958737] grsec: From 127.0.0.6:
denied RWX mmap of <anonymous mapping> by /sbin/grub[grub:9291]
uid/euid:0/0 gid/egid:0/0, parent /bin/bash[bash:2357] uid/euid:0/0
gid/egid:0/0
Nov 30 09:55:45 phantom kernel: [61181.959072] grsec: From 127.0.0.6:
denied resource overstep by requesting 4096 for RLIMIT_CORE against
limit 0 for /sbin/grub[grub:9291] uid/euid:0/0 gid/egid:0/0, parent
/bin/bash[bash:2357] uid/euid:0/0 gid/egid:0/0

# paxctl-ng -v /sbin/grub
/sbin/grub:
XATTR_PAX : -em--

# grep PAX /usr/src/linux/.config
CONFIG_PAX_PER_CPU_PGD=y
CONFIG_PAX_ENABLE_PAE=y
CONFIG_PAX_USERCOPY_SLABS=y
CONFIG_PAX=y
# CONFIG_PAX_SOFTMODE is not set
# CONFIG_PAX_PT_PAX_FLAGS is not set
CONFIG_PAX_XATTR_PAX_FLAGS=y
# CONFIG_PAX_NO_ACL_FLAGS is not set
CONFIG_PAX_HAVE_ACL_FLAGS=y
# CONFIG_PAX_HOOK_ACL_FLAGS is not set
CONFIG_PAX_NOEXEC=y
CONFIG_PAX_PAGEEXEC=y
CONFIG_PAX_SEGMEXEC=y
CONFIG_PAX_EMUTRAMP=y
CONFIG_PAX_MPROTECT=y
# CONFIG_PAX_MPROTECT_COMPAT is not set
# CONFIG_PAX_ELFRELOCS is not set
CONFIG_PAX_KERNEXEC=y
CONFIG_PAX_KERNEXEC_MODULE_TEXT=4
CONFIG_PAX_ASLR=y
CONFIG_PAX_RANDKSTACK=y
CONFIG_PAX_RANDUSTACK=y
CONFIG_PAX_RANDMMAP=y
CONFIG_PAX_MEMORY_SANITIZE=y
# CONFIG_PAX_MEMORY_STACKLEAK is not set
# CONFIG_PAX_MEMORY_STRUCTLEAK is not set
CONFIG_PAX_MEMORY_UDEREF=y
CONFIG_PAX_REFCOUNT=y
CONFIG_PAX_CONSTIFY_PLUGIN=y
CONFIG_PAX_USERCOPY=y
# CONFIG_PAX_USERCOPY_DEBUG is not set
# CONFIG_PAX_SIZE_OVERFLOW is not set
CONFIG_HAVE_PAX_INITIFY_INIT_EXIT=y
# CONFIG_PAX_LATENT_ENTROPY is not set

Thanks in advance for any help.
Re: Grub not working anymore (but boot does) [ In reply to ]
2016.November 30.(Sze) 10:25 időpontban subscryer@gmail.com ezt írta:
> Entirely by accident, I updated my ancient version of grub. Once I found
> out I said to myself that it would be better to update the boot stages
> but this is what happens:
>
> ~ # grub
> grub: asmstub.c:215: grub_stage2: Assertion `simstack_alloc_base !=
> ((void *) -1)' failed.
> Aborted
>
> I hadn't run grub in AGES, so I can't say what/when it broke. The good
> news is the machine still boots but I'm not in a reliable condition.
>
> equery l grub
> * Searching for grub ...
> [IP-] [ ] sys-boot/grub-0.97-r16:0
>
> Relevant kern.log:
> Nov 30 09:55:45 phantom kernel: [61181.759120] REISERFS warning (device
> sda3): jdm-20002 reiserfs_xattr_get: Invalid hash for xattr
> (user.pax.flags) associated with [1919251317 2019651630 0x616c662e
> UNKNOWN]
> Nov 30 09:55:45 phantom kernel: [61181.958737] grsec: From 127.0.0.6:
> denied RWX mmap of <anonymous mapping> by /sbin/grub[grub:9291]
> uid/euid:0/0 gid/egid:0/0, parent /bin/bash[bash:2357] uid/euid:0/0
> gid/egid:0/0
> Nov 30 09:55:45 phantom kernel: [61181.959072] grsec: From 127.0.0.6:
> denied resource overstep by requesting 4096 for RLIMIT_CORE against
> limit 0 for /sbin/grub[grub:9291] uid/euid:0/0 gid/egid:0/0, parent
> /bin/bash[bash:2357] uid/euid:0/0 gid/egid:0/0
>
> # paxctl-ng -v /sbin/grub
> /sbin/grub:
> XATTR_PAX : -em--
>

I had moved to grub2 for some time now and it works fine. Although the
syntax is different, so you have to convert your entries.

Other comments about your log messages:
- reiserfs - OMG. I recommend a system upgrade here. I would suggest ext4
rather than btrfs, though.
- 127.0.0.6 - is it a VM?

BR: Dw.
--
dr Tóth Attila, Radiológus, 06-20-825-8057
Attila Toth MD, Radiologist, +36-20-825-8057
Re: Grub not working anymore (but boot does) [ In reply to ]
Il 30/11/2016 11:01, "Tóth Attila" ha scritto:
> I had moved to grub2 for some time now and it works fine. Although the
> syntax is different, so you have to convert your entries.

I guess I'll schedule an update, it's still a pity because grub has done
its job reliably for 10 years now on this iron.

> Other comments about your log messages:
> - reiserfs - OMG. I recommend a system upgrade here. I would suggest ext4
> rather than btrfs, though.

:D
I have no love for ext4 but I understand what you mean.

> - 127.0.0.6 - is it a VM?

No, it's a small server that takes care of basic services when the vm
container is down.