Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #231479 > unrolled thread

Incorrect password Debian 10.8 after installation

Started byJohn Berden <john.berden4@gmail.com>
First post2021-02-08 03:50 +0100
Last post2021-02-10 00:00 +0100
Articles 20 — 12 participants

Back to article view | Back to linux.debian.user


Contents

  Incorrect password Debian 10.8 after installation John Berden <john.berden4@gmail.com> - 2021-02-08 03:50 +0100
    Re: Incorrect password Debian 10.8 after installation Andrei POPESCU <andreimpopescu@gmail.com> - 2021-02-08 09:30 +0100
    Re: Incorrect password Debian 10.8 after installation Marco Möller <talby@debianlists.mobilxpress.net> - 2021-02-08 09:50 +0100
      Re: Incorrect password Debian 10.8 after installation Keith Bainbridge <ke1thrboz@gmx.com> - 2021-02-08 10:50 +0100
      Re: Incorrect password Debian 10.8 after installation David Christensen <dpchrist@holgerdanske.com> - 2021-02-08 22:10 +0100
        Re: Incorrect password Debian 10.8 after installation David Wright <deblis@lionunicorn.co.uk> - 2021-02-09 00:20 +0100
          Re: Incorrect password Debian 10.8 after installation David Christensen <dpchrist@holgerdanske.com> - 2021-02-09 03:30 +0100
            Re: Incorrect password Debian 10.8 after installation Anssi Saari <as@sci.fi> - 2021-02-09 08:30 +0100
              Re: Incorrect password Debian 10.8 after installation David Christensen <dpchrist@holgerdanske.com> - 2021-02-09 08:40 +0100
                Re: Incorrect password Debian 10.8 after installation <tomas@tuxteam.de> - 2021-02-09 10:00 +0100
                  Re: Incorrect password Debian 10.8 after installation Anssi Saari <as@sci.fi> - 2021-02-09 17:30 +0100
                  Re: Incorrect password Debian 10.8 after installation David Christensen <dpchrist@holgerdanske.com> - 2021-02-09 23:00 +0100
                    Re: Incorrect password Debian 10.8 after installation Erwan David <erwan@rail.eu.org> - 2021-02-10 07:50 +0100
                  Re: Incorrect password Debian 10.8 after installation Stefan Monnier <monnier@iro.umontreal.ca> - 2021-02-09 23:30 +0100
                    Re: Incorrect password Debian 10.8 after installation Greg Wooledge <wooledg@eeg.ccf.org> - 2021-02-10 13:40 +0100
            Re: Incorrect password Debian 10.8 after installation Greg Wooledge <wooledg@eeg.ccf.org> - 2021-02-09 13:50 +0100
              Re: Incorrect password Debian 10.8 after installation David Christensen <dpchrist@holgerdanske.com> - 2021-02-09 23:00 +0100
                Re: Incorrect password Debian 10.8 after installation David <bouncingcats@gmail.com> - 2021-02-09 23:20 +0100
            Re: Incorrect password Debian 10.8 after installation David Wright <deblis@lionunicorn.co.uk> - 2021-02-09 16:40 +0100
              Re: Incorrect password Debian 10.8 after installation David Christensen <dpchrist@holgerdanske.com> - 2021-02-10 00:00 +0100

#231479 — Incorrect password Debian 10.8 after installation

FromJohn Berden <john.berden4@gmail.com>
Date2021-02-08 03:50 +0100
SubjectIncorrect password Debian 10.8 after installation
Message-ID<BG4MF-5QX-13@gated-at.bofh.it>
Hello.
I'm installing Debian 10.8 with a console installer. I use ISO 
debian-10.8.0-amd64-netinst.iso.
After starting the system, I get a request for the user's password.
I enter the correct password that I specified during installation. But I 
get a message that I entered the wrong password.
Why and how to fix it?
Thanks in advance!

[toc] | [next] | [standalone]


#231486

FromAndrei POPESCU <andreimpopescu@gmail.com>
Date2021-02-08 09:30 +0100
Message-ID<BGa5H-NY-7@gated-at.bofh.it>
In reply to#231479

[Multipart message — attachments visible in raw view] — view raw

On Lu, 08 feb 21, 04:49:28, John Berden wrote:
> Hello.
> I'm installing Debian 10.8 with a console installer. I use ISO
> debian-10.8.0-amd64-netinst.iso.
> After starting the system, I get a request for the user's password.
> I enter the correct password that I specified during installation. But I get
> a message that I entered the wrong password.
> Why and how to fix it?

Besides the obvious answer (the password is indeed wrong -- could happen 
to anyone), maybe the keyboard layout is different that the one you are 
expecting.

You can use the username field to test, in particular any special 
characters your password might contain.

If you still can't figure it out the Debian Installer's 'rescue' mode 
can be used to chroot into the install and reset the password.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

[toc] | [prev] | [next] | [standalone]


#231487

FromMarco Möller <talby@debianlists.mobilxpress.net>
Date2021-02-08 09:50 +0100
Message-ID<BGap4-Ud-15@gated-at.bofh.it>
In reply to#231479
On 08.02.21 03:49, John Berden wrote:
> Hello.
> I'm installing Debian 10.8 with a console installer. I use ISO 
> debian-10.8.0-amd64-netinst.iso.
> After starting the system, I get a request for the user's password.
> I enter the correct password that I specified during installation. But I 
> get a message that I entered the wrong password.
> Why and how to fix it?
> Thanks in advance!
> 

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
Good Luck!

[toc] | [prev] | [next] | [standalone]


#231491

FromKeith Bainbridge <ke1thrboz@gmx.com>
Date2021-02-08 10:50 +0100
Message-ID<BGbl7-1El-3@gated-at.bofh.it>
In reply to#231487
Marco

Is this at the desktop or a terminal?

If desktop, try switching to a terminal (ctrl-alt-f1) and log in there.
If successful, switch back to desktop (ctrl-alt-f7) and try again.  I
recall I had this happen to me last year.


If terminal, then you haven't spent much download data/time and a
re-install isn't much of a waste of effort.

Best


--

Keith Bainbridge

keith.bainbridge.3216@gmx.com
On 8/2/21 19:40, Marco Möller wrote:
>
> After starting the system, I get a request for the user's password.

[toc] | [prev] | [next] | [standalone]


#231529

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2021-02-08 22:10 +0100
Message-ID<BGlXc-dm-23@gated-at.bofh.it>
In reply to#231487
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.


STFW 'site:debian.org boot parameters buster', I see:

    https://www.debian.org/releases/buster/arm64/ch05s03.en.html

Skimming the page, I do not see any instructions for entering boot 
parameters...


Following the link 'Linux BootPrompt HOWTO':

     https://tldp.org/HOWTO/BootPrompt-HOWTO.html

SSL problems.  Try another site:

     http://linuxdocs.org/HOWTOs/BootPrompt-HOWTO.html

I see LILO.  Wow.  Remember LILO and the 90's?


STFW 'linux boot prompt', I see:

 
https://www.linuxquestions.org/questions/linux-newbie-8/linux-boot-prompt-4175659396/

The answer by djk44883 provides a link to the GRUB manual:

     https://www.gnu.org/software/grub/manual/grub/grub.html

'5.3.2 GNU/Linux' looks relevant:

     https://www.gnu.org/software/grub/manual/grub/grub.html#GNU_002fLinux

But nothing tells me how to get to the 'grub>' prompt...


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

     Use the ? and ? keys to select which entry is highlighted.
Press enter to boot the selected OS, 'e' to edit the commands before 
booting, or 'c' for a command line


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

If I press 'c', I obtain a prompt:

     grub>


Do I add 'init=/sbin/sulogin --force' in the editor?  Why no 'set'?


Where is this documented?


David

[toc] | [prev] | [next] | [standalone]


#231531

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2021-02-09 00:20 +0100
Message-ID<BGnYZ-1te-1@gated-at.bofh.it>
In reply to#231529
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.
> STFW 'site:debian.org boot parameters buster', I see:
> 
>    https://www.debian.org/releases/buster/arm64/ch05s03.en.html
> 
> Skimming the page, I do not see any instructions for entering boot
> parameters...

Perhaps it's not made obvious enough there. The page starts with
"Boot parameters are Linux kernel parameters", and the footnote
(labelled ²) hints that they're given on the kernel command line,
ie the line starting with "linux" in grub.cfg.

> Following the link 'Linux BootPrompt HOWTO':
> 
>     https://tldp.org/HOWTO/BootPrompt-HOWTO.html
> 
> SSL problems.  Try another site:
> 
>     http://linuxdocs.org/HOWTOs/BootPrompt-HOWTO.html
> 
> I see LILO.  Wow.  Remember LILO and the 90's?

Some of these HOWTOs are interesting reminders of how we used to
configure things. Keeping such internal references up to date is
a tough task. Perhaps googling is more productive.

> STFW 'linux boot prompt', I see:
> 
> https://www.linuxquestions.org/questions/linux-newbie-8/linux-boot-prompt-4175659396/
> 
> The answer by djk44883 provides a link to the GRUB manual:
> 
>     https://www.gnu.org/software/grub/manual/grub/grub.html

Yes, that the place I look these things up.

> '5.3.2 GNU/Linux' looks relevant:
> 
>     https://www.gnu.org/software/grub/manual/grub/grub.html#GNU_002fLinux
> 
> But nothing tells me how to get to the 'grub>' prompt...

I think that section is for people building a grub.cfg from scratch.
You want §14.2, which describes the menu interface that we're all
familiar with.

> 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
> 
>     Use the ? and ? keys to select which entry is highlighted.
> Press enter to boot the selected OS, 'e' to edit the commands before
> booting, or 'c' for a command line

Yes, that summarises §14.2 …

> 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.

> If I press 'c', I obtain a prompt:
> 
>     grub>

You don't want that, which is what you get when Grub gets lost.

> Do I add 'init=/sbin/sulogin --force' in the editor?

Yes, to the linux line: it's a kernel parameter.

Why no 'set'?

Because "init" is not a Grub variable.

> 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.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#231533

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2021-02-09 03:30 +0100
Message-ID<BGqWR-3nn-11@gated-at.bofh.it>
In reply to#231531
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.

4.  A second GRUB menu should be displayed (the OP should have a newer 
kernel):

         *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?


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.)

3.  Will changes made to a boot entry with the GRUB editor persist for 
subsequent boots?


David

[toc] | [prev] | [next] | [standalone]


#231537

FromAnssi Saari <as@sci.fi>
Date2021-02-09 08:30 +0100
Message-ID<BGvDb-6y5-5@gated-at.bofh.it>
In reply to#231533
David Christensen <dpchrist@holgerdanske.com> writes:

> Questions:
>
> 1.  How do I make a copy of a boot entry?  (So that I can edit the
> copy and keep the original.)

In Grub, you don't really need to since changes are not saved. For
permanent changes then in Linux edit the various files in /etc/grub.d
and regenerate /boot/grub/grub.cfg via running update-grub.

> 2.  How do I insert a tab character with the GRUB editor?  (Pressing
> <Tab> causes the editor to attempt command completion.)

I guess you don't? There doesn't seem to be much about the editor's
capabilities in the Grub manual.

[toc] | [prev] | [next] | [standalone]


#231538

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2021-02-09 08:40 +0100
Message-ID<BGvMR-6B3-3@gated-at.bofh.it>
In reply to#231537
On 2021-02-08 23:22, Anssi Saari wrote:
> David Christensen <dpchrist@holgerdanske.com> writes:
> 
>> Questions:
>>
>> 1.  How do I make a copy of a boot entry?  (So that I can edit the
>> copy and keep the original.)
> 
> In Grub, you don't really need to since changes are not saved. For
> permanent changes then in Linux edit the various files in /etc/grub.d
> and regenerate /boot/grub/grub.cfg via running update-grub.

Okay.


>> 2.  How do I insert a tab character with the GRUB editor?  (Pressing
>> <Tab> causes the editor to attempt command completion.)
> 
> I guess you don't? There doesn't seem to be much about the editor's
> capabilities in the Grub manual.

Agreed.  The editor has a note that it supports some Emacs stuff. 
Perhaps an Emacs user would know?


David

[toc] | [prev] | [next] | [standalone]


#231540

From<tomas@tuxteam.de>
Date2021-02-09 10:00 +0100
Message-ID<BGx2i-7mb-3@gated-at.bofh.it>
In reply to#231538

[Multipart message — attachments visible in raw view] — view raw

On Mon, Feb 08, 2021 at 11:32:11PM -0800, David Christensen wrote:
> On 2021-02-08 23:22, Anssi Saari wrote:
> >David Christensen <dpchrist@holgerdanske.com> writes:
> >
> >>Questions:
> >>
> >>1.  How do I make a copy of a boot entry?  (So that I can edit the
> >>copy and keep the original.)
> >
> >In Grub, you don't really need to since changes are not saved. For
> >permanent changes then in Linux edit the various files in /etc/grub.d
> >and regenerate /boot/grub/grub.cfg via running update-grub.
> 
> Okay.
> 
> 
> >>2.  How do I insert a tab character with the GRUB editor?  (Pressing
> >><Tab> causes the editor to attempt command completion.)
> >
> >I guess you don't? There doesn't seem to be much about the editor's
> >capabilities in the Grub manual.
> 
> Agreed.  The editor has a note that it supports some Emacs stuff.
> Perhaps an Emacs user would know?

I don't know how far "some" reaches, but try <CTRL>-Q then <TAB>
(mnemonics: Q like "quote").

Not Emacs-y, but worth a try would be <CTRL>-I

Failing that, we'll have to use the source :)

Cheers
 - t

[toc] | [prev] | [next] | [standalone]


#231556

FromAnssi Saari <as@sci.fi>
Date2021-02-09 17:30 +0100
Message-ID<BGE3L-3sX-7@gated-at.bofh.it>
In reply to#231540
<tomas@tuxteam.de> writes:

> I don't know how far "some" reaches, but try <CTRL>-Q then <TAB>
> (mnemonics: Q like "quote").
>
> Not Emacs-y, but worth a try would be <CTRL>-I

Neither worked, although I only tried in grub-emu. But it should work
the same as Grub.

[toc] | [prev] | [next] | [standalone]


#231563

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2021-02-09 23:00 +0100
Message-ID<BGJd8-6xo-3@gated-at.bofh.it>
In reply to#231540
On 2021-02-09 00:54, tomas@tuxteam.de wrote:
> On Mon, Feb 08, 2021 at 11:32:11PM -0800, David Christensen wrote:
>> On 2021-02-08 23:22, Anssi Saari wrote:
>>> David Christensen <dpchrist@holgerdanske.com> writes:

>>>> 2.  How do I insert a tab character with the GRUB editor?  (Pressing
>>>> <Tab> causes the editor to attempt command completion.)
>>>
>>> I guess you don't? There doesn't seem to be much about the editor's
>>> capabilities in the Grub manual.
>>
>> Agreed.  The editor has a note that it supports some Emacs stuff.
>> Perhaps an Emacs user would know?
> 
> I don't know how far "some" reaches, but try <CTRL>-Q then <TAB>
> (mnemonics: Q like "quote").

Nope.


> Not Emacs-y, but worth a try would be <CTRL>-I

Ctrl+I -- nope

Ctrl+I, then <Tab> -- nope.


David

[toc] | [prev] | [next] | [standalone]


#231574

FromErwan David <erwan@rail.eu.org>
Date2021-02-10 07:50 +0100
Message-ID<BGRu1-3ia-1@gated-at.bofh.it>
In reply to#231563
Le 09/02/2021 à 22:54, David Christensen a écrit :
> On 2021-02-09 00:54, tomas@tuxteam.de wrote:
>> On Mon, Feb 08, 2021 at 11:32:11PM -0800, David Christensen wrote:
>>> On 2021-02-08 23:22, Anssi Saari wrote:
>>>> David Christensen <dpchrist@holgerdanske.com> writes:
> 
>>>>> 2.  How do I insert a tab character with the GRUB editor?  (Pressing
>>>>> <Tab> causes the editor to attempt command completion.)
>>>>
>>>> I guess you don't? There doesn't seem to be much about the editor's
>>>> capabilities in the Grub manual.
>>>
>>> Agreed.  The editor has a note that it supports some Emacs stuff.
>>> Perhaps an Emacs user would know?
>>
>> I don't know how far "some" reaches, but try <CTRL>-Q then <TAB>
>> (mnemonics: Q like "quote").
> 
> Nope.
> 
> 
>> Not Emacs-y, but worth a try would be <CTRL>-I
> 
> Ctrl+I -- nope
> 
> Ctrl+I, then <Tab> -- nope.
> 
> 
> David
> 
> 

In shells, Ctrl+V before character inserts character without 
interpreting it. In Emacs Ctrl+Q has same effect, so tryingh Ctrl+V Tab 
and Ctrl+Q Tab might be worthwile.

[toc] | [prev] | [next] | [standalone]


#231568

FromStefan Monnier <monnier@iro.umontreal.ca>
Date2021-02-09 23:30 +0100
Message-ID<BGJG9-6Wa-3@gated-at.bofh.it>
In reply to#231540
> I don't know how far "some" reaches, but try <CTRL>-Q then <TAB>
> (mnemonics: Q like "quote").
>
> Not Emacs-y, but worth a try would be <CTRL>-I

You can also try `C-v` instead of `C-q` to quote the next key (not sure
where this comes from, but it works in bash and zsh, IIUC), i.e. use
`C-v TAB` to insert a TAB character.


        Stefan "who can't be bothered to reboot to try it out"

[toc] | [prev] | [next] | [standalone]


#231584

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2021-02-10 13:40 +0100
Message-ID<BGWWK-6Ge-9@gated-at.bofh.it>
In reply to#231568
On Tue, Feb 09, 2021 at 05:23:45PM -0500, Stefan Monnier wrote:
> You can also try `C-v` instead of `C-q` to quote the next key (not sure
> where this comes from, but it works in bash and zsh, IIUC), i.e. use
> `C-v TAB` to insert a TAB character.

It's deeper than just shells.  It's also in the "canonical" processing
layer of the terminal driver.

unicorn:~$ stty -a | grep lnext
werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;

unicorn:~$ man stty | grep -A1 lnext
       * lnext CHAR
              CHAR will enter the next character quoted

unicorn:~$ man termios | grep -A3 VLNEXT
       VLNEXT (not in POSIX; 026, SYN, Ctrl-V) Literal next  (LNEXT).   Quotes
              the  next  input  character,  depriving it of a possible special
              meaning.  Recognized when IEXTEN is set, and then not passed  as
              input.

You can see its behavior, for example, by running "cat" with no
arguments in a terminal.  Type some stuff, then press Ctrl-V and Enter,
and you should see ^M (a token representing a carriage return) in your
typed input.

Shells don't operate in canonical mode, but they emulate this feature
because it's useful and expected.

[toc] | [prev] | [next] | [standalone]


#231546

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2021-02-09 13:50 +0100
Message-ID<BGACR-1fw-5@gated-at.bofh.it>
In reply to#231533
On Mon, Feb 08, 2021 at 06:26:22PM -0800, David Christensen wrote:
>         *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.
[...]

> 1.  How do I make a copy of a boot entry?  (So that I can edit the copy and
> keep the original.)

The changes you make to the GRUB boot entry are one time only.  They're
not saved anywhere; they're only passed to the current instance of the
kernel.

> 2.  How do I insert a tab character with the GRUB editor?  (Pressing <Tab>
> causes the editor to attempt command completion.)

Why would you want to?

My best guess is that you think you want to because you think you're
making a permanent change that you'll have to look at again in the
future and you want it to be pretty.  This is not the case.  All you're
doing is adding some new words to a list of parameter words.

> 3.  Will changes made to a boot entry with the GRUB editor persist for
> subsequent boots?

No.

[toc] | [prev] | [next] | [standalone]


#231564

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2021-02-09 23:00 +0100
Message-ID<BGJd8-6xo-5@gated-at.bofh.it>
In reply to#231546
On 2021-02-09 04:42, Greg Wooledge wrote:
> On Mon, Feb 08, 2021 at 06:26:22PM -0800, David Christensen wrote:
>>          *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.
> [...]

>> 2.  How do I insert a tab character with the GRUB editor?  (Pressing <Tab>
>> causes the editor to attempt command completion.)
> 
> Why would you want to?

1.  Tabs may be required (e.g. make(1)).

2.  To exercise my OCD.  ;-)


David

[toc] | [prev] | [next] | [standalone]


#231565

FromDavid <bouncingcats@gmail.com>
Date2021-02-09 23:20 +0100
Message-ID<BGJwu-6Td-9@gated-at.bofh.it>
In reply to#231564
On Wed, 10 Feb 2021 at 08:57, David Christensen
<dpchrist@holgerdanske.com> wrote:
> On 2021-02-09 04:42, Greg Wooledge wrote:
> > On Mon, Feb 08, 2021 at 06:26:22PM -0800, David Christensen wrote:

> >> 2.  How do I insert a tab character with the GRUB editor?  (Pressing <Tab>
> >> causes the editor to attempt command completion.)

> > Why would you want to?

> 1.  Tabs may be required (e.g. make(1)).

> 2.  To exercise my OCD.  ;-)

You seem to be conceptualising the grub editor as a file editor.
It is not a file editor.
Its edits are ephemeral, it has no ability to save any edits made.

It is an interactive tool which allows modifying the next boot by
allowing temporary changes to what grub has just read from the
its configuration file, before proceeding.

In that context, the Tab key is useless so it has been repurposed
to provide command completion.

[toc] | [prev] | [next] | [standalone]


#231552

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2021-02-09 16:40 +0100
Message-ID<BGDho-2WW-11@gated-at.bofh.it>
In reply to#231533
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.

[toc] | [prev] | [next] | [standalone]


#231570

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2021-02-10 00:00 +0100
Message-ID<BGK9c-76i-5@gated-at.bofh.it>
In reply to#231552
On 2021-02-09 07:35, David Wright wrote:
> 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[?] ...

>>
>> 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.

Testing confirms that I can edit either boot entry and get the same result.


>> 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. 

Testing confirms the above steps.


> AIUI --force deals with the case where there is no root
> password/the root account is locked.

Testing confirms that if there is a valid root password, it must be 
entered to obtain a root shell.


>> 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.

Testing confirms that leading tabs are not required in a GRUB boot entry.


>> 3.  Will changes made to a boot entry with the GRUB editor persist for
>> subsequent boots?
> 
> No.

Testing confirms that changes made to a boot entry via the GRUB editor 
do not persist beyond one boot.


David

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web