Making a bootable external USB drive with MX Linux installed

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
User avatar
FullScale4Me
Posts: 1083
Joined: Fri Jan 08, 2021 11:30 pm

Making a bootable external USB drive with MX Linux installed

#1 Post 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.
Last edited by FullScale4Me on Tue Feb 18, 2025 2:22 pm, edited 2 times in total.
Michael O'Toole
MX Linux facebook group moderator
Dell OptiPlex 7050 i7-7700, MX Linux 23 Xfce & Win 11 Pro
HP Pavilion P2-1394 i3-2120T, MX Linux 23 Xfce & Win 10 Home
Dell Inspiron N7010 Intel Core i5 M 460, MX Linux 23 Xfce & KDE, Win 10

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

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

#2 Post 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!
*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!

User avatar
Germ
Posts: 174
Joined: Sat Sep 03, 2022 9:42 am

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

#3 Post by Germ »

Excellent. Thank you!
calm down.... it's only ones and zeroes...
Linux User #274693

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

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

#4 Post 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.

User avatar
FullScale4Me
Posts: 1083
Joined: Fri Jan 08, 2021 11:30 pm

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

#5 Post 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.
Michael O'Toole
MX Linux facebook group moderator
Dell OptiPlex 7050 i7-7700, MX Linux 23 Xfce & Win 11 Pro
HP Pavilion P2-1394 i3-2120T, MX Linux 23 Xfce & Win 10 Home
Dell Inspiron N7010 Intel Core i5 M 460, MX Linux 23 Xfce & KDE, Win 10

User avatar
FullScale4Me
Posts: 1083
Joined: Fri Jan 08, 2021 11:30 pm

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

#6 Post 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
Michael O'Toole
MX Linux facebook group moderator
Dell OptiPlex 7050 i7-7700, MX Linux 23 Xfce & Win 11 Pro
HP Pavilion P2-1394 i3-2120T, MX Linux 23 Xfce & Win 10 Home
Dell Inspiron N7010 Intel Core i5 M 460, MX Linux 23 Xfce & KDE, Win 10

1nky
Posts: 11
Joined: Sat Dec 07, 2024 7:10 pm

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

#7 Post 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]

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

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

#8 Post by Eadwine Rose »

@1nky Removed sizing around QSI. Not needed, just paste after pressing copy for forum.
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

1nky
Posts: 11
Joined: Sat Dec 07, 2024 7:10 pm

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

#9 Post 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

User avatar
FullScale4Me
Posts: 1083
Joined: Fri Jan 08, 2021 11:30 pm

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

#10 Post 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.
Michael O'Toole
MX Linux facebook group moderator
Dell OptiPlex 7050 i7-7700, MX Linux 23 Xfce & Win 11 Pro
HP Pavilion P2-1394 i3-2120T, MX Linux 23 Xfce & Win 10 Home
Dell Inspiron N7010 Intel Core i5 M 460, MX Linux 23 Xfce & KDE, Win 10

Post Reply

Return to “Tips & Tricks by users (not for help)”