diff options
| author | fumingwei <[email protected]> | 2024-09-11 18:29:52 +0800 |
|---|---|---|
| committer | 付明卫 <[email protected]> | 2024-09-11 10:41:00 +0000 |
| commit | 2d4cceaf583bbfa9c6f0525aab769587954a5532 (patch) | |
| tree | 6ede3f84f2ac9d2b76674c78bb3993a55d7b759c | |
| parent | a49f6483da566084e69428fcd8a5a5a51b701a69 (diff) | |
bugfix: fix losetup /dev/loop0 no such file or directory error.
| -rwxr-xr-x | installer/install.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/installer/install.sh b/installer/install.sh index 2920300c..ff51ab93 100755 --- a/installer/install.sh +++ b/installer/install.sh @@ -266,6 +266,11 @@ install_onie_swap() remove_onie_swap ${data_part_mount_path} dd if=/dev/zero of=${data_part_mount_path}/.onie_swapfile bs=32M count=1024 + + if [ ! -e /dev/loop0 ]; then + mknod /dev/loop0 b 7 0 + fi + losetup /dev/loop0 ${data_part_mount_path}/.onie_swapfile mkswap /dev/loop0 |
