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,049
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,715