I am attempting to update a broken Linux Mint 32 bit installation using chroot from a live cd. Different websites give different folders that need to be mounted before
The error I am trying to solve is here What folders to mount and why?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
well; gentoo wiki is very nice in that respect; (assuming that you are booted to working environment like livecd/usb) first we assume your chroot system is on /dev/sdaX. so we go mount it:
mkdir -p /mnt/distro mount /dev/sdaX /mnt/distro
if your chroot (problematic environment) has seprate
/var or any other partitions we mount them like above.
root #mount -o bind /proc /mnt/distro/proc
then depend on what kind of system you are building (systemd or init ):
root #mount --rbind /sys /mnt/distro/sys root #mount --make-rslave /mnt/distro/sys root #mount --rbind /dev /mnt/distro/dev root #mount --make-rslave /mnt/distro/dev
if youare building init-based system like
OpenRc don't do
then to chroot in a right way do this:
root #chroot /mnt/distro /bin/env -i TERM=$TERM /bin/bash root #source /etc/profile root #export PS1="(chroot) $PS1"
Note; that your chroot environment may differ and
there. so it should be at