Need help creating a self-booting solo frugal install on nvme ssd  [Solved]

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
retroD0d0
Posts: 74
Joined: Sat Aug 17, 2024 4:36 pm

Need help creating a self-booting solo frugal install on nvme ssd

#1 Post by retroD0d0 »

Hey All, I want to do a (generalised) frugal solo install to a nvme ssd (nothing else on the drive other than MX-Frugal) with a view to sharing a self-booting frugal MX with someone else to fit in his nvme2usb enclosure and run on his system directly. (not needing a live-usb to chainload).

In other words I want the bootloader/grub on the same drive as the frugal install. The target device supports both legacy and uefi boot.

My hopeless attempt so far. (Actually my first attempt at a frugal install).

Using Gparted. So far I have created a 200MB FAT32 ESP partition and for the remainder, an ext4 partition for the frugal install.

I set the ESP partition flags to boot/efi and performed the frugal installation using a live usb.

Now running MX in f_static_root mode from the nvme ssd, I used disk-manager to ensure both EFI and antiX_Frugal partitions were mounted.

Then I tried reinstalling grub using MX Boot Repair, selecting type ESP and the corresponding ESP partition as the location for grub and antiX_Frugal partition as the root location. After hitting 'apply' I run into an error; specifically: Cannot setup chroot environment, please double-check the root location.

Can anyone please help me get this bootloader up and running?

Code: Select all

Snapshot created on: 20250504_0012
System:
  Kernel: 5.10.230-antix.1-amd64-smp arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.10.230-antix.1-amd64-smp root=UUID=<filter> ro quiet
    splash
  Desktop: Xfce v: 4.20.0 tk: Gtk v: 3.24.38 info: xfce4-panel wm: xfwm v: 4.20.0 vt: 7
    dm: LightDM v: 1.32.0 Distro: MX-23.6_x64 Libretto May 19  2024 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Desktop Mobo: MAXSUN model: MS-HDZ A10 Quad V2.0 serial: <superuser required>
    UEFI: American Megatrends v: 4.6.5 date: 08/31/2022
CPU:
  Info: model: AMD A8-7200P Radeon R5 8 Compute Cores 4C+4G bits: 64 type: MT MCP arch: Steamroller
    level: v2 built: 2014 process: GF 28nm family: 0x15 (21) model-id: 0x30 (48) stepping: 1
    microcode: 0x6003106
  Topology: cpus: 1x cores: 4 smt: enabled cache: L1: 256 KiB desc: d-4x16 KiB; i-2x96 KiB
    L2: 4 MiB desc: 2x2 MiB
  Speed (MHz): avg: 1931 high: 2063 min/max: 1400/2400 boost: enabled scaling:
    driver: acpi-cpufreq governor: ondemand cores: 1: 1928 2: 2063 3: 1953 4: 1783 bogomips: 19163
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT vulnerable
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, STIBP: disabled, RSB filling, PBRSB-eIBRS: Not
    affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Kaveri [Radeon R5 Graphics] driver: radeon v: kernel alternate: amdgpu arch: GCN-2
    code: Sea Islands process: GF/TSMC 16-28nm built: 2013-17 ports: active: HDMI-A-1 empty: VGA-1
    bus-ID: 00:01.0 chip-ID: 1002:130e class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.20.0 driver: X: loaded: radeon
    unloaded: fbdev,modesetting,vesa dri: radeonsi gpu: radeon display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 509x286mm (20.04x11.26") s-diag: 584mm (22.99")
  Monitor-1: HDMI-A-1 mapped: HDMI-0 model: Sony TV serial: <filter> built: 2010 res: 1920x1080
    hz: 60 dpi: 30 gamma: 1.2 size: 1600x900mm (62.99x35.43") diag: 1836mm (72.3") ratio: 16:9 modes:
    max: 1920x1080 min: 640x480
  API: OpenGL v: 4.5 Mesa 22.3.6 renderer: KAVERI ( LLVM 15.0.6 DRM 2.50
    5.10.230-antix.1-amd64-smp) direct-render: Yes
Audio:
  Device-1: AMD Kaveri HDMI/DP Audio driver: snd_hda_intel v: kernel bus-ID: 00:01.1
    chip-ID: 1002:1308 class-ID: 0403
  Device-2: AMD FCH Azalia vendor: Conexant Systems driver: snd_hda_intel v: kernel
    bus-ID: 00:14.2 chip-ID: 1022:780d class-ID: 0403
  API: ALSA v: k5.10.230-antix.1-amd64-smp status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 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 Wireless 7260 driver: iwlwifi v: kernel modules: wl pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 bus-ID: 01:00.0 chip-ID: 8086:08b1 class-ID: 0280
  IF: wlan0 state: down mac: <filter>
  Device-2: Realtek RTL810xE PCI Express Fast Ethernet driver: r8169 v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 05:00.0 chip-ID: 10ec:8136 class-ID: 0200
  IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 1011.57 GiB used: 57.49 GiB (5.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: KingSpec model: NE-512 2280 size: 476.94 GiB
    block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: VC3S500H temp: 45.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Netac model: SSD 512GB size: 476.94 GiB block-size:
    physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 9A0 scheme: MBR
  ID-3: /dev/sdb maj-min: 8:16 type: USB vendor: Toshiba model: KIOXIA TransMemory
    size: 57.69 GiB block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  ID-1: / raw-size: 476.69 GiB size: 468.13 GiB (98.21%) used: 57.49 GiB (12.3%) fs: ext4
    dev: /dev/sda2 maj-min: 8:2
  ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 274 KiB (0.1%) fs: vfat
    dev: /dev/sda1 maj-min: 8:1
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 3 GiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
Sensors:
  System Temperatures: cpu: 46.6 C mobo: N/A gpu: radeon temp: 46.0 C
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2204 pm: dpkg pkgs: 2191 libs: 1102 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 13
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list
    1: deb [arch=amd64 signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian/ bookworm-updates non-free-firmware non-free contrib main
  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/megasync.list
    1: deb [signed-by=/usr/share/keyrings/meganz-archive-keyring.gpg] https://mega.nz/linux/repo/Debian_12/ ./
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb https://mxlinux.mirror.liquidtelecom.com/packages/mx/repo/ bookworm main non-free
Info:
  Processes: 208 Uptime: 26m wakeups: 1 Memory: 14.6 GiB used: 1.6 GiB (10.9%) 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

User avatar
CharlesV
Global Moderator
Posts: 7313
Joined: Sun Jul 07, 2019 5:11 pm

Re: Need help creating a self-booting solo frugal install on nvme ssd

#2 Post by CharlesV »

Do you still need help with this ?
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

retroD0d0
Posts: 74
Joined: Sat Aug 17, 2024 4:36 pm

Re: Need help creating a self-booting solo frugal install on nvme ssd

#3 Post by retroD0d0 »

CharlesV wrote: Fri May 30, 2025 1:38 pm Do you still need help with this ?
You bet Sir. I was getting a little worried this thread was going to die of loneliness.

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

Re: Need help creating a self-booting solo frugal install on nvme ssd

#4 Post by fehlix »

retroD0d0 wrote: Mon May 26, 2025 8:19 am In other words I want the bootloader/grub on the same drive as the frugal install. The target device supports both legacy and uefi boot.
The easiest: Use live-usb-maker to create a "self booting" drive.

LiveMedia/LiveUSB created with live-usb-maker is like "boot-loader for BIOS and UEFI" + frugal install.
So, with a pure frugal install a boot loader needs to be installed separately.
live-usb-maker will create both bootloader(s) (for BIOS and UEFI boot) and the actual frugal-install.
When creating the "LiveSSD" make the ext4 with a label e.g like "Live-Install"
and add "blab=Live-Install" to the boot parameter in order the live-install to boot from will be found during boot.

With this setup the LiveSSD is prepared to boot with UEFI and legacyBIOS/MBR.
Within live-usb-maker set to disable USB-check, which allows to
create a LiveSSD, even if detected as internal drive incase the SSD
is attached and seen as internal drive.

Directly "frugal install" is also possible:
Boot from a LiveUSB and select frugal boot option, follow instructions shown.
The "complicated" part would be to add a bootloader for bootign both legacyBIOS and UEFI.
Can be done with a "grub-install" twice for UEFI and legacy BIOS.
You would first prepare a grub-install environment to get this done.
Next you need manually create the GRUB menu to hold the grub entries,
like those generated by frugal-install found under antiX.../grub.entry.
But to be honest, it's just simpler to let live-usb-maker do this for you.

retroD0d0
Posts: 74
Joined: Sat Aug 17, 2024 4:36 pm

Re: Need help creating a self-booting solo frugal install on nvme ssd

#5 Post by retroD0d0 »

Hi @fehlix , thanks for responding. On my attempt using LiveUSB Maker, I encountered an error.
log:

Code: Select all

/usr/local/bin/live-usb-maker gui -N --force=usb --force=makefs --label=Live_Install -C off --from=/home/Default/Downloads/Large Files/iso/MX-23.6.1_KDE_x64.iso -t /dev/nvme0n1
        program: live-usb-maker
        started: Sun  1 Jun 09:01:46 +04 2025
        version: 2.41.19-2302 (Sat, 25 Feb 2023 12:45:10 -0500)
         kernel: 5.10.230-antix.1-amd64-smp
             OS: MX 23.6 (Libretto)
      found lib: /usr/local/lib/cli-shell-utils/cli-shell-utils.bash
    lib version: 2.41.05-2302 (Sat, 25 Feb 2023 12:45:10 -0500)
---------------------------------------------------------------------

Found man page: live-usb-maker.1
Will use target device /dev/nvme0n1 (476.9G NE-512 2280)
Will use source file /home/Default/Downloads/Large Files/iso/MX-23.6.1_KDE_x64.iso
Distro: MX-23.6.1_KDE_x64 Libretto May 18, 2025
Found grub config 2.0
Estimated extfs overhead for 488335M is 44M

                   Total      Used    Extra
   entire drive  476 GiB  476 GiB    1 MiB
 main partition  476 GiB 2.73 GiB  474 GiB
 uefi partition   50 MiB   32 MiB   18 MiB

Ready to make live-usb on device nvme0n1
... by copying file /home/Default/Downloads/Large Files/iso/MX-23.6.1_KDE_x64.iso

>> partition-clear
Total bytes: 512110190592
Total blocks: 1000215216
 > dd status=none if=/dev/zero of=/dev/nvme0n1 bs=512 count=34
 > dd status=none if=/dev/zero of=/dev/nvme0n1 bs=512 count=34 seek=64
 > dd status=none conv=notrunc if=/dev/zero of=/dev/nvme0n1 bs=512 count=34 seek=1000215182
 > partprobe /dev/nvme0n1

>> partition-make
Using msdos partitioning
 > parted --script --align optimal /dev/nvme0n1 unit MiB mklabel msdos
 > dd status=none if=/dev/zero of=/dev/nvme0n1 seek=1024 bs=1K count=128
 > parted --script --align optimal /dev/nvme0n1 unit MiB mkpart primary 1 488335
 > parted --script --align optimal /dev/nvme0n1 unit MiB set 1 boot on
 > dd status=none if=/dev/zero of=/dev/nvme0n1 seek=500055040 bs=1K count=128
 > parted --script --align optimal /dev/nvme0n1 unit MiB mkpart primary 488335 488384
 > parted --script --align optimal /dev/nvme0n1 unit MiB set 2 esp on
 > partprobe /dev/nvme0n1
 > wait_for_file /dev/nvme0n11
Error: Device /dev/nvme0n11 does not exist!

Error: Device /dev/nvme0n11 does not exist!
configs:
Image

I tried with MS-DOS partitioning and GPT but same error: could not find /dev/nvme0n11.
Notice how it labels 'nvme0n11' instead of 'nvme0n1p1' as it should be for the first partition. Could mislabelling be to blame?

Hi @Eadwine Rose Ok, got it, have done the necessary edit.
Last edited by retroD0d0 on Sun Jun 01, 2025 1:57 am, edited 2 times in total.

User avatar
Eadwine Rose
Administrator
Posts: 14618
Joined: Wed Jul 12, 2006 2:10 am

Re: Need help creating a self-booting solo frugal install on nvme ssd

#6 Post by Eadwine Rose »

Please don't post screenshots of code output, they cannot be searched. You can post code on the forum like this:

[code]code output here[/code]

Thanks.
MX-23.6_x64 July 31 2023 * 6.1.0-37amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

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

Re: Need help creating a self-booting solo frugal install on nvme ssd

#7 Post by fehlix »

retroD0d0 wrote: Sun Jun 01, 2025 1:41 am

Code: Select all

 > partprobe /dev/nvme0n1
 > wait_for_file /dev/nvme0n11
Error: Device /dev/nvme0n11 does not exist!

Error: Device /dev/nvme0n11 does not exist!
Looks like a bug somewhere. Maybe related to the special nvme naming sceme.
Workaround put the ssd into a external USB enclosure and try again. Stay with GPT.

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

Re: Need help creating a self-booting solo frugal install on nvme ssd

#8 Post by fehlix »

retroD0d0 wrote: Sun Jun 01, 2025 1:41 am

Code: Select all

 > partprobe /dev/nvme0n1
 > wait_for_file /dev/nvme0n11
Error: Device /dev/nvme0n11 does not exist!

Error: Device /dev/nvme0n11 does not exist!
OK, identified the bug, which causes live-usb-maker to error out when using with nvme drives.
Here a "quick-fix":
Do open terminal as normal user and run this sed command with sudo:

Code: Select all

sudo sed -i.orig '/mmcblk/{p;s//nvme/}' /usr/local/lib/cli-shell-utils/cli-shell-utils.bash
At least this would make "MX Live USb Maker" (GUI) work with nvme drives.
Looks like something like this fix need to go into the repos.
So thanks for reporting the bug.

retroD0d0
Posts: 74
Joined: Sat Aug 17, 2024 4:36 pm

Re: Need help creating a self-booting solo frugal install on nvme ssd  [Solved]

#9 Post by retroD0d0 »

fehlix wrote: Sat May 31, 2025 6:38 am
The easiest: Use live-usb-maker to create a "self booting" drive.
LiveMedia/LiveUSB created with live-usb-maker is like "boot-loader for BIOS and UEFI" + frugal install.
When creating the "LiveSSD" make the ext4 with a label e.g like "Live-Install"
and add "blab=Live-Install" to the boot parameter in order the live-install to boot from will be found during boot.
fehlix wrote: Sun Jun 01, 2025 9:56 am
OK, identified the bug, which causes live-usb-maker to error out when using with nvme drives.
Here a "quick-fix":
Do open terminal as normal user and run this sed command with sudo:

Code: Select all

sudo sed -i.orig '/mmcblk/{p;s//nvme/}' /usr/local/lib/cli-shell-utils/cli-shell-utils.bash
At least this would make "MX Live USb Maker" (GUI) work with nvme drives.
Great, @fehlix , the quick fix worked, you're a genius!
I had no idea how to persist boot parameters, so from the grub menu I edited the main entry and when in the live SSD session, I used MX Boot Options, where the boot parameter was already set "blab=my-partition_label", I checked and unchecked a random box to un-grey the 'apply' button and then hit it. All the necessary grubcfg/grubenv? changes were done. I now have a Live NVME. I had no idea Live USB maker was that flexible. Super! It is really insanely fast by the way.

I condensed the solution into this single post and will mark this one itself as the solution to make it easily searchable to anyone in the future, though perhaps by then the naming bug part will be fixed. Thanks to everyone in the thread including @CharlesV for the kind bump.

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

Re: Need help creating a self-booting solo frugal install on nvme ssd

#10 Post by fehlix »

retroD0d0 wrote: Thu Jun 05, 2025 6:21 am I had no idea how to persist boot parameters, so from the grub menu I edited the main entry and when in the live SSD session, I used MX Boot Options, where the boot parameter was already set "blab=my-partition_label", I checked and unchecked a random box to un-grey the 'apply' button and then hit it. All the necessary grubcfg/grubenv?
The now this way installed frugal installation is effectively like a Live installation on a drive.
And boot parameters of this Live-install can now be saved using "grubsave" live-boot parameter to be found
on the LiveBoot menu under Advance Options -> Save options -> "grubsave".
E:g. in case to have changes stored on the drive persistently , one would select one of the persist boot parameter
like this one
persist_root Save root and home in RAM then saved at shutdown
or e,g
p_static_root Save root and home on disk together
Those saved boot parameter can be found on the first ext4 partition under /boot/grub/grubenv.cfg
and can be listed with the running live "frugal" system with

Code: Select all

sudo live-grubsave --print
The Live-installed system can now be booted by selecting the drive at the [Fn] UEFI boot option list.
In addttiion one can add it's own UEFI boot menu entry to this list by
using MX provided "UEFI Boot Manager". Select the efi-file on the ESP (that's the 2nd partition on the live-disk)
and choose/select under /EFI/BOOT/Bootx64.efi. Give it a reasonable label like "Live_Install (ssd...)" or similar
and it will be available to select from within the UEFI-boot options list.

Post Reply

Return to “MX Help”