ImageWriter broken the partition table?

Archived topics about LMDE 1 and LMDE 2
Locked
birchy

ImageWriter broken the partition table?

Post by birchy »

While using ImageWriter to create a bootable flash drive, it spat out an error (that I didn't note) and then appeared to be blank, despite being formatted as fat32 only minutes before. After re-loading into gparted, it reported that the drive had no partition table. So I did the obvious thing and ran Device -> Create Partition Table. I now have a 4GB stick that according to gparted is TWO physical drives. It mounts as /dev/sdc 1MB and /dev/sdd 3.72GB. It previously mounted as /dev/sdc with a size of 3.82 or 3.83 (can't remember exactly).

The 1MB "drive" cannot be mounted and attempting to format it reports Minimum Size: 1MB, Maximum Size: 0MB with only these formats available: ext2, ext3, ext4, linux-swap, ntfs, unformatted. Attempting to use one of those formats results in an error message: "A partition cannot have a length of -1 sectors".

Oddly, the 3.72GB part (/dev/sdd) works fine and hasn't gone read-only...the tell-tale sign of a faulty stick. I've messed about with testdisk but am not totally sure what I am doing with regards to geometry, etc.

Is the flash drive on its way out or can the partition table be repaired? Any suggestions please...
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
DrHu

Re: ImageWriter broken the partition table?

Post by DrHu »

Well for a small 4GB flash drive, i don't know that FAT32 is needed, regular FAT would have been OK
https://en.wikipedia.org/wiki/Fat32#FAT32
--however since you decided on FAT32 no real problem with that: and maybe you are right to do so, since you get one volume (fat32)

There could be some issues with the choice though!
http://support.microsoft.com/kb/954457
http://www.pendrivelinux.com/install-a- ... sh-device/
--mbr issues, sometimes..
http://rufus.akeo.ie/
--another tool for creating a bootable usb flash drive..

As to the partition issue, 1MB is rather small, I would tend to ignore it, unless you want to try again with imagewriter, since you say the drive works fine..
birchy

Re: ImageWriter broken the partition table?

Post by birchy »

The main problem was that the drive won't boot due to the 1MB partition that I can't get rid of. Not a major problem, I have other flash drives that DO boot OK. This is more of a curiosity thing as the "partition" appeared magically but even more bizarre is that it is showing as a completely separate DEVICE and not just a device with partitions. I just don't see how that is possible... :shock:
wayne128

Re: ImageWriter broken the partition table?

Post by wayne128 »

Oh, I have this recently.

I used windows's image writer to write over USB stick with some iso.
then I have many ( really many) partitions with 1M, as many as 4 in front of the proper partition plus some after the partitions. so I ended up with total 9 partitions on the USB stick.
This happened consistently, I thought I did it wrongly, a few weeks later I do it all over and the USB stick would ended up with 8 to 9 partitions..

anyway I just reformat the stick and stop using that software..
perhaps the software I download from did some tricks.
wayne128

Re: ImageWriter broken the partition table?

Post by wayne128 »

just for the fun of it

I redo this:
1. format 4G USb flash with fat32
2. run win7
3. eun image writer
4. use it to write an iso file
5. now I try to boot it from USB stick, it won't boot

so boot up Linux OS, run fdisk -l, and found it was written with GPT format!

Code: Select all

# fdisk -l /dev/sdb

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 4012 MB, 4012900352 bytes
256 heads, 63 sectors/track, 485 cylinders, total 7837696 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1     4005922     2002961   ee  GPT
lets see what else I can display

Code: Select all

# sfdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util sfdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 1019 cylinders, 124 heads, 62 sectors/track
sfdisk: Warning: The partition table looks like it was made
  for C/H/S=*/256/63 (instead of 1019/124/62).
For this listing I'll assume that geometry.

Units = cylinders of 8257536 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          0+    248-    249-   2002961   ee  GPT
sfdisk: 		end: (c,h,s) expected (248,98,5) found (1023,255,63)

/dev/sdb2          0       -       0          0    0  Empty
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty

parted -l shows details..

# parted -l

Model: SanDisk Cruzer Blade (scsi)
Disk /dev/sdb: 4013MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
11 32.8kB 8421kB 8389kB RWFW
6 8421kB 8422kB 512B KERN-C
7 8422kB 8422kB 512B ROOT-C
9 8422kB 8423kB 512B reserved
10 8423kB 8423kB 512B reserved
2 10.5MB 27.3MB 16.8MB KERN-A
3 27.3MB 927MB 900MB ext2 ROOT-A
1 927MB 2001MB 1074MB ext4 STATE
8 2001MB 2017MB 16.8MB OEM
12 2017MB 2034MB 16.8MB fat16 EFI-SYSTEM boot
4 2034MB 2051MB 16.8MB KERN-B
5 2051MB 2051MB 512B ROOT-B

so I attached image from gparted, just to show how it graphically look like

Image


hmm, better go back to school and start learning GPT...

to the OP, sorry to borrow your post...
Locked

Return to “LMDE Archive”