* Re: [gentoo-user] How to repair a 'secondary Gentoo system'
@ 2017-12-11 20:06 99% ` Dale
0 siblings, 0 replies; 1+ results
From: Dale @ 2017-12-11 20:06 UTC (permalink / raw
To: gentoo-user
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
:-) :-)
^ 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 19:12 [gentoo-user] How to repair a 'secondary Gentoo system' Helmut Jarausch
2017-12-11 20:06 99% ` Dale
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox