Partition
如何發現磁碟映像 FAT32 分區上的剩餘空間?
鑑於目前的 Debian 安裝程序 hd-media 啟動映像文件,我如何找出包含的 FAT32 格式分區中剩餘的可用空間?
這是我到目前為止所擁有的:
$ curl -fsSLO https://deb.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/boot.img.gz $ gzip -fdk boot.img.gz $ stat boot.img File: boot.img Size: 999997440 Blocks: 1953120 IO Block: 4096 regular file Device: fd01h/64769d Inode: 7998443 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ neil) Gid: ( 1000/ neil) Access: 2020-07-23 16:42:25.173516535 +0000 Modify: 2020-07-23 16:41:58.025469623 +0000 Change: 2020-07-23 16:42:35.437534306 +0000 Birth: - $ file boot.img boot.img: DOS/MBR boot sector, code offset 0x58+2, OEM-ID "SYSLINUX", sectors/cluster 8, Media descriptor 0xf8, sectors/track 63, heads 255, sectors 1953120 (volumes > 32 MB), FAT (32 bit), sectors/FAT 1904, serial number 0xdeb00001, label: "Debian Inst" $ fdisk -l boot.img Disk boot.img: 953.7 MiB, 999997440 bytes, 1953120 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: 0x20ac7dda Device Boot Start End Sectors Size Id Type boot.img1 3224498923 3657370039 432871117 206.4G 7 HPFS/NTFS/exFAT boot.img2 3272020941 5225480974 1953460034 931.5G 16 Hidden FAT16 boot.img3 0 0 0 0B 6f unknown boot.img4 50200576 974536369 924335794 440.8G 0 Empty Partition table entries are not in disk order. $ fatresize -i boot.img fatresize 1.0.2 (10/15/17) FAT: fat32 Size: 999997440 Min size: 536870912 Max size: 999997440
上述數字中的任何一個是我想要的嗎?
使用
mdir
(來自mtools
):$ mdir -i boot.img :: ... g2ldr mbr 8192 2020-05-04 19:14 WIN32-~1 INI 178 2020-05-04 19:14 win32-loader.ini 43 files 76 373 022 bytes 921 333 760 bytes free
如您所見,您擁有的數字都與剩餘的可用空間不匹配。