[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: using debian debootstrap and chroot to login to other distro on neighbouring partition etc



On Fri, Feb 05, 2016 at 12:49:59PM +0000, Michael Fothergill wrote:
>     This is good advice, and these steps can be automated with the schroot
>     package.
> 
>     For any non-trivial operations inside your guest systems, such as
>     installing packages or running daemons, I can recommend Linux containers
>     (lxc or libvirt-lxc).
> 
> 
> I want to install openrc in an install where it can't boot up because I
> deleted it by mistake.  If I use e.g. lxc how many of the above commands do I
> need to enter into it - does it sniff out existing partitions and create
> appropriate mount points by itself etc?

lxc doesn't help if the boot process of your guest is broken.
I would recommend chroot for the repair work.
For a one-off job, schroot might not even be worth setting up.

If you want to try an lxc variant once your guest sytem is fixed:
Most of the mount commands from the chroot solution are not needed with
lxc because it runs the guest system's boot process, which mounts the
necessary filesystems based on the guest's /etc/fstab and other knowledge
hard-coded inside the guest system.

Guest machines for libvirt-lxc can be easily set up using virt-manager,
that's what I used here.
It is my understanding that plain lxc offers more features and has to be
set up manually with a config file, but I haven't used it yet.

Mirko


Reply to: