I’m trying to install a Windows partition on my xps 13 laptop, it currently only has an Ubuntu 20.04 partition.
From guides I’ve been looking at Windows needs to be installed in the first partition to work. So I’m looking for a way to backup or move my current Ubuntu setup so that I can install windows and then reinstall ubuntu.
I’ve seen some guides online but nothing quite in the same fashion. Does anyone have experience in the matter? How can I get Windows 10 running on a dualboot with my current Ubuntu machine?
Windows doesn't like to share and doesn't play nice with other OSes.
The "easy" way is to use a new drive or an NVME USB drive.
If you absolutely must use that drive without wiping its partition table (
dd if=/dev/zero of=/dev/sda bs=512 count=100 will wipe it), you can try to arrange your partitions as follows, as from a stock XPS 13, before installation. You can of course skip the recovery partition. There's no guarantee that it will work, but it's worth a shot - IIRC I couldn't get the recovery installation to work, but it did work for me the last time I tried it on a different machine with the downloadable installation media.
$ sudo gdisk GPT fdisk (gdisk) version 1.0.3 Type device filename, or press <Enter> to exit: /dev/sda Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Command (? for help): p Disk /dev/sda: 250069680 sectors, 119.2 GiB Model: LITEON CV8-8E128 Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): 328435D2-72A8-4168-AB1E-13EC6E1E182B Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 250069646 Partitions will be aligned on 2048-sector boundaries Total free space is 5130 sectors (2.5 MiB) Number Start (sector) End (sector) Size Code Name 1 2048 1023999 499.0 MiB EF00 EFI system partition 2 1024000 1286143 128.0 MiB 0C01 Microsoft reserved 3 1286144 89128546 41.9 GiB 0700 Basic data partition 4 248039424 250066943 990.0 MiB 2700 Recovery Partition 5 89128960 248039423 75.8 GiB 8300 Linux
There are a bunch of utilities that you might find useful, such as
grub-install and more.
But really, just do the USB NVME install. You can even clone it and run it on similar PC's. Although if the CPU or peripherals change, you'll need to reactivate it, or buy a new license.
The other option is to run it in a VM:
$ qemu-img create -f qcow2 win10.qc2 50G $ sudo qemu-system-x86_64 -enable-kvm -m 4G -drive file=win10.qc2,cache=none,format=qcow2,if=virtio -vnc :1 -device usb-ehci -device usb-tablet -netdev type=tap,id=n0,ifname=tap2 -device virtio-net-pci,mac=00:12:23:34:45:56,netdev=n0 -localtime -cpu host -monitor stdio -smp cores=1 -vga vmware -cdrom win10cdorusb.img -boot d # keep this last line only for installation
In another terminal:
$ while sleep 1; do xtightvncviewer :1; done
Or you can use
virt-manager, or any of the other GUI's such as
Answered by Dagelf on December 16, 2020
10 Asked on January 4, 2021 by sergiomafra
0 Asked on January 4, 2021 by malika-arora
7 Asked on January 4, 2021 by jhonnytunes
1 Asked on January 3, 2021 by mark-lee
3 Asked on January 3, 2021 by tucanco
2 Asked on January 2, 2021 by sam-vega
2 Asked on January 2, 2021 by int_ua
1 Asked on January 2, 2021 by zeekhuge
0 Asked on January 1, 2021 by cyberworldclouds-support
2 Asked on January 1, 2021 by alexwh
0 Asked on January 1, 2021 by yamifm0f
1 Asked on December 31, 2020 by iavr
2 Asked on December 31, 2020 by dima-gural
3 Asked on December 30, 2020 by ebram-shehata
Get help from others!