-
Notifications
You must be signed in to change notification settings - Fork 400
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
dmsquash-live: add rd.live.join #687
Conversation
Can one of the admins verify this patch? |
@FGrose could you please review? |
if [ -e "$SQUASHED" ]; then | ||
if [ -n "$live_ram" ]; then | ||
echo 'Copying live image to RAM...' > /dev/kmsg | ||
echo ' (this may take a minute)' > /dev/kmsg | ||
dd if=$SQUASHED of=/run/initramfs/squashed.img bs=512 2> /dev/null | ||
echo 'Done copying live image to RAM.' > /dev/kmsg | ||
SQUASHED="/run/initramfs/squashed.img" | ||
if [ -n ${join} ];then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [ -n ${join} ];then | |
if [ -n ${join} ]; then |
Did you intend to support the live_ram option? If so, please verify that this new code path works.
SQUASHED_JOIN_LOOPDEV=$( losetup -f ) | ||
losetup -r $SQUASHED_JOIN_LOOPDEV $SQUASHED_JOIN | ||
mkdir -m 0755 -p /run/initramfs/joinfs | ||
mount -n -t squashfs -o ro $SQUASHED_LOOPDEV /run/initramfs/joinfs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mount -n -t squashfs -o ro $SQUASHED_LOOPDEV /run/initramfs/joinfs | |
mount -n -t squashfs -o ro $SQUASHED_JOIN_LOOPDEV /run/initramfs/joinfs |
Did you intend to support an unflat join.img? I would recommend not to as you require an OverlayFS for the union join. (You don't use the /run/initramfs/joinfs mountpoint anyway. This section is superfluous.)
if [ -d /run/initramfs/squashfs/LiveOS ]; then | ||
if [ -f /run/initramfs/squashfs/LiveOS/rootfs.img ]; then | ||
FSIMG="/run/initramfs/squashfs/LiveOS/rootfs.img" | ||
elif [ -f /run/initramfs/squashfs/LiveOS/ext3fs.img ]; then | ||
FSIMG="/run/initramfs/squashfs/LiveOS/ext3fs.img" | ||
fi | ||
if [ -f /run/initramfs/squashfs/LiveOS/${join} ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking for the join.img inside the squashfs.img. Not correct.
@@ -323,12 +345,22 @@ else | |||
elif [ -e /run/initramfs/live/${live_dir}/ext3fs.img ]; then | |||
FSIMG="/run/initramfs/live/${live_dir}/ext3fs.img" | |||
fi | |||
if [ -e /run/initramfs/live/${live_dir}/${join} ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intend to support an uncompressed join.img? If so, please verify that this new code path works.
@@ -343,6 +375,15 @@ if [ -n "$FSIMG" ]; then | |||
unpack_archive $FSIMG /run/initramfs/fsimg/ | |||
fi | |||
FSIMG=/run/initramfs/fsimg/rootfs.img | |||
|
|||
if [ -n ${join} ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intend to support the 'writeable_fsimg' option? If so, please verify that this new code path works.
('Writeable_fsimg' configurations use Device-mapper linear devices, which don't support the union join of content. This section seems superfluous.)
@@ -358,12 +399,23 @@ if [ -n "$FSIMG" ]; then | |||
fi | |||
if [ "$FSIMG" = "$SQUASHED" ]; then | |||
BASE_LOOPDEV=$SQUASHED_LOOPDEV | |||
if [ -n ${join} ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Device-mapper based configurations will not support a union join of rootfs content with joinfs. This new code through line 418 is superfluous, no?
fi | ||
mount -r $FSIMG /run/rootfsbase | ||
if [ -n ${join} ]; then | ||
mount -r $FSIMG_JOIN /run/rootfsjoin | ||
fi | ||
if [ -z "$DRACUT_SYSTEMD" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to support DRACUT_SYSTEMD systems, the ovlfs variable in dmsquash-generator.sh must be similarly modified.
I am sorry for the late reply, as soon as I have enough time at hand, I will look more closely at it. |
@udeved any update? |
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. |
Support a union join on rootfs wiih another img.
This makes throw away layers possible, or starting different setups depending on rootfs and the join.img.
Example:
Usage:
rd.live.join=$name.img