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

Re: Using a Debian Live image to Invoke a Rescue Shell



Andrei POPESCU <andreimpopescu@gmail.com> writes:
> From memory, I'm aware of two methods:
> 
> 1. Any time after starting the installer, press Ctrl+F2 and there will
> be a prompt to press Enter to enable the console. Ctrl+F1 returns to the
> installer.
> 
> If using the graphical installer you will need Ctrl+Alt+F2 and Ctrl+F5
> will should get you back to the installer.
> 
> 2. Start the installer in "rescue mode". After doing some basic
> configuration it will ask you about the root and will offer to start a
> shell. For your purposes chose "open a shell in the installer
> environment", because you don't want to touch your system.
> 
> As mentioned above, this is all from memory, it's been a while since I
> used the installer.

	The Control-F2 did it although there was no prompt, at
least I didn't hear one.  The console showed a shell prompt and I
started poking around.  This was the buster image and the only
disappointment was no fdisk.  I found /dev/sda, /dev/sdb and,
after plugging in the 1 TB target drive, /dev/sdc.

	As a card-carrying coward, I made sure that /dev/sdc was
the device that wasn't there just a few seconds ago and is here
now.

	This particular PC is of the HP Pavilion family and I was
surprised to find 2 hard drives in a stack as Windows is on a
single 1 TB logical drive.  One would have had to disassemble the
system to be able to see the drives and since this is a fairly
new system as of February, 2019, it seemed prudent to take as
little apart as possible.

	My heart sank when I saw /dev/sda and /dev/sdb.  If this
is some sort of software raid, it might be that /dev/sda and
/dev/db would be parts of the system and using dd from sda to sdc
would yield a useless dump of stuff that only would be useful if
you also dumped /dev/sdb and then used some software to combine
them back to 1 drive, but read on.

	I dumped /dev/sda to /dev/sdc

dd if=/dev/sda of=/dev/sdc

After a deep breath, I hit Enter.  The dump started at about 4:30
PM and was still churning along at 9:30 last night.

When I checked on it a bit after 05:00 this morning, it had
stopped, showing the same number of records in and out and no
squawks.

	There are 5 partitions in the image and it looks like
Partition 3 is the user work space.

	After setting the debian system to be able to mount ntfs,
it mounts read-only with some complaints about it being uncleanly
mounted but one does appear to be able to read everything.

So, What was /dev/sdb?

	It's a linux image put there by the installer, I guess to
use as a virtual disk when one installs it to a new system.

	Since I don't have another 1 TB drive, I put a 128-GB
drive in and after

dd if=/dev/sdb of=/dev/sdc

as /dev/sdc was now the 128-GB drive, I got a finish after a few
minutes.  Mounting that drive, I saw the Linux image and the
README.txt file said what it was.

	I am so thankful for the fact that many linux images can
be made to boot with the screen reader able to work as I was able
to do all of this without needing anybody to look at the screen.

	The tinkering environment in Windows is still not
anywhere near as solid as it is in unix.

	About the only thing these days that is still
inaccessible on most computers that aren't enterprise servers,
etc, is the BIOS setup and selection of boot sources.  That's
still back in the stone age.

	Many thanks to everyone who helped with information.

Martin


Reply to: