commit feda732522f372a2dc4b399ec236eed089cc86dc
parent 17fc8647866175f68f91dc1240119e4fbf90c4cd
Author: torter <koubbamohamedrayan@gmail.com>
Date: Tue, 17 Nov 2026 18:29:00 +0000
zfs: mount the root before home and var, stage install checks its download
Diffstat:
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/handbook/handbook.md b/handbook/handbook.md
@@ -155,6 +155,7 @@ the root. Then it does, in this order:
mkfs.fat -F32 BOOT
zpool create -f -o ashift=12 -O compression=zstd -O acltype=posixacl -O xattr=sa -O mountpoint=none -R /mnt rpool ROOT
zfs create -o mountpoint=/ -o canmount=noauto rpool/root
+ zfs mount rpool/root
zfs create -o mountpoint=/home rpool/home
zfs create -o mountpoint=/var rpool/var
zpool set bootfs=rpool/root rpool
diff --git a/tools/chamesle-disk b/tools/chamesle-disk
@@ -41,11 +41,10 @@ mkfs.fat -F32 "$boot" || die "mkfs.fat failed"
undo() { umount /mnt/boot 2>/dev/null; zpool export -f rpool 2>/dev/null; die "$1, rpool was exported again, run chamesle-disk again"; }
zpool create -f -o ashift=12 -O compression=zstd -O acltype=posixacl -O xattr=sa -O mountpoint=none -R /mnt rpool "$root" || die "zpool create failed"
zfs create -o mountpoint=/ -o canmount=noauto rpool/root || undo "zfs create failed"
+zfs mount rpool/root || undo "cannot mount rpool/root"
zfs create -o mountpoint=/home rpool/home
zfs create -o mountpoint=/var rpool/var
zpool set bootfs=rpool/root rpool
-zfs mount rpool/root || undo "cannot mount rpool/root"
-zfs mount -a
mkdir -p /mnt/boot /mnt/etc
mount -t vfat "$boot" /mnt/boot || undo "cannot mount $boot"
diff --git a/tools/chamesle-vm b/tools/chamesle-vm
@@ -86,9 +86,9 @@ if [ "$mode" = install ]; then
: > "$dir/ser.log"
run "partitioning" "printf 'label: gpt\nsize=512M, type=U\ntype=L\n' | sfdisk /dev/vda >/dev/null && sleep 2"
run "boot partition" "modprobe vfat; mkfs.fat -F32 /dev/vda1 >/dev/null"
- run "zfs pool" "modprobe zfs && zpool create -f -o ashift=12 -O compression=zstd -O acltype=posixacl -O xattr=sa -O mountpoint=none -R /mnt rpool /dev/vda2 && zfs create -o mountpoint=/ -o canmount=noauto rpool/root && zfs create -o mountpoint=/home rpool/home && zfs create -o mountpoint=/var rpool/var && zpool set bootfs=rpool/root rpool && zfs mount rpool/root && zfs mount -a && mkdir -p /mnt/boot && mount -t vfat /dev/vda1 /mnt/boot"
+ run "zfs pool" "modprobe zfs && zpool create -f -o ashift=12 -O compression=zstd -O acltype=posixacl -O xattr=sa -O mountpoint=none -R /mnt rpool /dev/vda2 && zfs create -o mountpoint=/ -o canmount=noauto rpool/root && zfs mount rpool/root && zfs create -o mountpoint=/home rpool/home && zfs create -o mountpoint=/var rpool/var && zpool set bootfs=rpool/root rpool && mkdir -p /mnt/boot && mount -t vfat /dev/vda1 /mnt/boot"
if [ -n "$STAGE" ]; then
- run "unpacking the stage" "curl -s $STAGE | xz -dc | tar -C /mnt --exclude ./etc/fstab -xpf - && mkdir -p /mnt/proc /mnt/sys /mnt/dev /mnt/run /mnt/tmp /mnt/var/tmp /mnt/var/log /mnt/var/cache /mnt/home && chmod 1777 /mnt/tmp /mnt/var/tmp && cp /run/live/rootfs/etc/fstab /mnt/etc/fstab && cp /run/live/medium/boot/initrd /mnt/boot/initrd && cp /run/live/rootfs/boot/vmlinuz-* /mnt/boot/ && cp /mnt/boot/vmlinuz-* /mnt/boot/vmlinuz" 1800
+ run "unpacking the stage" "curl -sf -o /mnt/stage.tar.xz $STAGE && xz -t /mnt/stage.tar.xz && xz -dc /mnt/stage.tar.xz | tar -C /mnt --exclude ./etc/fstab -xpf - && rm /mnt/stage.tar.xz && mkdir -p /mnt/proc /mnt/sys /mnt/dev /mnt/run /mnt/tmp /mnt/var/tmp /mnt/var/log /mnt/var/cache /mnt/home && chmod 1777 /mnt/tmp /mnt/var/tmp && cp /run/live/rootfs/etc/fstab /mnt/etc/fstab && cp /run/live/medium/boot/initrd /mnt/boot/initrd && cp /run/live/rootfs/boot/vmlinuz-* /mnt/boot/ && cp /mnt/boot/vmlinuz-* /mnt/boot/vmlinuz" 1800
else
run "copying the system" "tar -C /run/live/rootfs -cf - . | tar -C /mnt -xpf - && cp /run/live/medium/boot/initrd /mnt/boot/initrd && cp /mnt/boot/vmlinuz-* /mnt/boot/vmlinuz" 900
fi