Re: Incorrect password Debian 10.8 after installation
On Mon 08 Feb 2021 at 18:26:22 (-0800), David Christensen wrote:
> On 2021-02-08 15:15, David Wright wrote:
> > On Mon 08 Feb 2021 at 13:02:21 (-0800), David Christensen wrote:
> > > On 2021-02-08 00:40, Marco Möller wrote:
> > >
> > > > You could bypass any password request during boot to the console
> > > > and then fix it by setting the desired password newly. The boot
> > > > parameter for bypassing all password request an right away
> > > > becoming logged in as user root is:
> > > > init=/sbin/sulogin --force
> > >
> > > That is interesting. But, how does the reader *use* that information[?] ...
>
> > > Booting a Stretch system, I see a menu:
> > >
> > > GNU GRUB version 2.02~beta3-5+deb9u2
> > >
> > > *Debian GNU/Linux
> > > Advanced options for Debian GNU/Linux
>
> > > If I press 'e', it (GRUB?) appears to bring up an editor window that
> > > contains a bunch of content that looks relevant. The last few lines
> > > are:
> > >
> > > ....
> > > echo 'Loading Linux 4.9.0-9-amd64 ...'
> > > linux /vmlinuz-4.9.0-9-amd64 root=UUID=... ro noresume
> > > echo 'Loading initial ramdisk ...'
> > > initrd /initrd.img-4.9.0-9-amd64
> >
> > … and that's the menu version of the commands outlined in 5.3.2.
>
> > Yes, [add the suggested parameters]to the linux line: it's a kernel parameter.
>
> > > Where is this documented?
> >
> > I always go to
> >
> > https://www.kernel.org/doc/html/v4.15/admin-guide/kernel-parameters.html
> >
> > (where v4.15 could be different).
> >
> > init= [KNL]
> > Format: <full_path>
> > Run specified binary instead of /sbin/init as init process.
> >
> > where KNL confirms it's a Kernel parameter. The introduction shows:
> >
> > BUGS= Relates to possible processor bugs on the said processor.
> > KNL Is a kernel start-up parameter.
> > BOOT Is a boot loader parameter.
>
> Thank you for the information. :-)
> But, it still does not answer the question -- how does the reader
> *use* the suggested "boot parameter"?
>
> My WAG (untested):
>
> 1. Power up the computer.
> 2. The GRUB menu should be displayed:
>
> *Debian GNU/Linux
> Advanced options for Debian GNU/Linux
>
> 3. Press the down arrow key to highlight "Advanced options for Debian
> GNU/Linux". Press <Enter> to select it.
If you're heading for sulogin, I'm not sure it matters which line you
pick, as it means s(ingle)u(se)rlogin.
> 4. A second GRUB menu should be displayed (the OP should have a newer
> kernel):
Yes, you warned us you're using stretch.
> *Debian GNU/Linux, with Linux 4.9.0-9-amd64
> Debian GNU/Linux, with Linux 4.9.0-9-amd64 (recovery mode)
>
> 5. Press the down arrow key to select the "... (recovery mode)" boot
> entry. Press 'e' to edit it.
>
> 6. The GRUB editor should start and display the contents of the
> selected boot entry. Look for the line that begins with 'linux'. Use
> the cursor keys to move the insertion point to the end of that line
> and add the following kernel boot parameters:
>
> init=/sbin/sulogin --force
>
> 7. "Press Ctrl+x or F10 to boot".
>
> Is the above correct?
Yes. AIUI --force deals with the case where there is no root
password/the root account is locked. But my understanding might be
faulty as I always set a root password in decades-old tradition.
As a result, I'm always prompted for a password. To reset *that*,
I'd either boot up my other system on the disk, or boot from a
stick/CD.
> Questions:
>
> 1. How do I make a copy of a boot entry? (So that I can edit the
> copy and keep the original.)
>
> 2. How do I insert a tab character with the GRUB editor? (Pressing
> <Tab> causes the editor to attempt command completion.)
I think Greg's guess was good. You don't need tabs or any other cosmetics.
> 3. Will changes made to a boot entry with the GRUB editor persist for
> subsequent boots?
No. Just write down what you change, so that you can fold it in to your
Grub configuration later if it worked.
Cheers,
David.
Reply to: