The officially official Devuan Forum!

You are not logged in.

#1 2020-04-27 15:51:59

rolfie
Member
Registered: 2017-11-25
Posts: 297  

[Solved] Grub issues with Beowulf beta

This is a follow-up on https://dev1galaxy.org/viewtopic.php?id=3461.

I think I have isolated the problem to a certain extend by installing Beowulf Beta from the desktop DVD into several VMs on my workstation.

The error is that before the grub screen appears, this error is posted (example):

error: no such device: b7c099c6-5171-4a21-9b31-44e7c484fec7
error: no server is specifed
error: no server is specifed

Press any key to continue

The UUID shown is the one of the logical volume of the root device (/dev/mapper/vgsys-root: UUID="b7c099c6-5171-4a21-9b31-44e7c484fec7" TYPE="ext4"). After some seconds the grub screen is shown if you don't press a key.

Common procedure: EFI mode, VMs are all 4G RAM, 2 CPU, 32G disk space, Expert install, German locale/keyboard, let the installer partition the drive, with network mirror set to deb.devuan.org, openrc, just install basic system tools, standard system utilities, no desktop. Reboot.
Then clean the sources.list to beowulf main contrib non-free, security updates, release-updates and backports.
Apt update, install build-essential, firmware-linux-nonfree, sudo, hwinfo, reboot.
Install guest additions, reboot.
apt install xorg lightdm
apt install mate-desktop-enviroment-extras or cinnamon. Add nfs-common, smbclient, geany, synaptic. Reboot.

1st VM: straight to the disk. Standard blue grub screen shown after first reboot. Switches to Cinnebar when the desktop is installed. Boots fine.
Note: When no mirror is selected grub-install fails. This is a grave bug. I would expect that I can run a complete offline install from the DVD image.
2nd VM: Use LVM. Standard grub design shown after first reboot. Switches to Cinnebar when the desktop is installed. Boots fine.
3rd VM: Use encrypted LVM with Mate desktop. Standard grub design shown after first reboot. The blue design remains. Grub complains after installing Mate.
4th VM: As before, just Cinnamon as desktop. Standard grub design shown after first reboot. Grub complains after installing Cinnamon, the blue design remains.
5th VM: Locale set to UK, German keyboard, encrypted LVM with Mate desktop, sysvinit. Standard grub design shown after first reboot. Left away nfs-common etc. Grub complains after installing Mate, the blue design remains.

Notes: I have got a VM that I did install from one of the early netinstall images about a year ago, with the same error present.
Got another VM installed from the beta DVD with Cinnomon without all the SW bits that does not show the error.

6th VM: Locale set to UK, German keyboard, encrypted LVM, openrc.
Boot after installation ok: copy grub-cfg.0, update sources.list, update-grub, grub-cfg.1
Next boot: ok. apt update, install nonfree firmware, dkms, build-essential, grub-cfg.2, reboot.
Next boot: ok. update-grub, grub-cfg.3, reboot.
Next boot: ok. apt install hwinfo, grub-cfg.4, reboot.
Next boot: ok. apt install xorg, grub-cfg.5, lightdm (update-grub is run), grub-cfg.6, cinnamon, grub-cfg.7, reboot
Next boot: not ok.

Difference between .5 and .6 starts at line 80.

grub-cfg.5

terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

grub-cfg.6 after installation of lightdm.

terminal_output gfxterm
insmod lvm
insmod ext2
set root='lvmid/91NKk7-tOG0-rbxc-EiqB-eIc0-jYsT-2cSV5t/hDTXd5-ZrjH-tN1n-60Vu-I7el-ukQd-mmGK1x'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='lvmid/91NKk7-tOG0-rbxc-EiqB-eIc0-jYsT-2cSV5t/hDTXd5-ZrjH-tN1n-60Vu-I7el-ukQd-mmGK1x'  e7380dd4-8083-4771-a095-aa15c7d0834d
else
  search --no-floppy --fs-uuid --set=root e7380dd4-8083-4771-a095-aa15c7d0834d
fi
insmod gfxmenu
loadfont ($root)/usr/share/desktop-base/grub-themes/cinnabar-grub/unifont-regular-16.pf2
insmod png
set theme=($root)/usr/share/desktop-base/grub-themes/cinnabar-grub/theme.txt
export theme
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

I am pretty confident that the method to modify the grub menu to show the Cinnebar Theme causes the issue with encrypted installations. A copy of the reference to the encrypted LVM that is not yet decrypted must fail. Please fix this somehow.

rolfie

Last edited by rolfie (2020-05-03 19:09:33)

Offline

#2 2020-04-27 17:10:22

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,489  

Re: [Solved] Grub issues with Beowulf beta

With a full desktop install from the installer isos, you don't get the grub theme. This is because desktop-base tries to set up the grub theme before grub is installed, and /etc/default/grub can't be edited because it does not exist yet. If you install destkop-base after the initial install, you should get the grub theme.

I don't know how the following lines get into /boot/grub/grub.cfg, but they came in when lightdm was installed with recommends. When I installed lightdm without recommends, I didn't get these lines. The other difference is that desktop-base got installed with the recommends. Either destkop-base or update-grub is doing something that I didn't know about.

loadfont ($root)/usr/share/desktop-base/grub-themes/cinnabar-grub/unifont-regular-16.pf2
insmod png
set theme=($root)/usr/share/desktop-base/grub-themes/cinnabar-grub/theme.txt
export theme

OK, I do get the cinnabar them on reboot. I'm not using encryption for this install. To get the grub theme to work with an encrypted root filesystem, I think you have to put the theme files in /boot/grub so that they are available before the root is decrypted. I don't know the details of that.

grub-efi-amd64 packages were missing in the beta isos. That's fixed in the next set, so you will be able to reboot after a no-mirror install.

Offline

#3 2020-04-27 18:42:16

rolfie
Member
Registered: 2017-11-25
Posts: 297  

Re: [Solved] Grub issues with Beowulf beta

Thank you for coming back. Looks like encryption always is in for more fun.

I am using my manual method because I think I have a bit more control which kind of SW is installed. Don't need to fight unwanted stuff like abiword when using the full desktop installs.

Would be interesting to understand how the Cinnebar stuff is linked into grub, I was searching for a hook, but could not find any. I will try the no recommends approach when I am no more so tired.

Anyhow, the hook also seems to duplicate an entry that is present before line 80 of the grub.cfg. These lines are added and I can't get rid of then, an update-grub always reproduce them:

insmod lvm
insmod ext2
set root='lvmid/91NKk7-tOG0-rbxc-EiqB-eIc0-jYsT-2cSV5t/hDTXd5-ZrjH-tN1n-60Vu-I7el-ukQd-mmGK1x'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='lvmid/91NKk7-tOG0-rbxc-EiqB-eIc0-jYsT-2cSV5t/hDTXd5-ZrjH-tN1n-60Vu-I7el-ukQd-mmGK1x'  e7380dd4-8083-4771-a095-aa15c7d0834d
else
  search --no-floppy --fs-uuid --set=root e7380dd4-8083-4771-a095-aa15c7d0834d
fi
insmod gfxmenu
loadfont ($root)/usr/share/desktop-base/grub-themes/cinnabar-grub/unifont-regular-16.pf2
insmod png
set theme=($root)/usr/share/desktop-base/grub-themes/cinnabar-grub/theme.txt
export theme

When I comment out the complete block grub does no more complain.

I am looking forward for the next set of isos. Thank you for your work.

rolfie

Last edited by rolfie (2020-04-27 18:48:27)

Offline

#4 2020-04-28 18:52:33

rolfie
Member
Registered: 2017-11-25
Posts: 297  

Re: [Solved] Grub issues with Beowulf beta

Found the Beta2-Iso images on the network and downloaded them. Tried them in a VM with my standard routine. Offline install now works.

Suggestion: make the default for deb-src no.

desktop-base isn't installed when lightdm is installed with --no-install-recommends. grub starts fine.

Then tried installing desktop-base via synaptic: problem is back. Tried to find what causes update-grub to duplicate the entry, and could not find it. Removing desktop-base again fixes the problem.

rolfie

Edit: Used the desktop DVD iso.

Last edited by rolfie (2020-04-30 19:52:23)

Offline

#5 2020-04-30 10:17:55

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,489  

Re: [Solved] Grub issues with Beowulf beta

I tried reproducing this in a VM install, but I get a scrambled screen. I'll have to find some hard drive space to do a proper EFI install. I'm not seeing the problem in a bios install.

Offline

#6 2020-04-30 20:00:01

rolfie
Member
Registered: 2017-11-25
Posts: 297  

Re: [Solved] Grub issues with Beowulf beta

Tried the beta2 netinstall iso expert install without efi in a VM, no mirror.

Editors like VIM and nano (my preference) still missing, without network mirror you can't make a cli install and prepare network access.
Asks for grub to be installed in the efi removable path?

Will try the desktop iso in bios mode.

rolfie

Last edited by rolfie (2020-04-30 20:07:31)

Offline

#7 2020-04-30 22:38:29

ralph.ronnquist
Administrator
From: Clifton Hill, Victoria, AUS
Registered: 2016-11-30
Posts: 417  

Re: [Solved] Grub issues with Beowulf beta

Note that the smallest installer iso to use for offline installation is called "server" iso.

The "netinstall" iso is purely intended for an installation that downloads packages from the net. Its pool (on beta2) is only that of "debootstrap minbase".

Offline

#8 2020-05-01 09:50:18

rolfie
Member
Registered: 2017-11-25
Posts: 297  

Re: [Solved] Grub issues with Beowulf beta

ralph.ronnquist wrote:

Note that the smallest installer iso to use for offline installation is called "server" iso.

The "netinstall" iso is purely intended for an installation that downloads packages from the net. Its pool (on beta2) is only that of "debootstrap minbase".

Dear Ralph, thanks for reminding me, I have read this statement before. You guys and girls make the decisions. Does not mean that I agree. I think its a pity that you do not catch two birds with a stone by dropping one or two small packages.

My statement as a happy user of Devuan: I have used the ASCII netinstall and the temporarily available Beowulf mini-isos for offline CLI installations, and I am disappointed that this does no more work.

End of discussion, thank you for your engagement into this project.

rolfie

Offline

#9 2020-05-01 10:04:53

rolfie
Member
Registered: 2017-11-25
Posts: 297  

Re: [Solved] Grub issues with Beowulf beta

Back to the grub issue with encrypted installations.

Done another VM install from the desktop DVD iso in Bios mode, traditionally encrypted with separate unencrypted /boot, lightdm and Mate. I can re-produce the issue, it does not depend on efi mode. The grub.cfg resulting from this install looks like this (relevant parts cut out and posted here): 

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod lvm
insmod ext2
set root='lvmid/BdBH9u-yJ7u-C6oR-MHyE-4N6Y-9COS-i7orqi/UTzSSs-6Jtx-2mf7-ug6f-YUYG-2f5Y-MoUl9G'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='lvmid/BdBH9u-yJ7u-C6oR-MHyE-4N6Y-9COS-i7orqi/UT$
else
  search --no-floppy --fs-uuid --set=root 2386d536-a213-4be4-8ac5-5b2a1d658982
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=de_DE
  insmod gettext
fi
terminal_output gfxterm
insmod lvm
insmod ext2
set root='lvmid/BdBH9u-yJ7u-C6oR-MHyE-4N6Y-9COS-i7orqi/UTzSSs-6Jtx-2mf7-ug6f-YUYG-2f5Y-MoUl9G'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='lvmid/BdBH9u-yJ7u-C6oR-MHyE-4N6Y-9COS-i7orqi/UT$
else
  search --no-floppy --fs-uuid --set=root 2386d536-a213-4be4-8ac5-5b2a1d658982
fi
insmod gfxmenu
loadfont ($root)/usr/share/desktop-base/grub-themes/cinnabar-grub/unifont-regular-16.pf2
insmod png
set theme=($root)/usr/share/desktop-base/grub-themes/cinnabar-grub/theme.txt
export theme


if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

Please note that the set root lines are doubled and get the Cinnebar settings amended. This is the issue.

After removing desktop-base and running an update-grub the issue is gone. grub.cfg now looks like this:

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod lvm
insmod ext2
set root='lvmid/BdBH9u-yJ7u-C6oR-MHyE-4N6Y-9COS-i7orqi/UTzSSs-6Jtx-2mf7-ug6f-YUYG-2f5Y-MoUl9G'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='lvmid/BdBH9u-yJ7u-C6oR-MHyE-4N6Y-9COS-i7orqi/UT$
else
  search --no-floppy --fs-uuid --set=root 2386d536-a213-4be4-8ac5-5b2a1d658982
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=de_DE
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

desktop-base takes some influence on the process behind update-grub, no idea how. Its an issue for encrypted installs, no matter if efi or bios mode.

Side notes:
* The installer offers as well the 4.19.0-6 as the 4.19.0-8 kernel. Does this make sense?
* The installer asks for grub to be installed in the efi removable path despite normal bios/CSM mode?

rolfie

Note: solved my copy/paste problem getting the grub.cfg lines from the VM after lunchbreak by re-installing the guest additions (had to do it twice to get it working).

Last edited by rolfie (2020-05-01 18:05:27)

Offline

#10 2020-05-01 14:22:49

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,489  

Re: [Solved] Grub issues with Beowulf beta

What do you mean when you say the issue was solved?

I can reproduce the problem, and it seems to be coming from the grub scripts, but I haven't tracked it down completely.

/usr/share/grub/grub-mkconfig_lib has a function called is_path_readable_by_grub.That function gets used by /etc/grub.d/05_debian_theme.

When the root filesystem is mounted and chrooted, then /usr/share/desktop-base/grub-themes is readable. When you're booting the system and the root filesystem hasn't been unlocked yet, it's not readable.

I tried copying the theme into /boot/grub/themes and using the --theme option with grub-install. That ran without error, but there's no similar option for update-grub or grub-mkconfig, and that looks in /usr/share/desktop-base. So right now, the only solution I have is no solution - press space bar or wait the 10 seconds or so for it to get to the boot menu. Manually editing grub.cfg will only work until the next time update-grub runs.

Edit: Another solution is to comment out the GRUB_THEME line in /etc/default/grub. You can optionally add an image file to /boot/grub if you want a background for the boot menu.

Edit2: Duh! Change the GRUB_THEME line.

mkdir /boot/grub/themes
cp -r /usr/share/desktop-base/grub-themes/cinnabar-grub /boot/grub/themes/

Then edit
/etc/default grub to change the GRUB_THEME:

GRUB_THEME=/boot/grub/themes/cinnabar-grub/theme.txt

Then run 'update-grub'

Edit(dunno - 6 or 7 now?): I think I can change desktop-base to put the theme in /boot/grub, but that won't happen in time for beowulf release. Maybe for point-release later.

Offline

#11 2020-05-01 19:11:30

rolfie
Member
Registered: 2017-11-25
Posts: 297  

Re: [Solved] Grub issues with Beowulf beta

fsmithred wrote:

What do you mean when you say the issue was solved?

I was reffering to my copy/paste problem with the text from grub.cfg from the VM. At first I just posted the text body description I prepared, made a break since a fast re-install of the guest additions did not help, and left a note that I would add the code later. When reading this again I saw its mis-understandable without the background, so I polished my test a bit.

fsmithred wrote:

I can reproduce the problem, and it seems to be coming from the grub scripts, but I haven't tracked it down completely.

.......

Edit(dunno - 6 or 7 now?): I think I can change desktop-base to put the theme in /boot/grub, but that won't happen in time for beowulf release. Maybe for point-release later.

Will give your suggestions a try. Feedback may take a while because I am dragged into a serious professinal problem that wil take priority for a while. Thank you for listening.

rolfie

Last edited by rolfie (2020-05-01 19:11:49)

Offline

#12 2020-05-03 19:08:31

rolfie
Member
Registered: 2017-11-25
Posts: 297  

Re: [Solved] Grub issues with Beowulf beta

Back earlier than I thought. Tried the suggestion in my latest VM, it is easy to implement (easier and faster than I thought) and it works.

Thank your for your suggestion. The only question remains: how update-proof is this fix? I remember the cryptdisk.functions patch that never made it upstream. The situation is slightly different since desktop-base is Devuan only, but you never know. 

Have a nice weekend and stay safe, rolfie

Offline

#13 2020-05-04 16:34:11

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,489  

Re: [Solved] Grub issues with Beowulf beta

I'm pretty sure this will be update-proof for you because you will be ahead of the update. The only other thing that will change is the target of the symlink, /etc/alternatives/desktop-grub-theme.

Offline

#14 2020-05-05 14:57:57

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,489  

Re: [Solved] Grub issues with Beowulf beta

ralph.ronnquist wrote:

Note that the smallest installer iso to use for offline installation is called "server" iso.

Fixed in beta3. Thanks!!!

I got nano and network commands with the no-mirror install using the amd64 beta3 netinstall iso.

Offline

Board footer