SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to upgrade Debian sid from Slackware using chroot. Here is the set of commands that I use:
Code:
mount /sid
mount --bind /proc /sid/proc
mount --bind /sys /sid/sys
mount --bind /dev /sid/dev
mount --bind /dev/pts /sid/dev/pts
chroot /sid
It seems that doesn't have access to my internet connection. Here is the output:
Code:
Err:1 http://debian.asis.io/debian sid InRelease
Temporary failure resolving 'debian.asis.io'
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
W: Failed to fetch http://debian.asis.io/debian/dists/sid/InRelease Temporary failure resolving 'debian.asis.io'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Is there any other directory that should be mounted before chroot command?
I'm trying to upgrade Debian sid from Slackware using chroot. Here is the set of commands that I use:
Code:
mount /sid
mount --bind /proc /sid/proc
mount --bind /sys /sid/sys
mount --bind /dev /sid/dev
mount --bind /dev/pts /sid/dev/pts
chroot /sid
It seems that doesn't have access to my internet connection. Here is the output:
Code:
Err:1 http://debian.asis.io/debian sid InRelease
Temporary failure resolving 'debian.asis.io'
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
W: Failed to fetch http://debian.asis.io/debian/dists/sid/InRelease Temporary failure resolving 'debian.asis.io'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Is there any other directory that should be mounted before chroot command?
Copy your /etc/resolv.conf into your /sid/etc/ directory. That's what I do for my Slackware boxes.
Worked, many thanks. Is this work for Slackware when I am on Debian too?
Correct! It will work. However, I wrote this script because Slackware expects for certain things to run at boot, which obviously don't occur when using chroot. From the bits and pieces of things that I have found online, I came up with something like this:
Code:
#!/bin/bash
# These GTK+/pango files need to be kept up to date for
# proper input method, pixbuf loaders, and font support.
if [ -x /usr/bin/update-gtk-immodules ]; then
echo "Updating gtk.immodules:"
echo " /usr/bin/update-gtk-immodules &"
/usr/bin/update-gtk-immodules > /dev/null 2>&1 &
fi
if [ -x /usr/bin/update-gdk-pixbuf-loaders ]; then
echo "Updating gdk-pixbuf.loaders:"
echo " /usr/bin/update-gdk-pixbuf-loaders &"
/usr/bin/update-gdk-pixbuf-loaders > /dev/null 2>&1 &
fi
if [ -x /usr/bin/update-pango-querymodules ]; then
echo "Updating pango.modules:"
echo " /usr/bin/update-pango-querymodules &"
/usr/bin/update-pango-querymodules > /dev/null 2>&1 &
fi
if [ -x /usr/bin/glib-compile-schemas ]; then
echo "Compiling GSettings XML schema files:"
echo " /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas &"
/usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas >/dev/null 2>&1 &
fi
update-ca-certificates -f
ldconfig
I run that script as soon as I chroot.sh into my environment as root. I know that for sure you need to run update-ca-certificates -f because otherwise, wget will complain about https certificates. An annoying problem if you are building packages inside your chroot.
Last edited by stormtracknole; 12-19-2017 at 12:21 PM.
Reason: spelling
No, it didn't work for Slackware. I tried your script too. Slackware couldn't access to internet from Debian.
Wait, so the host is Debian or Slackware? Something that I have different from you, but not sure that it matters is:
Code:
mount -t proc /proc /sid/proc
Did you make sure that /etc/resolv.conf was copied correctly? You can manually edit it to test things around. I have to say that I have never tested my chroot setup under a different OS other than Slackware. So, quite possibly, Debian could be doing something different with networking.
It works for chrooting to Debian but not vice versa. However, I barely touch that Debian partition, so by your instruction I can upgrade it from Slackware. Thanks again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.