• cordlesslamp@lemmy.today
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    8 months ago

    Let say I want to try Linux but I want to keep my Windows OS intact (for now), and I only have 1 SSD in my PC.

    Is there a solution that I can just partition the drive, install Linux, switch between OS by just restarting without affecting the other, AND later on remove one OS without wiping the SSD?

    • mexicancartel@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      8 months ago

      Yes I did this less than a week ago.

      I shrinked the windows main partition(the C: drive) to like only 70gb since i don’t want to use it at all, then made a live usb and go with custom partition selection. Then you have to give certain partitions for linux. The /boot/efi should be selected as windows boot partition so both show up in bootloader.

      Then you have to create a root and swap partition atleast, and you can have seperate home partition if you want tp install different linux distro without losing data in first linux.

    • smnwcj@fedia.io
      link
      fedilink
      arrow-up
      3
      ·
      8 months ago

      I’ll add that id highly recommend making a backup before doing anything. You can more safely try out linux in a virtual machine as well

    • Zink@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      8 months ago

      I just installed Linux Mint into a dual boot setup recently. Unsurprisingly, their install process made it pretty easy to partition the drive and have everything play nice together.

    • bitfucker@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      Yes, first you need to resize the partition to accommodate the new OS. Usually 40-60 GB is good enough for minimal linux installation if you didn’t do any gaming or other massive applications. The resizing can be done in windows using disk management utility baked into windows, or some other partition manager (easeus, magic tools, etc). After that, linux can be safely installed in the free space as a single partition.

      Now, sometimes the bootloader is fucked, but it is quite easy to fix. In fact, if you use grub, it usually runs os-probe for you to check for any other OS. So sometimes, fixing it is as simple as rerunning grubmkconfig. But there are other times where it is not as simple. It will vary depending on what happened and too long to list here. Arch Wiki usually covers a lot of the topic so you could try searching there, especially on the topic of boot sequence.

      Lastly, if you need to move the partition, the data already inside will need to be moved too. This can take time depending on the size. But it is doable and safe.

      If, later down the road you want to remove either OS, you can simply remove the partition after moving the data first. Linux can mount ntfs natively so no problem there. On windows, there is a program called ext4 explorer or something along the line to browse and copy from linux filesystem (which is usually ext4). Don’t forget to remove the boot information too after you’re done removing the partition.

      Now there is also the other suggestion to use a live environment but I didn’t suggest it since the experience can be lacking and more hassle in and of itself.

      • Cethin@lemmy.zip
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        8 months ago

        I want to add to this that Windows sometimes has its own ideas and decides it owns the disk. I had a dual boot with Windows and Linux and Windows updated and fucked up the file system. I was able to recover almost everything without that much issue, that it did require some extra tools and some knowledge. The boot partition I never recovered though. (I was able to fix it to get it to boot into the Linux install again, but not Windows no matter what I tried.)

        This was about a year ago, maybe a bit more. The issue I had with Linux prior to this, which is why I was dual booting, was gaming. At this point gaming was perfectly fine for me to ditch windows, so I just grabbed all the files I needed to keep and set the drive up new with a fresh install.

        • lud@lemm.ee
          link
          fedilink
          arrow-up
          4
          ·
          8 months ago

          In general dual booting windows and Linux on the same disk is risky.

      • cordlesslamp@lemmy.today
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        8 months ago

        Thanks, but on second thought I don’t want to risk anything as I’m not quite the “technical” kind. I don’t even know how to dual boot 2 different windows version. I don’t think I’ll be able to fix it if anything broke.

        So I’ll buy another cheap SSD and put Linux on it while unplugged my old SSD. Then I’ll be choosing the boot drive during POST.

        I’m damn sick of Windows BS, I hope this’ll work out.

        • bitfucker@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          8 months ago

          Yeah, that’s fair. But I will still recommend anyone trying out linux AND having a problem to consult Arch Wiki when they can. It is amazing what they have there. It will also increase your technical understanding of how your system works overtime. But if you don’t have any problems when driving linux, that is good too. It just means linux for the masses is coming closer.

          For some distro recommendations, if you love to tinker, I’d say go arch. You will learn a lot about your computer too, and it is also how I learn about mine and get the know how for a lot of things now. But also, if you don’t have the time to tinker, I’d recommend bazzite. I’ve read their documentation and came to the conclusion that if anything goes wrong, it would be easy to recover from it, has great community, and is based on a solid distro.

    • celeste@lemmy.world
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      8 months ago

      Yes, other options to try linux while keeping windows are windows subsystem linux (wsl) or booting live from a usb

      • cordlesslamp@lemmy.today
        link
        fedilink
        arrow-up
        1
        ·
        8 months ago

        Thanks, what I want to try out is the gaming capabilities. I don’t know if VM or live USB can do that reliably.

        I heard that AMD GPUs is better with Linux, right?

    • lengau@midwest.social
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      One of the most important things to recognise before I start: Don’t try to make something permanent right now. None of this needs to be written in stone. Choose what’s going to be best for you right now and know that in a few weeks or months you might want to change it. With that in mind:

      What do you want out of Linux right now? A development system? Are you looking to see what it would be like to move away from Windows? Something else?

      Let’s start with the development system. Let’s say you’re comfortable on Windows and just want to do a few things that are easier or more convenient on Linux. In that case, you probably want Windows Subsystem for Linux. This will get you a bunch of things, including the ability to quickly and easily try out a bunch of distributions. Of course, this is going to be primarily a command line experience. You’re not going to get the “full experience” with a desktop environment, etc. But if you just “need Linux for a couple of things,” this is a great intro.

      Next, let’s say you want to try Linux out, see what the desktop is like, etc. This is a great opportunity to try a virtual machine. You’ll have limitations (less hardware access, maybe not as smooth a desktop as if it were on the hardware directly), but it’s a great way to play with distributions, especially if you want to explore multiple distros. (I’ll get to distros below)

      Got a distro you want and want to try it as your “main environment” for a while? Other folks have mentioned how to dual boot. Here, the most critical part in my opinion is to put your important data onto a third partition that’s easily accessible to both. On Linux, I’d suggest bind mounting directories from that partition in your home directory. If you want to wipe an OS later it’ll be a bit rough, but you can do it. You’ll just need to boot from a live USB to do it, and of course be very careful about what partitions you delete.

      Now, for distros:

      Everyone is going to recommend their pet distro, and to that end I recommend [REDACTED]. But! Here’s my actual guide for selecting a distro:

      1. Got a friend who’s willing to spend a decent amount of time helping you? Go with whatever they suggest, at least for now. It’s okay if it’s not where you’ll be eventually. What they’re familiar with right now will speed up their ability to help you, which will speed up your learning. What they use may well not be where you end up and that’s okay. I do however have two exceptions to this: first, if they suggest Gentoo or NixOS as your intro distro, find someone else. Gentoo and NixOS are both fantastic, but they are very much not beginner distros. In 6 months or a year though, they might be something you want to play with if you’re interested in doing a deep dive into Linux. Second, have them with you while you’re doing the install. You want to be doing the install, but they should be there to guide you and answer questions.
      2. Doing this on your own? Go with a beginner friendly distro. The main recommendations I have here are Ubuntu spins or Fedora spins. There may well be people who reply to my comment spewing hate about one or both of those recommendations, and while there’s controversy about both of these, at the end of the day they’re both great. (Conflict of interest declaration: I work for the company that makes one of those distros, and the other one is some of our biggest competition. I applied for this job in part because I thought that one of the things the community loves to hate about one of these was Great, Actually™, but I wanted to improve some of the things that I think are actually valid criticisms.)

      If internet randoms tell you “X is garbage, don’t use it,” feel free to disregard them. Most Linux distros are great. They all have smart, dedicated people working on them, and they each have their own vision of how they want it done. These ideas conflict sometimes, but that’s okay.

      And one final thing… Don’t fight against your distro’s way of doing something. At least not now. Most people telling you to do something that works against the distro are doing so for ideological, not practical, reasons. You don’t need to get involved in ideological wars - enjoy Linux for its positives.!

      • AnUnusualRelic@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        8 months ago

        Those are wise words.

        Remember that in the end, all the distributions end up doing and installing pretty much the same thing (from the user’s pov). It doesn’t matter all that much what you use. Most of the major ones work just fine.