<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=3034&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Devuan and chroot]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=3034</link>
		<description><![CDATA[The most recent posts in Devuan and chroot.]]></description>
		<lastBuildDate>Tue, 03 Sep 2019 11:54:22 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Devuan and chroot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17656#p17656</link>
			<description><![CDATA[<p># ls -l /mnt/lib64/ld-linux-x86-64.so.2<br />lrwxrwxrwx 1 root root 32 Jan 14&#160; 2018 /mnt/lib64/ld-linux-x86-64.so.2 -&gt; /lib/x86_64-linux-gnu/ld-2.24.so</p><p># ls -l /mnt/lib/x86_64-linux-gnu/libtinfo.so.5<br />ls: cannot access &#039;/mnt/lib/x86_64-linux-gnu/libtinfo.so.5&#039;: No such file or directory</p><p># ls -l /mnt/lib/x86_64-linux-gnu/libdl.so.2<br />ls: cannot access &#039;/mnt/lib/x86_64-linux-gnu/libdl.so.2&#039;: No such file or directory</p><p># ls -l /mnt/lib/x86_64-linux-gnu/libc.so.6<br />ls: cannot access &#039;/mnt/lib/x86_64-linux-gnu/libc.so.6&#039;: No such file or directory</p><p># ls -l /mnt/bin/bash<br />-rwxr-xr-x 1 root root 1099016 May 15&#160; 2017 /mnt/bin/bash</p><p>Doesnt look right. Dont know why they are missing. I guess I will have to find them and link them back or something.</p>]]></description>
			<author><![CDATA[dummy@example.com (devuanuser)]]></author>
			<pubDate>Tue, 03 Sep 2019 11:54:22 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17656#p17656</guid>
		</item>
		<item>
			<title><![CDATA[Re: Devuan and chroot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17655#p17655</link>
			<description><![CDATA[<p>Interesting. Possibly a reinstall would make your problem go away; it tends to work on Windows, so why not with Linux ;D</p><p>I just verified that in order to chroot into a directory /BLAH you only need 5 files:</p><div class="codebox"><pre><code>/BLAH/bin/bash
/BLAH/lib/x86_64-linux-gnu/libtinfo.so.5
/BLAH/lib/x86_64-linux-gnu/libc.so.6
/BLAH/lib/x86_64-linux-gnu/libdl.so.2
/BLAH/lib64/ld-linux-x86-64.so.2</code></pre></div><p>So, getting tedious: check that the files concerned are not links that points out of <span class="bbc">/mnt</span>:</p><div class="codebox"><pre><code># ls -l /mnt/lib64/ld-linux-x86-64.so.2
# ls -l /mnt/lib/x86_64-linux-gnu/libtinfo.so.5
# ls -l /mnt/lib/x86_64-linux-gnu/libdl.so.2
# ls -l /mnt/lib/x86_64-linux-gnu/libc.so.6
# ls -l /mnt/bin/bash</code></pre></div><p>The first one in particular might point to <span class="bbc">/lib/x86_64-linux-gnu/ld-2.24.so</span> (or something) and maybe <span class="bbc">/mnt/lib/x86_64-linux-gnu/ld-2.24.so</span> (or something) is missing. That could explain why it &quot;looks right&quot; in the prior checks, without actually being right under <span class="bbc">chroot</span>.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Tue, 03 Sep 2019 11:12:53 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17655#p17655</guid>
		</item>
		<item>
			<title><![CDATA[Re: Devuan and chroot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17652#p17652</link>
			<description><![CDATA[<p>You can be rude, sometimes good and clever people make stupid mistakes, but so far I didnt.</p><p># ls -lL /mnt/lib64/ld-linux-x86-64.so.2<br />-rwxr-xr-x 1 root root 153288 Feb&#160; 6&#160; 2019 /mnt/lib64/ld-linux-x86-64.so.2</p><p>Maybe I should just reinstall. Maybe that installation has been hit by a god-particle.</p>]]></description>
			<author><![CDATA[dummy@example.com (devuanuser)]]></author>
			<pubDate>Tue, 03 Sep 2019 09:51:12 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17652#p17652</guid>
		</item>
		<item>
			<title><![CDATA[Re: Devuan and chroot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17651#p17651</link>
			<description><![CDATA[<p>Hmm. The problem obviously has little to do <span class="bbc">bash</span> as such, but with the attempt to run a dynamic 64bit binary. You are sure the sda6 OS is 64 bit as well? For example, that there is a <span class="bbc">/lib64</span> directory?</p><p>It feels &quot;rude&quot; to ask, but one of the main causes for this problem is simply that one attempts to run with a 64 bit kernel inside a 32 bit OS file system. I missed on confirming before, that you have: </p><div class="codebox"><pre><code># ls -lL /mnt/lib64/ld-linux-x86-64.so.2</code></pre></div><p>Let&#039;s get past this one ....</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Tue, 03 Sep 2019 09:30:24 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17651#p17651</guid>
		</item>
		<item>
			<title><![CDATA[Re: Devuan and chroot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17650#p17650</link>
			<description><![CDATA[<p># chroot /mnt ls <br />chroot: failed to run command ‘ls’: No such file or directory</p><p>but I can cd into /mnt and do an ls and it works, so it must be a problem with chroot itself.</p><p>Again&quot; Remember, these are Vanilla installs. The only thing that has been done after install is apt update &amp; apt upgrade.<br />That is it.</p><p>I want to use Devuan on my rackservers and is currently testing it. I like it very much as I got rid of all the enormous systemD related problems by using it, but chroot is unfortunately crucial to work.<br />Does it actually work on anyone elses latest Devuan install ? I did list my distro details in an earlier post for reference</p>]]></description>
			<author><![CDATA[dummy@example.com (devuanuser)]]></author>
			<pubDate>Tue, 03 Sep 2019 08:40:43 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17650#p17650</guid>
		</item>
		<item>
			<title><![CDATA[Re: Devuan and chroot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17646#p17646</link>
			<description><![CDATA[<p>Yes, it *should* work. But it doesn&#039;t <img src="http://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>I guess you verified that the libs are available:</p><div class="codebox"><pre><code># ls -lL /mnt/lib/x86_64-linux-gnu/libtinfo.so.5
# ls -lL /mnt/lib/x86_64-linux-gnu/libdl.so.2
# ls -lL /mnt//lib/x86_64-linux-gnu/libc.so.6</code></pre></div><p>Does something else work? Eg<br /><span class="bbc"># chroot /mnt ls </span></p><p>... it&#039;s gradually rising to be a &quot;peculiar&quot; problem ...</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Tue, 03 Sep 2019 03:08:57 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17646#p17646</guid>
		</item>
		<item>
			<title><![CDATA[Re: Devuan and chroot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17645#p17645</link>
			<description><![CDATA[<p>I already confirmed that # /mnt/bin/bash&#160; &#160;executes without returning an error in my previous posts.</p><p># ldd /mnt/bin/bash<br />&#160; &#160; linux-vdso.so.1 (0x00007ffc7798e000)<br />&#160; &#160; libtinfo.so.5 =&gt; /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fda49c9b000)<br />&#160; &#160; libdl.so.2 =&gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fda49a97000)<br />&#160; &#160; libc.so.6 =&gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007fda496f8000)<br />&#160; &#160; /lib64/ld-linux-x86-64.so.2 (0x00007fda49ec5000)</p><p>For the record remember these are vanilla installations of Devuan.<br />No alterations. Both are identical</p><p># cat /etc/*lease*<br />PRETTY_NAME=&quot;Devuan GNU/Linux ascii&quot;<br />NAME=&quot;Devuan GNU/Linux&quot;<br />ID=devuan<br />ID_LIKE=debian<br />HOME_URL=&quot;https://www.devuan.org/&quot;<br />SUPPORT_URL=&quot;https://devuan.org/os/community&quot;<br />BUG_REPORT_URL=&quot;https://bugs.devuan.org/&quot;</p><p># cat /proc/version<br />Linux version 4.9.0-9-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.168-1+deb9u4 (2019-07-19)</p>]]></description>
			<author><![CDATA[dummy@example.com (devuanuser)]]></author>
			<pubDate>Tue, 03 Sep 2019 01:52:49 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17645#p17645</guid>
		</item>
		<item>
			<title><![CDATA[Re: Devuan and chroot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17644#p17644</link>
			<description><![CDATA[<p>That looks good. I would then confirm the executable by running it</p><div class="codebox"><pre><code>/mnt/bin/bash</code></pre></div><p>When that looks fine, your problem have risen to the level of &quot;intricate&quot; <img src="http://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>The next is to confirm its dynamically linked libraries, which starts by checking which they are in the current root, and then verify that they are all present within <span class="bbc">/mnt</span>. Use <span class="bbc">ldd /mnt/bin/bash</span>.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Mon, 02 Sep 2019 22:19:00 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17644#p17644</guid>
		</item>
		<item>
			<title><![CDATA[Re: Devuan and chroot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17642#p17642</link>
			<description><![CDATA[<p>Nope the file system is intact and it has an executable /bin/bash</p><p>/dev/sdb6&#160; &#160; &#160; &#160;11468016 2111548&#160; &#160;8754204&#160; 20% /mnt</p><p>root@blinc:~# ls -l /mnt/bin/bash<br />-rwxr-xr-x 1 root root 1099016 May 15&#160; 2017 /mnt/bin/bash</p><p>I can even execute /mnt/bin/bash<br />and it complees without error.<br />Perfectly working.</p>]]></description>
			<author><![CDATA[dummy@example.com (devuanuser)]]></author>
			<pubDate>Mon, 02 Sep 2019 21:56:18 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17642#p17642</guid>
		</item>
		<item>
			<title><![CDATA[Re: Devuan and chroot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17641#p17641</link>
			<description><![CDATA[<p>Apparently <span class="bbc">sda6</span> does not contain a complete file system, and in particular it doesn&#039;t have an executable program <span class="bbc">/bin/bash</span>.</p><p>I suggest you investigate this directly after the first mount command, which makes the file system of <span class="bbc">sda6</span> available under <span class="bbc">/mnt</span>.</p><p>All the other commands (except <span class="bbc">chroot</span>) are just extra noise here, and they serve no purpose for you being able to change the root file system for a process.</p><p>So the investigation sequence would be two commands, with the first one optional (if you have doen it already):</p><div class="codebox"><pre><code># mount /dev/sda6 /mnt
# ls -l /mnt/bin/bash</code></pre></div><p>Consistently with the <span class="bbc">chroot</span> error you may get the result:</p><div class="codebox"><pre><code>ls: cannot access &#039;/mnt/bin/bash&#039;: No such file or directory</code></pre></div><p>or you may get something else, which in any case should provide something for understanding the <span class="bbc">chroot</span> error report.</p><p>Later, when you have sorted out your chroot problem, you return to also use the other commands, when/if you need access to those virtual file system components.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Mon, 02 Sep 2019 21:49:32 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17641#p17641</guid>
		</item>
		<item>
			<title><![CDATA[Re: Devuan and chroot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17640#p17640</link>
			<description><![CDATA[<p>This pc dont have efi enabled bios, it is legacy..<br />Yes you guessed right, I have to run grub on that partition.</p><p>BTW, that error message about /bin/bash must be a bug with chroot. /bin/bash clearly exists.<br />It is a bug misreporting an error now for years and they never fix it.</p>]]></description>
			<author><![CDATA[dummy@example.com (devuanuser)]]></author>
			<pubDate>Mon, 02 Sep 2019 21:42:21 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17640#p17640</guid>
		</item>
		<item>
			<title><![CDATA[Re: Devuan and chroot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17639#p17639</link>
			<description><![CDATA[<div class="quotebox"><cite>devuanuser wrote:</cite><blockquote><div><p>In my case system is /dev/sdb3 and target to chroot to is /dev/sdb6</p><p>root@blinc:~# mount /dev/sdb6 /mnt<br />root@blinc:~# mkdir -p /mnt/boot/efi&#160; <br />root@blinc:~# mount /dev/sdb3 /mnt/boot/efi<br />root@blinc:~# mount --bind /dev /mnt/dev<br />root@blinc:~# mount --bind /proc /mnt/proc<br />root@ginc:~# mount --bind /sys /mnt/sys<br />root@blinc:~# chroot /mnt&#160; <br />chroot: failed to run command ‘/bin/bash’: No such file or directory</p><p>Note: These are fresh unaltered Devuan installs.</p></div></blockquote></div><p>Are you sure about your EFI partition? It&#039;s generally (always?) partition 1...</p><p>Not sure you need to mount the EFI partition, depending on what you&#039;re chrooting to do - I always mount it because I&#039;m often reinstalling grub or something like that...</p>]]></description>
			<author><![CDATA[dummy@example.com (sgage)]]></author>
			<pubDate>Mon, 02 Sep 2019 21:40:24 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17639#p17639</guid>
		</item>
		<item>
			<title><![CDATA[Re: Devuan and chroot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17637#p17637</link>
			<description><![CDATA[<p>In my case system is /dev/sdb3 and target to chroot to is /dev/sdb6</p><p>root@blinc:~# mount /dev/sdb6 /mnt<br />root@blinc:~# mkdir -p /mnt/boot/efi&#160; <br />root@blinc:~# mount /dev/sdb3 /mnt/boot/efi<br />root@blinc:~# mount --bind /dev /mnt/dev<br />root@blinc:~# mount --bind /proc /mnt/proc<br />root@ginc:~# mount --bind /sys /mnt/sys<br />root@blinc:~# chroot /mnt&#160; <br />chroot: failed to run command ‘/bin/bash’: No such file or directory</p><p>Note: These are fresh unaltered Devuan installs.<br />also, if you dont give the command field to chroot then it assumes that bash is in /bin/bash you give the command argument if bash is somewhere else than that.<br />In this case bash IS in /bin/bash. so both our chroot commands are basically the same.</p>]]></description>
			<author><![CDATA[dummy@example.com (devuanuser)]]></author>
			<pubDate>Mon, 02 Sep 2019 21:30:46 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17637#p17637</guid>
		</item>
		<item>
			<title><![CDATA[Re: Devuan and chroot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17633#p17633</link>
			<description><![CDATA[<div class="quotebox"><cite>devuanuser wrote:</cite><blockquote><div><p>Somehow my usual chroot tricks dont work on Devuan.</p><p>I have two Devuan installations on the same disk.<br />One on /dev/sdb3 and another on /dev/sdb6</p><p>I want to chroot devuan on /dev/sdb6 while I am in devuan on /dev/sdb3</p><p>While I am root user in Devuan on /dev/sdb3 I do.</p><p>mount /dev/sdb6 /sdb6<br />mount -t proc none /sbd6/proc<br />mount -t proc none /sdb6/proc<br />mount --rbind /sys /sdb6/sys<br />mount --rbind /dev /sdb6/dev<br />chroot /sdb6 /bin/bash</p><p>I now get<br />chroot: failed to run command ‘/bin/bash’: No such file or directory</p><p>Why doesnt this work in Devuan ?<br />It worked on Debian</p></div></blockquote></div><p>I have never added &#039;/bin/bash&#039; to the chroot command - I just use chroot (location of mounted system), and have never had a problem.</p><p>My formula goes like this (system on sda5):</p><div class="codebox"><pre><code>sudo mount /dev/sda5 /mnt  

sudo mkdir -p /mnt/boot/efi          
sudo mount /dev/sda1 /mnt/boot/efi   

sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

sudo chroot /mnt  </code></pre></div><p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;</p><p>It&#039;s never failed me (yet).</p>]]></description>
			<author><![CDATA[dummy@example.com (sgage)]]></author>
			<pubDate>Mon, 02 Sep 2019 21:09:09 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17633#p17633</guid>
		</item>
		<item>
			<title><![CDATA[Re: Devuan and chroot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17630#p17630</link>
			<description><![CDATA[<p>Hi thanks.<br />This doesnt work at all sorry, .mount -t proc none proc can never work<br />&#039;Yes I copied it double.from my terminal<br />/bin/bash is command to be executed in target installation.<br />Used to work flawlessly.</p><p>And..<br /># ls /bin/chroot<br />ls: cannot access &#039;/bin/chroot&#039;: No such file or directory </p><p># whereis chroot<br />chroot: /usr/sbin/chroot /usr/share/man/man8/chroot.8.gz</p><p>So the commands you posted are for a completely different system than Devuan.</p>]]></description>
			<author><![CDATA[dummy@example.com (devuanuser)]]></author>
			<pubDate>Mon, 02 Sep 2019 20:50:28 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17630#p17630</guid>
		</item>
	</channel>
</rss>
