3

I have a SSD Drive that has Ubuntu already on it (can wipe it clean, nothing important on the drive). I am trying to boot from a Ubuntu Live CD and use GParted to format the SSD drive (which is connected via USB to my laptop) and clone the internal drives Ubuntu partition. Gparted shows the below

dev/sdb1 --- ext4 --- 243 MiB
dev/sdb2 --- extended --- 465.52 GB (has a key beside sdb2)
dev/sdb5 --- lvm2 pv ---- 465.52 GB (has a key beside sdb5)

Anytime I try to use GParted to format either Sdb2 or sdb5 to ext4 it throws an error. All I want to do is format this drive, wipe it completely, and copy over the partition from my internal drive.

2 Answers 2

3

If all you wish to do with /dev/sdb is wipe it completely, make sure it isn't mounted, then try

$ sudo dd if=/dev/zero of=/dev/sdb bs=1G count=1

... but in doing so, make VERY sure that you do NOT type anything else than /dev/sdb - if that IS where the drive is.


$ lsblk should list the available and mounted drives/devices with some exceptions.
No need to sudo for the basics. Check man lsblk if you need more.

0

In GParted a key or padlock icon beside a partition indicates that the partition is active, mounted or otherwise in use.

Although it is possible to perform some actions on a partition while it is in use, most actions are available only when the partition is not in use.

In the case of your LVM2 PV (Physical Volume) partition, you will need to de-activate the sdb5 partition before you can perform further actions on it. See GParted menu option Partition -> Deactivate. Note that this option for a file system is Partition -> Unmount, and for linux-swap is Partition -> Swapoff.

Please note that if you wish to shrink an LVM2 PV then often you must first use the Logical Volume Management tools, such as lvresize, to free up space in one more more LMV2 Logical Volumes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .