Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 760866 - sys-fs/growpart: lacks init script
Summary: sys-fs/growpart: lacks init script
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthew Thode ( prometheanfire )
Depends on:
Reported: 2020-12-20 11:17 UTC by ShorTie
Modified: 2021-03-21 12:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description ShorTie 2020-12-20 11:17:21 UTC
Growpart lacks a init script.
I started playing with growpart in my Devuan imager.
Having switch to Gentoo, I had to port over my init script.
While still using the version of growpart I had/have.
Then I found sys-fs/growpart.
Still have actually not tried it as it pulls in a bunch of stuff.
Is sys-apps/gptfdisk really really needed ??

But anyways, here is my init script that works for me.
It is kinda basic and just does mmcblkp02 and sda2.

Might need some tweeking as I see that other bug talking about /dev/vda.
Not sure what that is to be honest.
But might be as easy to just add a
"elif fdisk -l | grep vda >/dev/null; then" ... in
arm keywording might be nice too...

# Dream up by ShorTie, enjoy .. :)~
# BeerWare By ShorTie	<> 
# This work is too trival to have any copyright, I hereby wave any copyright
# and release it into the public domain.
#rc-update add growpart boot

description="AutoMagically expand the root partition to fill the device upon 1st boot"

	need localmount

start () {
    ebegin "Starting growpart"
    if fdisk -l | grep mmcblk >/dev/null; then
        ebegin "  growing part /dev/mmcblk0p2"
        bash growpart /dev/mmcblk0 2
        sleep 1s
        ebegin "    resize2fs /dev/mmcblk0p2"
        resize2fs /dev/mmcblk0p2
        ebegin "  growing part /dev/sda2"
        bash growpart /dev/sda 2
        sleep 1s
        ebegin "    resize2fs /dev/sda2"
        resize2fs /dev/sda2
    rc-update -v del growpart
Comment 1 ShorTie 2020-12-24 22:47:26 UTC
I've updated to using emerge sys-fs/growpart --nodeps
Along with my init and all seems fine.