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

Remove False Positive Errors When Using 'livenet' And Squashfs #2595

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

FedericoVaga
Copy link

This pull request changes...

Changes

Remove the following false positive error messages when using a squashfs image using the livenet module

  • modprobe can't squashfs driver when actually it is built-in in the kernel
  • dmsquash-live-root trying to verify the ISO checksum for a squashfs filesystem file image

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

Fixes #

  • One fix was provided and integrated long ago, but it got broken again. See d0cd7cd

@LaszloGombos
Copy link
Collaborator

LaszloGombos commented Mar 9, 2024

@FedericoVaga Thanks.

1./ Can you please change the title of both commit messages from
dmsquash-live:

to
fix(dmsquash-live):

2./ Also can you please rebase on top of latest master so that "Pull Request Labeler" is green ?

Looking for directories in `/sys/fs` is not exhaustive. Not all available
filesystems are listed there.

A library function has been already developed for such a use case. It is
`load_fstype``.

This patch replaces custom code with a call to `load_fstype`

Signed-off-by: Federico Vaga <[email protected]>
@github-actions github-actions bot added modules Issue tracker for all modules dmsquash-live Issues related to the dmsquash-live module labels Mar 11, 2024
@FedericoVaga
Copy link
Author

FedericoVaga commented Mar 11, 2024

@LaszloGombos
Done as recommended.

Copy link
Collaborator

@LaszloGombos LaszloGombos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Found some small issues with the comment.

CC @FGrose

systemctl start checkisomd5@"${p}".service
else
checkisomd5 --verbose "$check_dev"
# Check ISO checksum only If we have a path to a block device (or just its name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If --> if

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

checkisomd5 --verbose "$check_dev"
# Check ISO checksum only If we have a path to a block device (or just its name
# without '/dev'). In other words, in this context, we perform the check only
# if the give $livedev is not a filesystem file image.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

give --> given

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

The ISO checksum code was executed independently of the provided
`$livedev`. Often, this is a loop device pointing to an ISO image, but
in other cases `dmsquash-live-root` receives the path to a filesystem
image. In this case, we can't use `udevadm` to extract information
because it is not a device, and trying to do that leads to `udevadm`
error messages (but not blocking).

Therefore, the ISO checksum check must be performed only if the provided
`$livedev` is **not** a regular file.

Signed-off-by: Federico Vaga <[email protected]>
Copy link

stale bot commented Apr 22, 2024

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

@stale stale bot added the stale communication is stuck label Apr 22, 2024
@FedericoVaga
Copy link
Author

Hi all, is there something I should do to make this pull-request move forward?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dmsquash-live Issues related to the dmsquash-live module modules Issue tracker for all modules stale communication is stuck
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants