Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Package ISO filesystem in an squashfs image to reduce ISO size
Fixes #23
- Loading branch information
Showing
7 changed files
with
98 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
title Lunar-%VERSION%, %CODENAME% (%DATE%), UEFI CD | ||
linux /isolinux/linux | ||
This comment has been minimized.
Sorry, something went wrong. |
||
initrd /isolinux/initrd | ||
options root=LABEL=%LABEL% readonlyroot rootdelay=10 loglevel=3 | ||
|
||
options root=live:CDLABEL=%LABEL% rd.live.image readonlyroot rootdelay=10 loglevel=3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
title Lunar-%VERSION%, %CODENAME% (%DATE%), UEFI USB | ||
linux /EFI/lunariso/linux | ||
initrd /EFI/lunariso/initrd | ||
options root=LABEL=%LABEL% readonlyroot rootdelay=10 loglevel=3 | ||
|
||
options root=live:CDLABEL=%LABEL% rd.live.image readonlyroot rootdelay=10 loglevel=3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# !!! DO NOT CHANGE THE IMG NAMES !!! | ||
# Dracut requires a very specific fs hiearchy for squashfs | ||
# /LiveOS | ||
# |- squashfs.img | ||
# !(mount) | ||
# /LiveOS | ||
# |- rootfs.img | ||
ROOTFSMNTDIR=$(mktemp -d /tmp/rootfs-XXXXXX) | ||
SFSDIR=$ISO_SOURCE/_SFS | ||
ROOTFSIMGDIR=$SFSDIR/LiveOS | ||
ROOTFSIMG=$ROOTFSIMGDIR/rootfs.img | ||
|
||
finishScript() { | ||
umount -d $ROOTFSMNTDIR || true | ||
rmdir $ROOTFSMNTDIR | ||
rm -rf "$SFSDIR" | ||
} | ||
|
||
trap finishScript 0 2 3 15 | ||
|
||
mkdir -p $ROOTFSIMGDIR | ||
truncate -s 16G $ROOTFSIMG | ||
mkfs.ext4 -O ^has_journal,^resize_inode -E lazy_itable_init=0 -m 0 -F "$ROOTFSIMG" | ||
tune2fs -i 0 -c 0 $ROOTFSIMG &> /dev/null | ||
mount $ROOTFSIMG $ROOTFSMNTDIR | ||
rsync -av $ISO_TARGET/ $ROOTFSMNTDIR --exclude ".*" \ | ||
--exclude boot/* \ | ||
--exclude isolinux/ \ | ||
--exclude EFI/ \ | ||
--exclude etc/lunar/local/* \ | ||
--exclude tmp/* \ | ||
--exclude var/tmp/* \ | ||
--exclude var/spool/* \ | ||
--exclude var/log/* \ | ||
--exclude usr/include \ | ||
--exclude usr/lib/locale \ | ||
--exclude usr/share/locale \ | ||
--exclude usr/share/man \ | ||
--exclude usr/share/info \ | ||
--exclude usr/share/doc \ | ||
--exclude usr/share/gtk-doc \ | ||
--exclude usr/share/vim \ | ||
--exclude usr/src \ | ||
--exclude var/state/lunar/module_history | ||
umount $ROOTFSMNTDIR | ||
mkdir -p $ISO_TARGET/LiveOS | ||
mksquashfs "$SFSDIR" "$ISO_TARGET/LiveOS/squashfs.img" -noappend -comp "xz" -no-progress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# Dracut config file for Lunar Linux CD | ||
add_dracutmodules+=" lunar-live " | ||
add_dracutmodules+=" dmsquash-live lunar-live " | ||
compress="xz" |
source missing