Page 1 of 1

Making a bootable external USB drive with MX Linux installed

Posted: Fri Jan 31, 2025 3:12 pm
by FullScale4Me
Compatible with both Legacy aka MBR aka CSM and modern UEFI systems.

This How-To guide outlines the steps needed to create this 'Hybrid disk' without a need to change the BIOS/Firmware of other PCs each time to boot from this drive. Minimally these PCs may need to be setup for allowing USB booting via the One Time Boot Menu.

Making a bootable external USB drive with MX Linux installed 195 Kb PDF, Last updated February 18, 2025.

Edit: updated long description and document date.

Re: Making a bootable external USB drive with MX Linux installed

Posted: Fri Jan 31, 2025 5:28 pm
by CharlesV
FullScale4Me wrote: Fri Jan 31, 2025 3:12 pm Compatible with both Legacy aka MBR aka CSM and modern UEFI systems.

This How-To guide outlines the steps needed to accomplish the above without the need to enter the BIOS/Firmware of other PCs each time to boot from this drive. Minimally they do need to be set up to allow USB booting. After this the One Time Boot Menu is sufficient.

Making a bootable external USB drive with MX Linux installed 195 Kb PDF, Last updated January 29, 2025.
Very nice guide, thank you!

Re: Making a bootable external USB drive with MX Linux installed

Posted: Fri Jan 31, 2025 5:39 pm
by Germ
Excellent. Thank you!

Re: Making a bootable external USB drive with MX Linux installed

Posted: Fri Jan 31, 2025 8:22 pm
by fehlix
FullScale4Me wrote: Fri Jan 31, 2025 3:12 pm Compatible with both Legacy aka MBR aka CSM and modern UEFI systems.

This How-To guide outlines the steps needed to accomplish the above without the need to enter the BIOS/Firmware of other PCs each time to boot from this drive. Minimally they do need to be set up to allow USB booting. After this the One Time Boot Menu is sufficient.

Making a bootable external USB drive with MX Linux installed 195 Kb PDF, Last updated January 29, 2025.
Thanks for writing this up. Some comments.

* It may be worth noting, that the procedure to install both UEFI and BIOS grub-bootloader, may also
useful for normal internal drive installations, in cases where e.g UEFI boot into MX ceased to stop working,
like in cases where Windows took over the ESP. So user could at least boot into within BIOS boot mode until the UEFI boot is repaired.

* On GPT I do normally also give the partitions a "Name" not only the filesystem a "Label"
For the "Bios Grub" partition perhaps this is more relevant, b/c the partitions will not have a filesystem on it,
as legacy grub-install will "dump" it's grub core.img onto this partition, ready to be used for legacy BIOS boot.
Also when creating a bios_grub partition, it may help to select filesystem format as "cleared",
(but any other filesystem will work also). When grub-install runs, any filesystem on that partition will be removed anyway.

* Re. the GRUB menu on the installed system and to avoid having other systems listed within the GRUB menu:
Instead of disabling os-prober after the MX Linux was installed, one could disable os-proper
on the booted LiveUSB just before the" MX Installer" was started.
So, on booted LiveSystem open terminal and run:

Code: Select all

sudo chmod -x /etc/grub.d/30_os-prober
The removed execution bit will be carried over into the installed system, and hence
the GRUB menu which was generated during the installation, would only have entries for this one system.
No need to re-run update grub on the installed system.
So far my quicky comments.

Re: Making a bootable external USB drive with MX Linux installed

Posted: Thu Feb 13, 2025 9:34 pm
by FullScale4Me
I just updated this How-To (13-February-2025) with comments from this thread, addressed a few more very minor (for English speakers) typos, and fixed some unclarities.

Re: Making a bootable external USB drive with MX Linux installed

Posted: Thu Feb 20, 2025 7:42 pm
by FullScale4Me
Searching for a really fast drive for this task?

https://ssd-tester.com/usb_flash_drive_test.php

I went for a name I knew and a price point that was within my budget (pensioner). PNY PRO Elite V2 256GB USB flash drive - all metal construction - https://ssd-tester.com/pny_pro_elite_v2_256gb.html

Re: Making a bootable external USB drive with MX Linux installed

Posted: Wed Feb 26, 2025 7:14 am
by 1nky
Hi Fullscaleme
Thanks nice tutorial cleared up a lot for me .... although I have only been using mx for about/ 4 or 5 months there are some things I'm still unsure of, regarding the excellent mx tools. I was hoping you wouldn't mind explaining how I would (using the tutorial) getting my head around creating, essentially a backup of my installed system. What I'm struggling with is understanding all the various ways to get this done and the differences between re-spins and creating a bootable iive usb of the installed system and which is the best way to create a bootable usb of my current installed system that could be a backup and also be used on other systems.
What I have at the moment is the live usb I installed with... and an iso of the current installed system. Here are my questions:
1) I'm using a preempted ahs kernel, and sysVinit... is that okay?
2)Can I use the 16g usb with the live install media to create a bootable clone of my current system from the 20G ISO ? ie does the cloned os get squashed and compressed and become a new bootable system that is my current installed system? as in reinstalling my currently installed system, or if I wanted a carbon copy of the full install would I need a storge device that can hold the full size of the current size (roughly 155g).

Thanks for your time and patience... :turtle:
ps I think i'm in a different time zone but will check in as and when thanks.






Code: Select all

[CODE]Snapshot created on: 20250225_1534
System:
  Kernel: 6.11.10-1-liquorix-amd64 [6.11-15~mx23ahs] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 parameters: audit=0
    intel_pstate=disable BOOT_IMAGE=/boot/vmlinuz-6.11.10-1-liquorix-amd64 root=UUID=<filter> ro
    quiet splash resume=UUID=<filter> resume_offset=113326080
  Desktop: KDE Plasma v: 5.27.5 wm: kwin_x11 vt: 7 dm: SDDM Distro: MX-23.5_KDE_x64 Libretto
    September 15 2024 base: Debian GNU/Linux 12 (bookworm)
Machine:
  Type: Desktop System: Micro-Star product: MS-7E27 v: 1.0 serial: <superuser required>
  Mobo: Micro-Star model: PRO B650M-P (MS-7E27) v: 1.0 serial: <superuser required> UEFI: American
    Megatrends LLC. v: 1.D1 date: 10/22/2024
Battery:
  Device-1: hidpp_battery_0 model: Logitech M350 Wireless Mouse serial: <filter> charge: 100%
    (should be ignored) rechargeable: yes status: discharging
CPU:
  Info: model: AMD Ryzen 7 7700X bits: 64 type: MT MCP arch: Zen 4 gen: 5 level: v4 note: check
    built: 2022+ process: TSMC n5 (5nm) family: 0x19 (25) model-id: 0x61 (97) stepping: 2
    microcode: 0xA601209
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache: L1: 512 KiB
    desc: d-8x32 KiB; i-8x32 KiB L2: 8 MiB desc: 8x1024 KiB L3: 32 MiB desc: 1x32 MiB
  Speed (MHz): avg: 1671 high: 5350 min/max: 545/5573 boost: enabled scaling:
    driver: amd-pstate-epp governor: performance cores: 1: 5350 2: 4957 3: 5349 4: 545 5: 545 6: 545
    7: 545 8: 545 9: 545 10: 545 11: 4551 12: 545 13: 545 14: 545 15: 545 16: 545 bogomips: 144000
  Flags: avx avx2 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 status: Not affected
  Type: spec_rstack_overflow mitigation: Safe RET
  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; STIBP: always-on;
    RSB filling; PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GA104 [GeForce RTX 3070] vendor: ZOTAC driver: nvidia v: 535.216.03
    non-free: 530.xx+ status: current (as of 2023-03) arch: Ampere code: GAxxx process: TSMC n7 (7nm)
    built: 2020-22 pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.0 chip-ID: 10de:2484
    class-ID: 0300
  Device-2: AMD Raphael vendor: Micro-Star MSI driver: amdgpu v: kernel arch: RDNA-2
    code: Navi-2x process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4 speed: 16 GT/s lanes: 16 ports:
    active: none empty: DP-1, DP-2, DP-3, HDMI-A-1, Writeback-1 bus-ID: 10:00.0 chip-ID: 1002:164e
    class-ID: 0300 temp: 37.0 C
  Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 22.1.9 compositor: kwin_x11 driver: X:
    loaded: amdgpu,nvidia unloaded: fbdev,modesetting,nouveau,vesa alternate: nv dri: radeonsi
    gpu: nvidia,amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1280x1024 s-dpi: 85 s-size: 382x302mm (15.04x11.89") s-diag: 487mm (19.17")
  Monitor-1: HDMI-0 res: 1280x1024 hz: 60 dpi: 86 size: 376x301mm (14.8x11.85")
    diag: 482mm (18.96") modes: N/A
  API: OpenGL v: 4.6.0 NVIDIA 535.216.03 renderer: NVIDIA GeForce RTX 3070/PCIe/SSE2
    direct-render: Yes
Audio:
  Device-1: NVIDIA GA104 High Definition Audio vendor: ZOTAC driver: snd_hda_intel v: kernel pcie:
    gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:228b class-ID: 0403
  Device-2: AMD Rembrandt Radeon High Definition Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 10:00.1
    chip-ID: 1002:1640 class-ID: 0403
  Device-3: AMD Family 17h/19h HD Audio vendor: Micro-Star MSI driver: snd_hda_intel v: kernel
    pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 10:00.6 chip-ID: 1022:15e3 class-ID: 0403
  API: ALSA v: k6.11.10-1-liquorix-amd64 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: Realtek RTL8125 2.5GbE vendor: Micro-Star MSI driver: r8169 v: kernel pcie: gen: 2
    speed: 5 GT/s lanes: 1 port: e000 bus-ID: 0c:00.0 chip-ID: 10ec:8125 class-ID: 0200
  IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 476.94 GiB used: 151.03 GiB (31.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital model: PC SN730 SDBPNTY-512G-1006
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD
    serial: <filter> rev: HPS2 temp: 34.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 476.69 GiB size: 468.13 GiB (98.21%) used: 151.03 GiB (32.3%) fs: ext4
    dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 274 KiB (0.1%) fs: vfat
    dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 53.16 GiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
Sensors:
  System Temperatures: cpu: 41.9 C mobo: 28.0 C
  Fan Speeds (RPM): N/A
  GPU: device: nvidia screen: :0.0 temp: 39 C fan: 0% device: amdgpu temp: 37.0 C
Repos:
  Packages: pm: dpkg pkgs: 2747 libs: 1500 tools: apt,apt-get,aptitude,nala 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://mxlinux.mirrors.uk2.net/packages/mx/repo/ bookworm main non-free
    2: deb http://mxlinux.mirrors.uk2.net/packages/mx/repo/ bookworm ahs
  Active apt repos in: /etc/apt/sources.list.d/vscodium.list
    1: deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium main
Info:
  Processes: 322 Uptime: 11h 38m wakeups: 6 Memory: 46.17 GiB used: 3.22 GiB (7.0%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 11/12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI
[/code]

Re: Making a bootable external USB drive with MX Linux installed

Posted: Wed Feb 26, 2025 7:23 am
by Eadwine Rose
@1nky Removed sizing around QSI. Not needed, just paste after pressing copy for forum.

Re: Making a bootable external USB drive with MX Linux installed

Posted: Wed Feb 26, 2025 1:04 pm
by 1nky
Eadwine Rose wrote: Wed Feb 26, 2025 7:23 am @1nky Removed sizing around QSI. Not needed, just paste after pressing copy for forum.
oops
ok thanks ... will remember to just paste after copy

Re: Making a bootable external USB drive with MX Linux installed

Posted: Wed Feb 26, 2025 3:06 pm
by FullScale4Me
1nky wrote: Wed Feb 26, 2025 7:14 am What I'm struggling with is understanding all the various ways to get this done and the differences between re-spins and creating a bootable iive usb of the installed system and which is the best way to create a bootable usb of my current installed system that could be a backup and also be used on other systems.
What I have at the moment is the live usb I installed with... and an iso of the current installed system. Here are my questions:
1) I'm using a preempted ahs kernel, and sysVinit... is that okay?
2)Can I use the 16g usb with the live install media to create a bootable clone of my current system from the 20G ISO ? ie does the cloned os get squashed and compressed and become a new bootable system that is my current installed system? as in reinstalling my currently installed system, or if I wanted a carbon copy of the full install would I need a storge device that can hold the full size of the current size (roughly 155g).
Respins by others are not what you are after as you are on a track to make your own personal respin via the MX Snapshot tool. So, what you need to do is create a Snapshot of your system using the MX Snapshot tool. The size obviously will depend on whether you include your home directory and personal files.

1) Yes.

2) The media you bootup to initiate the (final) 'bare metal' install will have to be large enough to have the snapshot ISO 'burned' to it. Said differently, the MX Installer has to be run on the device containing the Snapshot ISO content, not a 3rd device. You can treat this ISO as any other.

Use it as a live system or use the How-To to make an external drive. The MX Live USB Maker can select your snapshot ISO and then be pointed to the destination external device.

Ensure there is greater than 2 times the size of your snapshot free disk space on the PC being snapshotted. MX Snapshot first creates the snapshot as temp files, which it then compresses as a source to write out a bootable ISO.

Start with the help file in that tool, and then, if you have further questions, ask here in a separate subject/topic.

FWIW I am NOT a SME (Subject Matter Expert) on MX Snapshot or MX RemasterCC so I caution you that the above might have a few to some advice errors.

Re: Making a bootable external USB drive with MX Linux installed

Posted: Wed Feb 26, 2025 3:58 pm
by DukeComposed
FullScale4Me wrote: Wed Feb 26, 2025 3:06 pm 2) The media you bootup to initiate the (final) 'bare metal' install will have to be large enough to have the snapshot ISO 'burned' to it.

Ensure there is greater than 2 times the size of your snapshot free disk space on the PC being snapshotted. MX Snapshot first creates the snapshot as temp files, which it then compresses as a source to write out a bootable ISO.
The best advice I'd give to someone experimenting with MX Snapshot is "don't cheap out on your USB thumb drive". There are plenty of threads on this forum created by people who got into trouble trying to be clever about backing up X amount of data to a Y-sized storage device and either X is bigger than Y or Y was just a hair's breadth bigger than X and then we get "that should work/why doesn't it work/is MX Snapshot broken/what's wrong with my computer?/fix it fix it fix it help plz!".

Don't try to squeeze 20 GB of data onto a 16 GB drive: compression isn't magic. Don't ignore the fact that in order to back up your data, you need enough space to both store a copy of the data and store the ISO that gets made from the copy of that data: hence the need for twice the snapshot size in free space just to create it.

The second best advice I could give is "start making backups while you still have room to store one". When your disk is 95% full and you can't bear to lose any of it, you've already missed your window to start exporting your data painlessly. Once you get to that point, you're going to have buy another drive and just start moving files over to it, and that's not something MX Snapshot would be useful at doing.

Thumb drives are cheap, especially the ones 128 GB and smaller. Save yourself the headache and just use a thumb drive big enough to comfortably the data you care about keeping. If you get one big enough you could even put Ventoy on it and maintain a library of different MX snapshot ISOs you create if you keep them around 20 GB each.

Re: Making a bootable external USB drive with MX Linux installed

Posted: Thu Feb 27, 2025 3:11 pm
by 1nky
Thanks FSC4M
Yeah I think some of what I was not getting was because I thought that the way it would work (or what i thought i remember) ... was from some years ago with embedded soc's .... I am probably phrasing this wrong but after the flashed sd card had expanded the sqaushfs to the onboard storage, you could then run a script that would expand the install media to the full size of the sd/ usb that could then be used as secondary storage . Will use appropriate sized USB drives
thanks
I'll make a new topic if I need further assistance cheers

Re: Making a bootable external USB drive with MX Linux installed

Posted: Thu Feb 27, 2025 5:09 pm
by FullScale4Me
Post #6 in this thread has some excellent storage recommendations for both USB and SATA/Nvme.

Frequent use can heat cycle drives thereby shortening their life. That is why I chose an all metal USB. Non metal drives get really hot just at the connector with the body staying relatively cool(er).

Re: Making a bootable external USB drive with MX Linux installed

Posted: Thu Feb 27, 2025 6:04 pm
by 1nky
Yeah FS4M
I have a 512gb all metal unit and have just splashed out on a 982gb all metal USB 3... they claim to be water proof, hope i don't have to find out.
@ Duke thanks
"start making backups while you still have room to store one".
I have been attempting to be more pro active in doing backup's, I had a MB go south last year and it screwed access to a drive and I lost the data on the nvme(that was thankfully backed up)... The Mx tools seem like a great way to keep every thing recent and in one place.
Thanks ;)