AMAZON

Monday, August 20, 2012

grub error in booting Ubuntu 12.04/windows xp permission denied

Ubuntu 12.04 Boot error – Windows XP from Grub2 – cannot create /var/lib/os-prober/labels: Permission denied


 In this issue machine  have the two hard drives. On one is Windows XP , on the other one is Xubuntu 12.04 .
Here the windows MBR is fine. I can boot my Windows partition by selecting that HD from the BIOS. Likewise the MBR on the other hard drive is fine and I can boot Xubuntu from grub. What I would like to do is to be able to chainload ntldr (I believe that’s the right terminology) from grub.
os-prober does not detect Windows – unless the partition is mounted but it can’t write anything anyway because it says it needs to be run as root. However sudo os-prober doesn’t seem to do anything at all, so that doesn’t help either. Always getting below error.


ERROR: you must be root ERROR: you must
be root /usr/lib/os-probes/mounted/20microsoft: 47:
/usr/lib/os-probes/mounted/20microsoft:
cannot create /var/lib/os-prober/labels: 
Permission denied /dev/sda1:Microsoft 
Windows XP Home Edition:Windows:chain mkdir: cannot 
create directory `/var/lib/os-prober/mount': Permission denied

followed below steps for resolve the issue
 Added the following to the lines below those already in /etc/grub.d/40_custom
 
menuentry “Microsoft Windows XP Home Edition (on /dev/sda1)” –class windows –class os {
insmod part_msdos
insmod ntfs
set root=’(hd0,msdos1)’
search –no-floppy –fs-uuid –set=root 5E1C40441C401983
drivemap -s (hd0) ${root}
chainloader +1
}
Save the file and update-grub.

Reinstalled os-prober with the following:
 
sudo apt-get install --reinstall os-probe 

No comments:

Post a Comment