Ok. I did a backup of the production MicroSD Card and I show you the partitions (gpart show):
Code:
# gpart show
=> 63 499744705 mmcsd0 MBR (238G)
63 1985 - free - (993K)
2048 102400 1 fat32lba [active] (50M)
104448 499640320 2 freebsd (238G)
=> 0 499640320 mmcsd0s2 BSD (238G)
0 128 - free - (64K)
128 112150400 1 freebsd-ufs (53G)
112150528 12476416 2 freebsd-swap (5.9G)
124626944 375013376 - free - (179G)
I deleted the swap partition:
Code:
# gpart delete -i 2 mmcsd0s2
mmcsd0s2b deleted
Now, if I do "gpart show" there is no swap partition anymore:
Code:
# gpart show
=> 63 499744705 mmcsd0 MBR (238G)
63 1985 - free - (993K)
2048 102400 1 fat32lba [active] (50M)
104448 499640320 2 freebsd (238G)
=> 0 499640320 mmcsd0s2 BSD (238G)
0 128 - free - (64K)
128 112150400 1 freebsd-ufs (53G)
112150528 387489792 - free - (185G)
Now I did this change on the kernel:
Code:
# sysctl kern.geom.debugflags=16
kern.geom.debugflags: 0 -> 16
root@mercuri:/home/joan #
I resized the root partition where I have the "/" of my system:
Code:
# gpart resize -i 1 -s 233G -a 4k mmcsd0s2
mmcsd0s2a resized
Ok. Now I have a look on the partitions:
Code:
# gpart show
=> 63 499744705 mmcsd0 MBR (238G)
63 1985 - free - (993K)
2048 102400 1 fat32lba [active] (50M)
104448 499640320 2 freebsd (238G)
=> 0 499640320 mmcsd0s2 BSD (238G)
0 128 - free - (64K)
128 488636416 1 freebsd-ufs (233G)
488636544 11003776 - free - (5.2G)
Finally I create the swap partion and I have some strange message:
Code:
# gpart add -t freebsd-swap -a 4k mmcsd0s2
mmcsd0s2b added, but partition is not aligned on 4194304 bytes
If I do "gpart show" I see the root partition with 233G and the swap partition:
Code:
# gpart show
=> 63 499744705 mmcsd0 MBR (238G)
63 1985 - free - (993K)
2048 102400 1 fat32lba [active] (50M)
104448 499640320 2 freebsd (238G)
=> 0 499640320 mmcsd0s2 BSD (238G)
0 128 - free - (64K)
128 488636416 1 freebsd-ufs (233G)
488636544 11003776 2 freebsd-swap (5.2G)
So, apparently I have 233G for the / partition, and 5.2G for the swap partition.
Everything seems to be right, isn't it?
I reboot with "shutdown -r now" but the system doesn't boot properly and I see the message of the attached image.
Can somebody tell me where is the problem? Do I need to do some more commands of gpart before reboot the system?
Joan