Awesome, thank your drs305 - It works!
Turns out after all that, I just needed to learn a bit about bash scripting (specifically 'cat') and escape the '$' character in '$root'. Don't I feel a bit stupid .
I'd tried more or less that same script before, but I'd only been editing 09_windaz. It worked in 40_custom, but when I tried to copy it to 09_windaz it didn't. After comparing what was output to grub.cfg, turns out it was reading $root as (an empty) variable and thus not printing anything there, leaving a half written command.
For someone else's future reference, my windows config now looks like this:
Code:
#!/bin/sh -e
echo "Adding Windows XP to GRUB 2 menu (09_windaz)" >&2
cat << EOF
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
}
EOF
And after running update-grub is printed to grub.cfg like this:
Code:
### BEGIN /etc/grub.d/09_windaz ###
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
}
### END /etc/grub.d/09_windaz ###
I reinstalled os-prober but it made no difference, not that it really matters to me now grub is configured how I want it.
However, in case anyone is curious, here's how it's behaving: http://paste.ubuntu.com/1034893/ (note the sudo os-prober at the end). If anyone wants to try and figure it out send me a PM or post here, I'll keep checking for the next few days.
Edit: Thank you to everyone who takes time to help out Linux newbs like myself, I'm sure it's not particularly rewarding, but it certainly doesn't go unappreciated.
Bookmarks