Computer and IT knowledge - things to know
### Step 1: Preparation and Data Backup
1. **Backup Data**: Create a complete backup of your important data before making changes to the bootloader.
2. **Start Live System**: Boot from an Ubuntu installation medium (USB stick or CD/DVD) that you have previously created.
3. **Identify Windows Partition**: Open the terminal and run the command `lsblk -f` to display the partitions on your hard drive. Note the UUID of the Windows partition (e.g., `/dev/sda1` with the NTFS filesystem).
### Step 2: Edit GRUB Configuration
1. **Open GRUB Configuration**: Navigate to the directory `/etc/grub.d/` and open the file `40_custom` with a text editor like `nano`:
```bash
sudo nano /etc/grub.d/40_custom
```
2. **Create Menuentry**: Add a new entry at the end of the file. Replace `<UUID_OF_YOUR_WINDOWS_PARTITION>` with the actual UUID you noted in Step 1:
```bash
menuentry "Windows" {
set root=(hd0,msdos1) # Adjust the disk and partition number if necessary
insmod ntfs
search --fs-uuid --no-floppy --set=root <UUID_OF_YOUR_WINDOWS_PARTITION>
chainloader +1
}
```
3. **Save and Close**: Press `Ctrl+X`, then `Y` to save, and `Enter` to exit the file.
### Step 3: Update GRUB
1. **Update GRUB**: Run the following command to apply the changes to the GRUB configuration:
```bash
sudo update-grub
```
### Step 4: Testing
1. **Restart**: Reboot your computer. You should now see a menu entry for Windows during boot.
```
computer2know :: thank you for your visit :: have a nice day :: © 2025