0

So basically I lost my windows 10 usb and I can't afford to buy a new one. I need windows because most of the programs I run are on windows. Somebody please help

1 Answers1

0

Install windows from hard disk

1- download windows 7/8/10/11 iso file.
2- extract the iso file to ntfs data partition.
3- sudo update-grub or add a menu entry to /boot/grub/grub.cfg.

menuentry "Windows installation Environment" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  55DD0595418E5BFC
    else
      search --no-floppy --fs-uuid --set=root 55DD0595418E5BFC
    fi
    parttool ${root} hidden-
    drivemap -s (hd0) ${root}
    chainloader +1
}

Replace 55DD0595418E5BFC by the uuid for that partition which given from disk utitity.
Replace 0 and 1 in the entry by yours, 0 is the hard no. and 1 is the partition no.

Related: create-usb-drive-contains-multi-ubuntu-versions-hbcd-pe-64-and-multi-windows-in-ubuntu

note: install windows will delete grub boot loader frome your hard disk so if you want to back to ubuntu you will have to use boot-repair or ubuntu live USB to restore grub boot loader and add Windows entrys to grub menu so no need to windows boot loader again.