public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* Re: [gentoo-user] How to repair a 'secondary Gentoo system'
  @ 2017-12-11 19:12 99% ` Helmut Jarausch
  0 siblings, 0 replies; 1+ results
From: Helmut Jarausch @ 2017-12-11 19:12 UTC (permalink / raw
  To: gentoo-user

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





^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2017-12-11 16:58     [gentoo-user] How to repair a 'secondary Gentoo system' David Haller
2017-12-11 19:12 99% ` Helmut Jarausch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox