WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: resizing partitions on piCore 7.0  (Read 1527 times)

Offline bobl

  • Newbie
  • *
  • Posts: 10
resizing partitions on piCore 7.0
« on: June 24, 2016, 09:42:46 PM »
I want to reduce the size of the package partition mmcblk0p2 in my case but that requires mmcblk0p2 to be unmounted. Doing that though kills ssh. so best I put the resize2fs command into a startup script that runs before mmcblk0p2 gets mounted.  Where should that go?


Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: resizing partitions on piCore 7.0
« Reply #1 on: June 24, 2016, 11:54:22 PM »
Depending on available RAM and installed TCZ packages the easiest way is to copy all used extensions to RAM. Than you can safely umount mmcblk2 and do what you want.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bobl

  • Newbie
  • *
  • Posts: 10
Re: resizing partitions on piCore 7.0
« Reply #2 on: June 25, 2016, 02:35:28 AM »
do you have a magic incantation for that

Offline bobl

  • Newbie
  • *
  • Posts: 10
Re: resizing partitions on piCore 7.0
« Reply #3 on: June 25, 2016, 06:43:09 AM »
I managed to do it in the shutdown script by changing the script to

umount /dev/mmcblk0p2
/resize2fs /dev/mmcblk0p2 <size>
umount -afr

...


and copying resize2fs into the root directory, the beauty is that once executed the scripts are wiped clean across the reboot because / is in ram.

After the reboot I reduced the partition size to match in fdisk.