[General Questions and Answers] soswow:
I have Samsung S 3 mini.

I did something really bad to my INTERNAL SD CARD partition layout, so now I have

~ # cat /proc/partitions
major minor #blocks name

179 0 7634944 mmcblk0
179 64 2048 mmcblk0boot1
179 32 2048 mmcblk0boot0
179 96 3866624 mmcblk1
179 97 3862528 mmcblk1p1

~ # ls -la /dev/block/mmcblk*
brw------- 1 root root 179, 0 Jan 1 10:30 /dev/block/mmcblk0
brw------- 1 root root 179, 32 Jan 1 09:28 /dev/block/mmcblk0boot0
brw------- 1 root root 179, 64 Jan 1 09:28 /dev/block/mmcblk0boot1
-rw-rw-rw- 1 root root 16777216 Jan 1 10:07 /dev/block/mmcblk0p20
-rw-r--r-- 1 root root 0 Jan 1 10:07 /dev/block/mmcblk0p22
brw------- 1 root root 179, 96 Jan 1 09:28 /dev/block/mmcblk1
brw------- 1 root root 179, 97 Jan 1 09:28 /dev/block/mmcblk1p1

~ # df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 411756 16452 395304 4% /dev
/dev/block/mmcblk1p1 3858432 1473472 2384960 38% /external_sd

~ # mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mmcblk1p1 on /external_sd type vfat (rw,nodev,noatime,nodiratime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

~ # tail ./etc/recovery.fstab
/system	ext4	/dev/block/mmcblk0p22
/cache	ext4	/dev/block/mmcblk0p23
/data	ext4	/dev/block/mmcblk0p25 length=-16384
/efs	ext4 /dev/block/mmcblk0p11
/boot	emmc	/dev/block/mmcblk0p20
/recovery	emmc	/dev/block/mmcblk0p21
/preload	ext4	/dev/block/mmcblk0p24
/modem	ext4	/dev/block/mmcblk0p12
/sdcard	datamedia	/dev/null
/external_sd	vfat	/dev/block/mmcblk1p1

~ # tail ./etc/fstab
/dev/block/mmcblk0p23 /cache ext4 rw
/dev/block/mmcblk0p25 /data ext4 rw
/dev/block/mmcblk0p22 /system ext4 rw
/dev/null /sdcard datamedia rw

~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
Warning: /dev/block/mmcblk0 contains GPT signatures, indicating that it has a
GPT table. However, it does not have a valid fake msdos partition table, as it
should. Perhaps it was corrupted -- possibly by a program that doesn't
understand GPT partition tables. Or perhaps you deleted the GPT table, and are
now using an msdos partition table. Is this a GPT partition table?
Yes/No?

My ClockWorkMod recovery tool can't mount anything (/cache, /system, nothing). This is what kind of stuff I get in CWM:

-- Wiping cache...
Formatting /cache...
Need size of filesystem
E:format_volume: make_extf4fs failed on /dev/block/mmcblk0p23
Cache wipe complete.
W:failed to mount /dev/block/mmcblk0p23 (Block device required)
E:Can't mount /cache/recovery/log
E:Can't open /cache/recovery/log
W:failed to mount /dev/block/mmcblk0p23 (Block device required)
E:Can't mount /cache/recovery/last_log
E:Can't open /cache/recovery/last_log
W:failed to mount /dev/block/mmcblk0p23 (Block device required)
W:Can't unlink /cache/recovery/command
Formatting /data...
warning: get_file_size: Computed filesystem size less than 0
Need size of filesystem
E:format_volume: make_extf4fs failed on /dev/block/mmcblk0p25
Error formatting /data!
W:failed to mount /dev/block/mmcblk0p23 (Block device required)
E:Can't mount /cache/recovery/log
E:Can't open /cache/recovery/log

As you can see, there is no partitions for /system, /cache and other stuff, that should be there. (but /system, and /cache folders are present in dir listing)

I really did everything I could. I tried: restore from backup (I have one, made with recovery tool), install new ROM (With recovery tool), install stock firmware and stock kernel in ODIN mode. I even tried some PIT file: nothing did absolutely nothing to my status.

Frankly I miss some important part in understanding of filesystem, partitions, images, what is ROM, what is stock kernel, how does those 22, 23 25 partitions are created etc ...

What should I do? Please, help.