Open yyx32 opened 8 months ago
I believe this is Linux kernel bug, and running sudo apt update && sudo apt upgrade
should fix it.
Hi @eugene-tarassov ,I tried the method you mentioned, but there was still the same error after running it.
I am also running into this problem. Updating to the latest Linux kernel did not fix it for me. Do you have any other suggestions?
The script works fine for me. I don't see such errors.
One possible cause of the error is stale (or leaked) file descriptor in the kernel. In this case rebooting the machine should fix it.
Hi @eugene-tarassov ,
I am getting the exact same issue as the original poster. I confirmed that it started the past couple weeks.
I tried the update & upgrade
solution, as well as the restart
, but neither of them worked.
Any other workarounds on this?
Can you share your set up if possible?
My machine has the following:
OS: Ubuntu 22.04.4 LTS jammy
Kernel: 5.15.0-101-generic
RISC-V GCC version: riscv64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Thank you very much for your help and time!
Kind regards, Nassos
I don't know how to get the tools to work on Ubuntu 22.04.4. I'm using Ubuntu 20.04.6 and I don't see such errors.
Hello . I am encountering the exact same issue. I am using Ubuntu 20.04.6 . What kernel version you use @eugene-tarassov ? I am stuck here for more than one week( have tried all possible workarounds)
Thanks in advance
What kernel version you use @eugene-tarassov ?
eugene@gate:~/projects/risc-v/vivado-risc-v$ cat /etc/issue
Ubuntu 20.04.6 LTS \n \l
eugene@gate:~/projects/risc-v/vivado-risc-v$ uname -a
Linux gate 5.4.0-172-generic #190-Ubuntu SMP Fri Feb 2 23:24:22 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
eugene@gate:~/projects/risc-v/vivado-risc-v$
I tried:
make clean update
./mk-sd-image
It worked OK.
I also tried Ubuntu 22.04.4 LTS machine, and got the error:
Device Boot Start End Sectors Size Id Type
/dev/loop0p1 * 2048 133119 131072 64M e W95 FAT16 (LBA)
/dev/loop0p2 133120 3071999 2938880 1.4G 83 Linux
The partition table has been altered.
Error: Partition(s) 1, 2 on /dev/loop0 have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.
eugene@smash:~/vivado-risc-v$ cat /etc/issue
Ubuntu 22.04.4 LTS \n \l
eugene@smash:~/vivado-risc-v$ uname -a
Linux smash 5.15.0-100-generic #110-Ubuntu SMP Wed Feb 7 13:27:48 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
eugene@smash:~/vivado-risc-v$
As a work around, you can download SD card image from the releases area of this repo, and use dd to copy it to SD card. It has a bit older Linux kernel - 6.3.12 vs 6.7.9, but it should work just fine.
Thanks a lot for the quick response @eugene-tarassov ! Your proposed workaround worked fine. Actually, we downloaded the latest SD card image from the release area and ran ./mk-sd-card skip_mk_img
Hello, I had the same problem and managed to fix it by changing two things in mk-sd-image script: 1) the line 66 to: $ sudo losetup -fP $SD_IMG
2) replaced sfdisk with fdisk for creating partition: replace lines 76 to 80 to: sudo fdisk ${SD_LOOP} << EOF n p 1 2048 +64M t e a n p 2 133120 3071999 p w EOF
According to my tests, adding -P option for losetup does fix the error, while replacing sfdisk with fdisk appears not needed.
@eugene-tarassov yes, you are right. The -P option fixes it. Thanks for this remark.
Hello, I have completed the process of setting up the system environment, but when I using the "mk-sd-image.sh" script to set up the SD card, an error message is reported as follows.In addition,my develop environment is Ubuntu20.04.
How can I fix this?