krglaws / MyLFS

A giant Bash script that builds Linux From Scratch
MIT License
90 stars 20 forks source link

losetup excute failed #20

Open kean0048 opened 5 months ago

kean0048 commented 5 months ago

when run 'sudo ./mylfs.sh --build-all' and input Y to delete the old image, there will be a new failed like: losetup: /works/Tools/LFS/MyLFS/lfs.img: failed to set up loop device: Device or resource busy

and I debug it, found there some code during loopx has been used and will try to re-plug it, but time too short, so lead the issues maybe, and I and sleep during it, and found every is fine.

Attached here for your check.

Thanks.

kean0048 commented 5 months ago

From 44f4e65b686edd70d878727e73e2e9ecb3ae113b Mon Sep 17 00:00:00 2001 From: Renhai rh_king@163.com Date: Thu, 25 Apr 2024 16:24:17 +0800 Subject: [PATCH] fixed xz download failed issues and losetup errors.


mylfs.sh | 1 + packages.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/mylfs.sh b/mylfs.sh index f279997..59e5f4f 100755 --- a/mylfs.sh +++ b/mylfs.sh @@ -207,6 +207,7 @@ function init_image {

 # reattach loop device to re-read partition table
 losetup -d $LOOP
kean0048 commented 5 months ago

![Uploading 2024-04-25_16-35.png…]()

krglaws commented 5 months ago

Thanks for the info. Submit a PR if you want and I'll merge your changes.