Skip to content

Commit 1c8c04e

Browse files
committed
automatically create /etc/mtab symlink if it doesn't exist (or, isn't a
link to /proc/self/mounts)
1 parent 2f42df8 commit 1c8c04e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

-6
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,6 @@ nano VARIABLES.sh
8080

8181
replace the root variable with the output of pwd up until and including the WSAGAScript folder
8282

83-
**Debian WSL users need to create an mtab symlink:**
84-
85-
```bash
86-
sudo ln -s /proc/self/mounts /etc/mtab
87-
```
88-
8983
### Run the scripts
9084

9185
```bash

extend_and_mount_images.sh

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
. ./VARIABLES.sh
44

5+
if [[ ! /proc/self/mounts -ef /etc/mtab ]]; then
6+
printf "/etc/mtab doesn't exist or is invalid\n"
7+
printf 'creating valid /etc/mtab\n'
8+
ln -sf /proc/self/mounts /etc/mtab
9+
fi
10+
511
echo "chk product.img"
612
e2fsck -f $ImagesRoot/product.img
713

0 commit comments

Comments
 (0)