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


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

no boot - kinda

Started byGlenn English <ghe2001@gmail.com>
First post2018-08-23 20:20 +0200
Last post2018-08-25 03:20 +0200
Articles 8 — 4 participants

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


Contents

  no boot - kinda Glenn English <ghe2001@gmail.com> - 2018-08-23 20:20 +0200
    Re: no boot - kinda Ben Caradoc-Davies <ben@transient.nz> - 2018-08-24 00:40 +0200
      Re: no boot - kinda Ben Caradoc-Davies <ben@transient.nz> - 2018-08-24 00:50 +0200
      Re: no boot - kinda Ben Caradoc-Davies <ben@transient.nz> - 2018-08-24 00:50 +0200
      Re: no boot - kinda <tomas@tuxteam.de> - 2018-08-24 09:00 +0200
        Re: no boot - kinda Glenn English <ghe2001@gmail.com> - 2018-08-24 20:00 +0200
          Re: no boot - kinda David Wright <deblis@lionunicorn.co.uk> - 2018-08-24 20:30 +0200
          Re: no boot - kinda Ben Caradoc-Davies <ben@transient.nz> - 2018-08-25 03:20 +0200

#199288 — no boot - kinda

FromGlenn English <ghe2001@gmail.com>
Date2018-08-23 20:20 +0200
Subjectno boot - kinda
Message-ID<wq2n7-7iz-1@gated-at.bofh.it>
Buster, Supermicro box

I updated this morning, and I couldn't reboot afterward. It halted at
trying to do something with the USB stick that's my /boot partition. *

After some time in the advanced grub menu, I found that the new kernel
would boot fine in recovery mode, and would come up normally if I just
CTL-D'ed at the prompt.

After some more time, I found that the kernel a couple updates ago
would boot normally when I selected it in the grub menu. As a side
effect, I got my RME sound card back (PulseAudio still showed up in
the AlsaMixer).

I'm told that grub.cfg is a place I don't want to be. Can someone tell
me how to get grub to boot the working OS, or maybe how to fix the new
one?

I edited the old grub several years and got the result I wanted, but
grub2 is a new universe...

* There's an M.2 as /, BIOS doesn't know about M.2, but it does USB,
and Debian knows about M.2. So the boot chain is BIOS-USB-M.2.

-- 
Glenn English

[toc] | [next] | [standalone]


#199300

FromBen Caradoc-Davies <ben@transient.nz>
Date2018-08-24 00:40 +0200
Message-ID<wq6qK-1c8-3@gated-at.bofh.it>
In reply to#199288
On 24/08/2018 06:14, Glenn English wrote:
> I'm told that grub.cfg is a place I don't want to be. Can someone tell
> me how to get grub to boot the working OS, or maybe how to fix the new
> one?

The recommended way to configure Grub 2 on Debian is to edit 
/etc/default/grub and run update-grub .

The new format to specify a different default kernel is horrific; it 
contains menu items separated with ">". You need to get the full label 
from your generated grub.conf because it likely contains device UUIDs:
GRUB_DEFAULT="gnulinux-advanced-ed4def00-71bb-4521-a16e-9551bd762b5b>gnulinux-4.16.0-1-amd64-advanced-ed4def00-71bb-4521-a16e-9551bd762b5b"

You can try adding kernel command line parameters to GRUB_CMDLINE_LINUX 
to fix your latest kernel. You will need to run update-grub after each 
change.

Kind regards,

-- 
Ben Caradoc-Davies <ben@transient.nz>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

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


#199301

FromBen Caradoc-Davies <ben@transient.nz>
Date2018-08-24 00:50 +0200
Message-ID<wq6Ap-1f7-1@gated-at.bofh.it>
In reply to#199300
On 24/08/2018 10:41, Ben Caradoc-Davies wrote:
> On 24/08/2018 10:37, Ben Caradoc-Davies wrote:
>> The new format to specify a different default kernel is horrific; it 
>> contains menu items separated with ">". You need to get the full label 
>> from your generated grub.conf because it likely contains device UUIDs:
>> GRUB_DEFAULT="gnulinux-advanced-ed4def00-71bb-4521-a16e-9551bd762b5b>gnulinux-4.16.0-1-amd64-advanced-ed4def00-71bb-4521-a16e-9551bd762b5b" 
> Actually, these are filesystem UUIDs. You can see them with "blkid".

To be specific, the filesystem UUID for the root filesystem to be booted.

Kind regards,

-- 
Ben Caradoc-Davies <ben@transient.nz>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

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


#199302

FromBen Caradoc-Davies <ben@transient.nz>
Date2018-08-24 00:50 +0200
Message-ID<wq6Ap-1f7-3@gated-at.bofh.it>
In reply to#199300
On 24/08/2018 10:37, Ben Caradoc-Davies wrote:
> The new format to specify a different default kernel is horrific; it 
> contains menu items separated with ">". You need to get the full label 
> from your generated grub.conf because it likely contains device UUIDs:
> GRUB_DEFAULT="gnulinux-advanced-ed4def00-71bb-4521-a16e-9551bd762b5b>gnulinux-4.16.0-1-amd64-advanced-ed4def00-71bb-4521-a16e-9551bd762b5b" 

Actually, these are filesystem UUIDs. You can see them with "blkid".

Kind regards,

-- 
Ben Caradoc-Davies <ben@transient.nz>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

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


#199309

From<tomas@tuxteam.de>
Date2018-08-24 09:00 +0200
Message-ID<wqeeB-5KP-13@gated-at.bofh.it>
In reply to#199300
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, Aug 24, 2018 at 10:37:43AM +1200, Ben Caradoc-Davies wrote:
> On 24/08/2018 06:14, Glenn English wrote:
> >I'm told that grub.cfg is a place I don't want to be. Can someone tell
> >me how to get grub to boot the working OS, or maybe how to fix the new
> >one?
> 
> The recommended way to configure Grub 2 on Debian is to edit
> /etc/default/grub and run update-grub .
> 
> The new format to specify a different default kernel is horrific [...]

Indeed -- I had to do this a couple of days ago, and in my notes
(I do take notes when doing such things: age and that) I see

  "Jeez. What a Rube Goldberg. Should I say Grube Goldberg?"

It's one of those cases where each step towards building the tower
seems to make sense, and at the end you say "wait: how did we arrive
here?".

This is not a specific critique towards Grub people, mind you, but
a reminder to myself to slash complexity early when designing a
system -- even at the cost of some feature or other.

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlt/rF8ACgkQBcgs9XrR2kYr3wCeLYnTJCU7owsD9LvP94J4CZO7
0vQAnjjEM19dEabYZZtd/TAJs6tzWDlL
=1Prw
-----END PGP SIGNATURE-----

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


#199323

FromGlenn English <ghe2001@gmail.com>
Date2018-08-24 20:00 +0200
Message-ID<wqoxj-3lH-1@gated-at.bofh.it>
In reply to#199309
On Fri, Aug 24, 2018 at 6:57 AM <tomas@tuxteam.de> wrote:

> Indeed -- I had to do this a couple of days ago, and in my notes
> (I do take notes when doing such things: age and that) I see
>
>   "Jeez. What a Rube Goldberg. Should I say Grube Goldberg?"
>
> It's one of those cases where each step towards building the tower
> seems to make sense, and at the end you say "wait: how did we arrive
> here?".

A post of those notes (with an addition on whether they worked or not)
might be very interesting to a fellow Debian user of the elderly
persuasion :-)

This thread on grub2 is getting really scary. I'm afraid to make
changes in the grub2 configs because an error could easily brick my
machine. And futzing with /etc/default doesn't seem to impress grub2 a
whole lot. Not concerning what I want to do, anyway.

I think that what I'm wanting to do is completely remove some kernels
from grub2's consideration and go back to one that works for me --
that seems to be a tricky job.

The installer and the updater send magic incantations to grub2 that
successfully add/delete kernels to the boot process. Anybody have any
idea what those might be?

How about just removing all references to the ones I don't want from
/boot and running update-grub?

--
Glenn English

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


#199326

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2018-08-24 20:30 +0200
Message-ID<wqp0l-3K5-9@gated-at.bofh.it>
In reply to#199323
On Fri 24 Aug 2018 at 17:51:20 (+0000), Glenn English wrote:
> On Fri, Aug 24, 2018 at 6:57 AM <tomas@tuxteam.de> wrote:
> 
> > Indeed -- I had to do this a couple of days ago, and in my notes
> > (I do take notes when doing such things: age and that) I see
> >
> >   "Jeez. What a Rube Goldberg. Should I say Grube Goldberg?"
> >
> > It's one of those cases where each step towards building the tower
> > seems to make sense, and at the end you say "wait: how did we arrive
> > here?".
> 
> A post of those notes (with an addition on whether they worked or not)
> might be very interesting to a fellow Debian user of the elderly
> persuasion :-)
> 
> This thread on grub2 is getting really scary. I'm afraid to make
> changes in the grub2 configs because an error could easily brick my
> machine. And futzing with /etc/default doesn't seem to impress grub2 a
> whole lot. Not concerning what I want to do, anyway.
> 
> I think that what I'm wanting to do is completely remove some kernels
> from grub2's consideration and go back to one that works for me --
> that seems to be a tricky job.
> 
> The installer and the updater send magic incantations to grub2 that
> successfully add/delete kernels to the boot process. Anybody have any
> idea what those might be?
> 
> How about just removing all references to the ones I don't want from
> /boot and running update-grub?

Look at the top of /etc/default/grub.

Cut and paste the line into a terminal:

$ info -f grub -n 'Simple configuration'

About 30 lines, down, read about GRUB_DEFAULT

To get started, note that you can type a number.
/etc/default/grub probably has 0 as that number.

Count down the "menuentry" items in your
/boot/grub/grub.cfg file and put the number of the
one you want booted (counting from 0) into
/etc/default/grub.

Run update-grub.

Reboot. Don't touch any keys while the grub menu is displayed.

If the wrong kernel starts, you can still reboot again and
use the menu selection as per normal.

That gets you on the road. Then you can start think about using
those long strings, which has the advantage that they're more
stable against upgrades/adding/removing other bootable partitions etc.

About 50 lines into the info file, there's the bit about "saved".
Later, if you use this, you can change the default just by typing

# grub-set-default 'gobble>de-gook'

or for one-shot

#grub-reboot 'gobble>de-gook'
#reboot

Cheers,
David.

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


#199341

FromBen Caradoc-Davies <ben@transient.nz>
Date2018-08-25 03:20 +0200
Message-ID<wqvp7-7Dy-1@gated-at.bofh.it>
In reply to#199323
On 25/08/2018 05:51, Glenn English wrote:
> This thread on grub2 is getting really scary. I'm afraid to make
> changes in the grub2 configs because an error could easily brick my
> machine. And futzing with /etc/default doesn't seem to impress grub2 a
> whole lot. Not concerning what I want to do, anyway.

"Brick" normally means unrecoverable. While you have rescue media, this 
is unlikely. Grub also has a very flexible command line that can be used 
to get a system to boot. I am not saying that you won't have some 
sphincter-tightening moments, but as long as you have backups, rescue 
media, and a second device for googling, you should be able to recover 
from any grub changes.

> I think that what I'm wanting to do is completely remove some kernels
> from grub2's consideration and go back to one that works for me --
> that seems to be a tricky job.
> The installer and the updater send magic incantations to grub2 that
> successfully add/delete kernels to the boot process. Anybody have any
> idea what those might be?
> How about just removing all references to the ones I don't want from
> /boot and running update-grub?

You could uninstall the linux-image packages you do not want to boot and 
everything should just work. Let the package manager do all the work. 
Remove the meta linux-image-${arch} metapackage and no new kernel 
packages will be installed. "apt-mark hold" can be used to prevent 
updates to the kernel packages you have installed.

Despite its ugliness, the verbose GRUB_DEFAULT option will work, will be 
stable against new kernel packages, and if you get it wrong, you can 
just use the grub menu to boot a kernel and fix it. This approach will 
let you keep the problematic kernels on your system so that you can 
investigate why they are failing. It looks like you have the makings of 
a good bug report, and it would be a shame to let this one go 
unreported. You can try setting GRUB_DEFAULT. It will not hurt you. To 
see the grub menu ids:

grep advanced /boot/grub/grub.cfg

GRUB_DEFAULT is just the advanced submenu id, then ">", then the 
advanced menuentry id you want to boot by default. For example, on my 
sid, with recovery options disabled:

$ grep advanced /boot/grub/grub.cfg
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 
'gnulinux-advanced-ed4def00-71bb-4521-a16e-9551bd762b5b' {
	menuentry 'Debian GNU/Linux, with Linux 4.17.0-3-amd64' --class debian 
--class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-4.17.0-3-amd64-advanced-ed4def00-71bb-4521-a16e-9551bd762b5b' {
	menuentry 'Debian GNU/Linux, with Linux 4.17.0-2-amd64' --class debian 
--class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-4.17.0-2-amd64-advanced-ed4def00-71bb-4521-a16e-9551bd762b5b' {
	menuentry 'Debian GNU/Linux, with Linux 4.17.0-1-amd64' --class debian 
--class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-4.17.0-1-amd64-advanced-ed4def00-71bb-4521-a16e-9551bd762b5b' {

I could then choose to boot 4.17.0-1-amd64 by setting (single line):

GRUB_DEFAULT="gnulinux-advanced-ed4def00-71bb-4521-a16e-9551bd762b5b>gnulinux-4.17.0-1-amd64-advanced-ed4def00-71bb-4521-a16e-9551bd762b5b"

Note the quotes. I then run "update-grub" and I am done.

I also like "apt-mark manual" to protect kernels from "apt-get autoremove".

Kind regards,

-- 
Ben Caradoc-Davies <ben@transient.nz>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

[toc] | [prev] | [standalone]


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


csiph-web