Re: About chroot
On Thu, Aug 25, 2005 at 06:11:09PM -0400, Tong wrote: > Hi, > > Several questions about chroot. > > - I need to chroot into an alien system. I.e., I need to chroot into a 2.6 > kernel from my 2.4 kernel. Is that ok? > No, you chroot into a directory, not a kernel. You may need something like User Mode Linux or qemu. > - I heard all the fuzz about un/mounting the /proc, but I can't find any > documents on that. Can somebody explains me why it is so critical, or give > me a link to refer to please? > If you don't have a /proc inside the chroot, you can't use ps or other commands that need /proc. > - I need to apt-get from the chrooted system. but on my 1st attempt, I > was not able to connect to outside, even ping. But all the documents I > read (I'm remastering a live CD) didn't mention anything about the > connection problem. Have I neglect something, or there is something to do > before I can connect? > Did you have /etc/hosts and /etc/resolv.conf in the chrooted system? You might also use "apt-get -c" with a separate apt.conf file (man apt.conf, look for Dir::) -- Knowledge, sir, should be free to all! -- Harry Mudd, "I, Mudd", stardate 4513.3 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: About chroot
On 8/25/05, Tong <[EMAIL PROTECTED]> wrote: > Hi, > > Several questions about chroot. > > - I need to chroot into an alien system. I.e., I need to chroot into a 2.6 > kernel from my 2.4 kernel. Is that ok? chroot cannot change kernels. It is, however, safe to chroot into the root filesystem of a system which normally runs a different kernel version. > - I heard all the fuzz about un/mounting the /proc, but I can't find any > documents on that. Can somebody explains me why it is so critical, or give > me a link to refer to please? /proc is a virtual filesystem which many programs expect and/or need to be mounted. If you don't have it mounted, things like 'ps' will fail. You can mount it by running in the chroot: mount -t proc proc /proc And to unmount just: umount /proc If you don't unmount /proc, you won't be able to unmount the filesystem it's mounted under. > - I need to apt-get from the chrooted system. but on my 1st attempt, I > was not able to connect to outside, even ping. But all the documents I > read (I'm remastering a live CD) didn't mention anything about the > connection problem. Have I neglect something, or there is something to do > before I can connect? Try copying /etc/resolv.conf from your host system to the chroot's etc/resolv.conf.
Re: About chroot
2005/8/25, Tong <[EMAIL PROTECTED]>: > Hi, > > Several questions about chroot. > > - I need to chroot into an alien system. I.e., I need to chroot into a 2.6 > kernel from my 2.4 kernel. Is that ok? it depends on what you're gonna do. chroot will change your /, but the system will be the same. modprobe won't work in the chrooted 'alien' system because it will look for modules on the chrooted /lib/modules/`uname -r`/ and will find 2.6 modules, that wont fit your 2.4 kernel. > > - I heard all the fuzz about un/mounting the /proc, but I can't find any > documents on that. Can somebody explains me why it is so critical, or give > me a link to refer to please? hmm i know nothing about it as well, sorry > > - I need to apt-get from the chrooted system. but on my 1st attempt, I > was not able to connect to outside, even ping. But all the documents I > read (I'm remastering a live CD) didn't mention anything about the > connection problem. Have I neglect something, or there is something to do > before I can connect? > maybe you just need to edit /etc/resolve.conf in the chrooted /etc in order to fit your dns server?! i guess that's all good luck ;)
About chroot
Hi, Several questions about chroot. - I need to chroot into an alien system. I.e., I need to chroot into a 2.6 kernel from my 2.4 kernel. Is that ok? - I heard all the fuzz about un/mounting the /proc, but I can't find any documents on that. Can somebody explains me why it is so critical, or give me a link to refer to please? - I need to apt-get from the chrooted system. but on my 1st attempt, I was not able to connect to outside, even ping. But all the documents I read (I'm remastering a live CD) didn't mention anything about the connection problem. Have I neglect something, or there is something to do before I can connect? thanks a lot! tong -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]