1

I have an ISO image that I created using Clonezilla from an NTFS (Windows-based) disk. It is 455 GiB in size, but only 32 GiB of which are used. So, I thought I could resize it.

I followed the instructions given here. Most of it was fine, except the final steps with fdisk -l and truncate (the latter of which I haven't tried yet).

When I run fdisk -l, I get this output:

$ sudo fdisk -l tmp.img 
Disk tmp.img: 455.43 GiB, 489010757632 bytes, 955099136 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
Disklabel type: dos
Disk identifier: 0x73736572

Device Boot Start End Sectors Size Id Type tmp.img1 1920221984 3736432267 1816210284 866G 72 unknown tmp.img2 1936028192 3889681299 1953653108 931.6G 6c unknown tmp.img3 0 0 0 0B 0 Empty tmp.img4 27722122 27722568 447 223.5K 0 Empty

Partition table entries are not in disk order.

I then tried running gdisk:

$ sudo gdisk -l tmp.img 
GPT fdisk (gdisk) version 1.0.10

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.


Exact type match not found for type code 7200; assigning type code for 'Linux filesystem' Exact type match not found for type code 6C00; assigning type code for 'Linux filesystem'

Warning! Secondary partition table overlaps the last partition by 2934582197 blocks! You will need to delete this partition or resize it in another utility. Disk tmp.img: 955099136 sectors, 455.4 GiB Sector size (logical): 512 bytes Disk identifier (GUID): ... Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 955099102 Partitions will be aligned on 32-sector boundaries Total free space is 955099069 sectors (455.4 GiB)

Number Start (sector) End (sector) Size Code Name 1 1920221984 3736432267 866.0 GiB 8300 Linux filesystem 2 1936028192 3889681299 931.6 GiB 8300 Linux filesystem

Everything up until this point was fine. That is, within gparted, I saw only one partition. I don't understand why there are now 4 (as reported by fdisk) or 2 (as reported by gdisk). Also, the sizes seem wrong to me. Perhaps my ISO is corrupted?

Originally, it was an ISO of size 455 GiB. So, that number makes sense to me. I don't know where the 866 GiB or 931 GiB from gdisk is coming from.

Can someone offer suggestions on what I should do? This is a copy of the ISO in question -- I can play with it and if I fail, I can copy again and try something else. Just the numbers don't make sense to me, but I also don't have much experience with this.

Any suggestions would be appreciated; thank you!

Ray
  • 2,200

0 Answers0