Dude, that's a bummer. First things first, let's make sure the drive is recognized by your system. Open up a terminal and type in:I installed Linus Mint on an external drive and I am unable to access the drive. How can I re-partition the drive
lsblk
/dev/sdX
(where X is a letter, like a
, b
, etc.).fdisk
tool to re-partition it. Run the following command, replacing /dev/sdX
with the actual device name:sudo fdisk /dev/sdX
fdisk
interface, you can use the following commands:p
to print the current partition tabled
to delete a partitionn
to create a new partitionw
to write the changes to the drive and exitfdisk
because you don't want to accidentally wipe out any important data.fdisk
, you can also try using graphical tools like GParted
for a more user-friendly partitioning experience, just install it using:sudo apt-get install gparted
Whoa, it looks like the drive is still in use and has an ISO 9660 signature. This means that it's being treated as a CD-ROM or DVD-ROM, which is why you're unable to repartition it.fdisk returns the following messge:
GPT PMBR size mismatch (5910963 != 3906963616) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.
The device contains 'iso9660' signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for more details.
sudo umount /dev/sdX
sudo swapoff -a
/dev/sdX
with the actual device name.fdisk
command again to re-partition the drive. Don't forget to be careful and double-check that you're working on the correct device.lsof
or fuser
to identify any processes that have files open on the drive and terminate them.Dude, that's a bummer. First things first, let's make sure the drive is recognized by your system. Open up a terminal and type in:
Code:lsblk
This will list all the block devices on your system, including your external drive. Look for the device that corresponds to your external drive, it should be something like/dev/sdX
(where X is a letter, likea
,b
, etc.).
Once you've identified the device, you can use thefdisk
tool to re-partition it. Run the following command, replacing/dev/sdX
with the actual device name:
Code:sudo fdisk /dev/sdX
Insidefdisk
interface, you can use the following commands:
p
to print the current partition tabled
to delete a partitionn
to create a new partitionw
to write the changes to the drive and exit
Remember to be super careful when making changes withfdisk
because you don't want to accidentally wipe out any important data.
If you're not comfortable withfdisk
, you can also try using graphical tools likeGParted
for a more user-friendly partitioning experience, just install it using:
Code:sudo apt-get install gparted
Hope that helps, bro! Let me know if you need further assistance.
Aw, my bad, dude! It seems like the commandsbothCode:lsblk and {CODE] return the message "Command not found"
lsblk
and fdisk
are not available on your system. sudo apt-get install util-linux parted
sudo dnf install util-linux parted
lsblk
and fdisk
commands without any issues.lsblk" and [\CODE] still return command not found message. The install message states already present
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
parted is already the newest version (3.4-2build1).
util-linux is already the newest version (2.37.2-4ubuntu3).
The following packages were automatically installed and are no longer required:
linux-headers-5.15.0-76 linux-headers-5.15.0-76-generic
linux-headers-5.15.0-78 linux-headers-5.15.0-78-generic
linux-headers-5.15.0-82 linux-headers-5.15.0-82-generic
linux-headers-5.15.0-84 linux-headers-5.15.0-84-generic
linux-headers-5.15.0-86 linux-headers-5.15.0-86-generic
linux-image-5.15.0-76-generic linux-image-5.15.0-78-generic
linux-image-5.15.0-82-generic linux-image-5.15.0-84-generic
linux-image-5.15.0-86-generic linux-modules-5.15.0-76-generic
linux-modules-5.15.0-78-generic linux-modules-5.15.0-82-generic
linux-modules-5.15.0-84-generic linux-modules-5.15.0-86-generic
linux-modules-extra-5.15.0-76-generic linux-modules-extra-5.15.0-78-generic
linux-modules-extra-5.15.0-82-generic linux-modules-extra-5.15.0-84-generic
linux-modules-extra-5.15.0-86-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Oops, my bad again, bro! It seems like the commands"Code:lsblk" and [\CODE] still return command not found message. The install message states already present randy@randy-Inspiron-5582:~$ sudo apt-get install util-linux parted [sudo] password for randy: Reading package lists... Done Building dependency tree... Done Reading state information... Done parted is already the newest version (3.4-2build1). util-linux is already the newest version (2.37.2-4ubuntu3). The following packages were automatically installed and are no longer required: linux-headers-5.15.0-76 linux-headers-5.15.0-76-generic linux-headers-5.15.0-78 linux-headers-5.15.0-78-generic linux-headers-5.15.0-82 linux-headers-5.15.0-82-generic linux-headers-5.15.0-84 linux-headers-5.15.0-84-generic linux-headers-5.15.0-86 linux-headers-5.15.0-86-generic linux-image-5.15.0-76-generic linux-image-5.15.0-78-generic linux-image-5.15.0-82-generic linux-image-5.15.0-84-generic linux-image-5.15.0-86-generic linux-modules-5.15.0-76-generic linux-modules-5.15.0-78-generic linux-modules-5.15.0-82-generic linux-modules-5.15.0-84-generic linux-modules-5.15.0-86-generic linux-modules-extra-5.15.0-76-generic linux-modules-extra-5.15.0-78-generic linux-modules-extra-5.15.0-82-generic linux-modules-extra-5.15.0-84-generic linux-modules-extra-5.15.0-86-generic Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
lsblk
and fdisk
are not recognized on your system even after the installation. parted
command to accomplish what we need. Let's give it a shot. Run the following command in the terminal:sudo parted -l
/dev/sdX
(where X is a letter, like a
, b
, etc.).parted
command to re-partition it. Run the following command, replacing /dev/sdX
with the actual device name:sudo parted /dev/sdX
parted
interactive mode, you can use the following commands:print
to print the current partition tablerm
to remove a partitionmkpart
to create a new partitionquit
to exit the parted interface and save the changesparted
! Double-check that you're working on the correct device to avoid any unwanted data loss.GParted
for a more user-friendly partitioning experience. Just run the following command to install it:sudo apt-get install gparted
Alright, dude! Based on yourBelow are my lsblk results. Should I fdisk /dev/sda? I want to make the 1.8 T available for data
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 2.8G 0 part /media/randy/Linux Mint 21.2 Cinnamon 64-bit
└─sda2 8:2 0 4.1M 0 part
nvme0n1 259:0 0 238.5G 0 disk
├─nvme0n1p1
│ 259:1 0 650M 0 part /boot/efi
├─nvme0n1p2
│ 259:2 0 128M 0 part
├─nvme0n1p3
│ 259:3 0 184.2G 0 part /media/OS
├─nvme0n1p4
│ 259:4 0 12.2G 0 part
├─nvme0n1p5
│ 259:5 0 1.2G 0 part
└─nvme0n1p6
lsblk
output, it looks like your external drive is /dev/sda
, which has a size of 1.8TB. If you want to make the entire 1.8TB available for data, you indeed need to re-partition it.fdisk
command and pass in the device name /dev/sda
:sudo fdisk /dev/sda
fdisk
interface, you can use the following commands to modify the partition table:p
: Print the current partition tabled
: Delete a partitionn
: Create a new partitionw
: Write the changes to the drive and exitext4
or NTFS
. To format the partition as ext4
, you can use the following command:sudo mkfs.ext4 /dev/sda1
/dev/sda1
with the appropriate partition number if it differs.mount
command. For example:sudo mount /dev/sda1 /mnt/mydrive
/dev/sda1
with the correct partition if needed, and /mnt/mydrive
with the desired mount point.No problem, dude! If you don't have any important data on the external SSD, it's totally cool to format it and start fresh.When I select "Format" the system currently thinks my external SSD drive is a USB stick and it is currently formatted as FAT32, if that matters. Fortunately, there is nothing on the SSD that I need to keep. I can format the external SSD and start from the beginning if needed. I do not know if I need to use NTFS or EXT4. What is the difference?
sudo mkfs.ntfs /dev/sda1
sudo mkfs.ext4 /dev/sda1
/dev/sda1
with the appropriate partition number if it differs.Apologies for the confusion, dude! If the partition on the external SSD is not labeled asThe command - sudo mkfs.ext4 /dev/sda1 returns the message below.
mke2fs 1.46.5 (30-Dec-2021)
The file /dev/sda1 does not exist and no size was specified
Should I try sudo mkfs.ext4 /dev/sda (sda appears to be the 1.8TB unallocated space on the external drive) ?
I unplugged the external drive and booted from my PC's hard drive, but it seems the system is confused by the external drive being a boot disk also.
/dev/sda1
, then it makes sense that the command sudo mkfs.ext4 /dev/sda1
is producing an error. /dev/sda
, you can format it directly with the following command:sudo mkfs.ext4 /dev/sda
I apologize for the inconvenience, dude. It seems that the partition on the external SSD drive is still in use by the system, even when it's unmounted. This can sometimes happen if there are still open files or processes tied to that partition.That's the problem, it won't let me format the SSD drive
The command - sudo mkfs.ext4 /dev/sda1 returns the message below.
mke2fs 1.46.5 (30-Dec-2021)
/dev/sda1 is apparently in use by the system; will not make a filesystem here!
I had previously attempted to install Cinnamon 21.2 on the SSD drive, but even though I boot from the PC's hard drive, the operating system appears to be using the SSD drive even when I have it unmounted.
sudo fdisk -l
mkfs.ext4
command as you mentioned before, but using the appropriate device name:sudo mkfs.ext4 /dev/sda1
/dev/sda1
with the correct device name you identified.No worries, dude! I can see from the output that your external drive is labeled asSorry, I'm lost. Here are the results from the command- sudo fdisk -l The first set of results (/dev/nvme0n1p1 are from my laptop hard drive,
Disk /dev/nvme0n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: KBG40ZNS256G NVMe TOSHIBA 256GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 770 770CBB
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1333247 1331200 650M EFI System
/dev/nvme0n1p2 1333248 1595391 262144 128M Microsoft reserved
/dev/nvme0n1p3 1595392 387874815 386279424 184.2G Microsoft basic data
/dev/nvme0n1p4 471842816 497496063 25653248 12.2G Windows recovery environment
/dev/nvme0n1p5 497498112 500084735 2586624 1.2G Windows recovery environment
/dev/nvme0n1p6 387874816 471842815 83968000 40G Linux filesystem
Partition table entries are not in disk order.
Disk /dev/sda: 1.82 TiB, 2000365371904 bytes, 3906963617 sectors
Disk model: Extreme 55AE
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 1048576 bytes
Disklabel type: gpt
Disk identifier: 7F710194-A624-43FA-9BA2-5155CFB1273A
Device Start End Sectors Size Type
/dev/sda1 64 5902403 5902340 2.8G Microsoft basic data
/dev/sda2 5902404 5910899 8496 4.1M EFI System
Is Windows tying up the disk space on the external drive? I don't use or want Windows on my PC hard drive or anywhere for that matter. Can I maybe remove windows completely?
/dev/sda
/dev/sda1
sudo fdisk /dev/sda
d
1
n
w
sudo mkfs.ext4 /dev/sda1