-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
715fa35
commit 408e0c8
Showing
4 changed files
with
29 additions
and
10 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description= Expand rootfs | ||
After=multi-user.target | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/sbin/grow-root.sh | ||
RemainAfterExit=true | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
echo "Resize Root Partition" | ||
root_device=$(lsblk -no UUID,MOUNTPOINT | grep " /$" | awk '{print $1}') | ||
growpart $root_device | ||
resize2fs $root_device | ||
echo "Resized Root Partition" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
Name: ultramarine-raw-filesystem | ||
Version: 1.0 | ||
Release: 1%{?dist} | ||
Summary: systemd-repart config to automatically extend the root filesystem on raw images | ||
Release: 2%{?dist} | ||
Summary: Automatically extend the root filesystem on raw images | ||
URL: ultramarine-linux.org | ||
Source0: 50-root.conf | ||
Source0: grow-root.service | ||
Source1: grow-root.sh | ||
License: MIT | ||
BuildArch: noarch | ||
|
||
|
@@ -15,13 +16,15 @@ BuildArch: noarch | |
%build | ||
|
||
%install | ||
mkdir -p %{buildroot}/usr/lib/repart.d | ||
cp -v %{SOURCE0} %{buildroot}/usr/lib/repart.d | ||
|
||
cp -v %{SOURCE0} %{buildroot}/etc/systemd/system | ||
cp -v %{SOURCE1} %{buildroot}/sbin | ||
|
||
%files | ||
/usr/lib/repart.d/* | ||
/etc/systemd/system/grow-root.service | ||
/sbin/grow-root.sh | ||
|
||
%changelog | ||
* Tue May 21 2024 Jaiden Riordan <[email protected]> | ||
- Switch to custom script | ||
* Mon May 20 2024 Jaiden Riordan <[email protected]> | ||
- Initial commit |