* [WIC] Grow last partition up to disk size
@ 2020-04-30 17:39 Rudolf J Streif
2020-04-30 18:16 ` [yocto] " Marek Belisko
0 siblings, 1 reply; 13+ messages in thread
From: Rudolf J Streif @ 2020-04-30 17:39 UTC (permalink / raw)
To: Yocto list discussion
[-- Attachment #1.1: Type: text/plain, Size: 345 bytes --]
I was looking for a way in a wks file to have wic grow the last
partition to fill up the remainder of the disk. Of course wic does not
know how large the disk is but that could be a parameter.
The alternative way is to use fixed-size and do the math manually but
that would not allow wic to grow a partition based on content.
:rjs
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 499 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [yocto] [WIC] Grow last partition up to disk size
2020-04-30 17:39 [WIC] Grow last partition up to disk size Rudolf J Streif
@ 2020-04-30 18:16 ` Marek Belisko
2020-04-30 18:23 ` Khem Raj
0 siblings, 1 reply; 13+ messages in thread
From: Marek Belisko @ 2020-04-30 18:16 UTC (permalink / raw)
To: yocto; +Cc: Yocto list discussion
Hi Rudolf,
On Thu, Apr 30, 2020 at 7:39 PM Rudolf J Streif
<rudolf.streif@ibeeto.com> wrote:
>
> I was looking for a way in a wks file to have wic grow the last
> partition to fill up the remainder of the disk. Of course wic does not
> know how large the disk is but that could be a parameter.
>
> The alternative way is to use fixed-size and do the math manually but
> that would not allow wic to grow a partition based on content.
You can use https://manpages.debian.org/testing/systemd/systemd-growfs.8.en.html
which grow partition to the end.
>
> :rjs
>
>
>
BR,
marek
--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [yocto] [WIC] Grow last partition up to disk size
2020-04-30 18:16 ` [yocto] " Marek Belisko
@ 2020-04-30 18:23 ` Khem Raj
2020-04-30 18:25 ` Marek Belisko
2020-05-18 9:39 ` Mike Looijmans
0 siblings, 2 replies; 13+ messages in thread
From: Khem Raj @ 2020-04-30 18:23 UTC (permalink / raw)
To: yocto; +Cc: Yocto list discussion
On 4/30/20 11:16 AM, Marek Belisko wrote:
> Hi Rudolf,
>
> On Thu, Apr 30, 2020 at 7:39 PM Rudolf J Streif
> <rudolf.streif@ibeeto.com> wrote:
>>
>> I was looking for a way in a wks file to have wic grow the last
>> partition to fill up the remainder of the disk. Of course wic does not
>> know how large the disk is but that could be a parameter.
>>
>> The alternative way is to use fixed-size and do the math manually but
>> that would not allow wic to grow a partition based on content.
> You can use https://manpages.debian.org/testing/systemd/systemd-growfs.8.en.html
> which grow partition to the end.
can it grow a mounted partition ? since that will be the case when
growing rootfs partition.
>>
>> :rjs
>>
>>
>>
>
> BR,
>
> marek
>
>
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [yocto] [WIC] Grow last partition up to disk size
2020-04-30 18:23 ` Khem Raj
@ 2020-04-30 18:25 ` Marek Belisko
2020-04-30 18:27 ` Khem Raj
2020-05-18 9:39 ` Mike Looijmans
1 sibling, 1 reply; 13+ messages in thread
From: Marek Belisko @ 2020-04-30 18:25 UTC (permalink / raw)
To: yocto; +Cc: Yocto list discussion
On Thu, Apr 30, 2020 at 8:23 PM Khem Raj <raj.khem@gmail.com> wrote:
>
>
>
> On 4/30/20 11:16 AM, Marek Belisko wrote:
> > Hi Rudolf,
> >
> > On Thu, Apr 30, 2020 at 7:39 PM Rudolf J Streif
> > <rudolf.streif@ibeeto.com> wrote:
> >>
> >> I was looking for a way in a wks file to have wic grow the last
> >> partition to fill up the remainder of the disk. Of course wic does not
> >> know how large the disk is but that could be a parameter.
> >>
> >> The alternative way is to use fixed-size and do the math manually but
> >> that would not allow wic to grow a partition based on content.
> > You can use https://manpages.debian.org/testing/systemd/systemd-growfs.8.en.html
> > which grow partition to the end.
>
> can it grow a mounted partition ? since that will be the case when
> growing rootfs partition.
It will grow last partition in first boot only.
>
> >>
> >> :rjs
> >>
> >>
> >>
> >
> > BR,
> >
> > marek
> >
> >
> >
> >
>
BR,
marek
--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [yocto] [WIC] Grow last partition up to disk size
2020-04-30 18:25 ` Marek Belisko
@ 2020-04-30 18:27 ` Khem Raj
2020-04-30 18:30 ` Marek Belisko
0 siblings, 1 reply; 13+ messages in thread
From: Khem Raj @ 2020-04-30 18:27 UTC (permalink / raw)
To: yocto; +Cc: Yocto list discussion
On 4/30/20 11:25 AM, Marek Belisko wrote:
> On Thu, Apr 30, 2020 at 8:23 PM Khem Raj <raj.khem@gmail.com> wrote:
>>
>>
>>
>> On 4/30/20 11:16 AM, Marek Belisko wrote:
>>> Hi Rudolf,
>>>
>>> On Thu, Apr 30, 2020 at 7:39 PM Rudolf J Streif
>>> <rudolf.streif@ibeeto.com> wrote:
>>>>
>>>> I was looking for a way in a wks file to have wic grow the last
>>>> partition to fill up the remainder of the disk. Of course wic does not
>>>> know how large the disk is but that could be a parameter.
>>>>
>>>> The alternative way is to use fixed-size and do the math manually but
>>>> that would not allow wic to grow a partition based on content.
>>> You can use https://manpages.debian.org/testing/systemd/systemd-growfs.8.en.html
>>> which grow partition to the end.
>>
>> can it grow a mounted partition ? since that will be the case when
>> growing rootfs partition.
> It will grow last partition in first boot only.
my question was will it grow a mounted rootfs parition if that happens
tobe the last partition, I understand it will grow last partion and do
it as firstboot service.
>>
>>>>
>>>> :rjs
>>>>
>>>>
>>>>
>>>
>>> BR,
>>>
>>> marek
>>>
>>>
>>>
>>>
>>
>
> BR,
>
> marek
>
>
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [yocto] [WIC] Grow last partition up to disk size
2020-04-30 18:27 ` Khem Raj
@ 2020-04-30 18:30 ` Marek Belisko
2020-04-30 19:10 ` Michael Nazzareno Trimarchi
[not found] ` <160AAEA430561E1B.4948@lists.yoctoproject.org>
0 siblings, 2 replies; 13+ messages in thread
From: Marek Belisko @ 2020-04-30 18:30 UTC (permalink / raw)
To: yocto; +Cc: Yocto list discussion
On Thu, Apr 30, 2020 at 8:27 PM Khem Raj <raj.khem@gmail.com> wrote:
>
>
>
> On 4/30/20 11:25 AM, Marek Belisko wrote:
> > On Thu, Apr 30, 2020 at 8:23 PM Khem Raj <raj.khem@gmail.com> wrote:
> >>
> >>
> >>
> >> On 4/30/20 11:16 AM, Marek Belisko wrote:
> >>> Hi Rudolf,
> >>>
> >>> On Thu, Apr 30, 2020 at 7:39 PM Rudolf J Streif
> >>> <rudolf.streif@ibeeto.com> wrote:
> >>>>
> >>>> I was looking for a way in a wks file to have wic grow the last
> >>>> partition to fill up the remainder of the disk. Of course wic does not
> >>>> know how large the disk is but that could be a parameter.
> >>>>
> >>>> The alternative way is to use fixed-size and do the math manually but
> >>>> that would not allow wic to grow a partition based on content.
> >>> You can use https://manpages.debian.org/testing/systemd/systemd-growfs.8.en.html
> >>> which grow partition to the end.
> >>
> >> can it grow a mounted partition ? since that will be the case when
> >> growing rootfs partition.
> > It will grow last partition in first boot only.
>
> my question was will it grow a mounted rootfs parition if that happens
> tobe the last partition, I understand it will grow last partion and do
> it as firstboot service.
I usually use it in case when have dual rootfs (A, B) and data
partition which is expanded to then end of disk.
I don't have experience with growing rootfs (I think it can grow only
not mounted partitions)
>
> >>
> >>>>
> >>>> :rjs
> >>>>
> >>>>
> >>>>
> >>>
> >>> BR,
> >>>
> >>> marek
> >>>
> >>>
> >>>
> >>>
> >>
> >
> > BR,
> >
> > marek
> >
> >
> >
> >
>
marek
--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [yocto] [WIC] Grow last partition up to disk size
2020-04-30 18:30 ` Marek Belisko
@ 2020-04-30 19:10 ` Michael Nazzareno Trimarchi
[not found] ` <160AAEA430561E1B.4948@lists.yoctoproject.org>
1 sibling, 0 replies; 13+ messages in thread
From: Michael Nazzareno Trimarchi @ 2020-04-30 19:10 UTC (permalink / raw)
To: yocto; +Cc: Yocto list discussion
Hi
Well I have write something like this
[Unit]
Description=Increases rootfs image size to fit partition
Requires=dev-disk-by\x2dpartlabel-rootfs.device
After=dev-disk-by\x2dpartlabel-rootfs.device
[Service]
Type=oneshot
ExecStart=/usr/sbin/sgdisk /dev/disk/by-path/platform-ff0f0000.dwmmc -e
ExecStart=/usr/sbin/parted /dev/disk/by-path/platform-ff0f0000.dwmmc
-s "resizepart 4 -1" quit
ExecStart=/sbin/resize2fs /dev/disk/by-partlabel/rootfs
ExecStart=/bin/systemctl disable resize-rootfs.service
StandardOutput=journal+console
[Install]
WantedBy=default.target
On Thu, Apr 30, 2020 at 8:30 PM Marek Belisko <marek.belisko@gmail.com> wrote:
>
> On Thu, Apr 30, 2020 at 8:27 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> >
> >
> > On 4/30/20 11:25 AM, Marek Belisko wrote:
> > > On Thu, Apr 30, 2020 at 8:23 PM Khem Raj <raj.khem@gmail.com> wrote:
> > >>
> > >>
> > >>
> > >> On 4/30/20 11:16 AM, Marek Belisko wrote:
> > >>> Hi Rudolf,
> > >>>
> > >>> On Thu, Apr 30, 2020 at 7:39 PM Rudolf J Streif
> > >>> <rudolf.streif@ibeeto.com> wrote:
> > >>>>
> > >>>> I was looking for a way in a wks file to have wic grow the last
> > >>>> partition to fill up the remainder of the disk. Of course wic does not
> > >>>> know how large the disk is but that could be a parameter.
> > >>>>
> > >>>> The alternative way is to use fixed-size and do the math manually but
> > >>>> that would not allow wic to grow a partition based on content.
> > >>> You can use https://manpages.debian.org/testing/systemd/systemd-growfs.8.en.html
> > >>> which grow partition to the end.
> > >>
> > >> can it grow a mounted partition ? since that will be the case when
> > >> growing rootfs partition.
> > > It will grow last partition in first boot only.
> >
> > my question was will it grow a mounted rootfs parition if that happens
> > tobe the last partition, I understand it will grow last partion and do
> > it as firstboot service.
> I usually use it in case when have dual rootfs (A, B) and data
> partition which is expanded to then end of disk.
> I don't have experience with growing rootfs (I think it can grow only
> not mounted partitions)
> >
> > >>
> > >>>>
> > >>>> :rjs
> > >>>>
> > >>>>
> > >>>>
> > >>>
> > >>> BR,
> > >>>
> > >>> marek
> > >>>
> > >>>
> > >>>
> > >>>
> > >>
> > >
> > > BR,
> > >
> > > marek
> > >
> > >
> > >
> > >
> >
>
> marek
>
>
> --
> as simple and primitive as possible
> -------------------------------------------------
> Marek Belisko - OPEN-NANDRA
> Freelance Developer
>
> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> Tel: +421 915 052 184
> skype: marekwhite
> twitter: #opennandra
> web: http://open-nandra.com
>
--
| Michael Nazzareno Trimarchi Amarula Solutions BV |
| COO - Founder Cruquiuskade 47 |
| +31(0)851119172 Amsterdam 1018 AM NL |
| [`as] http://www.amarulasolutions.com |
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [yocto] [WIC] Grow last partition up to disk size
[not found] ` <160AAEA430561E1B.4948@lists.yoctoproject.org>
@ 2020-04-30 19:13 ` Michael Nazzareno Trimarchi
2020-04-30 23:11 ` Rudolf J Streif
0 siblings, 1 reply; 13+ messages in thread
From: Michael Nazzareno Trimarchi @ 2020-04-30 19:13 UTC (permalink / raw)
To: yocto; +Cc: Yocto list discussion
Hi
On Thu, Apr 30, 2020 at 9:10 PM Michael Nazzareno Trimarchi via
lists.yoctoproject.org
<michael=amarulasolutions.com@lists.yoctoproject.org> wrote:
>
> Hi
>
> Well I have write something like this
>
> [Unit]
> Description=Increases rootfs image size to fit partition
> Requires=dev-disk-by\x2dpartlabel-rootfs.device
> After=dev-disk-by\x2dpartlabel-rootfs.device
>
> [Service]
> Type=oneshot
> ExecStart=/usr/sbin/sgdisk /dev/disk/by-path/platform-ff0f0000.dwmmc -e
This resize gpt up to disk size
> ExecStart=/usr/sbin/parted /dev/disk/by-path/platform-ff0f0000.dwmmc
> -s "resizepart 4 -1" quit
This resize partition number 4 up to the max
Michael
> ExecStart=/sbin/resize2fs /dev/disk/by-partlabel/rootfs
> ExecStart=/bin/systemctl disable resize-rootfs.service
>
> StandardOutput=journal+console
>
> [Install]
> WantedBy=default.target
>
>
> On Thu, Apr 30, 2020 at 8:30 PM Marek Belisko <marek.belisko@gmail.com> wrote:
> >
> > On Thu, Apr 30, 2020 at 8:27 PM Khem Raj <raj.khem@gmail.com> wrote:
> > >
> > >
> > >
> > > On 4/30/20 11:25 AM, Marek Belisko wrote:
> > > > On Thu, Apr 30, 2020 at 8:23 PM Khem Raj <raj.khem@gmail.com> wrote:
> > > >>
> > > >>
> > > >>
> > > >> On 4/30/20 11:16 AM, Marek Belisko wrote:
> > > >>> Hi Rudolf,
> > > >>>
> > > >>> On Thu, Apr 30, 2020 at 7:39 PM Rudolf J Streif
> > > >>> <rudolf.streif@ibeeto.com> wrote:
> > > >>>>
> > > >>>> I was looking for a way in a wks file to have wic grow the last
> > > >>>> partition to fill up the remainder of the disk. Of course wic does not
> > > >>>> know how large the disk is but that could be a parameter.
> > > >>>>
> > > >>>> The alternative way is to use fixed-size and do the math manually but
> > > >>>> that would not allow wic to grow a partition based on content.
> > > >>> You can use https://manpages.debian.org/testing/systemd/systemd-growfs.8.en.html
> > > >>> which grow partition to the end.
> > > >>
> > > >> can it grow a mounted partition ? since that will be the case when
> > > >> growing rootfs partition.
> > > > It will grow last partition in first boot only.
> > >
> > > my question was will it grow a mounted rootfs parition if that happens
> > > tobe the last partition, I understand it will grow last partion and do
> > > it as firstboot service.
> > I usually use it in case when have dual rootfs (A, B) and data
> > partition which is expanded to then end of disk.
> > I don't have experience with growing rootfs (I think it can grow only
> > not mounted partitions)
> > >
> > > >>
> > > >>>>
> > > >>>> :rjs
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>
> > > >>> BR,
> > > >>>
> > > >>> marek
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>
> > > >
> > > > BR,
> > > >
> > > > marek
> > > >
> > > >
> > > >
> > > >
> > >
> >
> > marek
> >
> >
> > --
> > as simple and primitive as possible
> > -------------------------------------------------
> > Marek Belisko - OPEN-NANDRA
> > Freelance Developer
> >
> > Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> > Tel: +421 915 052 184
> > skype: marekwhite
> > twitter: #opennandra
> > web: http://open-nandra.com
> >
>
>
>
> --
> | Michael Nazzareno Trimarchi Amarula Solutions BV |
> | COO - Founder Cruquiuskade 47 |
> | +31(0)851119172 Amsterdam 1018 AM NL |
> | [`as] http://www.amarulasolutions.com |
>
--
| Michael Nazzareno Trimarchi Amarula Solutions BV |
| COO - Founder Cruquiuskade 47 |
| +31(0)851119172 Amsterdam 1018 AM NL |
| [`as] http://www.amarulasolutions.com |
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [yocto] [WIC] Grow last partition up to disk size
2020-04-30 19:13 ` Michael Nazzareno Trimarchi
@ 2020-04-30 23:11 ` Rudolf J Streif
2020-04-30 23:17 ` Khem Raj
2020-05-01 6:47 ` Gmane Admin
0 siblings, 2 replies; 13+ messages in thread
From: Rudolf J Streif @ 2020-04-30 23:11 UTC (permalink / raw)
To: yocto; +Cc: Yocto list discussion
[-- Attachment #1.1.1: Type: text/plain, Size: 3691 bytes --]
Thanks, guys, I appreciate it.
Doing it dynamically on first boot would probably work as it is a data
partition and not the rootfs partition.
I will give it a try.
:rjs
On 4/30/20 12:13 PM, Michael Nazzareno Trimarchi wrote:
> Hi
>
> On Thu, Apr 30, 2020 at 9:10 PM Michael Nazzareno Trimarchi via
> lists.yoctoproject.org
> <michael=amarulasolutions.com@lists.yoctoproject.org> wrote:
>> Hi
>>
>> Well I have write something like this
>>
>> [Unit]
>> Description=Increases rootfs image size to fit partition
>> Requires=dev-disk-by\x2dpartlabel-rootfs.device
>> After=dev-disk-by\x2dpartlabel-rootfs.device
>>
>> [Service]
>> Type=oneshot
>> ExecStart=/usr/sbin/sgdisk /dev/disk/by-path/platform-ff0f0000.dwmmc -e
> This resize gpt up to disk size
>
>> ExecStart=/usr/sbin/parted /dev/disk/by-path/platform-ff0f0000.dwmmc
>> -s "resizepart 4 -1" quit
> This resize partition number 4 up to the max
>
> Michael
>
>> ExecStart=/sbin/resize2fs /dev/disk/by-partlabel/rootfs
>> ExecStart=/bin/systemctl disable resize-rootfs.service
>>
>> StandardOutput=journal+console
>>
>> [Install]
>> WantedBy=default.target
>>
>>
>> On Thu, Apr 30, 2020 at 8:30 PM Marek Belisko <marek.belisko@gmail.com> wrote:
>>> On Thu, Apr 30, 2020 at 8:27 PM Khem Raj <raj.khem@gmail.com> wrote:
>>>>
>>>>
>>>> On 4/30/20 11:25 AM, Marek Belisko wrote:
>>>>> On Thu, Apr 30, 2020 at 8:23 PM Khem Raj <raj.khem@gmail.com> wrote:
>>>>>>
>>>>>>
>>>>>> On 4/30/20 11:16 AM, Marek Belisko wrote:
>>>>>>> Hi Rudolf,
>>>>>>>
>>>>>>> On Thu, Apr 30, 2020 at 7:39 PM Rudolf J Streif
>>>>>>> <rudolf.streif@ibeeto.com> wrote:
>>>>>>>> I was looking for a way in a wks file to have wic grow the last
>>>>>>>> partition to fill up the remainder of the disk. Of course wic does not
>>>>>>>> know how large the disk is but that could be a parameter.
>>>>>>>>
>>>>>>>> The alternative way is to use fixed-size and do the math manually but
>>>>>>>> that would not allow wic to grow a partition based on content.
>>>>>>> You can use https://manpages.debian.org/testing/systemd/systemd-growfs.8.en.html
>>>>>>> which grow partition to the end.
>>>>>> can it grow a mounted partition ? since that will be the case when
>>>>>> growing rootfs partition.
>>>>> It will grow last partition in first boot only.
>>>> my question was will it grow a mounted rootfs parition if that happens
>>>> tobe the last partition, I understand it will grow last partion and do
>>>> it as firstboot service.
>>> I usually use it in case when have dual rootfs (A, B) and data
>>> partition which is expanded to then end of disk.
>>> I don't have experience with growing rootfs (I think it can grow only
>>> not mounted partitions)
>>>>>>>> :rjs
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> BR,
>>>>>>>
>>>>>>> marek
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>> BR,
>>>>>
>>>>> marek
>>>>>
>>>>>
>>>>>
>>>>>
>>> marek
>>>
>>>
>>> --
>>> as simple and primitive as possible
>>> -------------------------------------------------
>>> Marek Belisko - OPEN-NANDRA
>>> Freelance Developer
>>>
>>> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
>>> Tel: +421 915 052 184
>>> skype: marekwhite
>>> twitter: #opennandra
>>> web: http://open-nandra.com
>>>
>>
>>
>> --
>> | Michael Nazzareno Trimarchi Amarula Solutions BV |
>> | COO - Founder Cruquiuskade 47 |
>> | +31(0)851119172 Amsterdam 1018 AM NL |
>> | [`as] http://www.amarulasolutions.com |
>>
>
>
>
>
--
-----
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3386 x700
[-- Attachment #1.1.2: Type: text/html, Size: 6859 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 499 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [yocto] [WIC] Grow last partition up to disk size
2020-04-30 23:11 ` Rudolf J Streif
@ 2020-04-30 23:17 ` Khem Raj
2020-05-01 6:47 ` Gmane Admin
1 sibling, 0 replies; 13+ messages in thread
From: Khem Raj @ 2020-04-30 23:17 UTC (permalink / raw)
To: yocto; +Cc: Yocto list discussion
On 4/30/20 4:11 PM, Rudolf J Streif wrote:
> Thanks, guys, I appreciate it.
>
> Doing it dynamically on first boot would probably work as it is a data
> partition and not the rootfs partition.
>
> I will give it a try.
96boards-tools also has a script which works regardless of init systems
https://github.com/96boards/meta-96boards/blob/master/recipes-bsp/96boards-tools/96boards-tools_0.12.bb
>
> :rjs
>
> On 4/30/20 12:13 PM, Michael Nazzareno Trimarchi wrote:
>> Hi
>>
>> On Thu, Apr 30, 2020 at 9:10 PM Michael Nazzareno Trimarchi via
>> lists.yoctoproject.org
>> <michael=amarulasolutions.com@lists.yoctoproject.org> wrote:
>>> Hi
>>>
>>> Well I have write something like this
>>>
>>> [Unit]
>>> Description=Increases rootfs image size to fit partition
>>> Requires=dev-disk-by\x2dpartlabel-rootfs.device
>>> After=dev-disk-by\x2dpartlabel-rootfs.device
>>>
>>> [Service]
>>> Type=oneshot
>>> ExecStart=/usr/sbin/sgdisk /dev/disk/by-path/platform-ff0f0000.dwmmc -e
>> This resize gpt up to disk size
>>
>>> ExecStart=/usr/sbin/parted /dev/disk/by-path/platform-ff0f0000.dwmmc
>>> -s "resizepart 4 -1" quit
>> This resize partition number 4 up to the max
>>
>> Michael
>>
>>> ExecStart=/sbin/resize2fs /dev/disk/by-partlabel/rootfs
>>> ExecStart=/bin/systemctl disable resize-rootfs.service
>>>
>>> StandardOutput=journal+console
>>>
>>> [Install]
>>> WantedBy=default.target
>>>
>>>
>>> On Thu, Apr 30, 2020 at 8:30 PM Marek Belisko<marek.belisko@gmail.com> wrote:
>>>> On Thu, Apr 30, 2020 at 8:27 PM Khem Raj<raj.khem@gmail.com> wrote:
>>>>>
>>>>> On 4/30/20 11:25 AM, Marek Belisko wrote:
>>>>>> On Thu, Apr 30, 2020 at 8:23 PM Khem Raj<raj.khem@gmail.com> wrote:
>>>>>>>
>>>>>>> On 4/30/20 11:16 AM, Marek Belisko wrote:
>>>>>>>> Hi Rudolf,
>>>>>>>>
>>>>>>>> On Thu, Apr 30, 2020 at 7:39 PM Rudolf J Streif
>>>>>>>> <rudolf.streif@ibeeto.com> wrote:
>>>>>>>>> I was looking for a way in a wks file to have wic grow the last
>>>>>>>>> partition to fill up the remainder of the disk. Of course wic does not
>>>>>>>>> know how large the disk is but that could be a parameter.
>>>>>>>>>
>>>>>>>>> The alternative way is to use fixed-size and do the math manually but
>>>>>>>>> that would not allow wic to grow a partition based on content.
>>>>>>>> You can usehttps://manpages.debian.org/testing/systemd/systemd-growfs.8.en.html
>>>>>>>> which grow partition to the end.
>>>>>>> can it grow a mounted partition ? since that will be the case when
>>>>>>> growing rootfs partition.
>>>>>> It will grow last partition in first boot only.
>>>>> my question was will it grow a mounted rootfs parition if that happens
>>>>> tobe the last partition, I understand it will grow last partion and do
>>>>> it as firstboot service.
>>>> I usually use it in case when have dual rootfs (A, B) and data
>>>> partition which is expanded to then end of disk.
>>>> I don't have experience with growing rootfs (I think it can grow only
>>>> not mounted partitions)
>>>>>>>>> :rjs
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> BR,
>>>>>>>>
>>>>>>>> marek
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> BR,
>>>>>>
>>>>>> marek
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>> marek
>>>>
>>>>
>>>> --
>>>> as simple and primitive as possible
>>>> -------------------------------------------------
>>>> Marek Belisko - OPEN-NANDRA
>>>> Freelance Developer
>>>>
>>>> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
>>>> Tel: +421 915 052 184
>>>> skype: marekwhite
>>>> twitter: #opennandra
>>>> web:http://open-nandra.com
>>>>
>>>
>>> --
>>> | Michael Nazzareno Trimarchi Amarula Solutions BV |
>>> | COO - Founder Cruquiuskade 47 |
>>> | +31(0)851119172 Amsterdam 1018 AM NL |
>>> | [`as]http://www.amarulasolutions.com |
>>>
>>
>>
> --
> -----
> Rudolf J Streif
> CEO/CTO ibeeto
> +1.855.442.3386 x700
>
>
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [WIC] Grow last partition up to disk size
2020-04-30 23:11 ` Rudolf J Streif
2020-04-30 23:17 ` Khem Raj
@ 2020-05-01 6:47 ` Gmane Admin
2020-05-01 7:06 ` [yocto] " Michael Nazzareno Trimarchi
1 sibling, 1 reply; 13+ messages in thread
From: Gmane Admin @ 2020-05-01 6:47 UTC (permalink / raw)
To: yocto; +Cc: Yocto list discussion
Op 01-05-2020 om 01:11 schreef Rudolf J Streif:
> Thanks, guys, I appreciate it.
>
> Doing it dynamically on first boot would probably work as it is a data
> partition and not the rootfs partition.
If you use btrfs you can even resize the rootfs (mounted) partition.
> I will give it a try.
>
> :rjs
>
> On 4/30/20 12:13 PM, Michael Nazzareno Trimarchi wrote:
>> Hi
>>
>> On Thu, Apr 30, 2020 at 9:10 PM Michael Nazzareno Trimarchi via
>> lists.yoctoproject.org
>> <michael=amarulasolutions.com@lists.yoctoproject.org> wrote:
>>> Hi
>>>
>>> Well I have write something like this
>>>
>>> [Unit]
>>> Description=Increases rootfs image size to fit partition
>>> Requires=dev-disk-by\x2dpartlabel-rootfs.device
>>> After=dev-disk-by\x2dpartlabel-rootfs.device
>>>
>>> [Service]
>>> Type=oneshot
>>> ExecStart=/usr/sbin/sgdisk /dev/disk/by-path/platform-ff0f0000.dwmmc -e
>> This resize gpt up to disk size
>>
>>> ExecStart=/usr/sbin/parted /dev/disk/by-path/platform-ff0f0000.dwmmc
>>> -s "resizepart 4 -1" quit
>> This resize partition number 4 up to the max
>>
>> Michael
>>
>>> ExecStart=/sbin/resize2fs /dev/disk/by-partlabel/rootfs
>>> ExecStart=/bin/systemctl disable resize-rootfs.service
>>>
>>> StandardOutput=journal+console
>>>
>>> [Install]
>>> WantedBy=default.target
>>>
>>>
>>> On Thu, Apr 30, 2020 at 8:30 PM Marek Belisko<marek.belisko@gmail.com> wrote:
>>>> On Thu, Apr 30, 2020 at 8:27 PM Khem Raj<raj.khem@gmail.com> wrote:
>>>>>
>>>>> On 4/30/20 11:25 AM, Marek Belisko wrote:
>>>>>> On Thu, Apr 30, 2020 at 8:23 PM Khem Raj<raj.khem@gmail.com> wrote:
>>>>>>>
>>>>>>> On 4/30/20 11:16 AM, Marek Belisko wrote:
>>>>>>>> Hi Rudolf,
>>>>>>>>
>>>>>>>> On Thu, Apr 30, 2020 at 7:39 PM Rudolf J Streif
>>>>>>>> <rudolf.streif@ibeeto.com> wrote:
>>>>>>>>> I was looking for a way in a wks file to have wic grow the last
>>>>>>>>> partition to fill up the remainder of the disk. Of course wic does not
>>>>>>>>> know how large the disk is but that could be a parameter.
>>>>>>>>>
>>>>>>>>> The alternative way is to use fixed-size and do the math manually but
>>>>>>>>> that would not allow wic to grow a partition based on content.
>>>>>>>> You can usehttps://manpages.debian.org/testing/systemd/systemd-growfs.8.en.html
>>>>>>>> which grow partition to the end.
>>>>>>> can it grow a mounted partition ? since that will be the case when
>>>>>>> growing rootfs partition.
>>>>>> It will grow last partition in first boot only.
>>>>> my question was will it grow a mounted rootfs parition if that happens
>>>>> tobe the last partition, I understand it will grow last partion and do
>>>>> it as firstboot service.
>>>> I usually use it in case when have dual rootfs (A, B) and data
>>>> partition which is expanded to then end of disk.
>>>> I don't have experience with growing rootfs (I think it can grow only
>>>> not mounted partitions)
>>>>>>>>> :rjs
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> BR,
>>>>>>>>
>>>>>>>> marek
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> BR,
>>>>>>
>>>>>> marek
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>> marek
>>>>
>>>>
>>>> --
>>>> as simple and primitive as possible
>>>> -------------------------------------------------
>>>> Marek Belisko - OPEN-NANDRA
>>>> Freelance Developer
>>>>
>>>> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
>>>> Tel: +421 915 052 184
>>>> skype: marekwhite
>>>> twitter: #opennandra
>>>> web:http://open-nandra.com
>>>>
>>>
>>> --
>>> | Michael Nazzareno Trimarchi Amarula Solutions BV |
>>> | COO - Founder Cruquiuskade 47 |
>>> | +31(0)851119172 Amsterdam 1018 AM NL |
>>> | [`as]http://www.amarulasolutions.com |
>>>
>>
>>
> --
> -----
> Rudolf J Streif
> CEO/CTO ibeeto
> +1.855.442.3386 x700
>
>
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [yocto] [WIC] Grow last partition up to disk size
2020-05-01 6:47 ` Gmane Admin
@ 2020-05-01 7:06 ` Michael Nazzareno Trimarchi
0 siblings, 0 replies; 13+ messages in thread
From: Michael Nazzareno Trimarchi @ 2020-05-01 7:06 UTC (permalink / raw)
To: yocto; +Cc: Yocto list discussion
Hi
On Fri, May 1, 2020 at 8:47 AM Gmane Admin <gley-yocto@m.gmane-mx.org> wrote:
>
> Op 01-05-2020 om 01:11 schreef Rudolf J Streif:
> > Thanks, guys, I appreciate it.
> >
> > Doing it dynamically on first boot would probably work as it is a data
> > partition and not the rootfs partition.
>
> If you use btrfs you can even resize the rootfs (mounted) partition.
>
I don't said but the code I sent resize my rootfs
Michael
> > I will give it a try.
> >
> > :rjs
> >
> > On 4/30/20 12:13 PM, Michael Nazzareno Trimarchi wrote:
> >> Hi
> >>
> >> On Thu, Apr 30, 2020 at 9:10 PM Michael Nazzareno Trimarchi via
> >> lists.yoctoproject.org
> >> <michael=amarulasolutions.com@lists.yoctoproject.org> wrote:
> >>> Hi
> >>>
> >>> Well I have write something like this
> >>>
> >>> [Unit]
> >>> Description=Increases rootfs image size to fit partition
> >>> Requires=dev-disk-by\x2dpartlabel-rootfs.device
> >>> After=dev-disk-by\x2dpartlabel-rootfs.device
> >>>
> >>> [Service]
> >>> Type=oneshot
> >>> ExecStart=/usr/sbin/sgdisk /dev/disk/by-path/platform-ff0f0000.dwmmc -e
> >> This resize gpt up to disk size
> >>
> >>> ExecStart=/usr/sbin/parted /dev/disk/by-path/platform-ff0f0000.dwmmc
> >>> -s "resizepart 4 -1" quit
> >> This resize partition number 4 up to the max
> >>
> >> Michael
> >>
> >>> ExecStart=/sbin/resize2fs /dev/disk/by-partlabel/rootfs
> >>> ExecStart=/bin/systemctl disable resize-rootfs.service
> >>>
> >>> StandardOutput=journal+console
> >>>
> >>> [Install]
> >>> WantedBy=default.target
> >>>
> >>>
> >>> On Thu, Apr 30, 2020 at 8:30 PM Marek Belisko<marek.belisko@gmail.com> wrote:
> >>>> On Thu, Apr 30, 2020 at 8:27 PM Khem Raj<raj.khem@gmail.com> wrote:
> >>>>>
> >>>>> On 4/30/20 11:25 AM, Marek Belisko wrote:
> >>>>>> On Thu, Apr 30, 2020 at 8:23 PM Khem Raj<raj.khem@gmail.com> wrote:
> >>>>>>>
> >>>>>>> On 4/30/20 11:16 AM, Marek Belisko wrote:
> >>>>>>>> Hi Rudolf,
> >>>>>>>>
> >>>>>>>> On Thu, Apr 30, 2020 at 7:39 PM Rudolf J Streif
> >>>>>>>> <rudolf.streif@ibeeto.com> wrote:
> >>>>>>>>> I was looking for a way in a wks file to have wic grow the last
> >>>>>>>>> partition to fill up the remainder of the disk. Of course wic does not
> >>>>>>>>> know how large the disk is but that could be a parameter.
> >>>>>>>>>
> >>>>>>>>> The alternative way is to use fixed-size and do the math manually but
> >>>>>>>>> that would not allow wic to grow a partition based on content.
> >>>>>>>> You can usehttps://manpages.debian.org/testing/systemd/systemd-growfs.8.en.html
> >>>>>>>> which grow partition to the end.
> >>>>>>> can it grow a mounted partition ? since that will be the case when
> >>>>>>> growing rootfs partition.
> >>>>>> It will grow last partition in first boot only.
> >>>>> my question was will it grow a mounted rootfs parition if that happens
> >>>>> tobe the last partition, I understand it will grow last partion and do
> >>>>> it as firstboot service.
> >>>> I usually use it in case when have dual rootfs (A, B) and data
> >>>> partition which is expanded to then end of disk.
> >>>> I don't have experience with growing rootfs (I think it can grow only
> >>>> not mounted partitions)
> >>>>>>>>> :rjs
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>> BR,
> >>>>>>>>
> >>>>>>>> marek
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>> BR,
> >>>>>>
> >>>>>> marek
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>> marek
> >>>>
> >>>>
> >>>> --
> >>>> as simple and primitive as possible
> >>>> -------------------------------------------------
> >>>> Marek Belisko - OPEN-NANDRA
> >>>> Freelance Developer
> >>>>
> >>>> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> >>>> Tel: +421 915 052 184
> >>>> skype: marekwhite
> >>>> twitter: #opennandra
> >>>> web:http://open-nandra.com
> >>>>
> >>>
> >>> --
> >>> | Michael Nazzareno Trimarchi Amarula Solutions BV |
> >>> | COO - Founder Cruquiuskade 47 |
> >>> | +31(0)851119172 Amsterdam 1018 AM NL |
> >>> | [`as]http://www.amarulasolutions.com |
> >>>
> >>
> >>
> > --
> > -----
> > Rudolf J Streif
> > CEO/CTO ibeeto
> > +1.855.442.3386 x700
> >
> >
> >
> >
>
>
>
--
| Michael Nazzareno Trimarchi Amarula Solutions BV |
| COO - Founder Cruquiuskade 47 |
| +31(0)851119172 Amsterdam 1018 AM NL |
| [`as] http://www.amarulasolutions.com |
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [yocto] [WIC] Grow last partition up to disk size
2020-04-30 18:23 ` Khem Raj
2020-04-30 18:25 ` Marek Belisko
@ 2020-05-18 9:39 ` Mike Looijmans
1 sibling, 0 replies; 13+ messages in thread
From: Mike Looijmans @ 2020-05-18 9:39 UTC (permalink / raw)
To: yocto; +Cc: Yocto list discussion
On 30-04-2020 20:23, Khem Raj via lists.yoctoproject.org wrote:
>
>
> On 4/30/20 11:16 AM, Marek Belisko wrote:
>> Hi Rudolf,
>>
>> On Thu, Apr 30, 2020 at 7:39 PM Rudolf J Streif
>> <rudolf.streif@ibeeto.com> wrote:
>>>
>>> I was looking for a way in a wks file to have wic grow the last
>>> partition to fill up the remainder of the disk. Of course wic does not
>>> know how large the disk is but that could be a parameter.
>>>
>>> The alternative way is to use fixed-size and do the math manually but
>>> that would not allow wic to grow a partition based on content.
>> You can use
>> https://manpages.debian.org/testing/systemd/systemd-growfs.8.en.html
>> which grow partition to the end.
>
> can it grow a mounted partition ? since that will be the case when
> growing rootfs partition.
Yes, a mounted ext4 partition can be resized. Some tools will try to
keep you from doing that though, had to patch parted to stop whining
about mounted partitions in "scripted" mode that to make it work though.
https://github.com/topic-embedded-products/topic-platform/tree/zeus/meta-topic-platform/recipes-extended/parted
Here's the recipe that re-partitions the SD or eMMC on first boot after
programming a (small) wic image:
https://github.com/topic-embedded-products/topic-platform/tree/zeus/meta-topic-platform/recipes-topic/expand-wic-partition
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2020-05-18 9:40 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30 17:39 [WIC] Grow last partition up to disk size Rudolf J Streif
2020-04-30 18:16 ` [yocto] " Marek Belisko
2020-04-30 18:23 ` Khem Raj
2020-04-30 18:25 ` Marek Belisko
2020-04-30 18:27 ` Khem Raj
2020-04-30 18:30 ` Marek Belisko
2020-04-30 19:10 ` Michael Nazzareno Trimarchi
[not found] ` <160AAEA430561E1B.4948@lists.yoctoproject.org>
2020-04-30 19:13 ` Michael Nazzareno Trimarchi
2020-04-30 23:11 ` Rudolf J Streif
2020-04-30 23:17 ` Khem Raj
2020-05-01 6:47 ` Gmane Admin
2020-05-01 7:06 ` [yocto] " Michael Nazzareno Trimarchi
2020-05-18 9:39 ` Mike Looijmans
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.