How to clone a bootable usb memory stick?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
jarnie
Posts: 88
Joined: Sun Dec 20, 2020 8:03 am
Location: Blue Mountains, Australia
Has thanked: 22 times
Been thanked: 1 time

How to clone a bootable usb memory stick?

Post 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

Fossapup 9.5 on 8Gb usb memory stick Acer R3-131T laptop 4Gb RAM 32Gb Emmc drive

williwaw
Posts: 1729
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 155 times
Been thanked: 314 times

Re: How to clone a bootable usb memory stick?

Post by williwaw »

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

android.... explain please?

User avatar
Jafadmin
Posts: 379
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: How to clone a bootable usb memory stick?

Post 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'.

Geek3579
Posts: 254
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 73 times
Been thanked: 64 times

Re: How to clone a bootable usb memory stick?

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

User avatar
jarnie
Posts: 88
Joined: Sun Dec 20, 2020 8:03 am
Location: Blue Mountains, Australia
Has thanked: 22 times
Been thanked: 1 time

Re: How to clone a bootable usb memory stick?

Post 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

Fossapup 9.5 on 8Gb usb memory stick Acer R3-131T laptop 4Gb RAM 32Gb Emmc drive

User avatar
jarnie
Posts: 88
Joined: Sun Dec 20, 2020 8:03 am
Location: Blue Mountains, Australia
Has thanked: 22 times
Been thanked: 1 time

Re: How to clone a bootable usb memory stick?

Post 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?

Fossapup 9.5 on 8Gb usb memory stick Acer R3-131T laptop 4Gb RAM 32Gb Emmc drive

williwaw
Posts: 1729
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 155 times
Been thanked: 314 times

Re: How to clone a bootable usb memory stick?

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

Last edited by williwaw on Thu Dec 24, 2020 8:26 pm, edited 1 time in total.
User avatar
jarnie
Posts: 88
Joined: Sun Dec 20, 2020 8:03 am
Location: Blue Mountains, Australia
Has thanked: 22 times
Been thanked: 1 time

Re: How to clone a bootable usb memory stick?

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

Fossapup 9.5 on 8Gb usb memory stick Acer R3-131T laptop 4Gb RAM 32Gb Emmc drive

User avatar
Jafadmin
Posts: 379
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: How to clone a bootable usb memory stick?

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

williwaw
Posts: 1729
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 155 times
Been thanked: 314 times

Re: How to clone a bootable usb memory stick?

Post 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?

User avatar
jarnie
Posts: 88
Joined: Sun Dec 20, 2020 8:03 am
Location: Blue Mountains, Australia
Has thanked: 22 times
Been thanked: 1 time

Re: How to clone a bootable usb memory stick?

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

Fossapup 9.5 on 8Gb usb memory stick Acer R3-131T laptop 4Gb RAM 32Gb Emmc drive

williwaw
Posts: 1729
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 155 times
Been thanked: 314 times

Re: How to clone a bootable usb memory stick?

Post 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

User avatar
mikeslr
Posts: 2859
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 174 times
Been thanked: 869 times

Re: How to clone a bootable usb memory stick?

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

User avatar
jarnie
Posts: 88
Joined: Sun Dec 20, 2020 8:03 am
Location: Blue Mountains, Australia
Has thanked: 22 times
Been thanked: 1 time

Re: How to clone a bootable usb memory stick?

Post by jarnie »

Fabulous information.

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

Fossapup 9.5 on 8Gb usb memory stick Acer R3-131T laptop 4Gb RAM 32Gb Emmc drive

User avatar
Jafadmin
Posts: 379
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: How to clone a bootable usb memory stick?

Post 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:

User avatar
Jafadmin
Posts: 379
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: How to clone a bootable usb memory stick?

Post 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' ..

User avatar
jarnie
Posts: 88
Joined: Sun Dec 20, 2020 8:03 am
Location: Blue Mountains, Australia
Has thanked: 22 times
Been thanked: 1 time

Re: How to clone a bootable usb memory stick?

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

Fossapup 9.5 on 8Gb usb memory stick Acer R3-131T laptop 4Gb RAM 32Gb Emmc drive

User avatar
Jafadmin
Posts: 379
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: How to clone a bootable usb memory stick?

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

User avatar
jarnie
Posts: 88
Joined: Sun Dec 20, 2020 8:03 am
Location: Blue Mountains, Australia
Has thanked: 22 times
Been thanked: 1 time

Re: How to clone a bootable usb memory stick?

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

Fossapup 9.5 on 8Gb usb memory stick Acer R3-131T laptop 4Gb RAM 32Gb Emmc drive

User avatar
Jafadmin
Posts: 379
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: How to clone a bootable usb memory stick?

Post 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:

User avatar
bigpup
Moderator
Posts: 6543
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 796 times
Been thanked: 1361 times

Re: How to clone a bootable usb memory stick?

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

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
jarnie
Posts: 88
Joined: Sun Dec 20, 2020 8:03 am
Location: Blue Mountains, Australia
Has thanked: 22 times
Been thanked: 1 time

Re: How to clone a bootable usb memory stick?

Post by jarnie »

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

Fossapup 9.5 on 8Gb usb memory stick Acer R3-131T laptop 4Gb RAM 32Gb Emmc drive

Post Reply

Return to “Users”