Quantcast
Channel: Active questions tagged partition - Server Fault
Viewing all articles
Browse latest Browse all 65

Discrepancy from fdisk while resizing an ISO image

$
0
0

I have an ISO image that I created using Clonezilla (on Ubuntu 24.04) 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.imgDisk tmp.img: 455.43 GiB, 489010757632 bytes, 955099136 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0x73736572Device       Boot      Start        End    Sectors   Size Id Typetmp.img1          1920221984 3736432267 1816210284   866G 72 unknowntmp.img2          1936028192 3889681299 1953653108 931.6G 6c unknowntmp.img3                   0          0          0     0B  0 Emptytmp.img4            27722122   27722568        447 223.5K  0 EmptyPartition table entries are not in disk order.

I then tried running gdisk:

$ sudo gdisk -l tmp.imgGPT fdisk (gdisk) version 1.0.10Partition table scan:  MBR: MBR only  BSD: not present  APM: not present  GPT: not present***************************************************************Found invalid GPT and valid MBR; converting MBR to GPT formatin 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 GiBSector size (logical): 512 bytesDisk identifier (GUID): ...Partition table holds up to 128 entriesMain partition table begins at sector 2 and ends at sector 33First usable sector is 34, last usable sector is 955099102Partitions will be aligned on 32-sector boundariesTotal 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!

(Note: Re-posted from AskUbuntu since I realised my question is probably more relevant to this site.)


Viewing all articles
Browse latest Browse all 65

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>