Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 571802 - sys-apps/openrc-0.20.0 rc segfaults during boot fails before root remount (ro) to (rw)
Summary: sys-apps/openrc-0.20.0 rc segfaults during boot fails before root remount (r...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal critical with 1 vote (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
: 571962 571988 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-01-14 00:54 UTC by Derk W te Bokkel
Modified: 2016-01-15 18:40 UTC (History)
8 users (show)

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


Attachments
emerge--info (emerge-info,5.56 KB, text/plain)
2016-01-14 00:54 UTC, Derk W te Bokkel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Derk W te Bokkel 2016-01-14 00:54:11 UTC
Created attachment 422858 [details]
emerge--info

upgrade to sys-apps/openrc-0.20.0 .. reboot fails with rc segfaults

revert to openrc-0.19.1 via install/chroot boot media is necessary .. to recover

then all is normal again ..
Comment 1 William Hubbs gentoo-dev 2016-01-14 01:47:20 UTC
This is the fix for this issue:

https://github.com/openrc/openrc/commit/d4c7207
Comment 2 Nikos Chantziaras 2016-01-14 01:57:16 UTC
My system is bricked.

Any info on how to restore it? I'm currently typing this in from my Windows 8.1 installation.
Comment 3 Nikos Chantziaras 2016-01-14 02:00:02 UTC
I can get a root login, and I know how to remount "/" read-write:

mount -o remount,rw /dev/sda /

but I also need to somehow remount /dev.
Comment 4 Drew McRae 2016-01-14 02:28:16 UTC
(In reply to Nikos Chantziaras from comment #2)
> My system is bricked.
> 
> Any info on how to restore it? I'm currently typing this in from my Windows
> 8.1 installation.

Since you have access to Windows 8.1, you should be able to create a live CD. Follow the directions in the handbook to mount your drives and chroot to your install (https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation). Then, you can mask openrc-20 (/etc/portage/package.mask), and re-emerge openrc to get your system back.
Comment 5 William Hubbs gentoo-dev 2016-01-14 02:34:43 UTC
Please try 0.20.1; this should be fixed in that version.
Comment 6 Nikos Chantziaras 2016-01-14 04:40:45 UTC
(In reply to Drew McRae from comment #4)
> (In reply to Nikos Chantziaras from comment #2)
> > My system is bricked.
> > 
> > Any info on how to restore it? I'm currently typing this in from my Windows
> > 8.1 installation.
> 
> Since you have access to Windows 8.1, you should be able to create a live
> CD. Follow the directions in the handbook to mount your drives and chroot to
> your install
> (https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation). Then, you
> can mask openrc-20 (/etc/portage/package.mask), and re-emerge openrc to get
> your system back.

I don't have a CD drive. I'll need to find a USB stick somewhere.

Any chance of doing all that from the root login instead?
Comment 7 Nikos Chantziaras 2016-01-14 05:06:22 UTC
Or alternatively, can someone upload a 64-bit binary of just "rc"? I can then copy it over the segfaulting one.
Comment 8 Nikos Chantziaras 2016-01-14 07:07:07 UTC
OK, fixed it. To whoever is affected, here's how to fix it.

Login as root.

mount -o remount,rw /dev/your_root_partition /
mount -t proc none /proc
cd /root
tar xf /path/to/portage/distfiles/openrc-0.20.tar.bz2
cd openrc-0.20

Then open src/rc/rc-misc.c in a text editor (vi, mcedit, whatever you have installed). Search for "if (!sys)" (should be in line 180.) Make this text:

  if (!sys)
          sys = detect_vm();
          setenv("RC_SYS", sys, 1);

look like this:

  if (!sys)
          sys = detect_vm();
  if (sys)
          setenv("RC_SYS", sys, 1);

Save and then:

make
cp src/rc/rc /sbin/rc
rc sysinit
rc boot
rc default

finally, emerge older openrc:

emerge -1 =openrc-0.19.1
sync
reboot

Should work now. Do an emerge --sync to get openrc-0.20.1 which works.
Comment 9 Xavier Miller (RETIRED) gentoo-dev 2016-01-14 08:12:54 UTC
Hi!

I don't see any segfault but the init process is frozen to "OpenRC 0.20 is starting up".

I use a custom initramfs to mount / from a LUKS configuration.

Is it related?
Comment 10 Xavier Miller (RETIRED) gentoo-dev 2016-01-14 08:46:18 UTC
(In reply to William Hubbs from comment #5)
> Please try 0.20.1; this should be fixed in that version.

This version is OK for me.
Comment 11 Derk W te Bokkel 2016-01-14 11:06:50 UTC
can confirm newer version openrc-0.20.1 works for my system..
Comment 12 SpanKY gentoo-dev 2016-01-15 18:40:45 UTC
*** Bug 571962 has been marked as a duplicate of this bug. ***
Comment 13 SpanKY gentoo-dev 2016-01-15 18:40:59 UTC
*** Bug 571988 has been marked as a duplicate of this bug. ***