cancel
Showing results for 
Search instead for 
Did you mean: 

Cloning a "live USB" installation

shutter
Community Veteran
Posts: 22,206
Thanks: 3,769
Fixes: 65
Registered: ‎06-11-2007

Cloning a "live USB" installation

Is it possible to clone a "Live USB" that has persistence and other programs/files and folders on it. to an external hard drive.

As I understand it... when you have a Linux Live USB...with persistence activated... you can use it "live" make additions to it.. add programs, files, folders and when you exit/close down... those "additions" remain on the USB..

next time you insert the USB ... all is the same as it was before..

BUT..

from my experience. when you click on the "install Linux" icon... you only get the basic Linux O.S. that was written to the Live USB.. and none of the stuff that you had added.

so.. any way of making a "hard drive" copy of the "Live USB" in its entirety ? ? ?

 

27 REPLIES 27
VileReynard
Hero
Posts: 12,616
Thanks: 582
Fixes: 20
Registered: ‎01-09-2007

Re: Cloning a "live USB" installation

The "live" function, even with persistence and the "install" function are quite separate, so basically rather difficult to do.

You could take a list of your persistent packages and add them later, together with any user data etc.

Alternatively, you could try using "Puppy Linux" which makes the building of a "remaster" possible.

http://puppylinux.com/ 

 

"In The Beginning Was The Word, And The Word Was Aardvark."

shutter
Community Veteran
Posts: 22,206
Thanks: 3,769
Fixes: 65
Registered: ‎06-11-2007

Re: Cloning a "live USB" installation

@foxy ! . ok.. I kinda new that it would be "separate" on the usb disc... 

Not sure what you are talking about... remember.. I don `t speak da linux lingo !.. so you must be more "explicit" in giving instructions rather than assuming I know what process is involved.

Will have a look at puppy linux... though, once on the usb stick ( live ) I don`t know what I will be looking for in the files, to do what you suggest.

 

Another problem I have... and was going to P.M. you about... got a 31gb sandisk cruser disc... when I plug it in.. I get.. Unable to mount location... can`t mount file".. although when I go to "Disks" and do a format on it.. it does that with no problem... formated for all use types same as another one, of the same type.which works .... as expected.

can`t copy and paste to it.... get same answer back !.

 

shutter
Community Veteran
Posts: 22,206
Thanks: 3,769
Fixes: 65
Registered: ‎06-11-2007

Re: Cloning a "live USB" installation

@VileReynard  And another USB stick ..with Linux mint on it... gives this....

 

a usb mount problem.png

 

So If I format it... to get rid of stuff on it... then maybe it will be the same as the other one ... ! this one is 16gb usb stick, not a sandisk cruzer blade as before..

 

VileReynard
Hero
Posts: 12,616
Thanks: 582
Fixes: 20
Registered: ‎01-09-2007

Re: Cloning a "live USB" installation

You can only mount partitions which have a file system on them. So if you only have one partition on a USB key it will be read as sdX1 (where X is a,b,c... according to the 'drive').

Two commands that are useful are

lsusb

and

dmesg | tail -n 10

The second one lists the last 10 lines of your hardware log, which shows any recent USB activity.

BTW I'm guessing that you have two USB keys produced in the same way so they have identical labels giving the error on the mount?

Alternatively do you do the 'safely remove disc' thing (right click on a mounted USB disk)?

A useful command to see your mounted systems (includes some system stuff which you can ignore)

df -h

If you have mounted any filesystems with the mount command, use the umount (not a typo) to unmount them.

 

"In The Beginning Was The Word, And The Word Was Aardvark."

shutter
Community Veteran
Posts: 22,206
Thanks: 3,769
Fixes: 65
Registered: ‎06-11-2007

Re: Cloning a "live USB" installation

@VileReynard  Thanks for those bits of info.... only "sometimes " use the "safely remove"  .... only sometimes... so maybe that has corrupted something.... but I can`t understand how the same usb gets a cannot mount message, but is still shown when I go to "disks"  and do a "format" on there.. perhaps I should make a small partition ?  and then re-format it ?

Can`t remember how and when they were formatted... several times over...as they do get used for various things and not in any specific order of use.. just the first one that comes to hand ..

Thanks

 

shutter
Community Veteran
Posts: 22,206
Thanks: 3,769
Fixes: 65
Registered: ‎06-11-2007

Re: Cloning a "live USB" installation

OK... seems to be a problem here.. As mentioned... I cannot get the USB stick(s) to be "mounted"... so... begs the question... how do I use those commands... ?

but the real question is.... How do I get them back into use ?  If they don`t "mount".. on Linux.. I can only format theme from the Menu> Disks option ... and do nothing else...

TheRoadCrew
Aspiring Pro
Posts: 140
Thanks: 43
Fixes: 9
Registered: ‎14-05-2017

Re: Cloning a "live USB" installation


@shutter wrote:

OK... seems to be a problem here.. As mentioned... I cannot get the USB stick(s) to be "mounted"... so... begs the question... how do I use those commands... ?


The screen shot you posted in message 4 of this thread tells you /dev/sdb1 (presumably the USB stick is already mounted.

In my case:

df -h | grep /dev/sd
/dev/sda1                120G   12G  109G  10% /run/media/waldo/Samsung  128GB

The USB stick is /dev/sda1 mounted at /run/media/waldo/Samsung 128GB

I can manually unmount it with:

# umount /dev/sda1

If I remove and reinsert the USB stick i can see the diagnostic messages from the kernel buffer re. the USB stick with:

dmesg | tail -n 15
[20965.904692] usb 2-1: Manufacturer: Samsung
[20965.904696] usb 2-1: SerialNumber: 0376318010010633
[20965.908872] usb-storage 2-1:1.0: USB Mass Storage device detected
[20965.909371] usb-storage 2-1:1.0: Quirks match for vid 090c pid 1000: 400
[20965.909662] scsi host2: usb-storage 2-1:1.0
[20967.293726] scsi 2:0:0:0: Direct-Access     Samsung  Flash Drive FIT  1100 PQ: 0 ANSI: 6
[20967.294230] scsi 2:0:0:0: alua: supports implicit and explicit TPGS
[20967.294237] scsi 2:0:0:0: alua: No target port descriptors found
[20967.294613] sd 2:0:0:0: Attached scsi generic sg0 type 0
[20967.295523] sd 2:0:0:0: [sda] 250675200 512-byte logical blocks: (128 GB/120 GiB)
[20967.296119] sd 2:0:0:0: [sda] Write Protect is off
[20967.296125] sd 2:0:0:0: [sda] Mode Sense: 43 00 00 00
[20967.296761] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[20967.335814]  sda: sda1
[20967.339491] sd 2:0:0:0: [sda] Attached SCSI removable disk

Do you see any error messages when running any of these commands (you might want to try a larger number than 15 on the last one)?

shutter
Community Veteran
Posts: 22,206
Thanks: 3,769
Fixes: 65
Registered: ‎06-11-2007

Re: Cloning a "live USB" installation

@TheRoadCrew  Hmm... I think maybe it is ME not doing things in the right order....and Linux hiding windows telling me things  that i can`t see..

so... when I plug in the usb stick... it shows on "computer"... and when I "open" it to see what is on.. it has "already" done that. (hence the "Cannot Mount" message ) .... but nothing is shown, I have to find it...(maybe it is hidden under another window!..)... which is what i have found since my last post..

however.. another problem with usb sticks.. but on the same thing... @VileReynard  suggests I try Puppy linux... and I have downloaded an .iso   ( i also see it is labelled uefi.iso )  now when I go to the Universal USB installer... or to YUMI to "burn " the .iso to the USB stick.... despite me having three usb sticks ( see pic ) .. RED , PINK & BLUE... (mounted) none of them show in the little box, where I am supposed be "burning" the .iso.... this , at first, I thought was because it was a UEFI.iso and, I thought.. that it may have to be "burned" using Windows... but... I also tried it with a Linux Mint 19.1   .iso and it still does not show any "drive" letter for me to choose which one to burn it to...

 

ALL USBS .png

VileReynard
Hero
Posts: 12,616
Thanks: 582
Fixes: 20
Registered: ‎01-09-2007

Re: Cloning a "live USB" installation

Anything that asks for a drive letter thinks you are running Windows.😎

 

"In The Beginning Was The Word, And The Word Was Aardvark."

shutter
Community Veteran
Posts: 22,206
Thanks: 3,769
Fixes: 65
Registered: ‎06-11-2007

Re: Cloning a "live USB" installation

Oh... C`mon @VileReynard  how is that suposed to help me ?     Undecided     Honestly, sometimes I wonder why you post such useless comments.  Sad    and other times you are very helpful...    Huh

 

Mook
Seasoned Champion
Posts: 1,266
Thanks: 870
Fixes: 9
Registered: ‎27-12-2019

Re: Cloning a "live USB" installation

@shutter - The point @VileReynard is making is that there is no concept of drive letters on Linux, so you'll never be able to pick one. You need to know what the device name is in order to use it.

shutter
Community Veteran
Posts: 22,206
Thanks: 3,769
Fixes: 65
Registered: ‎06-11-2007

Re: Cloning a "live USB" installation

@Mook  Thank you for the enlightenment..... given that the UUI  shown in the pic  along with all the "drives" has a "penguin" logo... ipso facto LINUX... what do you suggest...using the information you can glean   from the above pic ?

VileReynard
Hero
Posts: 12,616
Thanks: 582
Fixes: 20
Registered: ‎01-09-2007

Re: Cloning a "live USB" installation

I suspect the "penguin" logo is that it is an application for some linux purpose.

Linux doesn't use drive letters, ever.

(excepting Wine which runs many Windows programs semi-natively).

"In The Beginning Was The Word, And The Word Was Aardvark."

shutter
Community Veteran
Posts: 22,206
Thanks: 3,769
Fixes: 65
Registered: ‎06-11-2007

Re: Cloning a "live USB" installation

@VileReynard I expect you are having lots of laughs....  but still not being helpful...

all I want to do is to get the .iso file for Linux Puppy as you suggested , on to a USB stick, so that I can then use it... either as a "live" test.. or to install it on a pre selected and pre formatted hard drive.

If you want to help....please do so....  then I will appreciate it.... if you want to have lots of fun  , at my expense...then please don`t....  you are doing yourself a disservice.