Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug /dev/loop0 Partition don't follow the config to resize #199

Closed
Neko-vecter opened this issue Jul 3, 2023 · 5 comments
Closed

Bug /dev/loop0 Partition don't follow the config to resize #199

Neko-vecter opened this issue Jul 3, 2023 · 5 comments

Comments

@Neko-vecter
Copy link

Neko-vecter commented Jul 3, 2023

After commit d8c63803c17a3bcab6eb61c14280c5a9a4c16711. Cannot create a larger partition for img and and system /dev/loop0 always the size of original img. In my case I use raspbian (64bit). So, the root partition around 1.7G.

The df -h look like below
/dev/loop0 1.7G mount on workspace/mount
/dev/loop1 256M mount on workspace/mount/root

in config file I set BASE_IMAGE_RESIZEROOT=4500

This issue starting at 06d9bdbb7077a792c7a5057e9a44cc384dfc87c3 it is not possible to use the configuration to create a larger disk partition.

I think it might be related to the modification of common.sh. Based on the commit logs, support for Btfs was added in 06d9bdbb7077a792c7a5057e9a44cc384dfc87c3 version.

System info.
Screenshot-test-system-info


Update 2023/08/01

Things I try.

  • using ubuntu 22.04 LTS (not working) (It not system issue) (not sure some packages are not installed)
  • rollback to d8c63803c17a3bcab6eb61c14280c5a9a4c16711 (it works) (last version currently know is working)
  • using function enlarge_ext() in last version that worked (it works)

What change in 06d9bdbb7077a792c7a5057e9a44cc384dfc87c3

  • Add support for resizing BTRFS based images
  • Change function enlarge_ext() in common.sh

-Neko.vecter

@guysoft
Copy link
Owner

guysoft commented Aug 20, 2023

Hey, what image are you building? Could you provide a build log so I can determine if there some edge case where it detects what filesystem its resizing? That code does stuff to resize BTRFS systems, but its likely you are using EXT4

@Neko-vecter
Copy link
Author

Neko-vecter commented Aug 20, 2023

Hey, what image are you building? Could you provide a build log so I can determine if there some edge case where it detects what filesystem its resizing? That code does stuff to resize BTRFS systems, but its likely you are using EXT4


The image I am trying to building is mainsailos.
The img I am using is Raspbian 64bit ver. (It seems to be a EXT4 img)


I think it's the if statement in common.sh that's causing the problem.

The code below is the screenshot of common.sh. The line 300 if statement it was skipped for unknown reasons. (not sure if I miss some dependencies to cause this issue).

Screenshot 2023-08-20 221618

The code below is skipped code in this if statement. (The code EXT4 filesystem need)

e2fsck -fy $LODEV
resize2fs -p $LODEV

Then I swap the function function enlarge_ext() to previous version that work. The partition resize normality.

It seems this issue can be solved by adding a fallback. Like add else at the end? and run the code that EXT4 need?


Also, what dependence I need? The dependence I install "aria2, coreutils, jq. p7zip-full, qemu-user-static, zip". Or? Do this is somethings only in GitHub Action?

-Neko.vecter

@guysoft
Copy link
Owner

guysoft commented Aug 21, 2023

Ok, pushed an echo that should print the filesystem line result if it can't determine, could you build and paste that result? That way we can figure why its failing.

@Neko-vecter
Copy link
Author

Neko-vecter commented Aug 21, 2023

Ok, pushed an echo that should print the filesystem line result if it can't determine, could you build and paste that result? That way we can figure why its failing.

image

I know why! I am missing dependence file. It can solve by using sudo apt install file. This may be due to my system installation. (Ubuntu minimal)

I think we need add docs. list what dependence need? Also, add a script to install the dependence that CustomPiOS need.

-Neko.vecter

@Neko-vecter
Copy link
Author

Since problem solved... I think we can close this issue?

Conclusion:
This issue cause by missing dependence that common.sh need. The dependence file is missing by system installation way (Ubuntu minimal).

-Neko.vecter

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

No branches or pull requests

2 participants