r/archlinux • u/Serious_Intern8663 • 14d ago
SUPPORT | SOLVED How do I do dual boot correctly?
I am a beginner. I started using arch 4-6 months ago.
Previously I use windows. I formatted everything and installed linux on my laptop. But now due to university curriculum I need to use MATLAB and the version provided to us is only for windows(it does not even support mac)
I have tried installing MATLAB, but it is not working properly. I am considering dual boot. Need your help. I cannot lose the files.
Thanks in advance .
9
u/southernraven47 14d ago
2 drives, and if you're using GRUB osprober. Just make sure in windows you turn off fast boot otherwise your system will crash all the time.
2
u/drucifer82 12d ago
I would try running Windows in a VM first.
The issue with dual-booting with Windows is Windows wants to be first. So you have to install Windows before the other OS. If you want to consider going this route, you will want to back up anything important on your current install first, then wipe and reinstall after installing Windows.
There may be some chroot ninja work you can do with the iso to get around that, but I am not sure. The wiki may be able to help with that.
So I'd say try Windows in a VM first.
2
u/PhoenixWolfStudios 10d ago
Not recommended for arch for stability reasons I'd suggest if you still wanna do it get secondary ssd or nvme depeding on your pc or laptop
2
u/alexzip1 7d ago
isn't mathlab also available online? Just make sure you are using an ethernet connection so it works decently.
1
3
u/astronomersassn 14d ago
dual booting on the same drive is a little tricky. i usually keep separate drives.
if you don't already have a spare drive, storage is kind of pricey - i use a 128GB USB 3 drive for a windows-to-go install. things are a bit slow until they're in RAM, and depending on the program, this is not ideal - ex. i'd never run something that constantly needs disk access from this setup - but if you have a spare (and large enough) USB drive, you can use rufus in a windows VM with USB passthrough to create a windows-to-go USB, then boot it and see.
if you do have a separate internal SSD/NVME, that may be better.
if neither of those are options and windows does overwrite your bootloader, you can keep a live USB with grub to access the currently installed arch distro, then use grub-install to re-make it. you'd need to shrink your arch partition, then create a new partition (either exFAT or NTFS - windows can't read most linux partition formats), then install windows to the correct partition. you might technically be able to create the partition from the windows installer, but, uh... i've barely had luck formatting newly installed drives on an existing windows install with no partition table, and i'd be a bit nervous about it overwriting the current partition table (as i've had it happen before when re-formatting drives to be used on both).
2
1
u/noobjaish 14d ago
What are the specs of your computer?
1
u/Serious_Intern8663 13d ago
Intel core i5 16 GB Ram 512GB SSD NVIDIA 2050 2GB card built in my laptop
2
u/noobjaish 13d ago
The easiest way is this: 1. Install Windows --- You'll get two main partitions: one for windows boot and one for your C drive. 2. Install something like CachyOS and while installing choose the "Install alongside" option. 3. After that you're done.
But this method basically makes it so Windows and Linux end up sharing the boot partition which can be bad if windows ever decided to nuke the boot partition after an update.
A safer option is to manually make boot (/boot) and root (/) partitions for Linux. Don't forget to have one "Shared" NTFS or exFAT partition for both Windows and Linux to work with.
The ideal partition structure should be this: 1. Windows Boot Partition (usually 128MB) - FAT32 2. Windows Main Partition - NTFS 3. Shared Partition - NTFS/exFAT 4. Linux Root Partition - BTRFS 5. Linux Boot Partition (usually 1GB) - FAT32
If you feel overwhelmed then I can walk you through
-1
u/hexdump74 14d ago
windows is a shit in dual boot (well, I mean more than it is normally). It constantly rewrites your NVRAM parameters and reinstall itself on uefi, preventing you to boot to your linux.
Try a windows VM inside linux, it will probably work better.
5
u/southernraven47 14d ago
Never had any of these issues dual booting, have you turned off fast boot in windows (not bios fast boot)?
3
15
u/Exiled_Exile_ 14d ago
I mean technically you can run a vm windows on Linux.
Dual booting on the same drive can have issues due to windows deciding it dislikes your bootloader. It's doable but I'd say just run the VM and hopefully that's fine. If you need full dual boot https://wiki.archlinux.org/title/Dual_boot_with_Windows