Skip to content

Commit

Permalink
live-iso: add erofs support
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-dubrovskii authored and jlebon committed Feb 13, 2025
1 parent f380ee3 commit 2f8e4f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,8 @@ else
echo "to specify an HTTP or HTTPS URL to the rootfs." >&2
exit 1
fi

# we support both squashfs and erofs, let's create the symlink for sysroot.mount
sysroot=$(ls /root.*fs)
echo "Creating symlink '/sysroot.img -> ${sysroot}'"
ln -s "${sysroot}" /sysroot.img
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,13 @@ if [ -z "${isoroot}" ]; then
[Unit]
DefaultDependencies=false
# Verifies that we have the right root.squashfs, or downloads it if needed
# Verifies that we have the right sysroot.img, or downloads it if needed
After=coreos-livepxe-rootfs.service
Before=initrd-root-fs.target
[Mount]
What=/root.squashfs
What=/sysroot.img
Where=/sysroot
Type=squashfs
Options=loop
EOF
else
Expand Down Expand Up @@ -148,9 +147,8 @@ ${sysrootrequiresmountsfor}
[Mount]
What=${sysrootfsimg}
Where=/sysroot
Type=squashfs
# Offset of the squashfs within the rootfs cpio. Assumes newc format
# and that a file named "root.squashfs" is the first member. This offset
# Offset of the root.erofs within the rootfs cpio. Assumes newc format
# and that a file named "root.[squash|ero]fs" is the first member. This offset
# is checked by coreos-assembler cmd-buildextend-live at build time.
Options=loop,offset=124
EOF
Expand Down

0 comments on commit 2f8e4f2

Please sign in to comment.