DiskDump to a smaller USB
-
@MattSpeller said:
@DustinB3403 oh, back it up first, resize can go caddywompus really easily
....
I am trying to back it up....
-
Linux doesn't see the 16 GB stick at all?
-
@DustinB3403 to something else lol
-
@Dashrender well Clonezilla didn't.
Lubuntu in a live cd does.
-
@DustinB3403 dd an img of it onto something else, then have at it
-
@MattSpeller How?
I have never used dd
-
@DustinB3403 oh!! you're in for a treat!
It's practically the only linux thing I know how to do because it's damn useful
Let me find a guide here....
-
So /dev/sdd has
sdd1 etc3 4GB
sdd2 fat32 4gb
sdd3 lvm2 pv 21.82GB -
Now I very well might need to restart the setup if in fact this USB is using almost 22GB on a partition that stores nothing..
-
@DustinB3403 http://www.computerhope.com/unix/dd.htm
Examples at the bottom, you want to take a copy of the whole SDD drive and dump it to an image of whatever flavour you fancy.
-
So
dd if=/dev/sdd of=/dev/sdb
Should clone it from the larger to the smaller disk?
-
@DustinB3403 said:
So
dd if=/dev/sdd of=/dev/sdb
Should clone it from the larger to the smaller disk?
Uhhhh yeahhhhhhh but you don't want to do that like that
First you want someone to double check what I'm suggesting, then read on
Something like:
dd if=/dev/sdd of=/dev/(hard drive)/(backup folder)/imageof32gbimportantthingy.img bs=4k
will get you a backup copy of the 32gb, then you can mangle it with GParted and not worry
DD is the ultimate "I want to copy X to Y and don't bother me with the details" tool - it's INCREDIBLY powerful
-
So I have to backup it up to an img file first and then write it, is that correct?
-
@DustinB3403 said:
So I have to backup it up to an img file first and then write it, is that correct?
Back it up to the img file then consult with someone who knows more man. We're at the bleeding edge of my linux expertise here.
Were it me, I'd take the backup then resize the 32GB usb with gparted then you can use gparted or DD to copy it to the other USB
-
There might be an easier way, but I would dd it to a logical volume, then shrink the logical volume and then dd the volume to the smaller USB.
lvcreate -L 32G -n <name> <volumegroup> dd if=/dev/usbdrive of=/dev/<volumegroup>/<volumename> bs=4M resize2fs /dev/<volumegroup>/<volumename> 16G lvreduce -L 16G /dev/<volumegroup>/<volumename> dd if=/dev/<volumegroup>/<volumename> of=/dev/smallerusbdrive
I would take a backup of the 32 GB usb drive before I did anything. You can just
dd if=/dev/usbdrive of=/home/dustinb3403/usbfile bs=4M
to make sure nothing is lost. -
@johnhooks said:
then shrink the logical volume
How?
Also, what do you mean by a logical volume?
-
@MattSpeller said:
@johnhooks said:
then shrink the logical volume
How?
Also, what do you mean by a logical volume?
A partition.
-
@Dashrender Thank you, I'm going to get a coffee, I'm slow today.
-
@MattSpeller said:
@johnhooks said:
then shrink the logical volume
How?
Also, what do you mean by a logical volume?
I updated my post to show how
-
@johnhooks hero of the thread - thank you, I'm saving that to try at home!