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

Re: How do I mount the USB stick containing the installer in Rescue Mode?



On Thu, Jul 15, 2021 at 10:11:06PM +0200, Stella Ashburne wrote:
> Hi
> 
> > Sent: Thursday, July 15, 2021 at 7:07 PM
> > From: "Reco" <recoverym4n@enotuniq.net>
> > To: debian-user@lists.debian.org
> > Subject: Re: How do I mount the USB stick containing the installer in Rescue Mode?
> 
> > Ok. Can you use this rescue mode to execute an ordinary shell, with full
> > access to all filesystems?
> 
> Before I proceed with your suggestion, while in Resuce Mode, do I
> enter the encryption passphrase or not? If I don't enter the password,
> /dev/perfect-vg/root won't be mounted.

You have to enter the encryption passphrase. It makes little sense to do
all this otherwise.


> Even after I've entered the encryption passphrase, there are two ways
> to execute a shell: one is to execute it in /dev/perfect-vg/root
> environment and the other is to execute it in the installer
> environment. Which environment do you want me to executve a shell in
> please?

First one definitely won't do it, so it's the "installer environment".


> What did you mean by "full access to all filesystems"? When I was
> installing Debian 11, I first encrypted a free space with LUKS and
> then created two logical volumes in it: one whose mount point is /
> (the root file system. Debian installer requires it; otherwise the
> installation can't and won't proceed.) while the other is "used as"
> swap area.

Compare the results of "mount" command from both shells. The difference
should be obvious.


> > If you're executing a shell in a
> > logical volume, you're chrooted into that filesystem.
> 
> I had to enter the encryption passphrase first, followed by mounting
> /dev/perfect-vg/root as a root file system temporarily. Then I chose
> 'Execute a shell in the installer environment' and only then would I
> be able to chroot /target

This. My suggestion is to use bind-mount before chrooting there.


> > What you actually need is to bind mount the directory with packages into
> > the mounted /dev/perfect-vg/root, and just chroot into it. No need to
> > modify /etc/fstab at all.
> >
> Could you be so nice as to give me the command(s) to bind mount the directory with packages? Thank you.

mount --bind <source_dir_with_packages> \
	/target/<target_dir_where_packages_should_be>

Reco


Reply to: