/history
/1000-loop-mounting.d/fedora-29.img
/2000-xz-compressed.d/Fedora-Cloud-Base-29-1.2.x86_64.raw.xz
-/2200-partitioning.d/boot.img
-/2200-partitioning.d/.root.img
-/2200-partitioning.d/root.img
-/2200-partitioning.d/swap.img
/6500-shell.d/badblocks.sh
/nbdview/error?
/nbdview/log?
+++ /dev/null
-#!/bin/bash -
-
-source functions
-
-# Title.
-export title="Create partitions"
-
-# History.
-remember 'ls'
-remember 'nbdkit partitioning boot.img mbr-id=0x82 swap.img mbr-id=0x83 root.img'
-remember 'sudo nbd-client -b 512 localhost /dev/nbd0'
-remember 'ls -l /dev/nbd0*'
-remember 'sudo fdisk -l /dev/nbd0'
-remember 'sudo mount /dev/nbd0p3 /tmp/mnt'
-remember 'ls -l /tmp/mnt'
-remember 'cat /tmp/mnt/etc/fedora-release'
-remember 'touch /tmp/mnt/hello-fosdem'
-
-./restore
-pushd 2200-partitioning.d >/dev/null
-terminal
-popd >/dev/null
<code style="position: absolute; top: 105px; left: 340px;">nbd</code>
<code style="position: absolute; top: 125px; left: 450px;">null</code>
<code style="position: absolute; top: 155px; left: 340px;">ocaml</code>
- <code style="position: absolute; top: 185px; left: 160px;"><b>partitioning</b></code>
+ <code style="position: absolute; top: 185px; left: 160px;">partitioning</code>
<code style="position: absolute; top: 240px; left: 380px;">pattern</code>
<code style="position: absolute; top: 300px; left: 320px;">perl</code>
<code style="position: absolute; top: 340px; left: 280px;">python</code>
popd
fi
-if [ ! -f 2200-partitioning.d/boot.img ]; then
- guestfish --ro -a 1000-loop-mounting.d/fedora-29.img -i <<EOF
-download /dev/sda2 2200-partitioning.d/boot.img
-download /dev/sda3 2200-partitioning.d/swap.img
-# Save to hidden file.
-download /dev/sda4 2200-partitioning.d/.root.img
-EOF
-fi
-
-# Restore original root.img before each run.
-if ! cmp -s 2200-partitioning.d/{.root.img,root.img}; then
- cp 2200-partitioning.d/{.root.img,root.img}
-fi
-
# Create mountpoint.
mkdir -p /tmp/mnt