mirror of
https://github.com/parchlinux/wikibackup.git
synced 2025-02-21 19:35:43 -05:00
2.5 KiB
2.5 KiB
title | description | published | date | tags | editor | dateCreated |
---|---|---|---|---|---|---|
Debian Chroot in Parch Linux | A Guide to have debian under Parch Linux | true | 2024-04-05T10:42:59.452Z | debian, parch | markdown | 2024-04-05T10:37:55.039Z |
What is a Chroot?
The chroot Linux utility can modify the working root directory for a process, limiting access to the rest of the file system.
how to have a Debian chroot inside ParchLinux?
- Install Debootstrap
sudo pacman -Sy
sudo pacman -S debootstrap
- Make a Folder inside /opt for your debian new root
sudo mkdir /opt/debian
- Set Debootstrap location and start Debootstraping :D
DEBOOTSTRAP_DIR=/opt/debootstrap/usr/share/debootstrap /opt/debootstrap/usr/sbin/debootstrap --arch amd64 bookworm /opt/debian/ http://ftp.uk.debian.org/debian/
- Note : You can change the debian version by changing the bookworm to your version codename. You can find debian codenames here.
- Mount the Directories
mount -t proc proc /opt/debian/proc/
mount -t sysfs sys /opt/debian/sys/
mount -o bind /dev /opt/debian/dev/
mount -o bind /dev/pts /opt/debian/dev/pts/
- Setup the repositories for your chrooted system
cat > /opt/debian/etc/apt/sources.list << 'EOF'
deb http://ftp.uk.debian.org/debian/ bookworm main non-free contrib
deb-src http://ftp.uk.debian.org/debian/ bookworm main non-free contrib
deb http://security.debian.org/ bookworm/updates main non-free contrib
deb-src http://security.debian.org/ bookworm/updates main non-free contrib
deb http://ftp.uk.debian.org/debian/ bookworm-updates main non-free contrib
deb-src http://ftp.uk.debian.org/debian/ bookworm-updates main non-free contrib
EOF
- Note : Change the Codename to your installed Version
- Chroot to your debian
chroot /opt/debian /bin/bash
- Upgrade the Debian and regenerate the locales:
apt-get update && apt-get dist-upgrade
apt-get install locales
dpkg-reconfigure locales
- Add a name to /etc/hosts
echo mywonderfulldebian >> /etc/hosts
Optional
- Add a new user to the chroot
apt-get install curl sudo ncurses-term
groupadd sudo
useradd -m -G sudo -s /bin/bash parch
passwd parch
- note : Replace parch with your username
- add new user to sudoers
cat > /etc/sudoers << 'EOF'
root ALL=(ALL) ALL
%sudo ALL=(ALL) ALL
EOF
- connect to your user
sudo -iu parch
or
su parch