[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: chroot doesn't work, among other things.





On 05/08/06, Roger Leigh <rleigh@whinlatter.ukfsn.org > wrote:
"David R. Litwin" <presently42@gmail.com> writes:

> On 04/08/06, Roger Leigh < rleigh@whinlatter.ukfsn.org > wrote:
>
>     >     Also, install strace, and run "strace -f -F -o /tmp/log chroot
>     >     /mnt/hda3" and check the results of the log.  Put it up for download
>     >     somewhere, and we can take a look at it.
>     >
>     > http://pastebin.ca/115013
>
>     It's failing after executing /bin/bash, during bash startup.
>
> This makes sense as when I boot in to that partition, it stops and
> drops me to an ash cli.

At what point?

After checking a bit, I don't think it's ash. I think it is bash. The point is right after it the fsck.xfs quits with error eight (I think eight).
However, I have checked the file system and it is clean. I don't even know how it is possible for  fsck.xfs to quite with an error seeing
as it litterally doesn't do any thing at all. 

If the chrooted system is broken in some way, that's where you should
look first.  chroot(8) on the host Debian system is working correctly,
so what you need to do next is discover the cause of the FPE on the
chrooted system.

I agree. There is clearly some thing very wrong on the hda3 partition. 

You may need to install the debugging versions of the libs bash uses
(including libc6-dbg) and set LD_LIBRARY_PATH=/usr/lib/debug.  You can
then use strace, ltrace and gdb to further investigate what is
triggering this problem.

Before doing this, I wish to recount a large development. I tried this morning to do _anything_ in what I thought to be the ash 
cli. This is why I think it is bash: I tried dpkg --configure -a and it said _bash_ couldn't find some folder or other since it wasn't in $PATH. I put the  folder in to $PATH and aha! dpkg had error. This must stem from the problem. If you recall (I had better have mentioned this. If not, I'm a real dolt), this all started when I was trying to apt-get dist-upgrade my system, as usuall, but right after I fixed the recent xfs bug. As I was doing this, my system froze utterly and I had to do a hard reboot. Well, now dpkg --configure -a is giving this:

Setting up [x] ...
dpkg (subprocess): unable to execute post-installation script: Exec format error
dpkg: error processing [x] (--configure)
     Subprocess post-installation script returned error exit status 2

. I googled a bit and came accross a posing on some thread saying that when this happens, go for a --dpkg --purge (or --force-depends, if need be) [x]. So I did for those ten packages that were'nt fully installed. Heyho! I got rid of them and reinstalled them, save one, libsnmp9, but it doesn't really matter any way. Now, I can boot in to the system. I can also startx; but only if, from single-user mode I give the root password and then startx. If I let the boot-up process complete, even if after I have used X, it starts x, promisingly, I see the X cursor then the normal black cursor... then it drops me back to tty1, I can't access tty7 via the normal ctrl+alt+F7 and, strangest of all, I can't _stay_ logged in. If I log in as root or user, once the standard login text has been written, it asks me to login again, thus indicating that I've been logged out. That is odd; I've never even heard of that before. That is why I tried the single-user mode login and startx, which works.

So, there you have it. Now what?


>     The chroot command itself completed successfully, as you can
>     see.  Please try mounting procfs on /proc inside the chroot
>     location and see if this makes any difference.
>
>
> I don't believe I know how to do what you wish me to do. Is this it:
> mount -t proc /dev/hda3/proc /mnt/hda3 ?

No.  Try

# mount -t proc proc /mnt/hda3/proc

(after you have mounted /dev/hda3 on /mnt/hda3)


Regards,
Roger

--
  .''`.  Roger Leigh
: :' :  Debian GNU/Linux             http://people.debian.org/ ~rleigh/
`. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge .net/
   `-    GPG Public Key: 0x25BFB848   Please sign and encrypt your mail.





--
—A watched bread-crumb never boils.
—My hover-craft is full of eels.
—[...]and that's the he and the she of it.
Reply to: