Some days ago the slow death of both harddisks in my main computer had reached the point where I had to make a permanent decision about the content of those disks (backup, or try to do a clonezilla job, or what).
After realizing that all my important data is either on our server or in my nextcloud I decided to replace the combination of 256MB SSD and 1TB rotating rust with just one 1TB ssd disk.
The hardware vendor of my choice delivered fast, and I swapped the disks out, deciding that I’d do a clean reinstall in the process – linux doesn’t really need that, but Windows benefits from that a lot.
After finding that the 7 year old SATA cables in that computer had aged to the part where the plastic of the connectors had become brittle, and trying to get to the electronics store and back as fast as possible I finally got to the point where I could install the two OSes.
I am not going to give a step by step account of how to install Windows and/or Linux here – too many other people have done that already. This is just a list of bulletpoints with some of the details that might break things if you get them wrong.
- The easiest way to get a working dual boot system is to install Windows first, and when you partition, just don’t use the whole disk – leave as much space unused as you want for linux. In my case, I’ve assigned 512GB for Windows, games being huge these days – that left me (after the few additional partitions that are required these days) with just a smidge under 420GB for linux.
- Make sure that you boot your Windows installer in UEFI mode – otherwise Windows will use the old MBR partitioning instead of GPT, and not create an EFI partition – and without that grub will be unable to detect windows and you won’t have dual boot. How to boot in UEFI mode depends on your mainboard BIOS, can’t tell you more here.
- When you do your partition setup for your linux installation, make sure you set the existing EFI partition from the Windows install up as mounted at boot to /boot/efi – but when you do so, openSUSE will complain that the EFI partition is too small, it seems to want at least 256MB in it. No idea why – after the installation my EFI partition holds 31MB, so the 100MB that windows created are just fine.
- Partitioning for linux: my preferred way of doing that is one huge partition as LVM physical volume, then create logical volumes as needed. My disk layout looks like this:
kumiko:~ # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 100M 0 part /boot/efi
├─sda2 8:2 0 16M 0 part
├─sda3 8:3 0 511.4G 0 part /windows/C
├─sda4 8:4 0 521M 0 part
└─sda5 8:5 0 419.5G 0 part
├─system-swapvol 254:0 0 32G 0 lvm [SWAP]
├─system-rootvol 254:1 0 64G 0 lvm /
├─system-datavol 254:2 0 128G 0 lvm /temp
├─system-dockervol 254:3 0 16G 0 lvm /var/lib/docker
├─system-gamevol 254:4 0 128G 0 lvm /usr/local/games
└─system-logvol 254:5 0 4G 0 lvm /var/log
sr0 11:0 1 1024M 0 rom
All my linux filesystems are ext4. This way I can easily move space between /temp where I do all work with overly large files (KVM disk images etc etc) and my games folder, and I do not get into any btrfs trouble… LVM + ext4 is simply the best choice (for me – YMMV).
That’s all folks.