MX-23 Live--Can't Restore Grub Options

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
calinb
Posts: 84
Joined: Tue Jun 27, 2017 1:57 am

MX-23 Live--Can't Restore Grub Options

#1 Post by calinb »

I've been trying to share an MX-23 live / persistence pendrive between a modern laptop and a workstartion wiIth an old CRT that doesn't like the default video modes. I used the failsafe and video mode boot screen options and saved them to get the CRT working but now I don't have good laptop video options. I cannot figure out how to remove the boot options. Using "e" and F10 doesn't stick, of course, and doing a reset of the options followed by a save doesn't remove them from the grub line. It seems to me that if boot options can be changed and saved at the boot screen that there should be a way to remove the options too!

MX-Tools >> Boot Options complains that it can't chroot. I could try MX-Tools >> Boot Repair but that seems risky. I guess there's no grub.cfg these days and I can't find the file to edit (to be followed with update-grub).

Thanks!

FWIW:

Code: Select all

System:
  Kernel: 6.4.0-1mx-ahs-amd64 [6.4.4-1~mx23+1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/antiX/vmlinuz quiet splasht nosplash lang=en_US kbd=us
    tz=America/Los_Angeles persist_static splasht
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm v: 4.18.0 vt: 7
    dm: LightDM v: 1.26.0 Distro: MX-23.1_ahs_x64 Libretto July 31  2023 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Laptop System: Dell product: Wyse 5470 v: N/A serial: <superuser required> Chassis:
    type: 10 serial: <superuser required>
  Mobo: Dell model: 02C0T1 v: A00 serial: <superuser required> UEFI: Dell v: 1.14.0
    date: 04/18/2022
Battery:
  ID-1: BAT0 charge: 42.0 Wh (100.0%) condition: 42.0/42.0 Wh (100.0%) volts: 12.9 min: 11.4
    model: LGC-LGC3.65 DELL FDRHM0C type: Li-ion serial: <filter> status: full
CPU:
  Info: model: Intel Celeron N4100 bits: 64 type: MCP arch: Goldmont Plus level: v2 built: 2017
    process: Intel 14nm family: 6 model-id: 0x7A (122) stepping: 1 microcode: 0x3A
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 224 KiB desc: d-4x24 KiB; i-4x32 KiB
    L2: 4 MiB desc: 1x4 MiB
  Speed (MHz): avg: 1711 high: 2280 min/max: 800/2400 scaling: driver: intel_cpufreq
    governor: ondemand cores: 1: 2022 2: 1743 3: 800 4: 2280 bogomips: 8755
  Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS, IBPB: conditional, RSB filling,
    PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel GeminiLake [UHD Graphics 600] vendor: Dell driver: i915 v: kernel arch: Gen-9
    process: Intel 14n built: 2015-16 ports: active: eDP-1 empty: DP-1,HDMI-A-1,HDMI-A-2
    bus-ID: 00:02.0 chip-ID: 8086:3185 class-ID: 0300
  Device-2: Realtek Integrated_Webcam_HD type: USB driver: uvcvideo bus-ID: 1-5:3
    chip-ID: 0bda:5520 class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X: loaded: fbdev
    dri: swrast gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x286mm (20.00x11.26") s-diag: 583mm (22.95")
  Monitor-1: eDP-1 mapped: default model: LG Display 0x068a built: 2020 res: 1920x1080 gamma: 1.2
    diag: 355mm (14") ratio: 16:9 modes: 1920x1080
  API: OpenGL v: 4.5 Mesa 23.1.2-1~mx23ahs renderer: llvmpipe (LLVM 15.0.6 128 bits)
    direct-render: Yes
Audio:
  Device-1: Intel Celeron/Pentium Silver Processor High Definition Audio vendor: Dell
    driver: snd_hda_intel v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_apl bus-ID: 00:0e.0
    chip-ID: 8086:3198 class-ID: 0403
  API: ALSA v: k6.4.0-1mx-ahs-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 0.3.65 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Gemini Lake PCH CNVi WiFi driver: iwlwifi v: kernel modules: wl bus-ID: 00:0c.0
    chip-ID: 8086:31dc class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Dell driver: r8169
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 03:00.0 chip-ID: 10ec:8168
    class-ID: 0200
  IF: eth0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb v: 0.8
    bus-ID: 1-9:4 chip-ID: 8087:0aaa class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 3.0 lmp-v: 5.1
    sub-v: 100 hci-v: 5.1 rev: 100
  Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff link-mode: peripheral accept
    service-classes: rendering, capturing, object transfer, audio, telephony
Drives:
  Local Storage: total: 43.35 GiB used: 10.42 GiB (24.0%)
  ID-1: /dev/mmcblk0 maj-min: 179:0 vendor: HP model: DF4016 size: 14.68 GiB block-size:
    physical: 512 B logical: 512 B type: SSD serial: <filter> rev: 0x8
  SMART Message: Unknown smartctl error. Unable to generate data.
  ID-2: /dev/sda maj-min: 8:0 type: USB vendor: SanDisk model: Cruzer Glide size: 28.67 GiB
    block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> rev: 1.00 scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  Message: No partition data found.
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 1024 MiB used: 0 KiB (0.0%) priority: -2
    file: /live/boot-dev/swap-file
Sensors:
  System Temperatures: cpu: 41.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: pm: dpkg pkgs: 2317 libs: 1170 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 0
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://la.mxrepo.com/mx/repo/ bookworm main non-free
    2: deb http://la.mxrepo.com/mx/repo/ bookworm ahs
Info:
  Processes: 232 Uptime: 27m wakeups: 58389 Memory: 3.64 GiB used: 1.98 GiB (54.3%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI
Video Tweaks:
No kernel video driver

User avatar
dolphin_oracle
Developer
Posts: 22744
Joined: Sun Dec 16, 2007 12:17 pm

Re: MX-23 Live--Can't Restore Grub Options

#2 Post by dolphin_oracle »

if they aren't removed by a reset, that would be a bug, and one I can confirm. resetting the failsafe parameter on the live uefi setup after being saved doesn't remove it. @fehlix .

mx-boot-options won't operate on the live media.

let's remove the parameter manually.

navigate to /live/boot-dev/boot/grub/grubenv.cfg and edit the file. remove the line that contains something like "extra=failsafe".

reboot.

that failsafe should be not in affect on your uefi boots and still present on the syslinux/legacy boot ones.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/

User avatar
fehlix
Developer
Posts: 12916
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX-23 Live--Can't Restore Grub Options

#3 Post by fehlix »

calinb wrote: Thu Oct 19, 2023 3:33 pm I've been trying to share an MX-23 live / persistence pendrive between a modern laptop and a workstartion wiIth an old CRT that doesn't like the default video modes. I used the failsafe and video mode boot screen options and saved them to get the CRT working but now I don't have good laptop video options. I cannot figure out how to remove the boot options. Using "e" and F10 doesn't stick, of course, and doing a reset of the options followed by a save doesn't remove them from the grub line. It seems to me that if boot options can be changed and saved at the boot screen that there should be a way to remove the options too!

MX-Tools >> Boot Options complains that it can't chroot. I could try MX-Tools >> Boot Repair but that seems risky. I guess there's no grub.cfg these days and I can't find the file to edit (to be followed with update-grub).

Thanks!

FWIW:

Code: Select all

System:
  Kernel: 6.4.0-1mx-ahs-amd64 [6.4.4-1~mx23+1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/antiX/vmlinuz quiet splasht nosplash lang=en_US kbd=us
    tz=America/Los_Angeles persist_static splasht
The above Line does not show any of the parameter you mentioned.
The Save Option "grubsave" would save all selected or manually added parameter
into a text-config file grubenv.cfg
Please open terminal as normal user, and run:

Code: Select all

cat /live/boot-dev/boot/grub/grubenv.cfg
and also

Code: Select all

grep "^linux" /live/boot-dev/boot/grub/grub.cfg 
+++EDIT+++
Note to remove any of thos saved paramter,
you would on the Live menu just de-select thos paramter and als
select again SAve Options "grubsave". By this a new grubenv.cfg is generated
with the currentl boot options.
In addtion you can do this also from terminal comand line
like:

Code: Select all

sudo live-grubsave --help
Usage: live-grubsave [options] [addtional boot parameter]
Save live boot parameter into grubenv.cfg

Options:
    -h|--help         Show this help. More details with »--list«

    -l|--list         Display list of recognised boot parameter

    -m|--mount        Keep grub-device mounted even if toram was used

    -p|--print        Print current grubenv.cfg

    -r|--reset        Remove saved boot parameter

    -s|--simulate     Do not save, but show what would be saved

    -v|--version      Show version
To show current saved boot parameter :
sudo live-grubsave -p

User avatar
calinb
Posts: 84
Joined: Tue Jun 27, 2017 1:57 am

Re: MX-23 Live--Can't Restore Grub Options

#4 Post by calinb »

fehlix wrote: Thu Oct 19, 2023 6:52 pm The above Line does not show any of the parameter you mentioned.
Yet the parameters are there when I type "e" at the boot Welcome screen! inxi doesn't seem to accurately report parameters for a live boot it seems.
fehlix wrote: Thu Oct 19, 2023 6:52 pm The Save Option "grubsave" would save all selected or manually added parameter
into a text-config file grubenv.cfg
Please open terminal as normal user, and run:

Code: Select all

cat /live/boot-dev/boot/grub/grubenv.cfg
.....
Thank you for the usage suggestions, fehlix!

I finally stumbled upon

Code: Select all

sudo live-grubsave -r extra
and it removed the boot parameters that I had added. Unfortunately, it removed more than extra and I had to put them all back via the Welcome screen at boot but they did save.
dolphin_oracle wrote: Thu Oct 19, 2023 4:02 pm if they aren't removed by a reset, that would be a bug, and one I can confirm. resetting the failsafe parameter on the live uefi setup after being saved doesn't remove it. @fehlix .

mx-boot-options won't operate on the live media.

let's remove the parameter manually.

navigate to /live/boot-dev/boot/grub/grubenv.cfg and edit the file. remove the line that contains something like "extra=failsafe".

reboot.

that failsafe should be not in affect on your uefi boots and still present on the syslinux/legacy boot ones.
I ended up doing it with sudo live-grubsave -r extra but I wish I'd seen your post and just edited grubenv.cfg and not had to restore the other boot parameters.

One more remaining problem, if I may impose on you two again: Why when I run "system >> display" do I no longer have a variety of video modes available (resolutions)? The only mode is 1920x1080.

Thanks DO and fehlix again!

Cal

User avatar
fehlix
Developer
Posts: 12916
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX-23 Live--Can't Restore Grub Options

#5 Post by fehlix »

calinb wrote: Thu Oct 19, 2023 11:23 pm
fehlix wrote: Thu Oct 19, 2023 6:52 pm The above Line does not show any of the parameter you mentioned.
Yet the parameters are there when I type "e" at the boot Welcome screen! inxi doesn't seem to accurately report parameters for a live boot it seems.
fehlix wrote: Thu Oct 19, 2023 6:52 pm The Save Option "grubsave" would save all selected or manually added parameter
into a text-config file grubenv.cfg
Please open terminal as normal user, and run:

Code: Select all

cat /live/boot-dev/boot/grub/grubenv.cfg
.....
Thank you for the usage suggestions, fehlix!

I finally stumbled upon

Code: Select all

sudo live-grubsave -r extra
and it removed the boot parameters that I had added. Unfortunately, it removed more than extra and I had to put them all back via the Welcome screen at boot but they did save.
OK, couple of ways:
with

Code: Select all

sudo live-grubsave -r extra
you reset the content in grubsave.cfg.
But the current parameter are still available. Just run again

Code: Select all

sudo live-grubsave 
and it saves again the one currently used.
To get rid only of one or more parameter, like this special extra="..." just set extra="" to empty it out:

Code: Select all

sudo live-grubsave  extra=""
Note. the extra parameter will hold all parameter which do not have any corresponding menuentry,
except some parameter which are filterd out.

Another way on the live grub menu:
Press "E"-key, remove or add manually any parameter from/to the first setparamas line
and (!) add manually the parameter "grubsave".
Press Ctrl+x or F10: Now all parameter currently in use will be saved by live-grubsave during boot.
( Or navigate to the Boot options -> Save options menu -> grubsave ...)

You can check what was saved on terminal with

Code: Select all

sudo live-grubsave -p
and adjust - add or remove - if needed.
HTH

User avatar
calinb
Posts: 84
Joined: Tue Jun 27, 2017 1:57 am

Re: MX-23 Live--Can't Restore Grub Options

#6 Post by calinb »

Thank you so much, fehlix! I've always had trouble understanding how to change and save live boot parameters.

Do your have any idea why I cannot change display resolution with "Settings >> DIsplay" now? It worked before I started to mess around with the boot parameters but now it is stuck with only one resolution. I still need to figure out the best way to share this live pendrive between a laptop and old CRT monitor at 1280x1024.

The live-grubsave methods work for me but I still don't understand the (!) and where to manually add the parameter "grubsave" as you suggest here. Does putting "grubsave" anywhere on the first setparams line make it save automatically?
fehlix wrote: Fri Oct 20, 2023 2:30 am Another way on the live grub menu:
Press "E"-key, remove or add manually any parameter from/to the first setparamas line
and (!) add manually the parameter "grubsave".
Press Ctrl+x or F10: Now all parameter currently in use will be saved by live-grubsave during boot.
( Or navigate to the Boot options -> Save options menu -> grubsave ...)

User avatar
fehlix
Developer
Posts: 12916
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX-23 Live--Can't Restore Grub Options

#7 Post by fehlix »

calinb wrote: Fri Oct 20, 2023 2:09 pm The live-grubsave methods work for me but I still don't understand the (!) and where to manually add the parameter "grubsave" as you suggest here. Does putting "grubsave" anywhere on the first setparams line make it save automatically?
Yes, that's what it does. You add manually "grubsave" to setparams line (the 1st line).
Or, you navigate to Advanced Boot options -> Save options
and "select" grubsave. When back at the main menu , you'll see
with "E"-key that "grubsave was added.
So either way the "grubsave" parameter will be visible as kernel command line parameter when booted into the system. And one of the very early processes will check the kernel command line parameter at /proc/cmdline,
And if "grubsave" parameter was found will re-write the saved boot parameter into /boot/grub/grubenv.cfg on the LiveUSB with help of the live-grubsave tool.
calinb wrote: Fri Oct 20, 2023 2:09 pm Do your have any idea why I cannot change display resolution with "Settings >> DIsplay" now? It worked before I started to mess around with the boot parameters but now it is stuck with only one resolution. I still need to figure out the best way to share this live pendrive between a laptop and old CRT monitor at 1280x1024.
Maybe you somehow managed to generate a xorg.conf file with some resolution definitions.
May be check if this file exists:
/etc/X11/xorg.conf
in case there is one, perhaps rename to /etc/X11/xorg.conf.back

Code: Select all

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.back

User avatar
calinb
Posts: 84
Joined: Tue Jun 27, 2017 1:57 am

Re: MX-23 Live--Can't Restore Grub Options

#8 Post by calinb »

fehlix wrote: Fri Oct 20, 2023 3:15 pm Maybe you somehow managed to generate a xorg.conf file with some resolution definitions.
May be check if this file exists:
/etc/X11/xorg.conf
in case there is one, perhaps rename to /etc/X11/xorg.conf.back

Code: Select all

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.back
Thanks, fehlix but here is no xorg.conf file. I might have to start over with a new live USB stick. I already flashed one and I noticed that System >> Display uses the "Laptop" entry with an abundance of screen resolution options but my old live system only has "default" and just a single available resolution.

I have to leave town for few days but I'll let you know how it goes when I return.

-Cal

User avatar
dolphin_oracle
Developer
Posts: 22744
Joined: Sun Dec 16, 2007 12:17 pm

Re: MX-23 Live--Can't Restore Grub Options

#9 Post by dolphin_oracle »

possibly kernel modules blacklists in /etc/modprobe.d/live-blacklist.conf. that file might not get removed either.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/

User avatar
calinb
Posts: 84
Joined: Tue Jun 27, 2017 1:57 am

Re: MX-23 Live--Can't Restore Grub Options

#10 Post by calinb »

dolphin_oracle wrote: Sat Oct 21, 2023 1:46 pm possibly kernel modules blacklists in /etc/modprobe.d/live-blacklist.conf. that file might not get removed either.
Bingo! Thanks, DO!

There's no blacklist.conf at all on the new live USB stick that's only been plugged into my Dell laptop. The original stick has been plugged into my workstation with the old CRT monitor and it has a ton of blacklisted module in a blacklist.conf file. I wonder if they all showed up after I plugged it into the workstation. I renamed the live-blacklist.conf to live-blacklist.conf.bak and now the "Laptop" resolutions are back again!

:popcorn:

More trials are necessary, which I'll do when I return from my road trip mid-next-week.

FYI (off-topic): The reason I'm interested in using a live USB stick is I've installed everything from the 73 Linux script for ham radio and it works very well. I'd like to share the stick and configurations between several computers. KM4ACK (Jason) originally authored Build-a-Pi and it has morphed into an amd/x86-64 Debian-based Linux compatible script. I've tried it on both MX-Linux and RPi and other arm64 OSes. For me, it works best on my AMD/IntelX86-64 MX-Linux systems!

JayM (Qualified MX Guide) here in the forum is a ham radio operator. I'm sure others will be interested in my experiences pairing MX-Linux with the 73 Linux installer so I'll post about it in a new thread when I return. I've also tried other packaged ham application bundle installers like Build-a-Pi, Inovato Quadra, and Andy's Ham Radio Linux (Xubuntu based, which with difficulty I converted to live with persistence) and this is the best system I've found yet..."73 MX-Linux." More info:
https://github.com/km4ack/73Linux


73,

Cal -- AD8Q

Post Reply

Return to “MX Help”