0

I pasted this script into source section at Grub customizer on Ubuntu to create windows entry. But I copied this script from another pc. 1A23-C8F4 part in this code is different in my pc for Windows where can I find this code from windows files. Where is this code?

insmod part_gpt
insmod fat
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  1A23-C8F4
else
  search --no-floppy --fs-uuid --set=root 1A23-C8F4
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi

But this script works. Just, it throw small error and press enter you can use Windows :).

Priyansh
  • 1,051
hkaraoglu
  • 103

1 Answers1

1

This is UUID of partition in which you installed that OS and when you boot system then it will search for bootloader in this device. so you can see that UUID either in /etc/fstab by using command

cat /etc/fstab

or

ll /dev/disk/by-uuid/

or

 sudo blkid

In my system it is like

....
else
  search --no-floppy --fs-uuid --set=root a119cedc-3e53-4c17-8bdc-a6878c29adc9
....

and

 ll /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root 100 Oct  3 16:32 ./
drwxr-xr-x 4 root root  80 Oct  3 18:32 ../
lrwxrwxrwx 1 root root  10 Oct  3 16:32 44a67255-60f1-44e6-8c3d-bdfc5a517c29 -> ../../sda1
lrwxrwxrwx 1 root root  10 Oct  3 16:32 a119cedc-3e53-4c17-8bdc-a6878c29adc9 -> ../../dm-0

and /etc/fstab entry is

# /boot was on /dev/sda1 during installation
UUID=44a67255-60f1-44e6-8c3d-bdfc5a517c29 /boot           ext2    defaults        0       2

size of UUID may differ for ntfs partition so don't bother about that thing.

pl_rock
  • 11,297
  • see http://askubuntu.com/questions/486752/dual-boot-win-8-ubuntu-loads-only-win and http://askubuntu.com/questions/456551/cannot-load-windows-8-following-ubuntu-14-04-installation and there is many question that have similar question . so , search on askubuntu for related question if still problem then ask new question with this error and also try first sudo update-grub . – pl_rock Oct 05 '15 at 01:50
  • May this command affect my windows ? For example delete it? – hkaraoglu Oct 05 '15 at 18:24
  • It says : Usage: grub-probe [OPTIONS...] [OPTION]... [PATH|DEVICE] For more information write 'grub-probe --help' or 'grub-probe --usage' – hkaraoglu Oct 05 '15 at 18:30
  • please delete some comment. otherwise we have to go in chat. you are working on grub related issue so do that it will not delete you os untill you delete that partition in which u installed os . so i think you have messed up many thing so you have to repair grub or reinstall grub it will not remove you any os . http://askubuntu.com/questions/83771/recovering-grub-after-installing-windows-7 – pl_rock Oct 05 '15 at 18:33