I have an USB disk. When I insert it into my PC, the USB interface displays two partition:sdb1 and sdb4.root@debian:~# fdisk -lDisk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 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: 0xa350a350Device     Boot     Start       End   Sectors  Size Id Type/dev/sda1  *         2048    206847    204800  100M  7 HPFS/NTFS/exFAT/dev/sda2          208894 312580095 312371202  149G  f W95 Ext'd (LBA)/dev/sda5       240011264 306278399  66267136 31.6G  7 HPFS/NTFS/exFAT/dev/sda6       306280448 312580095   6299648    3G 82 Linux swap / Solaris/dev/sda7          208896  80285695  80076800 38.2G 83 Linux/dev/sda8        80287744 163878911  83591168 39.9G 83 Linux/dev/sda9       163880960 240011263  76130304 36.3G  b W95 FAT32Partition table entries are not in disk order.Disk /dev/sdb: 14.6 GiB, 15610576896 bytes, 30489408 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: 0xc3072e18Device     Boot    Start      End  Sectors  Size Id Type/dev/sdb1  *       16128 30489407 30473280 14.5G  c W95 FAT32 (LBA)/dev/sdb4       11580256 13523807  1943552  949M  0 EmptyHow to combine sdb1 and sdb4 into  sdb ?It is strange that it is displayed as sdb, only sdb1 can be detected, the sdb4 can't be detected in gparted.Let us get the mbr in my sdb with the command dd if=/dev/sdb of=/home/mbr.img bs=512 count=1Output the mbr.img with xxd.xxd  /home/mbr.imgHow to fix the mbr?
How to combine two partitions into one?
partition
Well, if you want them to be /dev/sdb you'll need to remove the partition table entirely. Maybe the most simple way to do that is just to backup the fs and create it anew.sudo mount /dev/sdb1 /mnttar -C/mnt -cf /tmp/sdb .sudo umount /mntsudo dd if=/dev/zero of=/dev/sdb bs=1kx1k count=4sudo mkfs.vfat /dev/sdbsudo mount /dev/sdb /mnttar -C/mnt -xf /tmp/sdb...I think that covers it...There are other solutions - such as fatresize and similar - but they are not as reliable. The real problem is that the FAT filesystem doesn't offer much in the way of intelligence of any kind - whether that be in the way of user-space tools or otherwise. With some research you could figure out how to do this at the byte offset level, but I think you'll find doing the above less hassle.