Skip to content

feat(live): Increase the available disk space in the Live system#1501

Merged
lslezak merged 2 commits intomasterfrom
live_disk_space
Jul 25, 2024
Merged

feat(live): Increase the available disk space in the Live system#1501
lslezak merged 2 commits intomasterfrom
live_disk_space

Conversation

@lslezak
Copy link
Copy Markdown
Contributor

@lslezak lslezak commented Jul 25, 2024

Problem

  • If you want to install additional packages or you want to copy a manually built Rust binary then you might have trouble with not enough free disk space in the Live ISO
  • This test shows that the available space in the default image is about 0.5GB:
# df -h /
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/live-rw  2.4G  1.8G  398M  83% /
# dd bs=1M if=/dev/zero of=/take_space
dd: error writing '/take_space': No space left on device
522+0 records in
521+0 records out
546709504 bytes (547 MB, 521 MiB) copied, 0.750277 s, 729 MB/s

Solution

  • Unfortunately it seems Kiwi does not support manually changing the default value
  • As a workaround create a huge sparse file which in reality takes tiny fraction of it's size
  • Kiwi evaluates the apparent (virtual) file sizes when computing the size of the image so it makes the image bigger
  • During testing I found out that after deleting the sparse file you can actually get even some more free space
  • So I created a new systemd service which deletes the created file at boot

Testing

  • The build ISO image has a similar size as before, the sparse file does not increase the ISO size
  • Tested manually, with the fix there is about 3.4GB free space now:
# df -h /
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/live-rw  5.3G  1.9G  3.2G  37% /
# dd bs=1M if=/dev/zero of=/take_space
dd: error writing '/take_space': No space left on device
3522+0 records in
3521+0 records out
3692621824 bytes (3.7 GB, 3.4 GiB) copied, 3.87284 s, 953 MB/s

Notes

  • The writes to the system are kept in RAM, that means to fully use the new 3.4GB disk space the machine needs more than 4GB RAM!

to allow installing additional development or debugging tools
@lslezak lslezak merged commit 423a5e0 into master Jul 25, 2024
@lslezak lslezak deleted the live_disk_space branch July 25, 2024 13:48
lslezak added a commit that referenced this pull request Aug 2, 2024
lslezak added a commit that referenced this pull request Aug 2, 2024
- Just the changes for the previous PR #1522
@imobachgs imobachgs mentioned this pull request Sep 20, 2024
imobachgs added a commit that referenced this pull request Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants