Gentoo Archives: gentoo-user

From: Helmut Jarausch <jarausch@××××××.be>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to repair a 'secondary Gentoo system'
Date: Mon, 11 Dec 2017 19:13:02
Message-Id: DBYDB4DM.H33UZDZF.NOJ2JSBF@4LJ2255N.JE52AS6M.VAVRWHVD
In Reply to: Re: [gentoo-user] How to repair a 'secondary Gentoo system' by David Haller
1 On 12/11/2017 05:58:42 PM, David Haller wrote:
2 > Hello,
3 >
4 > On Mon, 11 Dec 2017, Helmut Jarausch wrote:
5 > >But now, don't ask me why,
6 > >chroot /OtherGentoo /bin/bash
7 > >dies of a segment fault.
8 > >
9 > >Is there any means to repair such a Gentoo system short of
10 > rebuilding it
11 > >(nearly) from scratch?
12 >
13 > How about a bit of debugging first?
14 >
15 > # catchsegv chroot /OtherGentoo /bin/bash
16 > # cd /OtherGentoo/ && chroot /OtherGentoo/ /bin/bash
17 >
18 > (ISTR, there was/is a reason for first cd-ing into the chroot and then
19 > chrooting with the full-path...)
20 >
21 > Have you (bind) mounted /sys, /dev, /proc into the chroot?
22 >
23 > I use this as the top and bottom of a little bit longer
24 > chroot-wrapper-script:
25 >
26 > ==== /root/bin/chrooter ====
27 > #!/bin/bash
28 > root="$1"
29 > shift
30 >
31 > test -e "${root}/proc/kcore" || mount --bind /proc/ "${root}/proc"
32 > test -e "${root}/sys/block" || mount --bind /sys/ "${root}/sys"
33 > test -e "${root}/dev/root" || mount --bind /dev/ "${root}/dev"
34 > test -e "${root}/dev/pts/0" || mount --bind /dev/pts/
35 > "${root}/dev/pts"
36 > [..]
37 > cd "$root"
38 > chroot "$root" /bin/bash -l
39 > ====
40
41 My procedure is quite similar, I only use
42
43 mount --rbind /dev/ "${root}/dev"
44
45 and
46
47 mount --rbind /run /${NROOT}/run
48
49 ---
50
51 I've tried
52 catchsegv chroot /OtherGentoo /bin/bash
53
54 as well as
55
56 chroot /OtherGentoo catchsegv /bin/bash
57
58 In both cases, I don't get any error messages BUT I don't get chrooted.
59
60 Strangely enough, dmesg shows
61
62 systemd-coredump[25375]: Failed to connect to coredump service: No such
63 file or directory
64
65 although I'm not using system but openrc on both system
66
67 Thanks,
68 Helmut

Replies

Subject Author
Re: [gentoo-user] How to repair a 'secondary Gentoo system' Dale <rdalek1967@×××××.com>
Re: [gentoo-user] How to repair a 'secondary Gentoo system' David Haller <gentoo@×××××××.de>
[gentoo-user] Re: How to repair a 'secondary Gentoo system' Kai Krakow <hurikhan77@×××××.com>