Page 1 of 1

How to clone a bootable usb memory stick?

Posted: Thu Dec 24, 2020 5:39 am
by jarnie

I have created a bootable usb memory stick and installed some apps on it and now would like to make a copy as a backup.
Are there any android puppy apps which will do this.
Thanks


Re: How to clone a bootable usb memory stick?

Posted: Thu Dec 24, 2020 5:58 am
by williwaw

just copy the savefile someplace. the rest is read only and easily reproduced.

android.... explain please?


Re: How to clone a bootable usb memory stick?

Posted: Thu Dec 24, 2020 6:17 am
by Jafadmin

Assuming you have another USB stick the same size,

Code: Select all

dd bs=4096 if=/dev/sdX of=/dev/sdY

Where 'X' is the USB you wish to clone, and 'Y' is the new USB. Check the actual device names with 'lsblk'.


Re: How to clone a bootable usb memory stick?

Posted: Thu Dec 24, 2020 6:40 am
by Geek3579

In my experience USB drives might be a nominal value (eg 16GB) but they will vary in terms of the actual size available. It might be useful to use GParted to shrink the largest partition on the USB, ( eg from 16 to 14GB), leaving 1-2 GB of un-allocated space. Then clone the resulting USB.

I used Clonezilla to do basckups years ago, especially to write an image to a storage device (eg a HDD), although Clonezilla is not a very intuitive program. I now use the command line to save an image of the USB to HDD, then write the clone to another USB using Barry K's Easydd (wonderful little program !!). I also write null bytes to the original USB to shrink the size of the clone image file. Can provide more details if anybody is interested.


Re: How to clone a bootable usb memory stick?

Posted: Thu Dec 24, 2020 6:41 am
by jarnie
williwaw wrote: Thu Dec 24, 2020 5:58 am

just copy the savefile someplace. the rest is read only and easily reproduced.

android.... explain please?

Sorry I have NO idea why I types that instead of LINUX. Sorry


Re: How to clone a bootable usb memory stick?

Posted: Thu Dec 24, 2020 6:43 am
by jarnie
Geek3579 wrote: Thu Dec 24, 2020 6:40 am

In my experience USB drives might be a nominal value (eg 16GB) but they will vary in terms of the actual size available. It might be useful to use GParted to shrink the largest partition on the USB, ( eg from 16 to 14GB), leaving 1-2 GB of un-allocated space. Then clone the resulting USB.

I used Clonezilla to do basckups years ago, especially to write an image to a storage device (eg a HDD), although Clonezilla is not a very intuitive program. I now use the command line to save an image of the USB to HDD, then write the clone to another USB using Barry K's Easydd (wonderful little program !!). I also write null bytes to the original USB to shrink the size of the clone image file. Can provide more details if anybody is interested.

Sorry I should have mentioned that I want to clone from a 4GB usb memory stick to a 32GB usb memory stick. Does this make any difference?
Also I thought that CloneZilla was a Windows app. So it can be done within Windows?


Re: How to clone a bootable usb memory stick?

Posted: Thu Dec 24, 2020 7:18 am
by williwaw

Here is a good read on dd, its advantages and disadvantages.
https://serverfault.com/questions/4906/ ... sk-cloning

do you just need a backup or are you wanting to create another bootable stick with an identical install.

dd will create a duplicate stick, but there will be 28 gigs of unusable space. you can copy the install to be able to use all 32 gigs.


Re: How to clone a bootable usb memory stick?

Posted: Thu Dec 24, 2020 7:33 am
by jarnie

I prefer to make another bootable usb stick
Pardon my ignorance but I thought that DD was a downloadable app but when I searched for it in PPM I couldn't find it. Or does it come with the fossapup installation. Whoops just noticed that I would end up with 28Gb unusable.
Might be just as easy to create another bootable usb stick from iso and just install the (only) 2 apps I have installed on the original.


Re: How to clone a bootable usb memory stick?

Posted: Thu Dec 24, 2020 3:51 pm
by Jafadmin
jarnie wrote: Thu Dec 24, 2020 7:33 am

I prefer to make another bootable usb stick
Pardon my ignorance but I thought that DD was a downloadable app but when I searched for it in PPM I couldn't find it. Or does it come with the fossapup installation. Whoops just noticed that I would end up with 28Gb unusable.
Might be just as easy to create another bootable usb stick from iso and just install the (only) 2 apps I have installed on the original.

It is 'dd' not 'DD'. It is a standard part of linux and comes on all distros. You already have it. You can test that by typing: 'which dd' in a terminal window.

If you are cloning to a larger USB stick, you can use GPartEd (Menu->System->GPartEd) to resize the clone after the 'dd' command finishes and you test it.


Re: How to clone a bootable usb memory stick?

Posted: Thu Dec 24, 2020 8:31 pm
by williwaw
Jafadmin wrote: Thu Dec 24, 2020 3:51 pm

It is 'dd' not 'DD'. It is a standard part of linux and comes on all distros. You already have it. You can test that by typing: 'which dd' in a terminal window.

If you are cloning to a larger USB stick, you can use GPartEd (Menu->System->GPartEd) to resize the clone after the 'dd' command finishes and you test it.

yes, dd. thanks . I have edited my post above to the correct name. I have often thought about resizing afterwards, but read conflicting information. Are there any caveats about using gparted for this usage?


Re: How to clone a bootable usb memory stick?

Posted: Thu Dec 24, 2020 9:33 pm
by jarnie

dd or DD I still cannot find it (I assume you mean that it is selectable from the 'menu' after right click on pinboard.


Re: How to clone a bootable usb memory stick?

Posted: Thu Dec 24, 2020 10:20 pm
by williwaw

in the terminal, at the command line

be careful when you choose your output device, the of=/dev/sdX part of the command.

Check the actual device names with 'lsblk'.

run lsblk at the terminal prior to each running of dd to verify the proper device/disk. the letter your system assigns to each device, ie sda or sdb etc, can change from one boot to the next, especially if you have lots of disks onboard which you appear to have evidenced by sdk.

the input file or image will replace everything on the disk you select. this use of dd is suitable for an unpartitioned disk, as the partition table and formatting will already be in the image you are writing. I mention this as you have a parallel thread going about a sd card which you are prepartitioning for a frugal install.

easydd is interactive and a possibility if you are not sure about using dd at the command line. dd is not interactive and seems to hang, but in fact it takes a while to run.

http://www.murga-linux.com/puppy/viewto ... 61#1031161

http://bkhome.org/files/easydd.gz


Re: How to clone a bootable usb memory stick?

Posted: Fri Dec 25, 2020 1:02 am
by mikeslr

Mike Walsh published EasyDD versions which provide a GUI, https://drive.google.com/drive/folders/ ... kC92wcE_oH. Download the AppImage, Right-Click it, Select properties, put checks in all boxes under Exec, then Left-Click it.


Re: How to clone a bootable usb memory stick?

Posted: Fri Dec 25, 2020 1:19 am
by jarnie

Fabulous information.

I have cut and pasted all this helpful information to a document for safe keeping and easy lookup.


Re: How to clone a bootable usb memory stick?

Posted: Fri Dec 25, 2020 2:11 am
by Jafadmin
williwaw wrote: Thu Dec 24, 2020 8:31 pm

yes, dd. thanks . I have edited my post above to the correct name. I have often thought about resizing afterwards, but read conflicting information. Are there any caveats about using gparted for this usage?

Yes. Never try to shrink boot partitions.

I have never had problems enlarging a fat32 or ext2-3-4 partition. Just shrinking them. But it's a clone, right? If you resize it after cloning and it stops working, just re-clone it. Nothing is lost, right? :thumbup2:


Re: How to clone a bootable usb memory stick?

Posted: Fri Dec 25, 2020 2:47 am
by Jafadmin
jarnie wrote: Thu Dec 24, 2020 9:33 pm

dd or DD I still cannot find it (I assume you mean that it is selectable from the 'menu' after right click on pinboard.

'dd' is a command line utility. Not an 'app' ..


Re: How to clone a bootable usb memory stick?

Posted: Fri Dec 25, 2020 6:39 am
by jarnie
Jafadmin wrote: Fri Dec 25, 2020 2:47 am
jarnie wrote: Thu Dec 24, 2020 9:33 pm

dd or DD I still cannot find it (I assume you mean that it is selectable from the 'menu' after right click on pinboard.

'dd' is a command line utility. Not an 'app' ..

Thanks I totally misunderstood especially after reading the (help) web site (for dd) for the link given early as the first line is -

"There's been a number of questions regarding disk cloning tools and dd has been suggested at least once."

When I read 'disk cloning tools' I couldn't help thinking that it must has been an app. Quite misleading that line.


Re: How to clone a bootable usb memory stick?

Posted: Fri Dec 25, 2020 8:47 pm
by Jafadmin
jarnie wrote: Fri Dec 25, 2020 6:39 am

When I read 'disk cloning tools' I couldn't help thinking that it must has been an app. Quite misleading that line.

In the Unix/Linux world, all "tools" are command line utilities. GUI apps are almost always wrappers for command line tools. They are also quite often prefaced with a 'g' like GPartEd which is a gui wrapper for the 'parted' command line tool.

We use Bash scripts to utilize different "tools" to accomplish a given task. This is also known as tool chaining.


Re: How to clone a bootable usb memory stick?

Posted: Fri Dec 25, 2020 10:50 pm
by jarnie
Jafadmin wrote: Fri Dec 25, 2020 8:47 pm
jarnie wrote: Fri Dec 25, 2020 6:39 am

When I read 'disk cloning tools' I couldn't help thinking that it must has been an app. Quite misleading that line.

In the Unix/Linux world, all "tools" are command line utilities. GUI apps are almost always wrappers for command line tools. They are also quite often prefaced with a 'g' like GPartEd which is a gui wrapper for the 'parted' command line tool.

We use Bash scripts to utilize different "tools" to accomplish a given task. This is also known as tool chaining.

Thanks
At my age I now am not a fan of keying in commands. Been there done that years ago with MSDOS and loved it at the time but now a bit 'over it'. I like the the ease of GUI apps :roll:
I also used to write programs in assembler (language) and all those lovely operators such as 'and','or',xor','push','pop' (goodness I still remember something :lol: ) - also loved it at the time.


Re: How to clone a bootable usb memory stick?

Posted: Sat Dec 26, 2020 12:33 am
by Jafadmin
jarnie wrote: Fri Dec 25, 2020 10:50 pm

I also used to write programs in assembler (language) and all those lovely operators such as 'and','or',xor','push','pop' (goodness I still remember something :lol: ) - also loved it at the time.

You forgot 'mov' .. :geek:


Re: How to clone a bootable usb memory stick?

Posted: Sat Dec 26, 2020 12:53 am
by bigpup
jarnie wrote: Thu Dec 24, 2020 5:39 am

I have created a bootable usb memory stick and installed some apps on it and now would like to make a copy as a backup.
Are there any android puppy apps which will do this.

If it is a USB with a Puppy version on it.
Just do the same thing you did the first time to make the Puppy bootable USB.
Look on the old USB for the save file or folder.
Copy it to the new USB.
You now have two USB's with the same exact install.


Re: How to clone a bootable usb memory stick?

Posted: Sat Dec 26, 2020 7:43 am
by jarnie

You ARE correct. And then there is INT, SUB, JMP and NOT. It's all streaming back now.