Can't restore/reformat my USB flash drive after moving to GPT
I have 8GB flash memory stick. Sometimes ago I formatted it to be able to install Windows from it. I can't remember what exactly I did but I think I wanted to be able to install Win 7 64-bit to boot in EFI mode.
Now I can't reformat it nor in Windows nor in Linux.
I tried to convert it to MBR from GPT with gdisk
by gdisk /dev/sdc
, then w
(to write GPT from memory to the drive as the tool reported "Found invalid GPT and valid MBR; converting MBR to GPT format in memory"). Then gdisk /dev/sdc
again:
# gdisk /dev/sdc
GPT fdisk (gdisk) version 0.8.8
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************
, opened expert tools with x
, z
(to destroy GPT).
Here is the output:
Expert command (? for help): z
About to wipe out GPT on /dev/sdc. Proceed? (Y/N): Y
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
Blank out MBR? (Y/N): Y
#
then tried to delete a partition with fdisk
# fdisk /dev/sdc
Command (m for help): p
Disk /dev/sdc: 8086 MB, 8086618112 bytes
249 heads, 62 sectors/track, 1023 cylinders, total 15794176 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a07ca
Device Boot Start End Blocks Id System
/dev/sdc1 * 62 15793073 7896506 7 HPFS/NTFS/exFAT
Command (m for help): d
Selected partition 1
Command (m for help): p
Disk /dev/sdc: 8086 MB, 8086618112 bytes
249 heads, 62 sectors/track, 1023 cylinders, total 15794176 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a07ca
Device Boot Start End Blocks Id System
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Error closing file
After this I tried to pull out and plug in the stick again but NTFS mount error window appeared each time.
I also tried to rewrite an initial drive area with a test content with badblocks
sudo badblocks -w -s -o /tmp/usbstick.log /dev/sdc
and with dd
sudo dd if=/dev/zero of=/dev/sdc bs=1024k count=2
but I couldn't reformat it to usable state.
Is there a way I can restore its factory state?
My system: Linux Mint 17.3
UPDATE
# blkid
/dev/sdc1: UUID="675599A00CE338FC" TYPE="ntfs"
# usb-devices
T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=02 Dev#= 4 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1307 ProdID=0190 Rev=01.00
S: Manufacturer=USBest Technology
S: Product=USB Mass Storage Device
S: SerialNumber=00000000000004
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=98mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
fdisk gpt mbr
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 2 more comments
I have 8GB flash memory stick. Sometimes ago I formatted it to be able to install Windows from it. I can't remember what exactly I did but I think I wanted to be able to install Win 7 64-bit to boot in EFI mode.
Now I can't reformat it nor in Windows nor in Linux.
I tried to convert it to MBR from GPT with gdisk
by gdisk /dev/sdc
, then w
(to write GPT from memory to the drive as the tool reported "Found invalid GPT and valid MBR; converting MBR to GPT format in memory"). Then gdisk /dev/sdc
again:
# gdisk /dev/sdc
GPT fdisk (gdisk) version 0.8.8
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************
, opened expert tools with x
, z
(to destroy GPT).
Here is the output:
Expert command (? for help): z
About to wipe out GPT on /dev/sdc. Proceed? (Y/N): Y
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
Blank out MBR? (Y/N): Y
#
then tried to delete a partition with fdisk
# fdisk /dev/sdc
Command (m for help): p
Disk /dev/sdc: 8086 MB, 8086618112 bytes
249 heads, 62 sectors/track, 1023 cylinders, total 15794176 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a07ca
Device Boot Start End Blocks Id System
/dev/sdc1 * 62 15793073 7896506 7 HPFS/NTFS/exFAT
Command (m for help): d
Selected partition 1
Command (m for help): p
Disk /dev/sdc: 8086 MB, 8086618112 bytes
249 heads, 62 sectors/track, 1023 cylinders, total 15794176 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a07ca
Device Boot Start End Blocks Id System
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Error closing file
After this I tried to pull out and plug in the stick again but NTFS mount error window appeared each time.
I also tried to rewrite an initial drive area with a test content with badblocks
sudo badblocks -w -s -o /tmp/usbstick.log /dev/sdc
and with dd
sudo dd if=/dev/zero of=/dev/sdc bs=1024k count=2
but I couldn't reformat it to usable state.
Is there a way I can restore its factory state?
My system: Linux Mint 17.3
UPDATE
# blkid
/dev/sdc1: UUID="675599A00CE338FC" TYPE="ntfs"
# usb-devices
T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=02 Dev#= 4 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1307 ProdID=0190 Rev=01.00
S: Manufacturer=USBest Technology
S: Product=USB Mass Storage Device
S: SerialNumber=00000000000004
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=98mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
fdisk gpt mbr
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
What doesblkid
report for this drive? Also run theusb-devices
script (if you have it). Do you have cfdisk? To keep things simple you should probably try to create a FAT32 partition on the drive.
– PM 2Ring
Mar 12 '16 at 2:23
Unless you know its factory state, no. However, it is easy to restore it to a useful state. Suggest you use dd again. This time make the count equal to 500
– fpmurphy
Mar 12 '16 at 7:18
@PM2Ring please see UPDATE section. FYI, I have cfdisk.
– gumkins
Mar 12 '16 at 8:59
@fpmurphy1 I've just rundd
withcount=500
, it must rewrite the first 500MB, right? However, I rebooted and Windows 7 installation started (I was able to see the first window with language/location/keyboard selection. So it looks likedd
writes to the device but those changes are not applied.
– gumkins
Mar 12 '16 at 10:00
... or, the boot/installation data is located not at the beginning, right?
– gumkins
Mar 12 '16 at 11:59
|
show 2 more comments
I have 8GB flash memory stick. Sometimes ago I formatted it to be able to install Windows from it. I can't remember what exactly I did but I think I wanted to be able to install Win 7 64-bit to boot in EFI mode.
Now I can't reformat it nor in Windows nor in Linux.
I tried to convert it to MBR from GPT with gdisk
by gdisk /dev/sdc
, then w
(to write GPT from memory to the drive as the tool reported "Found invalid GPT and valid MBR; converting MBR to GPT format in memory"). Then gdisk /dev/sdc
again:
# gdisk /dev/sdc
GPT fdisk (gdisk) version 0.8.8
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************
, opened expert tools with x
, z
(to destroy GPT).
Here is the output:
Expert command (? for help): z
About to wipe out GPT on /dev/sdc. Proceed? (Y/N): Y
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
Blank out MBR? (Y/N): Y
#
then tried to delete a partition with fdisk
# fdisk /dev/sdc
Command (m for help): p
Disk /dev/sdc: 8086 MB, 8086618112 bytes
249 heads, 62 sectors/track, 1023 cylinders, total 15794176 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a07ca
Device Boot Start End Blocks Id System
/dev/sdc1 * 62 15793073 7896506 7 HPFS/NTFS/exFAT
Command (m for help): d
Selected partition 1
Command (m for help): p
Disk /dev/sdc: 8086 MB, 8086618112 bytes
249 heads, 62 sectors/track, 1023 cylinders, total 15794176 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a07ca
Device Boot Start End Blocks Id System
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Error closing file
After this I tried to pull out and plug in the stick again but NTFS mount error window appeared each time.
I also tried to rewrite an initial drive area with a test content with badblocks
sudo badblocks -w -s -o /tmp/usbstick.log /dev/sdc
and with dd
sudo dd if=/dev/zero of=/dev/sdc bs=1024k count=2
but I couldn't reformat it to usable state.
Is there a way I can restore its factory state?
My system: Linux Mint 17.3
UPDATE
# blkid
/dev/sdc1: UUID="675599A00CE338FC" TYPE="ntfs"
# usb-devices
T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=02 Dev#= 4 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1307 ProdID=0190 Rev=01.00
S: Manufacturer=USBest Technology
S: Product=USB Mass Storage Device
S: SerialNumber=00000000000004
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=98mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
fdisk gpt mbr
I have 8GB flash memory stick. Sometimes ago I formatted it to be able to install Windows from it. I can't remember what exactly I did but I think I wanted to be able to install Win 7 64-bit to boot in EFI mode.
Now I can't reformat it nor in Windows nor in Linux.
I tried to convert it to MBR from GPT with gdisk
by gdisk /dev/sdc
, then w
(to write GPT from memory to the drive as the tool reported "Found invalid GPT and valid MBR; converting MBR to GPT format in memory"). Then gdisk /dev/sdc
again:
# gdisk /dev/sdc
GPT fdisk (gdisk) version 0.8.8
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************
, opened expert tools with x
, z
(to destroy GPT).
Here is the output:
Expert command (? for help): z
About to wipe out GPT on /dev/sdc. Proceed? (Y/N): Y
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
Blank out MBR? (Y/N): Y
#
then tried to delete a partition with fdisk
# fdisk /dev/sdc
Command (m for help): p
Disk /dev/sdc: 8086 MB, 8086618112 bytes
249 heads, 62 sectors/track, 1023 cylinders, total 15794176 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a07ca
Device Boot Start End Blocks Id System
/dev/sdc1 * 62 15793073 7896506 7 HPFS/NTFS/exFAT
Command (m for help): d
Selected partition 1
Command (m for help): p
Disk /dev/sdc: 8086 MB, 8086618112 bytes
249 heads, 62 sectors/track, 1023 cylinders, total 15794176 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a07ca
Device Boot Start End Blocks Id System
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Error closing file
After this I tried to pull out and plug in the stick again but NTFS mount error window appeared each time.
I also tried to rewrite an initial drive area with a test content with badblocks
sudo badblocks -w -s -o /tmp/usbstick.log /dev/sdc
and with dd
sudo dd if=/dev/zero of=/dev/sdc bs=1024k count=2
but I couldn't reformat it to usable state.
Is there a way I can restore its factory state?
My system: Linux Mint 17.3
UPDATE
# blkid
/dev/sdc1: UUID="675599A00CE338FC" TYPE="ntfs"
# usb-devices
T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=02 Dev#= 4 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1307 ProdID=0190 Rev=01.00
S: Manufacturer=USBest Technology
S: Product=USB Mass Storage Device
S: SerialNumber=00000000000004
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=98mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
fdisk gpt mbr
fdisk gpt mbr
edited Mar 12 '16 at 8:57
gumkins
asked Mar 12 '16 at 1:37
gumkinsgumkins
4271822
4271822
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
What doesblkid
report for this drive? Also run theusb-devices
script (if you have it). Do you have cfdisk? To keep things simple you should probably try to create a FAT32 partition on the drive.
– PM 2Ring
Mar 12 '16 at 2:23
Unless you know its factory state, no. However, it is easy to restore it to a useful state. Suggest you use dd again. This time make the count equal to 500
– fpmurphy
Mar 12 '16 at 7:18
@PM2Ring please see UPDATE section. FYI, I have cfdisk.
– gumkins
Mar 12 '16 at 8:59
@fpmurphy1 I've just rundd
withcount=500
, it must rewrite the first 500MB, right? However, I rebooted and Windows 7 installation started (I was able to see the first window with language/location/keyboard selection. So it looks likedd
writes to the device but those changes are not applied.
– gumkins
Mar 12 '16 at 10:00
... or, the boot/installation data is located not at the beginning, right?
– gumkins
Mar 12 '16 at 11:59
|
show 2 more comments
What doesblkid
report for this drive? Also run theusb-devices
script (if you have it). Do you have cfdisk? To keep things simple you should probably try to create a FAT32 partition on the drive.
– PM 2Ring
Mar 12 '16 at 2:23
Unless you know its factory state, no. However, it is easy to restore it to a useful state. Suggest you use dd again. This time make the count equal to 500
– fpmurphy
Mar 12 '16 at 7:18
@PM2Ring please see UPDATE section. FYI, I have cfdisk.
– gumkins
Mar 12 '16 at 8:59
@fpmurphy1 I've just rundd
withcount=500
, it must rewrite the first 500MB, right? However, I rebooted and Windows 7 installation started (I was able to see the first window with language/location/keyboard selection. So it looks likedd
writes to the device but those changes are not applied.
– gumkins
Mar 12 '16 at 10:00
... or, the boot/installation data is located not at the beginning, right?
– gumkins
Mar 12 '16 at 11:59
What does
blkid
report for this drive? Also run the usb-devices
script (if you have it). Do you have cfdisk? To keep things simple you should probably try to create a FAT32 partition on the drive.– PM 2Ring
Mar 12 '16 at 2:23
What does
blkid
report for this drive? Also run the usb-devices
script (if you have it). Do you have cfdisk? To keep things simple you should probably try to create a FAT32 partition on the drive.– PM 2Ring
Mar 12 '16 at 2:23
Unless you know its factory state, no. However, it is easy to restore it to a useful state. Suggest you use dd again. This time make the count equal to 500
– fpmurphy
Mar 12 '16 at 7:18
Unless you know its factory state, no. However, it is easy to restore it to a useful state. Suggest you use dd again. This time make the count equal to 500
– fpmurphy
Mar 12 '16 at 7:18
@PM2Ring please see UPDATE section. FYI, I have cfdisk.
– gumkins
Mar 12 '16 at 8:59
@PM2Ring please see UPDATE section. FYI, I have cfdisk.
– gumkins
Mar 12 '16 at 8:59
@fpmurphy1 I've just run
dd
with count=500
, it must rewrite the first 500MB, right? However, I rebooted and Windows 7 installation started (I was able to see the first window with language/location/keyboard selection. So it looks like dd
writes to the device but those changes are not applied.– gumkins
Mar 12 '16 at 10:00
@fpmurphy1 I've just run
dd
with count=500
, it must rewrite the first 500MB, right? However, I rebooted and Windows 7 installation started (I was able to see the first window with language/location/keyboard selection. So it looks like dd
writes to the device but those changes are not applied.– gumkins
Mar 12 '16 at 10:00
... or, the boot/installation data is located not at the beginning, right?
– gumkins
Mar 12 '16 at 11:59
... or, the boot/installation data is located not at the beginning, right?
– gumkins
Mar 12 '16 at 11:59
|
show 2 more comments
1 Answer
1
active
oldest
votes
I hope, I understand properly what you want.
Recently, I had a similar issue. It was after making a bootable USB drive for installing ubuntu. Therefore, I used the dd command: sudo dd if=*.iso of=/dev/sdb . Afterwards I could not access the full storage capacity of my drive (that means: also after formatting my device, further, programs like fdisk did not show its capacity).
Further, applying gparted, I could only reduce the visible amount of usable disk-space, but not restore ist to the maximum of appr 8 GB. Also, gparted wouldn't show me the 8 GB but 4, 3, 2..., whatever I reduced it to. At least using Windows, I could not solve the problem (but I didn't try extensively nor did I have admin privileges). What I did then was to delete all partitions on my usb-stick with fdisk and rebooted the computer. Then the storage capacity shown was around 8 GB again, as I expected.
Your usage of dd command sudo dd if=/dev/zero of=/dev/sdc bs=1024k count=2
won't write zeros onto the whole drive.
You said, you cannot format your usb drive. Further you said you deleted all of your partitions. So my suggestion is, that you run the following command to format your drive (Maybe you will have to do this using the sudo
command):
mkfs.vfat -I -F 32 /dev/sdX
where X has to be replaced for the letter of your drive. You can try to write a new partition/partition-table onto your drive before, using sudo fdisk /dev/sdX
(d to delete partitions, n to make a new partition [e.g. over the whole device] and with t you could change the type of the partition table; with p you can check the partitioning of your device). But anyway, you wrote, you already used fdisk.
I searched on google, I didn't find information, that linux mint is using a different command for formatting than at least most other linux distributions.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f269294%2fcant-restore-reformat-my-usb-flash-drive-after-moving-to-gpt%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I hope, I understand properly what you want.
Recently, I had a similar issue. It was after making a bootable USB drive for installing ubuntu. Therefore, I used the dd command: sudo dd if=*.iso of=/dev/sdb . Afterwards I could not access the full storage capacity of my drive (that means: also after formatting my device, further, programs like fdisk did not show its capacity).
Further, applying gparted, I could only reduce the visible amount of usable disk-space, but not restore ist to the maximum of appr 8 GB. Also, gparted wouldn't show me the 8 GB but 4, 3, 2..., whatever I reduced it to. At least using Windows, I could not solve the problem (but I didn't try extensively nor did I have admin privileges). What I did then was to delete all partitions on my usb-stick with fdisk and rebooted the computer. Then the storage capacity shown was around 8 GB again, as I expected.
Your usage of dd command sudo dd if=/dev/zero of=/dev/sdc bs=1024k count=2
won't write zeros onto the whole drive.
You said, you cannot format your usb drive. Further you said you deleted all of your partitions. So my suggestion is, that you run the following command to format your drive (Maybe you will have to do this using the sudo
command):
mkfs.vfat -I -F 32 /dev/sdX
where X has to be replaced for the letter of your drive. You can try to write a new partition/partition-table onto your drive before, using sudo fdisk /dev/sdX
(d to delete partitions, n to make a new partition [e.g. over the whole device] and with t you could change the type of the partition table; with p you can check the partitioning of your device). But anyway, you wrote, you already used fdisk.
I searched on google, I didn't find information, that linux mint is using a different command for formatting than at least most other linux distributions.
add a comment |
I hope, I understand properly what you want.
Recently, I had a similar issue. It was after making a bootable USB drive for installing ubuntu. Therefore, I used the dd command: sudo dd if=*.iso of=/dev/sdb . Afterwards I could not access the full storage capacity of my drive (that means: also after formatting my device, further, programs like fdisk did not show its capacity).
Further, applying gparted, I could only reduce the visible amount of usable disk-space, but not restore ist to the maximum of appr 8 GB. Also, gparted wouldn't show me the 8 GB but 4, 3, 2..., whatever I reduced it to. At least using Windows, I could not solve the problem (but I didn't try extensively nor did I have admin privileges). What I did then was to delete all partitions on my usb-stick with fdisk and rebooted the computer. Then the storage capacity shown was around 8 GB again, as I expected.
Your usage of dd command sudo dd if=/dev/zero of=/dev/sdc bs=1024k count=2
won't write zeros onto the whole drive.
You said, you cannot format your usb drive. Further you said you deleted all of your partitions. So my suggestion is, that you run the following command to format your drive (Maybe you will have to do this using the sudo
command):
mkfs.vfat -I -F 32 /dev/sdX
where X has to be replaced for the letter of your drive. You can try to write a new partition/partition-table onto your drive before, using sudo fdisk /dev/sdX
(d to delete partitions, n to make a new partition [e.g. over the whole device] and with t you could change the type of the partition table; with p you can check the partitioning of your device). But anyway, you wrote, you already used fdisk.
I searched on google, I didn't find information, that linux mint is using a different command for formatting than at least most other linux distributions.
add a comment |
I hope, I understand properly what you want.
Recently, I had a similar issue. It was after making a bootable USB drive for installing ubuntu. Therefore, I used the dd command: sudo dd if=*.iso of=/dev/sdb . Afterwards I could not access the full storage capacity of my drive (that means: also after formatting my device, further, programs like fdisk did not show its capacity).
Further, applying gparted, I could only reduce the visible amount of usable disk-space, but not restore ist to the maximum of appr 8 GB. Also, gparted wouldn't show me the 8 GB but 4, 3, 2..., whatever I reduced it to. At least using Windows, I could not solve the problem (but I didn't try extensively nor did I have admin privileges). What I did then was to delete all partitions on my usb-stick with fdisk and rebooted the computer. Then the storage capacity shown was around 8 GB again, as I expected.
Your usage of dd command sudo dd if=/dev/zero of=/dev/sdc bs=1024k count=2
won't write zeros onto the whole drive.
You said, you cannot format your usb drive. Further you said you deleted all of your partitions. So my suggestion is, that you run the following command to format your drive (Maybe you will have to do this using the sudo
command):
mkfs.vfat -I -F 32 /dev/sdX
where X has to be replaced for the letter of your drive. You can try to write a new partition/partition-table onto your drive before, using sudo fdisk /dev/sdX
(d to delete partitions, n to make a new partition [e.g. over the whole device] and with t you could change the type of the partition table; with p you can check the partitioning of your device). But anyway, you wrote, you already used fdisk.
I searched on google, I didn't find information, that linux mint is using a different command for formatting than at least most other linux distributions.
I hope, I understand properly what you want.
Recently, I had a similar issue. It was after making a bootable USB drive for installing ubuntu. Therefore, I used the dd command: sudo dd if=*.iso of=/dev/sdb . Afterwards I could not access the full storage capacity of my drive (that means: also after formatting my device, further, programs like fdisk did not show its capacity).
Further, applying gparted, I could only reduce the visible amount of usable disk-space, but not restore ist to the maximum of appr 8 GB. Also, gparted wouldn't show me the 8 GB but 4, 3, 2..., whatever I reduced it to. At least using Windows, I could not solve the problem (but I didn't try extensively nor did I have admin privileges). What I did then was to delete all partitions on my usb-stick with fdisk and rebooted the computer. Then the storage capacity shown was around 8 GB again, as I expected.
Your usage of dd command sudo dd if=/dev/zero of=/dev/sdc bs=1024k count=2
won't write zeros onto the whole drive.
You said, you cannot format your usb drive. Further you said you deleted all of your partitions. So my suggestion is, that you run the following command to format your drive (Maybe you will have to do this using the sudo
command):
mkfs.vfat -I -F 32 /dev/sdX
where X has to be replaced for the letter of your drive. You can try to write a new partition/partition-table onto your drive before, using sudo fdisk /dev/sdX
(d to delete partitions, n to make a new partition [e.g. over the whole device] and with t you could change the type of the partition table; with p you can check the partitioning of your device). But anyway, you wrote, you already used fdisk.
I searched on google, I didn't find information, that linux mint is using a different command for formatting than at least most other linux distributions.
edited Apr 13 '16 at 7:09
answered Mar 12 '16 at 10:48
Philipp HPhilipp H
13
13
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f269294%2fcant-restore-reformat-my-usb-flash-drive-after-moving-to-gpt%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What does
blkid
report for this drive? Also run theusb-devices
script (if you have it). Do you have cfdisk? To keep things simple you should probably try to create a FAT32 partition on the drive.– PM 2Ring
Mar 12 '16 at 2:23
Unless you know its factory state, no. However, it is easy to restore it to a useful state. Suggest you use dd again. This time make the count equal to 500
– fpmurphy
Mar 12 '16 at 7:18
@PM2Ring please see UPDATE section. FYI, I have cfdisk.
– gumkins
Mar 12 '16 at 8:59
@fpmurphy1 I've just run
dd
withcount=500
, it must rewrite the first 500MB, right? However, I rebooted and Windows 7 installation started (I was able to see the first window with language/location/keyboard selection. So it looks likedd
writes to the device but those changes are not applied.– gumkins
Mar 12 '16 at 10:00
... or, the boot/installation data is located not at the beginning, right?
– gumkins
Mar 12 '16 at 11:59