99
submitted 1 month ago* (last edited 1 month ago) by Stopwatch1986@lemmy.ml to c/linux@lemmy.ml

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!

top 50 comments
sorted by: hot top controversial new old
[-] unexposedhazard@discuss.tchncs.de 23 points 1 month ago* (last edited 1 month 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.ml 3 points 1 month 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.

[-] sludgewife 6 points 1 month 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.ml 4 points 1 month 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 5 points 1 month 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

[-] Stopwatch1986@lemmy.ml 5 points 1 month ago

Very reassuring. The Ship of Theseus approach has been working for me for decades.

[-] fushuan@piefed.blahaj.zone 2 points 1 month 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 1 points 1 month ago* (last edited 1 month 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.

load more comments (3 replies)
load more comments (1 replies)
[-] diaphragmwp@discuss.tchncs.de 13 points 1 month ago* (last edited 1 month 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 sda2 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)
[-] whatiswrongwithyou@lemmy.ml 9 points 1 month 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.

[-] Cyber@feddit.uk 9 points 1 month ago* (last edited 1 month 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 4 points 1 month ago* (last edited 1 month 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.ml 4 points 1 month ago

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

load more comments (1 replies)
[-] cmnybo@discuss.tchncs.de 8 points 1 month 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.ml 2 points 1 month 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 2 points 1 month ago* (last edited 1 month 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.

load more comments (1 replies)
[-] Stopwatch1986@lemmy.ml 2 points 1 month 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.

[-] cmnybo@discuss.tchncs.de 2 points 1 month ago

It still shows up because the windows boot partition is still there.

If you're using grub, you can add GRUB_DISABLE_OS_PROBER=true to /etc/default/grub and run update-grub. That will remove other operating systems from the grub boot menu.

[-] Stopwatch1986@lemmy.ml 2 points 1 month ago

This did it. Previously /boot/grub/grub.cfg mentioned Windows on sda3 but now it doesn't. The partition is still there of course but at least I don't see the grub menu entry. Many thanks!

[-] ohshit604@sh.itjust.works 8 points 1 month ago* (last edited 1 month 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 1 points 1 month 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 8 points 1 month 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

[-] Stopwatch1986@lemmy.ml 2 points 1 month ago

How would you resize /home upwards with /boot/efi standing in the middle?

[-] coolie4@lemmy.world 6 points 1 month 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 4 points 1 month ago* (last edited 1 month 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.

[-] IsoKiero@sopuli.xyz 6 points 1 month 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.ml 1 points 1 month 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 2 points 1 month ago* (last edited 1 month 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 2 points 1 month 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.

load more comments (2 replies)
[-] InFerNo@lemmy.ml 6 points 1 month 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.

[-] sun_is_ra@sh.itjust.works 6 points 1 month 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.ml 2 points 1 month 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.

[-] sun_is_ra@sh.itjust.works 1 points 1 month ago

It depends how your boot is setup

If you intially get the uefi boot (usually black screen) then try to search "removing entries from uefi boot in Linux"

If you directly get colorful screen then it could be grub and in this case u search for grub instead of uefi

But it also could be something else that is neither grub nor uefi, you really need to find out first what is your bootloader

[-] Stopwatch1986@lemmy.ml 2 points 1 month ago

Apparently, the easy way is to install Grub Customizer, but I don’t like PPAs so I disabled the OS Prober instead. The partition is still there but at least I don't see the grub entry.

[-] db2@lemmy.world 4 points 1 month 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 2 points 1 month 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.

[-] adarza@lemmy.ca 4 points 1 month 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?

[-] morto@piefed.social 3 points 1 month ago

The sda1 and sda2 partitions seem safe to format. Just be sure that you really copied everything you need from there. Like others said, better not to mess with the boot partitions

If you want to increase the space of the linux partitions, insead of creating a new extra partition, that may be a bit tricky in that layout, but one thing you can do is (from a live boot) is:
1- delete both windows partitions and create a new ext4 one with ~530gb
2 - clone your /home partition into there and change the fstab to point to the new partition
3- manually check if all your files were safely copied, just to be sure
4 - delete the old /home and expand the size of the / partition into it

you will end with a / partition with ~300gb and a /home of ~530gb

[-] Stopwatch1986@lemmy.ml 3 points 1 month ago

This looks fairly straightforward. I have done (1) already. It's not great that / will be that big, wasting around 200GB but the setup is definitely better than now and the risk is minimal.

Generally, it's as simple as just deleting the Windows NTFS partition. I would leave the others for now. Depending on how you installed your distro they may be related to your Linux installation. Deleting them could prevent you from booting into your Linux installation.

I'm not as familiar with UEFI as BIOS, but I believe UEFI uses a FAT formatted partition for booting into the OS proper.

You may need to adjust the boot order in your UEFI/BIOS afterwards to get it to boot back to Linux afterwards, but that is fairly uncommon in my experience.

The most likely issue you might run into is accidentally wiping your active Linux partition instead of the Windows one.

I would make backups and have your distros install disk handy before you wipe the partitions.

Afterwards, you can resize your linux root to include the now free space or move your home directory to the new partition after formatting it. Your call.

load more comments (1 replies)
[-] AnUnusualRelic@lemmy.world 3 points 1 month 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.

[-] waigl@lemmy.world 2 points 1 month ago

Unfortunately, your existing /home and the ntfs partitions you could remove are in completely non-contiguous regions, so you cannot easily just combine the space. If I were you, I would switch to LVM piece-meal. Ideally, you'd have some other medium were you can temporarily store the current contents of /home while your repartition the drive. Then combine sda2 and sda7 into a volume group and pull just one logical volume out of it for the new /home.

Otherwise, create a new volume group with only sda2 in it (just overwrite the existing ntfs filesystem) using vgcreate, create a logical on top of that using lvcreate, make a filesystem in that using mkfs.ext4, I would add the -m 0 parameter for a non-root filesystem, mount that somewhere under /mnt/, move or copy over all the contents from /home to that mountpoint, taking care to replicate file owners and permissions (I would just use cp -a), then once this is done (and you've double-checked that it is because at the next step you can lose data if you're not careful), umount /home, extend the volume group to include sda7 using vgextend, enlarge the logical volume for the new /home to the maximum using lvresize, enlarge the ext4 filesystem in there to the maximum possible using resize2fs, finally editing /etx/fstab to use that new logical volume as /home and remounting /home.

[-] Stopwatch1986@lemmy.ml 2 points 1 month ago

I think that's a good plan. With a backup, moving step-by-step and some reading it's difficult to get it horribly wrong. If the new /home doesn't work while the old /home is unmounted, I will just have to backtrack. Minimising risk sounds like a project though.

[-] Ooops@feddit.org 2 points 1 month ago

The fat32 formated partitions are EFI System Partitions used to boot your PC. I assume that sda3 is the one Windows created, while a later Linux install created sda5 as an alternative. Yet sda5 doesn't seem to be really used (with that cute 9MB used), so your Linux boot stuff -including a bootloader that would allow you to start Windows (or you picking directly from EFI?)- is probably all sitting alongside Windows' EFI stuff in sda3.

In fact I wouldn't touch anything there without some backup.

[-] Stopwatch1986@lemmy.ml 1 points 1 month ago

I have changed the partitions and all seems to work but I still get the bootloader menu with the Windows option even though there is no Windows partition. Not a huge problem, but it is a little annoying I can't remove references to Windows without risking breaking my setup.

[-] Kazumara@discuss.tchncs.de 2 points 1 month ago* (last edited 1 month 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!

load more comments
view more: next ›
this post was submitted on 04 Jul 2026
99 points (100.0% liked)

Linux

67077 readers
541 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS