From 36a46c45452d3faac6ae2fb2757d0777614e4608 Mon Sep 17 00:00:00 2001 From: yafen Date: Wed, 6 Jan 2021 17:25:56 +0800 Subject: [PATCH 1/2] extend root partition on boot --- README.en.md | 36 +++++++------- README.md | 36 +++++++------- .../changelog-20.03-LTS-SP1-DDE.en.md | 22 +++++++++ .../changelog/changelog-20.03-LTS-SP1-DDE.md | 22 +++++++++ .../changelog-20.03-LTS-SP1-UKUI.en.md | 22 +++++++++ .../changelog/changelog-20.03-LTS-SP1-UKUI.md | 22 +++++++++ .../changelog/changelog-20.03-LTS-SP1.en.md | 22 +++++++++ .../changelog/changelog-20.03-LTS-SP1.md | 22 +++++++++ documents/changelog/changelog-20.03-LTS.en.md | 18 +++++++ documents/changelog/changelog-20.03-LTS.md | 18 +++++++ .../changelog/changelog-20.09-Xfce.en.md | 20 +++++++- documents/changelog/changelog-20.09-Xfce.md | 20 +++++++- documents/changelog/changelog-20.09.en.md | 18 +++++++ documents/changelog/changelog-20.09.md | 18 +++++++ scripts/build-image-common.sh | 4 ++ scripts/build-image.sh | 4 ++ scripts/config-common/extend-root.sh | 1 + scripts/config-common/rpmlist | 1 + scripts/config-common/rpmlist-dde | 1 + scripts/config-common/rpmlist-ukui | 1 + scripts/config-common/rpmlist-xfce | 1 + scripts/config/chroot.sh | 7 ++- scripts/config/extend-root.sh | 49 +++++++++++++++++++ scripts/config/rpmlist | 1 + scripts/config/rpmlist-dde | 1 + scripts/config/rpmlist-ukui | 1 + scripts/config/rpmlist-xfce | 1 + 27 files changed, 350 insertions(+), 39 deletions(-) create mode 120000 scripts/config-common/extend-root.sh create mode 100755 scripts/config/extend-root.sh diff --git a/README.en.md b/README.en.md index 33a23d9..407364e 100644 --- a/README.en.md +++ b/README.en.md @@ -54,29 +54,29 @@ Basic information of the image is as follows:

Repository of rootfs

-openEuler 20.03 LTS alpha3 +openEuler 20.03 LTS alpha4 ChangeLog -

2020/12/29

+

2021/01/06

217 MiB

4.19.90-2012.5.0

openEuler 20.03 LTS repository built daily -openEuler 20.09 alpha3 +openEuler 20.09 alpha4 ChangeLog -

2020/12/29

-

242 MiB

+

2021/01/06

+

243 MiB

4.19.140-2012.2.0.0006

openEuler 20.09 repository built daily -openEuler 20.09 alpha4 (with Xfce desktop environment) +openEuler 20.09 alpha5 (with Xfce desktop environment) ChangeLog -

2020/12/31

-

923 MiB

+

2021/01/06

+

922 MiB

4.19.138-2008.1.0.0001

openEuler 20.09 repository @@ -90,30 +90,30 @@ Basic information of the image is as follows: openEuler 20.09 repository -openEuler 20.03 LTS SP1 alpha1 +openEuler 20.03 LTS SP1 alpha2 ChangeLog -

2020/12/29

-

238 MiB

-

4.19.90-2012.3.0.0011

+

2021/01/06

+

239 MiB

+

4.19.90-2012.5.0.0013

openEuler 20.03 LTS SP1 repository built daily -openEuler 20.03 LTS SP1 alpha1 (with UKUI desktop environment) +openEuler 20.03 LTS SP1 alpha2 (with UKUI desktop environment) ChangeLog -

2020/12/29

+

2021/01/06

1.0 GiB

-

4.19.90-2012.3.0.0011

+

4.19.90-2012.5.0.0013

openEuler 20.03 LTS SP1 repository built daily -openEuler 20.03 LTS SP1 alpha1 (with DDE desktop environment) +openEuler 20.03 LTS SP1 alpha2 (with DDE desktop environment) ChangeLog -

2020/12/29

+

2021/01/06

1.0 GiB

-

4.19.90-2012.3.0.0011

+

4.19.90-2012.5.0.0013

openEuler 20.03 LTS SP1 repository built daily diff --git a/README.md b/README.md index 68d206a..f050359 100644 --- a/README.md +++ b/README.md @@ -53,29 +53,29 @@ SIG 组基本信息位于 [sig-RaspberryPi](https://gitee.com/jianminw/community

构建文件系统的源仓库

-openEuler 20.03 LTS 内测版 +openEuler 20.03 LTS 内测版 更新日志 -

2020/12/29

+

2021/01/06

217 MiB

4.19.90-2012.5.0

openEuler 20.03 LTS 每日构建的源仓库 -openEuler 20.09 内测版 +openEuler 20.09 内测版 更新日志 -

2020/12/29

-

242 MiB

+

2021/01/06

+

243 MiB

4.19.140-2012.2.0.0006

openEuler 20.09 每日构建源仓库 -openEuler 20.09 内测版(包含 Xfce 桌面环境) +openEuler 20.09 内测版(包含 Xfce 桌面环境) 更新日志 -

2020/12/31

-

923 MiB

+

2021/01/06

+

922 MiB

4.19.138-2008.1.0.0001

openEuler 20.09 源仓库 @@ -89,30 +89,30 @@ SIG 组基本信息位于 [sig-RaspberryPi](https://gitee.com/jianminw/community openEuler 20.09 源仓库 -openEuler 20.03 LTS SP1 内测版 +openEuler 20.03 LTS SP1 内测版 更新日志 -

2020/12/29

-

238 MiB

-

4.19.90-2012.3.0.0011

+

2021/01/06

+

239 MiB

+

4.19.90-2012.5.0.0013

openEuler 20.03 LTS SP1 每日构建源仓库 -openEuler 20.03 LTS SP1 内测版(包含 UKUI 桌面环境) +openEuler 20.03 LTS SP1 内测版(包含 UKUI 桌面环境) 更新日志 -

2020/12/29

+

2021/01/06

1.0 GiB

-

4.19.90-2012.3.0.0011

+

4.19.90-2012.5.0.0013

openEuler 20.03 LTS SP1 每日构建源仓库 -openEuler 20.03 LTS SP1 内测版(包含 DDE 桌面环境) +openEuler 20.03 LTS SP1 内测版(包含 DDE 桌面环境) 更新日志 -

2020/12/29

+

2021/01/06

1.0 GiB

-

4.19.90-2012.3.0.0011

+

4.19.90-2012.5.0.0013

openEuler 20.03 LTS SP1 每日构建源仓库 diff --git a/documents/changelog/changelog-20.03-LTS-SP1-DDE.en.md b/documents/changelog/changelog-20.03-LTS-SP1-DDE.en.md index 3c28f4d..1905ac8 100644 --- a/documents/changelog/changelog-20.03-LTS-SP1-DDE.en.md +++ b/documents/changelog/changelog-20.03-LTS-SP1-DDE.en.md @@ -2,6 +2,28 @@ English | [简体中文](./changelog-20.03-LTS-SP1-DDE.md) +### 2021-01-06 + +#### Basic information + +- Release date: 2021/01/06 +- Size: 1.0 GiB +- OS version: openEuler 20.03 LTS SP1 +- Kernel version: 4.19.90-2012.5.0.0013 +- Firmware source: [firmware](https://github.com/raspberrypi/firmware), [bluez-firmware](https://github.com/RPi-Distro/bluez-firmware), [firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) +- Repository of rootfs: [openEuler 20.03 LTS SP1 repository built daily](http://119.3.219.20:82/openEuler:/20.03:/LTS:/SP1/standard_aarch64/aarch64/) +- Repository inside the image: [openEuler 20.03 LTS SP1 repository](https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS-SP1/generic.repo) + +#### Updates + +##### Kernel + +Update to the latest stable version of openEuler: 4.19.90-2012.5.0. + +##### Feature update + +Extend the root partition automatically on boot. + ### 2020-12-29 #### Basic information diff --git a/documents/changelog/changelog-20.03-LTS-SP1-DDE.md b/documents/changelog/changelog-20.03-LTS-SP1-DDE.md index 2f7a2ca..55218d8 100644 --- a/documents/changelog/changelog-20.03-LTS-SP1-DDE.md +++ b/documents/changelog/changelog-20.03-LTS-SP1-DDE.md @@ -2,6 +2,28 @@ [English](./changelog-20.03-LTS-SP1-DDE.en.md) | 简体中文 +### 2021-01-06 + +#### 基本信息 + +- 发布时间:2021/01/06 +- 大小:1.0 GiB +- 操作系统版本:openEuler 20.03 LTS SP1 +- 内核版本:4.19.90-2012.5.0.0013 +- 固件来源:[firmware](https://github.com/raspberrypi/firmware)、[bluez-firmware](https://github.com/RPi-Distro/bluez-firmware)、[firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) +- 构建文件系统的源仓库:[openEuler 20.03 LTS SP1 每日构建的源仓库](http://119.3.219.20:82/openEuler:/20.03:/LTS:/SP1/standard_aarch64/aarch64/) +- 镜像内置源仓库:[openEuler 20.03 LTS SP1 源仓库](https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS-SP1/generic.repo) + +#### 更新说明 + +##### 内核 + +更新到 openEuler 最新稳定版本 4.19.90-2012.5.0。 + +##### 功能改动 + +开机自动扩展根分区。 + ### 2020-12-29 #### 基本信息 diff --git a/documents/changelog/changelog-20.03-LTS-SP1-UKUI.en.md b/documents/changelog/changelog-20.03-LTS-SP1-UKUI.en.md index 5e9cb89..0f6a416 100644 --- a/documents/changelog/changelog-20.03-LTS-SP1-UKUI.en.md +++ b/documents/changelog/changelog-20.03-LTS-SP1-UKUI.en.md @@ -2,6 +2,28 @@ English | [简体中文](./changelog-20.03-LTS-SP1-UKUI.md) +### 2021-01-06 + +#### Basic information + +- Release date: 2021/01/06 +- Size: 1.0 GiB +- OS version: openEuler 20.03 LTS SP1 +- Kernel version: 4.19.90-2012.5.0.0013 +- Firmware source: [firmware](https://github.com/raspberrypi/firmware), [bluez-firmware](https://github.com/RPi-Distro/bluez-firmware), [firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) +- Repository of rootfs: [openEuler 20.03 LTS SP1 repository built daily](http://119.3.219.20:82/openEuler:/20.03:/LTS:/SP1/standard_aarch64/aarch64/) +- Repository inside the image: [openEuler 20.03 LTS SP1 repository](https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS-SP1/generic.repo) + +#### Updates + +##### Kernel + +Update to the latest stable version of openEuler: 4.19.90-2012.5.0. + +##### Feature update + +Extend the root partition automatically on boot. + ### 2020-12-29 #### Basic information diff --git a/documents/changelog/changelog-20.03-LTS-SP1-UKUI.md b/documents/changelog/changelog-20.03-LTS-SP1-UKUI.md index 78d63ea..42298cc 100644 --- a/documents/changelog/changelog-20.03-LTS-SP1-UKUI.md +++ b/documents/changelog/changelog-20.03-LTS-SP1-UKUI.md @@ -2,6 +2,28 @@ [English](./changelog-20.03-LTS-SP1-UKUI.en.md) | 简体中文 +### 2021-01-06 + +#### 基本信息 + +- 发布时间:2021/01/06 +- 大小:1.0 GiB +- 操作系统版本:openEuler 20.03 LTS SP1 +- 内核版本:4.19.90-2012.5.0.0013 +- 固件来源:[firmware](https://github.com/raspberrypi/firmware)、[bluez-firmware](https://github.com/RPi-Distro/bluez-firmware)、[firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) +- 构建文件系统的源仓库:[openEuler 20.03 LTS SP1 每日构建的源仓库](http://119.3.219.20:82/openEuler:/20.03:/LTS:/SP1/standard_aarch64/aarch64/) +- 镜像内置源仓库:[openEuler 20.03 LTS SP1 源仓库](https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS-SP1/generic.repo) + +#### 更新说明 + +##### 内核 + +更新到 openEuler 最新稳定版本 4.19.90-2012.5.0。 + +##### 功能改动 + +开机自动扩展根分区。 + ### 2020-12-29 #### 基本信息 diff --git a/documents/changelog/changelog-20.03-LTS-SP1.en.md b/documents/changelog/changelog-20.03-LTS-SP1.en.md index 8215bee..0588c64 100644 --- a/documents/changelog/changelog-20.03-LTS-SP1.en.md +++ b/documents/changelog/changelog-20.03-LTS-SP1.en.md @@ -2,6 +2,28 @@ English | [简体中文](./changelog-20.03-LTS-SP1.md) +### 2021-01-06 + +#### Basic information + +- Release date: 2021/01/06 +- Size: 239 MiB +- OS version: openEuler 20.03 LTS SP1 +- Kernel version: 4.19.90-2012.5.0.0013 +- Firmware source: [firmware](https://github.com/raspberrypi/firmware), [bluez-firmware](https://github.com/RPi-Distro/bluez-firmware), [firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) +- Repository of rootfs: [openEuler 20.03 LTS SP1 repository built daily](http://119.3.219.20:82/openEuler:/20.03:/LTS:/SP1/standard_aarch64/aarch64/) +- Repository inside the image: [openEuler 20.03 LTS SP1 repository](https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS-SP1/generic.repo) + +#### Updates + +##### Kernel + +Update to the latest stable version of openEuler: 4.19.90-2012.5.0. + +##### Feature update + +Extend the root partition automatically on boot. + ### 2020-12-29 #### Basic information diff --git a/documents/changelog/changelog-20.03-LTS-SP1.md b/documents/changelog/changelog-20.03-LTS-SP1.md index 4b1c969..343c73c 100644 --- a/documents/changelog/changelog-20.03-LTS-SP1.md +++ b/documents/changelog/changelog-20.03-LTS-SP1.md @@ -2,6 +2,28 @@ [English](./changelog-20.03-LTS-SP1.en.md) | 简体中文 +### 2021-01-06 + +#### 基本信息 + +- 发布时间:2021/01/06 +- 大小:239 MiB +- 操作系统版本:openEuler 20.03 LTS SP1 +- 内核版本:4.19.90-2012.5.0.0013 +- 固件来源:[firmware](https://github.com/raspberrypi/firmware)、[bluez-firmware](https://github.com/RPi-Distro/bluez-firmware)、[firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) +- 构建文件系统的源仓库:[openEuler 20.03 LTS SP1 每日构建的源仓库](http://119.3.219.20:82/openEuler:/20.03:/LTS:/SP1/standard_aarch64/aarch64/) +- 镜像内置源仓库:[openEuler 20.03 LTS SP1 源仓库](https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS-SP1/generic.repo) + +#### 更新说明 + +##### 内核 + +更新到 openEuler 最新稳定版本 4.19.90-2012.5.0。 + +##### 功能改动 + +开机自动扩展根分区。 + ### 2020-12-29 #### 基本信息 diff --git a/documents/changelog/changelog-20.03-LTS.en.md b/documents/changelog/changelog-20.03-LTS.en.md index d9cbb1e..60e37b9 100644 --- a/documents/changelog/changelog-20.03-LTS.en.md +++ b/documents/changelog/changelog-20.03-LTS.en.md @@ -2,6 +2,24 @@ English | [简体中文](./changelog-20.03-LTS.md) +### 2021-01-06 + +#### Basic information + +- Release date: 2021/01/06 +- Size: 217 MiB +- OS version: openEuler 20.03 LTS +- Kernel version: 4.19.90-2012.5.0 +- Firmware source: [firmware](https://github.com/raspberrypi/firmware), [bluez-firmware](https://github.com/RPi-Distro/bluez-firmware), [firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) +- Repository of rootfs: [openEuler 20.03 LTS repository built daily](http://119.3.219.20:82/openEuler:/20.03:/LTS/standard_aarch64/aarch64/) +- Repository inside the image: [openEuler 20.03 LTS repository](https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS/generic.repo) + +#### Updates + +##### Feature update + +Extend the root partition automatically on boot. + ### 2020-12-29 #### Basic information diff --git a/documents/changelog/changelog-20.03-LTS.md b/documents/changelog/changelog-20.03-LTS.md index 3902b84..ee6ca47 100644 --- a/documents/changelog/changelog-20.03-LTS.md +++ b/documents/changelog/changelog-20.03-LTS.md @@ -2,6 +2,24 @@ [English](./changelog-20.03-LTS.en.md) | 简体中文 +### 2021-01-06 + +#### 基本信息 + +- 发布时间:2021/01/06 +- 大小:217 MiB +- 操作系统版本:openEuler 20.03 LTS +- 内核版本:4.19.90-2012.5.0 +- 固件来源:[firmware](https://github.com/raspberrypi/firmware)、[bluez-firmware](https://github.com/RPi-Distro/bluez-firmware)、[firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) +- 构建文件系统的源仓库:[openEuler 20.03 LTS 每日构建的源仓库](http://119.3.219.20:82/openEuler:/20.03:/LTS/standard_aarch64/aarch64/) +- 镜像内置源仓库:[openEuler 20.03 LTS 源仓库](https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS/generic.repo) + +#### 更新说明 + +##### 功能改动 + +开机自动扩展根分区。 + ### 2020-12-29 #### 基本信息 diff --git a/documents/changelog/changelog-20.09-Xfce.en.md b/documents/changelog/changelog-20.09-Xfce.en.md index 3b353ee..357c326 100644 --- a/documents/changelog/changelog-20.09-Xfce.en.md +++ b/documents/changelog/changelog-20.09-Xfce.en.md @@ -2,6 +2,24 @@ English | [简体中文](./changelog-20.09-Xfce.md) +### 2021-01-06 + +#### Basic information + +- Release date: 2021/01/06 +- Size: 922 MiB +- OS version: openEuler 20.09 +- Kernel version: 4.19.138-2008.1.0.0001 +- Firmware source: [firmware](https://github.com/raspberrypi/firmware), [bluez-firmware](https://github.com/RPi-Distro/bluez-firmware), [firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) +- Repository of rootfs: [openEuler 20.09 repository](https://repo.openeuler.org/openEuler-20.09/) +- Repository inside the image: [openEuler 20.09 repository](https://repo.openeuler.org/openEuler-20.09/) + +#### Updates + +##### Feature update + +Extend the root partition automatically on boot. + ### 2020-12-31 #### Basic information @@ -18,7 +36,7 @@ English | [简体中文](./changelog-20.09-Xfce.md) ##### Feature update -- Install xfce4-screensaver, which enables the screen lock feature. +Install xfce4-screensaver, which enables the screen lock feature. ### 2020-12-29 diff --git a/documents/changelog/changelog-20.09-Xfce.md b/documents/changelog/changelog-20.09-Xfce.md index 78f975b..056fadf 100644 --- a/documents/changelog/changelog-20.09-Xfce.md +++ b/documents/changelog/changelog-20.09-Xfce.md @@ -2,6 +2,24 @@ [English](./changelog-20.09-Xfce.en.md) | 简体中文 +### 2021-01-06 + +#### 基本信息 + +- 发布时间:2021/01/06 +- 大小:922 MiB +- 操作系统版本:openEuler 20.09 +- 内核版本:4.19.138-2008.1.0.0001 +- 固件来源:[firmware](https://github.com/raspberrypi/firmware)、[bluez-firmware](https://github.com/RPi-Distro/bluez-firmware)、[firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) +- 构建文件系统的源仓库:[openEuler 20.09 源仓库](https://repo.openeuler.org/openEuler-20.09/) +- 镜像内置源仓库:[openEuler 20.09 源仓库](https://repo.openeuler.org/openEuler-20.09/) + +#### 更新说明 + +##### 功能改动 + +开机自动扩展根分区。 + ### 2020-12-31 #### 基本信息 @@ -18,7 +36,7 @@ ##### 功能改动 -- 安装 xfce4-screensaver,添加锁屏功能。 +安装 xfce4-screensaver,添加锁屏功能。 ### 2020-12-29 diff --git a/documents/changelog/changelog-20.09.en.md b/documents/changelog/changelog-20.09.en.md index ac8afd0..6e6205d 100644 --- a/documents/changelog/changelog-20.09.en.md +++ b/documents/changelog/changelog-20.09.en.md @@ -2,6 +2,24 @@ English | [简体中文](./changelog-20.09.md) +### 2021-01-06 + +#### Basic information + +- Release date: 2021/01/06 +- Size: 243 MiB +- OS version: openEuler 20.09 +- Kernel version: 4.19.140-2012.2.0.0006 +- Firmware source: [firmware](https://github.com/raspberrypi/firmware), [bluez-firmware](https://github.com/RPi-Distro/bluez-firmware), [firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) +- Repository of rootfs: [openEuler 20.09 repository built daily](https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.09/generic.repo) +- Repository inside the image: [openEuler 20.09 repository](http://repo.openeuler.org/openEuler-20.09/) + +#### Updates + +##### Feature update + +Extend the root partition automatically on boot. + ### 2020-12-29 #### Basic information diff --git a/documents/changelog/changelog-20.09.md b/documents/changelog/changelog-20.09.md index 0275e97..2b531f5 100644 --- a/documents/changelog/changelog-20.09.md +++ b/documents/changelog/changelog-20.09.md @@ -2,6 +2,24 @@ [English](./changelog-20.09.en.md) | 简体中文 +### 2021-01-06 + +#### 基本信息 + +- 发布时间:2021/01/06 +- 大小:243 MiB +- 操作系统版本:openEuler 20.09 +- 内核版本:4.19.140-2012.2.0.0006 +- 固件来源:[firmware](https://github.com/raspberrypi/firmware)、[bluez-firmware](https://github.com/RPi-Distro/bluez-firmware)、[firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) +- 构建文件系统的源仓库:[openEuler 20.09 每日构建的源仓库](https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.09/generic.repo) +- 镜像内置源仓库:[openEuler 20.09 源仓库](http://repo.openeuler.org/openEuler-20.09/) + +#### 更新说明 + +##### 功能改动 + +开机自动扩展根分区。 + ### 2020-12-29 #### 基本信息 diff --git a/scripts/build-image-common.sh b/scripts/build-image-common.sh index f75bcd5..818d8b6 100644 --- a/scripts/build-image-common.sh +++ b/scripts/build-image-common.sh @@ -485,6 +485,10 @@ make_rootfs(){ mkdir -p ${rootfs_dir}/usr/share/licenses/raspi cp ${euler_dir}/License/* ${rootfs_dir}/usr/share/licenses/raspi/ cp ${euler_dir}/chroot.sh ${rootfs_dir}/chroot.sh + if [ ! -d ${rootfs_dir}/etc/rc.d/init.d ]; then + mkdir -p ${rootfs_dir}/etc/rc.d/init.d + fi + cp ${euler_dir}/extend-root.sh ${rootfs_dir}/etc/rc.d/init.d/extend-root.sh chmod +x ${rootfs_dir}/chroot.sh mount --bind /dev ${rootfs_dir}/dev mount -t proc /proc ${rootfs_dir}/proc diff --git a/scripts/build-image.sh b/scripts/build-image.sh index 8c03560..1447099 100644 --- a/scripts/build-image.sh +++ b/scripts/build-image.sh @@ -265,6 +265,10 @@ make_rootfs(){ cp ${euler_dir}/*.rules ${rootfs_dir}/lib/udev/rules.d/ cp ${euler_dir}/LICENCE.* ${rootfs_dir}/usr/share/licenses/raspi/ cp ${euler_dir}/chroot.sh ${rootfs_dir}/chroot.sh + if [ ! -d ${rootfs_dir}/etc/rc.d/init.d ]; then + mkdir -p ${rootfs_dir}/etc/rc.d/init.d + fi + cp ${euler_dir}/extend-root.sh ${rootfs_dir}/etc/rc.d/init.d/extend-root.sh chmod +x ${rootfs_dir}/chroot.sh mount --bind /dev ${rootfs_dir}/dev mount -t proc /proc ${rootfs_dir}/proc diff --git a/scripts/config-common/extend-root.sh b/scripts/config-common/extend-root.sh new file mode 120000 index 0000000..c2b264b --- /dev/null +++ b/scripts/config-common/extend-root.sh @@ -0,0 +1 @@ +../config/extend-root.sh \ No newline at end of file diff --git a/scripts/config-common/rpmlist b/scripts/config-common/rpmlist index e7285ba..102e109 100644 --- a/scripts/config-common/rpmlist +++ b/scripts/config-common/rpmlist @@ -12,5 +12,6 @@ passwd hostname bluez pulseaudio-module-bluetooth +parted sudo openEuler-repos diff --git a/scripts/config-common/rpmlist-dde b/scripts/config-common/rpmlist-dde index 81a48cd..0c36c0b 100644 --- a/scripts/config-common/rpmlist-dde +++ b/scripts/config-common/rpmlist-dde @@ -12,6 +12,7 @@ passwd hostname bluez pulseaudio-module-bluetooth +parted sudo dde openEuler-repos diff --git a/scripts/config-common/rpmlist-ukui b/scripts/config-common/rpmlist-ukui index de9a8b6..4bd9147 100644 --- a/scripts/config-common/rpmlist-ukui +++ b/scripts/config-common/rpmlist-ukui @@ -12,6 +12,7 @@ passwd hostname bluez pulseaudio-module-bluetooth +parted sudo ukui firefox diff --git a/scripts/config-common/rpmlist-xfce b/scripts/config-common/rpmlist-xfce index 950f227..af61c09 100644 --- a/scripts/config-common/rpmlist-xfce +++ b/scripts/config-common/rpmlist-xfce @@ -12,6 +12,7 @@ passwd hostname bluez pulseaudio-module-bluetooth +parted sudo mesa-dri-drivers xorg-x11-drv-fbdev diff --git a/scripts/config/chroot.sh b/scripts/config/chroot.sh index 3e5360c..e3cdd63 100755 --- a/scripts/config/chroot.sh +++ b/scripts/config/chroot.sh @@ -24,4 +24,9 @@ elif [ "x$1" == "xdde" ]; then if id openeuler; then userdel -r openeuler fi -fi \ No newline at end of file +fi +cd /etc/rc.d/init.d +chmod +x extend-root.sh +chkconfig --add extend-root.sh +chkconfig extend-root.sh on +cd - \ No newline at end of file diff --git a/scripts/config/extend-root.sh b/scripts/config/extend-root.sh new file mode 100755 index 0000000..1e23a3e --- /dev/null +++ b/scripts/config/extend-root.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# chkconfig: - 99 10 +# description: extend root + +set -e + +extend_root(){ + ROOT_PART="$(findmnt / -o source -n)" # /dev/mmcblk0p3 + ROOT_DEV="/dev/$(lsblk -no pkname "$ROOT_PART")" # /dev/mmcblk0 + PART_NUM="$(echo "$ROOT_PART" | grep -o "[[:digit:]]*$")" # 3 + + PART_INFO=$(parted "$ROOT_DEV" -ms unit s p) + # BYT; + # /dev/mmcblk0:31116288s:sd/mmc:512:512:msdos:SD SC16G:; + # 1:8192s:593919s:585728s:fat16::boot, lba; + # 2:593920s:1593343s:999424s:linux-swap(v1)::; + # 3:1593344s:31116287s:29522944s:ext4::; + LAST_PART_NUM=$(echo "$PART_INFO" | tail -n 1 | cut -f 1 -d:) # 3 + PART_START=$(echo "$PART_INFO" | grep "^${PART_NUM}" | cut -f 2 -d: | sed 's/[^0-9]//g') # 1593344 + PART_END=$(echo "$PART_INFO" | grep "^${PART_NUM}" | cut -f 3 -d: | sed 's/[^0-9]//g') # XXXX < 31116288 + ROOT_END=$(echo "$PART_INFO" | grep "^/dev"| cut -f 2 -d: | sed 's/[^0-9]//g') # 31116288 + ((ROOT_END--)) # 31116287 + + if [ $PART_END -lt $ROOT_END ]; then + fdisk "$ROOT_DEV" <> /var/log/extend-root.log + else + echo "Already the largest! Do not need extend any more!" >> /var/log/extend-root.log + fi + return 0 +} + +if extend_root; then + rm -f /etc/rc.d/init.d/extend-root.sh +else + echo "Fail to root!" >> /var/log/extend-root.log +fi diff --git a/scripts/config/rpmlist b/scripts/config/rpmlist index 02d20b4..efba17a 100644 --- a/scripts/config/rpmlist +++ b/scripts/config/rpmlist @@ -12,6 +12,7 @@ passwd hostname bluez pulseaudio-module-bluetooth +parted raspberrypi-kernel raspberrypi-firmware raspberrypi-bluetooth diff --git a/scripts/config/rpmlist-dde b/scripts/config/rpmlist-dde index be35444..86af297 100644 --- a/scripts/config/rpmlist-dde +++ b/scripts/config/rpmlist-dde @@ -12,6 +12,7 @@ passwd hostname bluez pulseaudio-module-bluetooth +parted raspberrypi-kernel raspberrypi-firmware raspberrypi-bluetooth diff --git a/scripts/config/rpmlist-ukui b/scripts/config/rpmlist-ukui index ec38b62..9c902be 100644 --- a/scripts/config/rpmlist-ukui +++ b/scripts/config/rpmlist-ukui @@ -12,6 +12,7 @@ passwd hostname bluez pulseaudio-module-bluetooth +parted raspberrypi-kernel raspberrypi-firmware raspberrypi-bluetooth diff --git a/scripts/config/rpmlist-xfce b/scripts/config/rpmlist-xfce index 340ffc0..965de88 100644 --- a/scripts/config/rpmlist-xfce +++ b/scripts/config/rpmlist-xfce @@ -12,6 +12,7 @@ passwd hostname bluez pulseaudio-module-bluetooth +parted raspberrypi-kernel raspberrypi-firmware raspberrypi-bluetooth -- Gitee From c6cf3c3c442638adae4cb13f5e83830063c7ce22 Mon Sep 17 00:00:00 2001 From: yafen Date: Thu, 7 Jan 2021 08:47:41 +0800 Subject: [PATCH 2/2] install openssh-clients in image --- scripts/config-common/rpmlist | 1 + scripts/config-common/rpmlist-dde | 1 + scripts/config-common/rpmlist-ukui | 1 + scripts/config-common/rpmlist-xfce | 1 + scripts/config/rpmlist | 1 + scripts/config/rpmlist-dde | 1 + scripts/config/rpmlist-ukui | 1 + scripts/config/rpmlist-xfce | 1 + 8 files changed, 8 insertions(+) diff --git a/scripts/config-common/rpmlist b/scripts/config-common/rpmlist index 102e109..612d60d 100644 --- a/scripts/config-common/rpmlist +++ b/scripts/config-common/rpmlist @@ -8,6 +8,7 @@ iproute iputils NetworkManager openssh-server +openssh-clients passwd hostname bluez diff --git a/scripts/config-common/rpmlist-dde b/scripts/config-common/rpmlist-dde index 0c36c0b..fe52bfd 100644 --- a/scripts/config-common/rpmlist-dde +++ b/scripts/config-common/rpmlist-dde @@ -8,6 +8,7 @@ iproute iputils NetworkManager openssh-server +openssh-clients passwd hostname bluez diff --git a/scripts/config-common/rpmlist-ukui b/scripts/config-common/rpmlist-ukui index 4bd9147..6090077 100644 --- a/scripts/config-common/rpmlist-ukui +++ b/scripts/config-common/rpmlist-ukui @@ -8,6 +8,7 @@ iproute iputils NetworkManager openssh-server +openssh-clients passwd hostname bluez diff --git a/scripts/config-common/rpmlist-xfce b/scripts/config-common/rpmlist-xfce index af61c09..ce1e85e 100644 --- a/scripts/config-common/rpmlist-xfce +++ b/scripts/config-common/rpmlist-xfce @@ -8,6 +8,7 @@ iproute iputils NetworkManager openssh-server +openssh-clients passwd hostname bluez diff --git a/scripts/config/rpmlist b/scripts/config/rpmlist index efba17a..335d909 100644 --- a/scripts/config/rpmlist +++ b/scripts/config/rpmlist @@ -8,6 +8,7 @@ iproute iputils NetworkManager openssh-server +openssh-clients passwd hostname bluez diff --git a/scripts/config/rpmlist-dde b/scripts/config/rpmlist-dde index 86af297..7281705 100644 --- a/scripts/config/rpmlist-dde +++ b/scripts/config/rpmlist-dde @@ -8,6 +8,7 @@ iproute iputils NetworkManager openssh-server +openssh-clients passwd hostname bluez diff --git a/scripts/config/rpmlist-ukui b/scripts/config/rpmlist-ukui index 9c902be..bad65b5 100644 --- a/scripts/config/rpmlist-ukui +++ b/scripts/config/rpmlist-ukui @@ -8,6 +8,7 @@ iproute iputils NetworkManager openssh-server +openssh-clients passwd hostname bluez diff --git a/scripts/config/rpmlist-xfce b/scripts/config/rpmlist-xfce index 965de88..4884937 100644 --- a/scripts/config/rpmlist-xfce +++ b/scripts/config/rpmlist-xfce @@ -8,6 +8,7 @@ iproute iputils NetworkManager openssh-server +openssh-clients passwd hostname bluez -- Gitee