Hi rameshan,
Those errors from grub-mkconfig -o /boot/grub/grub.cfg aren't good at all!
So, let's go back to the beginning
First (as I just rebooted in my Sabayon 8 right now to be sure), there's only those files in my /etc/grub.d/:
00_fonts 00_header 05_distro_theme 10_linux 20_linux_xen 30_os-prober 40_custom 41_custom README
As we can see, no /etc/grub.d/40_custom.save! So let's say it's a backup file that was made when you've edited the original /etc/grub.d/40_custom.
To be sure, open a terminal as your standard user and type "sudo leafpad /etc/grub.d/40_custom.save" (or use gedit / kate / kwrite or whatever you've installed).
Check that there is only this inside:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
and save it with the same name (to use it as a backup).
Then add (after it) those lines:
menuentry "PCBSD 9.0" {
set root=(hd0,3)
chainloader +1
}
(as it seems you have on a single HDD XP Pro / Sabayon / PC-BSD and as "Found unknown Linux distribution on /dev/sda3" is the same I've got here = it's PC-BSD but you can use "sudo fdisk -l" to check it)
and save it as /etc/grub.d/40_custom (without any extension, just 40_custom).
It should now looks like:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "PCBSD 9.0" {
set root=(hd0,3)
chainloader +1
}
Now type "sudo grub-mkconfig -o /boot/grub/grub.cfg" and there shouldn't be anymore errors and you should be good...
(In case it's still want to read 40_custom.save, move it to your Documents and let only 40_custom be in /etc/grub.d)
Good luck.