Skip to content

Commit e83d7d1

Browse files
committed
dont forget saving ssh keys in /mnt
1 parent a35dc10 commit e83d7d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/create-image/configure.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# Copyright 2025 syzkaller project authors. All rights reserved.
33
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
44

5+
sudo mkdir -p /fs/$DIR /mnt
6+
pushd /mnt
7+
58
# Set some defaults and enable promtless ssh to the machine for root.
69
sudo sed -i '/^root/ { s/:x:/::/ }' $DIR/etc/passwd
710
echo 'T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100' | sudo tee -a $DIR/etc/inittab
@@ -45,8 +48,6 @@ sudo chroot $DIR /bin/bash -c "apt-get update"
4548
sudo chroot $DIR /bin/bash -c "apt-get install -y python3 && ln -s /usr/bin/python3 /usr/bin/python"
4649

4750
# create ssh key and save it
48-
sudo mkdir -p /fs/$DIR /mnt
49-
pushd /mnt
5051
ssh-keygen -f $RELEASE.id_rsa -t rsa -N ''
5152
sudo mkdir -p $DIR/root/.ssh/
5253
cat $RELEASE.id_rsa.pub | sudo tee $DIR/root/.ssh/authorized_keys
@@ -61,4 +62,3 @@ sudo cp -a $DIR/. /fs/$DIR/.
6162
sudo umount /fs/$DIR
6263

6364
popd
64-

0 commit comments

Comments
 (0)