You will be better off in the future if primary OS is backed up prior to the installation of another.
First, preferably, we have to discover a path that let us boot you into Windows.
Assuming that Lubuntu filesystem has not overwritten any bit of Windows (highly probable) and GRUB is installed with Lubuntu on default you can let os-prober
do the job.
To be on the safe side, change /etc/default/grub
settings:
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
# GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_HIDDEN=-1
GRUB_TIMEOUT=100
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
GRUB_DISABLE_OS_PROBER=false
Type into CLI:
# sudo update-grub
Check whether grub.cfg
resides in /boot/grub/
If positive, try:
# sudo grub-mkconfig -o /boot/grub/grub.cfg
If os-prober
(which should be on default turned on) found UUID of Windows bootloader
partition, you can reboot the system, choosing Windows when dialogue appears just after BIOS.
If os-prober
failed, we would manually provide GRUB with location of Windows bootloader
partition.
To do this, we have to obtain Windows bootloader
partition:
blkid
Probably it is in position of /dev/sda1
:
/dev/sda1: UUID="SPX7ZJUBC2EN7FAH" TYPE="ntfs"
Now, as we know UUID, we have to adjust this piece of code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
# Windows 10 Pro 64-bit (loader) (on /dev/sda1)
menuentry 'Windows 10 Pro 64-bit (loader) (/dev/sda1)' --class windows --class os
$menuentry_id_option 'osprober-chain-SPX7ZJUBC2EN7FAH' {
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 SPX7ZJUBC2EN7FAH
else
search --no-floppy --fs-uuid --set=root SPX7ZJUBC2EN7FAH
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
# End of Windows 10 Pro 64-bit (loader) (on /dev/sda1)
Change UUID (SPX7ZJUBC2EN7FAH) and position ('hd0,msdos1') of Windows bootloader
everywhere.
Paste code provided into /etc/grub.d/40_custom
and save.
Then, once again, put into CLI:
# sudo grub-mkconfig -o /boot/grub/grub.cfg
Reboot.
Before you erase Lubuntu, try to change desktop enviroment for e.g. MATE:
Install MATE how-to
I think it would be enough for enriching your computer experience and would make all functionalities available easier.
Recommended reading:
- GRUB Manual: 5. Writing your own configuration file, p.17 et seq.
- GRUB Manual: 5.3. Multi-boot manual config, p.24.
- GRUB Manual: 29. Invoking grub-mkconfig, p.99.
- GRUB Manual: 32. Invoking grub-probe, p. 105 et seq.
os-prober
's work manually.BTW, link is dead.
– Christianus Feb 13 '16 at 06:36