After nine months of not having booted my Windows even once, I think it’s time to wipe the Windows related partitions once and for all and claim the space. The problem is I think the way my partitions are structured, it may not be that easy. I am assuming everything other than the two ext4 partitions will have to go. What do you think? r/linux4noobs -

Someone even suggested I nuked the whole thing and started again, which would be the absolute last resort and only when I ran out of space.

EDIT: In the end, having considered all replies, I decided to go with a compromise. I wiped the NTFS partitions and made an ext4 out of the unallocated space. Then, I moved /home to that new, larger partition and if it all continues working for a day or two, I will wipe the old and smaller /home, which is not mounted now anyway, and use it for storage. This allocation will last me for ages until I have to reinstall the OS, at which point I will use the opportunity to tidy things up. I thought this was not the time to break my system moving partitions. There were some hairy moments (eg when a UUID changed quietly and the system failed to start) but overall it was OK.

Thanks to everyone for the help. This thread was very educational and I hope others will find it useful too. As a sidenote, I posted the same question to a much bigger subreddit and I received very few responses and little help. So, the much smaller Lemmy wins hands down!

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

    For historical reasons, I’ve had a /space partition for several machines now. It’s used for large media archives, buffering towards other servers (which only grab stuff every now and then), cold storage and the like.

  • whatiswrongwithyou@lemmy.ml
    link
    fedilink
    arrow-up
    6
    arrow-down
    3
    ·
    6 hours ago

    Use a surface cleaner first. You wanna get the majority of the crud broken up and off first, wiping towards the middle then go get the whole thing with a glass cleaner using a microfiber cloth if you don’t have a squeegee.

  • diaphragmwp@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    9 hours ago
    • Write down GUID for sda6
    • copy sda5 contents somewhere
    • dd sda6 to sda2
    • delete sda6
    • change the GUID for sda2 to the one written down
    • fsck sda6 to fix size
    • make sda1’s type EFI
    • copy sda5 contents to sda1
    • delete sda5
    • you can now resize whatever is left (if your partition tool doesn’t have resize, just delete and recreate with the same starting sector, again you have to keep GUID for root and fsck it to fix size)
  • SayCyberOnceMore@feddit.uk
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    13 hours ago

    Kinda already covered by others here, but my summary:

    You won’t have partitions nicely numbered from 1~3 unless you start again.

    1 - Backup

    2 - Check the backup

    3 - Boot from GParted Live (feel free to use another live distro with gparted on)

    4- Delete sda1, sda2, sda3 & sda4

    5- Move sda5 to the beginning of the drive and resize down to 512MB

    6- Slide sda6 & sda7 down next to sda5. I like to have 1MB gap between all partitions to deal with future issues (sometimes restoring a partition might nip the next one)

    7- resize /home to fill the rest of the drive

    8- redo another backup

    If you wanted, you can apply each of those steps and then reboot to check it’s all working, then you’ll gain confidence in what’s happening for the future.

    I also advise doing a health scan of your drive to check it’s SMART parameters. Something like smartmontools (with gsmartcontrol if you like a GUI). Then you’ll know if the drive’s going to die during all that data moving…

    • noughtnaut@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      11 hours ago

      Step two-and-a-half is to install Ventoy on a usb stick once and then you can simply copy over any iso files you’ll every need and get a neat boot menu (plus persistent storage position) from Ventoy. Like a scroll wheel on a mouse, there is no going back after having tried it.

      • Stopwatch1986@lemmy.mlOP
        link
        fedilink
        arrow-up
        2
        ·
        2 hours ago

        Amen. I took your advice and Ventoy really saved the day. Without it and its option 2 (grub2) no live USB booted.

      • SayCyberOnceMore@feddit.uk
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 hours ago

        Yeah, I don’t disagree, I just wanted to keep it focused on their partitions.

        Personally, I have everything I need on a persistent bootable Arch stick - that basically has everything to fix & rebuild any device I’m working on.

  • InFerNo@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    15 hours ago

    I would simply delete sda1 and sda2, then that whole part will be available as 1. Format as ext4.

    If you play games with steam you could then use it as a space to put games. Steam handles it for you. When you add a disk via Steam settings, it will be listed as an option.

    Moving partitions is a tedious task and doesn’t always pan out, I personally wouldn’t risk it. Let it be a thing to do if you would ever reinstall completely for whatever reason and start fresh then.

    Also, backup backup backup.

  • Kazumara@discuss.tchncs.de
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    12 hours ago

    I am assuming everything other than the two ext4 partitions will have to go.

    Your /dev/sda5 the FAT32 mounted at /boot/efi has to stay too! That’s your EFI System Partition, it’s essential for the boot chain.

    What you can do is delete the “Microsoft” directory that’s on there, but definitely keep the one named after your distribution!

  • ohshit604@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    13 hours ago

    Everything with a lock means it’s mounted and in use. sda1, sda2, sda3 and sda4 should be safe to format, however as others have mentioned, booting into a live environment is the best course of action as it lets you freely move or extend partitions.

    I suggest finding a thumb drive and flashing Gparted onto it.

    • ElectricWaterfall@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 hours ago

      The one word of caution here if the bootloader is stored in these partitions you mentioned in which case it could render their system unbootable which would require some fixing. The safest would be like another commenter mentioned to only format the ntfs partition after doing a backup of course.

  • Beangut@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    22 hours ago

    Personally I’d just boot into a live environment so the SSD isn’t in use, backup important things, then wipe windows partitions and resize /home to use the rest of the space on the disk

      • coolie4@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        22 hours ago

        You can freely move partitions/free space when the partition is unmounted. That’s why the last guy recommended a live disk, so that all your partitions would be unmounted.

        • SapphironZA@sh.itjust.works
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          21 hours ago

          It is worth noting you can only move partitions into a empty space larger enough for the full partition. Its a copy/delete process not a shift process.

          In this case it should work. Delete first two windows partitions. Then move the Linux boot to first part. Then move the root partition Then move the home partition Then finally expand the home partition to the rest of the disk.

          You will probably need to fix grub and do an initfs(?) Since the order of partitions have changed.

  • unexposedhazard@discuss.tchncs.de
    link
    fedilink
    arrow-up
    18
    arrow-down
    1
    ·
    edit-2
    1 day ago

    Careful with wiping anything with the “boot” flag. That can backfire very badly depending on how your system is set up. Those are small anyways so i would just leave them and only kill the ntfs partitions and combine that space into an extra partition that you can store stuff in.

    Resizing partitions is messy so if you want a clean setup with one big home partition i would just reinstall. You could also copy everything in the home partition to a backup drive and just try out resizing. If it breaks you can create a new home partition and copy everything back.

    • Stopwatch1986@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      I have been wondering about this. People recommend backing up /home and then reinstalling very casually, eg many recommend a new install when the new Debian stable is released every two years. My personal files and most of my user setup are stored in /home but wouldn’t many customisations be stored in /? I have been tweaking things for nearly a year to get everything working. I wouldn’t want to spend ages to reinstall applications (flatpaks and all) and re-create my working setup. People being so relaxed about nuking their setup tells me I may be missing something here.

      • IronKrill@lemmy.ca
        link
        fedilink
        arrow-up
        1
        ·
        2 hours ago

        Yeah there’s a fair bit outside of home people don’t mention. Basically any system-level stuff: fstab mounts, all your system packages, /opt installs, config tweaks you had to do. It tales some time to get set back up after a while on the same install.

        After having to reinstall a couple times myself I now don’t touch anything outside of /home by hand. It’s all scripted so that I can copy /home, run the script, and be back up and running. Well, theoretically, there’s usually a hiccup or two. But the peace of mind knowing it’s all (self) documenting is quite nice. Not for everybody of course.

      • sludgewife@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        5
        ·
        23 hours ago

        your customizations should usually go in /etc and /usr/local so you could back those up. your distro ought to have a guide on backing up your package selection. but yeah i don’t enjoy wiping everything and starting over

        • Stopwatch1986@lemmy.mlOP
          link
          fedilink
          arrow-up
          4
          ·
          23 hours ago

          ah, OK it’s not just me then. I find the prospect of having to reinstall Debian on my main work machine every two years is scary. I’d rather have the messy partitioning for the rest of my life :)

          • sludgewife@lemmy.blahaj.zone
            link
            fedilink
            English
            arrow-up
            4
            ·
            23 hours ago

            if it helps i’ve been using the same install of gentoo since 2007. the hard drives, cpu, ram, init system, and everything else changed but it’s still that same install. or is it? vsauce music

              • fushuan@piefed.blahaj.zone
                link
                fedilink
                English
                arrow-up
                1
                arrow-down
                1
                ·
                23 hours ago

                Honestly, those who reinstall constantly feel like people that don’t take care of their stuff as they should. There’s no need to reinstall.

                I’ve been thinking of reinstalling my endeavourOS install to arch just because at the point I’m at, it’s basically arch, but the system print shows endeavour, and low key pisses me off. It’s such an incredibly stupid reason to reinstall, I want everything just like I have it currently, but changing the files so they think the system is arch sounds… Something I definitely shouldn’t do. Dammit.

                • HaraldvonBlauzahn@feddit.org
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  edit-2
                  6 hours ago

                  Honestly, those who reinstall constantly feel like people that don’t take care of their stuff as they should. There’s no need to reinstall.

                  I’d take that with a pinch of salt. Over years, systems can get quite crufty and by my own experience, things like GNOME can break from upgrades even under Debian. A reinstall can tidy things up.

  • sun_is_ra@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    6
    ·
    23 hours ago

    The easiest solution is to format windows partition and mount it as separate mount point (for example /mnt/extra) and use it for storing any large files you have (movies, songs, books, photos, backups, downloaded files …)

    • Stopwatch1986@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      2 hours ago

      In the end, I went for something like this. I moved /home to the larger partition I created out of the Windows partitions and I will use the old, smaller /home as separate storage.

      The problem now is how I can remove Windows from the bootloader. There is no Windows partition left anyway.

  • BananaTrifleViolin@piefed.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    1 day ago

    Before you do anything, backup /home.

    You can reinstall your system while preserving and expanding your /home partition; this is probably the cleanest and safest way to sort your disk. It allows you to move the boot and filesystem partitions to the start of the disk while keeping /home untouched, and then separately resize /home to fill the rest of the drive. You could not reinstall and manually move the partition but it’s slow and riskier when messing with a boot and main filesystem partition; much easier to start again tbh.

    I’d get a USB and install Ventoy on it. Ventoy is a great bootable USB tool that lets you drop multiple different bootable ISOs on it (instead of reflashing the drive every time) & pick one at boot; great for installs and also to keep around as a recovery drive. I’d then put on it an ISO file of your preferred linux distro, and also a separate ISO file of a good live distro for recovery. GParted Live is particularly good USB live distro for this because resizing the partition is the aim, but almost any good USB Live Distro will do

    I’d then boot up the USB drive and select the ISO for your Linux distro’s installer. During install, in the partition section, I’d then use the partition tool in your installer. Dlete all the windows partitions (sda1, sda2, sda3 and sda4), and then delete the exisiting boot (/boot/efi) and root file system (/) and create new ones at the beginning of the disk: 1gb /boot/efi and 85gb / system partiton as you have now, and ensure the existing /home partition is kept and mounted as /home in the new install. You’ll have loads of free unpartitioned space; leave that for now.

    After the system is reinstalled, I’d boot in, check everything is ok, and then restart and boot the USB again, this time selecting GParted Live. Then with GParted Live, I’d resize the /home partition to fill all the empty space.

    But as I said, before you do anything, backup /home. Also before you do anything you can use a partition tool now (like KDE Partition or Gparted) to add a label/name to your /home drive so there is no confusion when you use use the Linux installer or Gparted later. But it should be clear from the size alone.

  • cmnybo@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    8
    ·
    1 day ago

    I would delete the first two partitions and put a new partition there to use as /home. Then expand / where /home was.

    It’s easy to expand a partition towards the end of the disk. I would not recommend expanding one towards the start of the disk. That would have to move all of the data. It’s slow and much more likely to cause problems.

    I wouldn’t suggest messing with a boot partition unless you are comfortable using a live boot disk to reinstall the bootloader if something goes wrong.

    • Stopwatch1986@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      2 hours ago

      I wouldn’t suggest messing with a boot partition unless you are comfortable using a live boot disk to reinstall the bootloader if something goes wrong.

      Repartitioning done but I still get the Windows option in the bootloader menu. It’s not the default so not a problem but it’s a little annoying.

    • Stopwatch1986@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      Yes, that looks safe enough. I am not sure what I would do with a 300GB / though. Isn’t that wasted space?

      • Tanoh@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        18 hours ago

        You could also actually just use it. Just because it is physically located on the root disk doesn’t mean you can’t add some directories and give your user full access to them.

        I usually have a /mnt/scratch, usually on another disk (hence mnt). Or you could make another steam library in /opt/. Steam can have multiple data locations.

        The purists might yell at you, but it is your system. If you have space to spare in root use it, just remember what is where if you need/want to reinstall at some point.

        Edit: or just nuke the NTFS partition, and use that partition as extra storage. Usually you don’t need that much in root, and if you do you can always symlink to another dir to get around it. Just remember to copy anything that might be useful from the ntfs! User/<foo> has a lot of data, I would copy at least that. Reading ntfs data is not a problem from linux, writing is more hit and miss.

      • cmnybo@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        3
        ·
        24 hours ago

        If you install a few Flatpak packages, it will fill it up quickly. You could also make a games directory.

  • db2@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    23 hours ago

    Boot a live image from USB, copy /home to a separate physical disk preserving ownerships and permissions, and save anything from the windows partitions that you want you keep. Once you’ve verified the copy is good delete all the original partitions on the screenshot.

    From here you install from scratch. You’ll appreciate it later when things aren’t a jumbled mess.

    If you have any kind of ssd install the OS to that instead, then use that spinning drive for /home. If you have two ssd drives do /home on the second one and use the spinning one for longer term storage like music or videos or the like.

    Also don’t put your swap partition on an ssd, use the spinning drive for it so you’re not wearing out the ssd. You can do a swap file instead of a partition if you miss the windows way. 😆

    • SapphironZA@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      ·
      21 hours ago

      I agree with this approach. It results in the cleanist install that does not require setting up everything from scratch.

      You can even backup your / as well if you want to copy some configs from the current install.

  • IsoKiero@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 day ago

    Well, moving partitions is at least a bit tricky and somewhat unreliable. So, unless you do a full repartitioning you will have sda1 with 520GB(ish). Current /home partition you can extend to fill the ~550MB from end of the drive.

    Then it’s up to you what you want to do with that 520GB. One option would be to build LVM (or zfs if you wish, LVM likely makes more sense on your case) setup from that and current /home partition and that way you could have ~850GB logical partition for home. Or you can just format the new sda1 as ext4 and mount it to /home/youruser/Media or whatever and have your home directory data split to two different partitions.

    But whatever you decide, when messing around with partitions make absolutely sure that your backups are in good shape. One small error somewhere and your data might be gone, or at very least you need to learn how to rebuild partition tables. Also when changing partitions check that your fstab uses UUIDs instead of device paths or your system may not boot cleanly. Broken fstab is fairly simple to fix, but it’s easier to check that while the system is up and running.

    • Stopwatch1986@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 day ago

      I’d rather have a single large /home partition, and the LVM method sounds less risky if I find out how to do it safely. I am sure I read somewhere that LVM is the clean way to manage partitions.

      I see my fstab says the following, so it’s UUIDs although I am not sure about that /swapfile:

      # / was on /dev/sda6 during installation
      UUID=9178d5fa-87a7-4e65-ba88-726f41c84186   /                        ext4   errors=remount-ro   0 1 
      # /boot/efi was on /dev/sda5 during installation
      UUID=0B9E-D68E                              /boot/efi                vfat   umask=0077          0 1 
      # /home was on /dev/sda8 during installation
      UUID=0a3aa38a-1673-4064-b573-9a090be7f3cb   /home                    ext4   defaults            0 2 
      # swap was on /dev/sda7 during installation
      # UUID=ca915564-2474-4399-ae6c-b4d9b73e69d1 none            swap    sw              0       0
      #
      # added swapfile
      /swapfile                                   none                     swap   sw                  0 0 
      /dev/sdb1                                   /media/myuser/backintime   ext4   nofail              0 0 
      
      • IsoKiero@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        15 hours ago

        Swapfile refers to a file at /. As long as you have rootfs there’s a place to put that swap file too, so no worries there. Usually there’s a separate partition for swap, but that works too.

        So, what you need to do is remove sda1 and sda2 windows partitions. That’ll leave you ~520GB of unallocated space at the start of the drive. Create a partition there and set it to ‘Linux LVM’ -type. Then create LVM ‘filesystem’ on that partition, or more accurately, assign that partition as an LVM physical volume with ‘pvcreate’. After that you need to create a volume group with ‘vgcreate’. Now you’ll have 520GB allocated to LVM. Create new partition for your home with ‘lvcreate’, use all the space if you like, but at least as big as your current consumption on /home. Then create an filesystem on it and mount it as /mnt/newhome (or whatever).

        Log out with your main user and make sure there’s no processes running on that user afterwards. Then you can copy data from current home to newhome and unmount the now old home (sda8). Change fstab so that your new home will be mounted on /home (blkid to get UUID and change that to fstab). Mount new home in it’s proper place, old home partition will be unmounted at this stage. Verify that everything works.

        Now you can change your current sda8, a.k.a. old home, to Linux LVM-type, assign that as LVM physical volume and extend your volume group with vgextend to include the another partition. And now with lvextend you can expand your brand new home directory to that ~850GB total.

        But, as I mentioned, make sure that you have your backups in good shape. These steps, if done incorrectly, will destroy your data. That’s also why I’m being somewhat vague on the instructions, you’ll need to understand what you’re doing. There’s plenty of information to push you in the right direction, but trust me, it’s better for you to take a minute or two and read documentation so that you’re actually confident on the steps.

        • Remus86@lemmy.zip
          link
          fedilink
          arrow-up
          2
          ·
          23 hours ago

          I don’t know if LVM acts the same as btrfs, but in order for my root snapshots to work, I couldn’t have the swapfile directly in /. It has to be made in /swap/swapfile to work. Just something to be aware of.

        • Stopwatch1986@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          23 hours ago

          It will take some reading but this sounds like a good long-term solution. Perhaps LVM should be the default. And there should be a live USB GUI method that would make the process less scary and safer. Thanks.

          • IsoKiero@sopuli.xyz
            link
            fedilink
            English
            arrow-up
            1
            ·
            15 hours ago

            Oops. I had a wrong command there at the start on text, vgcreate is for creating volume group, not lvcreate. I edited it. That would just be a syntax error of sorts, nothing would happen with a wrong command.

            USB GUI method is called ‘installer’ ;) Messing around with partitions is inherently a dangerous thing to do, no matter if you use a GUI or CLI. Today tools like fdisk or parted are pretty good at protecting yourself from yourself, but it’s still just one wrong command and your partition table is broken which will be a pain in the rear to fix.

            About the default setting, there’s plenty of reasons to not choose LVM, even if it is pretty neat. For example if you have a smaller drive on a laptop it usually doesn’t add much to even have multiple partitions at all. And also LVM has a small overhead compared to ‘raw’ partitions, so if you need to squeeze the last drop of disk-io out of the system LVM might not be the right choise. Or you might prefer zfs or brtfs. All solutions have their own pros and cons.

  • adarza@lemmy.ca
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 day ago

    that is an odd layout, even for a windows system with linux added later.

    what’s the actual order of the partitions on disk?