The kernel problem with recent updates has been solved. Find the solution here

Important information
-- Required MX 15/16 Repository Changes
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

-- Introducing our new Website
-- MX Linux on social media: here

Current releases
-- MX-18.3 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.4.1 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

?possible to install "live w/ persistence" on an existing partition of a USB flash drive w/o having to erase any data?

Post Reply
User avatar
Forum Novice
Forum  Novice
Posts: 4
Joined: Fri Apr 19, 2019 11:10 am

?possible to install "live w/ persistence" on an existing partition of a USB flash drive w/o having to erase any data?


Post by FoxiMaxi » Tue Aug 20, 2019 11:18 am

I am a newbie but I have been searching for advice on my issue, which I find too special. :(

My question:
Is it possible to use
an already existing partition of a USB flash drive
for installing "MX Linux live with persistence"
without having to erase data on the other partition?

The drive has two partitions:
/dev/sdd1 exfat 41.28GB # full of data, and i have no room on other drives to temporarily move them to
/dev/sdd2 - 16.00GB # no data; this is what i'd like to use for mx linux live with persistence

# i have linux mint installed on my hdd, that's what i am using right now

User avatar
Forum Regular
Forum Regular
Posts: 578
Joined: Sat Jun 22, 2019 8:35 am

Re: ?possible to install "live w/ persistence" on an existing partition of a USB flash drive w/o having to erase any dat


Post by Huckleberry » Tue Aug 20, 2019 11:43 am

In fact, it's possible to install frugal with persistence on any drive even with a system installed there (even Win) without disturbing it, as it will be like creating a directory there without touching other things.. So, I guess the answer is yes, you just need to place the relevant entry to Grub menu and point out that drive - partition to boot..

But, if you mean you want to make the same of your live-usb with persistence there and boot directly with it; then "no" it wouldn't boot directly to that partition like a live-usb with a single partition. (Anyway, when you attempt to write the iso, the application will already warn you that everything - all partitions and data- will be exterminated and whether you're sure etc..) Therefore it needs to be "frugal" and started via Grub menu like other installed systems on different partitions...

You just start the live-session on the other usb and hit F5 at the welcome screen then select the one you like (frugal_persist) https://i.vgy.me/JxPpt2.png https://i.vgy.me/IvgNdr.png and then install and point out that usb device and partition "where to" frugal install.. (As you might already know, the letters may change next time "sdd2")

These may be helpful to make it clear "what's what" and how to:

https://download.tuxfamily.org/antix/do ... #under-toc
https://www.mxlinux.org/user_manual_mx1 ... ist+frugal
When asking for help, please first : Menu => MX Tools => Quick System Info
Even no need to select & copy. The output will get in the clipboard automatically, just paste.

MX 18.3 - 32bit 5.2.15-antix.1-686-smp-pae

User avatar
Posts: 3353
Joined: Sat Aug 22, 2009 11:36 pm

Re: ?possible to install "live w/ persistence" on an existing partition of a USB flash drive w/o having to erase any dat


Post by BitJam » Tue Aug 20, 2019 4:16 pm

The frugal install is very clever. The first time you boot with the "frugal" option, it will do the frugal install to a formatted partition of your choice. After that, the same "frugal" option will cause us to boot into the frugal install you created on the first boot.

You need a recent version of live-usb-maker (from test repos or my git repo) for the following to work. Make sure it has the --data-first option available. Otherwise we might overwrite your data!

You will also need to create a small (50M or so) fat32 partition at the end of your usb-stick and format your 2nd partition as ext4. This should be easy to do in the gparted program. Please use --pretend mode first.

However, if you don't already have an MX live system available or if you want to boot from your usb stick then some manual intervention will be required. Fortunately, we make this very easy with the command line version of live-usb-maker. Let's say you want to install from MX-18.3_x64.iso in your user's ~/Download directory. Plug in your usb stick and run:

Code: Select all

sudo live-usb-maker --from ~/Download/MX-18.3_x64.iso  "copy-main+"
I just tested that here. The "copy-main+" command will cause LUM to skip the partitioning and formatting steps and start with copy-main so your current data is preserved.

If you are nervous about your data, please use "pretend" mode first to see the steps we will take. I also did that here and LUM created the following output:

Code: Select all

Found msdos partitioning

Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/sdd1      vfat  3.0G  4.0K  3.0G   1% data
/dev/sdd2      ext4   12G  330M   12G   3% main
/dev/sdd3      vfat   49M   13M   37M  26% uefi

>> copy-uefi
copy from iso to uefi partition
files [Ee][Ff][Ii] boot/{grub,uefi-mt} version
Fix Dell uefi memtest bug
>> copy-main
Removing existing antiX/ directory
copy from iso to main partition

>> check-usb-md5
check md5 for initrd.gz
check md5 for linuxfs
check md5 for vmlinuz
>> uuids
Using antiX/MX grub config 1.0
>> install
extlinux version 6.04
>> done
You can see the actual commands that would be run in the file /var/log/live-usb-maker.log. Carefully look at the table that shows the existing partitions. If the first partition is not marked as "data" then something is wrong.

If you don't already have a recent version of live-usb-maker (with the --data-first option) installed on your system, you can easily get it using the instructions in my live-usb-maker repo:

Code: Select all

sudo apt-get update       # if needed
sudo apt-get install git  # if needed
git clone https://github.com/BitJam/live-usb-maker
git clone https://github.com/BitJam/cli-shell-utils
cd live-usb-maker
sudo ./live-usb-maker
If you already have "git" installed then you can skip the first two steps. If you are using a non-Debian system then use your normal package installer to install "git" if it is not already installed. If you are using live-usb-maker from my repos then then command to run changes slightly to:

Code: Select all

sudo ./live-usb-maker --from ~/Download/MX-18.3_x64.iso  "copy-main+"
We precede "live-usb-maker" with a "./" so the version in the current directory is used instead of having the system look for live-usb-maker on your $PATH.

Tl;DR: this may look very complicated but it boils down to just 4 commands (assuming you already have "git" installed):

Code: Select all

git clone https://github.com/BitJam/live-usb-maker
git clone https://github.com/BitJam/cli-shell-utils
cd live-usb-maker
sudo ./live-usb-maker --from ~/Download/MX-18.3_x64.iso  "copy-main+"
Will I cry when it's all over?
When I die will I see Heaven?

Post Reply

Return to “Installation”