ibm-s390-linux / s390-tools

Tools for use with the s390 Linux kernel and device drivers
MIT License
62 stars 58 forks source link

zipl leaves a bootmap_temp.XXXXXX file behind on failure #165

Closed Vogtinator closed 3 months ago

Vogtinator commented 4 months ago

Every time zipl is run with a broken configuration file (in this case wrong targetbase), it creates a new empty file in the target directory.

localhost:/ # ll -h /boot/zipl/
total 28M
-rw-r--r-- 1 root root    0 Feb  2 11:48 active_devices.txt
-rw------- 1 root root 107K Mar 14 10:27 bootmap
-rw-r--r-- 1 root root 2.2K Mar 15 13:12 config
lrwxrwxrwx 1 root root   34 Mar 15 13:12 image -> image-5.14.21-150500.55.52-default
-rw-r--r-- 1 root root 8.0M Mar  6 10:29 image-5.14.21-150500.55.52-default
lrwxrwxrwx 1 root root   35 Mar 15 13:12 initrd -> initrd-5.14.21-150500.55.52-default
-rw------- 1 root root  19M Mar 15 13:12 initrd-5.14.21-150500.55.52-default
drwx------ 2 root root  12K Mar 14 10:26 lost+found
localhost:/ # zipl -nc /boot/zipl/config 
Using config file '/boot/zipl/config' (from command line)
Error: Could not get information for file '/dev/loop0': No such file or directory
localhost:/ # zipl -nc /boot/zipl/config 
Using config file '/boot/zipl/config' (from command line)
Error: Could not get information for file '/dev/loop0': No such file or directory
localhost:/ # zipl -nc /boot/zipl/config 
Using config file '/boot/zipl/config' (from command line)
Error: Could not get information for file '/dev/loop0': No such file or directory
localhost:/ # ll -h /boot/zipl/
total 28M
-rw-r--r-- 1 root root    0 Feb  2 11:48 active_devices.txt
-rw------- 1 root root 107K Mar 14 10:27 bootmap
-rw------- 1 root root    0 Mar 15 13:16 bootmap_temp.AbDp14
-rw------- 1 root root    0 Mar 15 13:16 bootmap_temp.F3fy0R
-rw------- 1 root root    0 Mar 15 13:16 bootmap_temp.yWUY30
-rw-r--r-- 1 root root 2.2K Mar 15 13:12 config
lrwxrwxrwx 1 root root   34 Mar 15 13:12 image -> image-5.14.21-150500.55.52-default
-rw-r--r-- 1 root root 8.0M Mar  6 10:29 image-5.14.21-150500.55.52-default
lrwxrwxrwx 1 root root   35 Mar 15 13:12 initrd -> initrd-5.14.21-150500.55.52-default
-rw------- 1 root root  19M Mar 15 13:12 initrd-5.14.21-150500.55.52-default
drwx------ 2 root root  12K Mar 14 10:26 lost+found

Reproduced with s390-tools 2.31.0 as well as 2.30.0.

edward-ibm commented 3 months ago

In addition, we found a leak of already renamed files (and, moreover, corruption of previously installed bootmap files with the same name) in case on unsuccessful installation. To be fixed soon..

Thanks, Eduard.