ltsp-chroot

From LTSPedia
Jump to: navigation, search

When chrooting into the client, you don't have your package tree in the client chroot by default. In the installation, the server package tree (among others) is bind mounted in the client tree, which means the client chroot actually uses the server's copied package tree. The command ltsp-chroot can be used to chroot into a specified chroot.

Usage

By default it chroots into /opt/ltsp/<arch> and mounts nothing. Default behavior can be changed by using the ltsp-chroot.conf file, or by using command line arguments. The following example mounts the package dirs and chroots into /opt/ltsp-dev/amd64.

root@server #ltsp-chroot -a amd64 -b /opt/ltsp-dev --mount-package-cache

Developer-24x24.png Extensions

Typically mounting the package cache is distribution specific. This function typically bind mounts the server directories containing the available packages. The mount_package_cache() function can be defined in the distro specific extension for ltsp-chroot.

Example

/usr/share/ltsp/ltsp-chroot-functions
 # Gentoo-specific function overrides for ltsp-chroot
 
 mount_package_cache() {
    mark_mount --bind /usr/portage "$ROOT/usr/portage"
    mark_mount --bind "/usr/portage/packages/${ARCH}" "$ROOT/usr/portage/packages"
    # remove if ltsp ever in portage tree
    mark_mount --bind "/var/lib/layman" "$ROOT/var/lib/layman"
 }
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox