Skip to content

Commit 4a21dc6

Browse files
committed
fix(getting-started): increase ext4 size and verify artifacts
We increased the ext4 size from 400M to 500M in our devtool scripts, but not in the getting started. Let's bump it to 1G to avoid issues like this in the future. In the longer term, we may look into simplifying the getting started guide, but for now it's quicker to just fix the issue. Fixes: #5349 Signed-off-by: Riccardo Mancini <[email protected]>
1 parent 1ba85a7 commit 4a21dc6

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

docs/getting-started.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,23 +115,29 @@ latest_ubuntu_key=$(curl "http://spec.ccfc.min.s3.amazonaws.com/?prefix=firecrac
115115
| sort -V | tail -1)
116116
ubuntu_version=$(basename $latest_ubuntu_key .squashfs | grep -oE '[0-9]+\.[0-9]+')
117117

118-
# Download a rootfs
118+
# Download a rootfs from Firecracker CI
119119
wget -O ubuntu-$ubuntu_version.squashfs.upstream "https://s3.amazonaws.com/spec.ccfc.min/$latest_ubuntu_key"
120120

121-
# Create an ssh key for the rootfs
121+
# The rootfs in our CI doesn't contain SSH keys to connect to the VM
122+
# For the purpose of this demo, let's create one and patch it in the rootfs
122123
unsquashfs ubuntu-$ubuntu_version.squashfs.upstream
123124
ssh-keygen -f id_rsa -N ""
124125
cp -v id_rsa.pub squashfs-root/root/.ssh/authorized_keys
125126
mv -v id_rsa ./ubuntu-$ubuntu_version.id_rsa
126127
# create ext4 filesystem image
127128
sudo chown -R root:root squashfs-root
128-
truncate -s 400M ubuntu-$ubuntu_version.ext4
129+
truncate -s 1G ubuntu-$ubuntu_version.ext4
129130
sudo mkfs.ext4 -d squashfs-root -F ubuntu-$ubuntu_version.ext4
130131

131132
# Verify everything was correctly set up and print versions
132-
echo "Kernel: $(ls vmlinux-* | tail -1)"
133-
echo "Rootfs: $(ls *.ext4 | tail -1)"
134-
echo "SSH Key: $(ls *.id_rsa | tail -1)"
133+
echo
134+
echo "The following files were downloaded and set up:"
135+
KERNEL=$(ls vmlinux-* | tail -1)
136+
[ -f $KERNEL ] && echo "Kernel: $KERNEL" || echo "ERROR: Kernel $KERNEL does not exist"
137+
ROOTFS=$(ls *.ext4 | tail -1)
138+
e2fsck -fn $ROOTFS &>/dev/null && echo "Rootfs: $ROOTFS" || echo "ERROR: $ROOTFS is not a valid ext4 fs"
139+
KEY_NAME=$(ls *.id_rsa | tail -1)
140+
[ -f $KEY_NAME ] && echo "SSH Key: $KEY_NAME" || echo "ERROR: Key $KEY_NAME does not exist"
135141
```
136142

137143
### Getting a Firecracker Binary

0 commit comments

Comments
 (0)