public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Dale <rdalek1967@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] How to repair a 'secondary Gentoo system'
Date: Mon, 11 Dec 2017 14:06:23 -0600	[thread overview]
Message-ID: <e75df4eb-8068-37fe-a255-07e938000f80@gmail.com> (raw)
In-Reply-To: <DBYDB4DM.H33UZDZF.NOJ2JSBF@4LJ2255N.JE52AS6M.VAVRWHVD>

Helmut Jarausch wrote:
> On 12/11/2017 05:58:42 PM, David Haller wrote:
>> Hello,
>>
>> On Mon, 11 Dec 2017, Helmut Jarausch wrote:
>> >But now, don't ask me why,
>> >chroot  /OtherGentoo   /bin/bash
>> >dies of a segment fault.
>> >
>> >Is there any means to repair such a Gentoo system short of
>> rebuilding it
>> >(nearly) from scratch?
>>
>> How about a bit of debugging first?
>>
>> # catchsegv chroot  /OtherGentoo   /bin/bash
>> # cd /OtherGentoo/ && chroot  /OtherGentoo/ /bin/bash
>>
>> (ISTR, there was/is a reason for first cd-ing into the chroot and then
>> chrooting with the full-path...)
>>
>> Have you (bind) mounted /sys, /dev, /proc into the chroot?
>>
>> I use this as the top and bottom of a little bit longer
>> chroot-wrapper-script:
>>
>> ==== /root/bin/chrooter ====
>> #!/bin/bash
>> root="$1"
>> shift
>>
>> test -e "${root}/proc/kcore" || mount --bind /proc/ "${root}/proc"
>> test -e "${root}/sys/block"  || mount --bind /sys/ "${root}/sys"
>> test -e "${root}/dev/root"   || mount --bind /dev/ "${root}/dev"
>> test -e "${root}/dev/pts/0"  || mount --bind /dev/pts/ "${root}/dev/pts"
>> [..]
>> cd "$root"
>> chroot "$root" /bin/bash -l
>> ====
>
> My procedure is quite similar, I only use
>
> mount --rbind /dev/ "${root}/dev"
>
> and
>
> mount --rbind /run  /${NROOT}/run
>
> ---
>
> I've tried
> catchsegv chroot  /OtherGentoo   /bin/bash
>
> as well as
>
> chroot  /OtherGentoo   catchsegv /bin/bash
>
> In both cases, I don't get any error messages BUT I don't get chrooted.
>
> Strangely enough, dmesg shows
>
> systemd-coredump[25375]: Failed to connect to coredump service: No
> such file or directory
>
> although I'm not using system but openrc on both system
>
> Thanks,
> Helmut

Just a thought.  Have you recompiled the package chroot belongs too? 
Maybe somehow the chroot file got corrupted or something and just fails
to run. 

I would also cd to your backup install and just poke around and see if
everything looks normal.  Like maybe /sbin is missing or something. 
Maybe look for some files that you know are used to chroot in, like bash
for example. 

Dale

:-)  :-) 


  parent reply	other threads:[~2017-12-11 20:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-11 16:23 [gentoo-user] How to repair a 'secondary Gentoo system' Helmut Jarausch
2017-12-11 16:58 ` David Haller
2017-12-11 19:12   ` Helmut Jarausch
2017-12-11 19:45     ` David Haller
2017-12-11 20:56       ` Rich Freeman
2017-12-11 20:06     ` Dale [this message]
2017-12-12  1:45     ` [gentoo-user] " Kai Krakow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e75df4eb-8068-37fe-a255-07e938000f80@gmail.com \
    --to=rdalek1967@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox