Bug 14657

Summary: drakboot crashed (mkdir: error creating directory /.. when it's a file mount point)
Product: Mageia Reporter: w unruh <unruh>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: thierry.vignaud
Version: 3Keywords: NEEDINFO
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: drakxtools-15.54.1-3.mga3 CVE:
Status comment:

Description w unruh 2014-11-25 11:29:11 CET
The "drakboot" program crashed. Drakbug-15.54.1 caught it.

Running the boot program in MCC
/usr/spool/mail/unruh IS a file, my mail file. Why in the world is drakboot trying to access it?

mkdir: error creating directory /var/spool/mail/unruh: /var/spool/mail/unruh is a file and i won't delete it
	...propagated at /usr/sbin/drakboot line 65.
Perl's trace:
standalone::bug_handler() called from /usr/sbin/drakboot:65

Theme name: oxygen-gtk
Kernel version = 3.10.44-desktop-1.mga3
Distribution=Mageia release 3 (Official) for i586
CPU=Intel(R) Core(TM)2 Duo CPU     E7400  @ 2.80GHz
Comment 1 Thierry Vignaud 2014-11-25 17:41:31 CET
What's your bootloader? (eg: run detectloaded)
Please attach its config file as well as your /etc/fstab

Keywords: (none) => NEEDINFO
CC: (none) => thierry.vignaud

Comment 2 w unruh 2014-11-25 18:10:14 CET
grub

boot/grub/menu.1st

timeout 10
color black/cyan yellow/cyan
default 0

title linux
kernel (hd1,0)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=f827abe4-9ef1-48b3-aca5-ab9f65acc283 splash quiet resume=UUID=3e2278b6-7712-468c-9690-019594153a24 vga=788
root (hd1,0)
initrd /boot/initrd.img

title linux-nonfb
kernel (hd1,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=f827abe4-9ef1-48b3-aca5-ab9f65acc283 resume=UUID=3e2278b6-7712-468c-9690-019594153a24
root (hd1,0)
initrd /boot/initrd.img

title failsafe
kernel (hd1,0)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=f827abe4-9ef1-48b3-aca5-ab9f65acc283 failsafe
root (hd1,0)
initrd /boot/initrd.img

title Mandriva Linux (Official)
root (hd0,0)
configfile /boot/grub/menu.lst

title desktop 3.8.13-1.mga3
kernel (hd1,0)/boot/vmlinuz-3.8.13-desktop-1.mga3 BOOT_IMAGE=desktop_3.8.13-1.mga3 root=UUID=f827abe4-9ef1-48b3-aca5-ab9f65acc283 splash quiet resume=UUID=3e2278b6-7712-468c-9690-019594153a24 vga=788
root (hd1,0)
initrd /boot/initrd-3.8.13-desktop-1.mga3.img

title desktop 3.10.24-2.mga3
kernel (hd1,0)/boot/vmlinuz-3.10.24-desktop-2.mga3 BOOT_IMAGE=desktop_3.10.24-2.mga3 root=UUID=f827abe4-9ef1-48b3-aca5-ab9f65acc283 splash quiet resume=UUID=3e2278b6-7712-468c-9690-019594153a24 vga=788
root (hd1,0)
initrd /boot/initrd-3.10.24-desktop-2.mga3.img

title desktop 3.10.28-1.mga3
kernel (hd1,0)/boot/vmlinuz-3.10.28-desktop-1.mga3 BOOT_IMAGE=desktop_3.10.28-1.mga3 root=UUID=f827abe4-9ef1-48b3-aca5-ab9f65acc283 splash quiet resume=UUID=3e2278b6-7712-468c-9690-019594153a24 vga=788
root (hd1,0)
initrd /boot/initrd-3.10.28-desktop-1.mga3.img

title desktop 3.10.40-1.mga3
kernel (hd1,0)/boot/vmlinuz-3.10.40-desktop-1.mga3 BOOT_IMAGE=desktop_3.10.40-1.mga3 root=UUID=f827abe4-9ef1-48b3-aca5-ab9f65acc283 splash quiet resume=UUID=3e2278b6-7712-468c-9690-019594153a24 vga=788
root (hd1,0)
initrd /boot/initrd-3.10.40-desktop-1.mga3.img

title desktop 3.10.44-1.mga3
kernel (hd1,0)/boot/vmlinuz-3.10.44-desktop-1.mga3 BOOT_IMAGE=desktop_3.10.44-1.mga3 root=UUID=f827abe4-9ef1-48b3-aca5-ab9f65acc283 splash quiet resume=UUID=3e2278b6-7712-468c-9690-019594153a24 vga=788
root (hd1,0)
initrd /boot/initrd-3.10.44-desktop-1.mga3.img

title desktop 3.10.50-1.mga3
kernel (hd1,0)/boot/vmlinuz-3.10.50-desktop-1.mga3 BOOT_IMAGE=desktop_3.10.50-1.mga3 root=UUID=f827abe4-9ef1-48b3-aca5-ab9f65acc283 splash quiet resume=UUID=3e2278b6-7712-468c-9690-019594153a24 vga=788
root (hd1,0)
initrd /boot/initrd-3.10.50-desktop-1.mga3.img

----------------------------------------------------------------------

/etc/fstab# Entry for /dev/sdb1 :
UUID=f827abe4-9ef1-48b3-aca5-ab9f65acc283 / ext3 acl,relatime 1 1
# sdd5
/dev/mapper/crypt_sdd5 /backup ext4 noatime,noauto 0 0
# /dev/sdb8
/dev/mapper/crypt_sdb8 /encrypt ext3 acl,relatime,noauto 0 0
/dev/sda6 /local/ ext3 acl,relatime,nofail 1 2
#LABEL=test /test ext3 acl,relatime,nofail 0 0
# Entry for /dev/sdb6 :
UUID=d8def5c0-dce3-4257-9519-58834f5742ef /newlocal ext3 acl,relatime 1 2
# Entry for /dev/sdb7 :
#UUID=b5138a18-f830-45c5-b91e-250d00758758 /newroot ext3 acl,relatime 1 2
none /proc proc defaults 0 0
# Entry for /dev/sda5 :
UUID=3e2278b6-7712-468c-9690-019594153a24 swap swap defaults 0 0
# Entry for /dev/sdb5 :
#UUID=18774810-27cf-4e27-badd-aef3606f99fb swap swap defaults 0 0
/encrypt/mail/unruh /var/spool/mail/unruh none  bind,noauto 0 0
LABEL=test /test ext3 acl,relatime,nofail 0 0
---------------------------------------------------------------------------
Comment 3 Thierry Vignaud 2014-11-25 18:14:42 CET
I did say "attach", not paste (as files got rewrapped and it makes bug reports unreadable)...

Anyway, it was what I though, it's related to a mount point
Comment 4 Thierry Vignaud 2014-11-25 18:17:05 CET
Is it fixed if you comment line 233 ("mkdir_p(...") in /usr/lib/libDrakX/fs.pm?
Please first make a backup of this file of course.

If that's it, I can add a check for existence of the target
Thierry Vignaud 2014-11-25 18:17:41 CET

Summary: drakboot crashed => drakboot crashed (mkdir: error creating directory /.. when it's a file mount point)

Comment 5 w unruh 2014-11-25 20:35:24 CET
Sorry about the cut and paste rather than attachment. 

Yes, commenting out that line does not throw that error anymore.
Comment 6 Mageia Robot 2014-11-25 21:10:10 CET
commit fe979d50ba183c76a0afbaa19952cc8e807d5dc7
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Tue Nov 25 21:06:30 2014 +0100

    do not crash if fstab contains a bind mount
    
    rationale: it crashes on a file (mga#14657)
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=fe979d50ba183c76a0afbaa19952cc8e807d5dc7
Comment 7 Thierry Vignaud 2014-11-25 21:11:48 CET
Thanks for helping me fixing that bug!
I won't provide an update for mga3 as it's EOL tomorrow but I'll provide an update for mga4 and of course it'll be included in mga5.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 8 w unruh 2014-11-25 21:27:57 CET
Great. Glad it could be fixed so quickly.