More Gparted problems. [SOLVED]

Message
Author
Stuart_M
Posts: 695
Joined: Wed Aug 07, 2019 7:10 pm

Re: More Gparted problems. [SOLVED]

#41 Post by Stuart_M »

I am not sure swap files as opposed to a dedicated swap partition is a good option. I have seen some information saying that it should be on its own dedicated partition.

One post you may want to look at is by user "p.H" http://forums.debian.net/viewtopic.php?p=706232#p706232 (20 August 2019) who said
Do think twice before doing that. Linux was designed to use raw block devices as swap space, and still is. Using swapfiles with Linux is a hack. A dirty one. It does not work natively on filesystems types which do not allow to map files to physical blocks, use copy-on-write, and so on ; making it work natively on some of them (NFS, Btrfs) has required heavy intrusive kernel patching. The only clean way to use a swap file would be through a loop device, which incurs a performance penalty.
I have heard both ways, that swap files are just as good as dedicated partitions, and that users have good results with a swap file vice partition.

I prefer a dedicated swap partition - just another point of view.

tony37
Posts: 1306
Joined: Sat Jul 18, 2020 12:34 pm

Re: More Gparted problems. [SOLVED]

#42 Post by tony37 »

Sparky wrote: Sun Sep 27, 2020 5:59 pmDid it!
Nice.
It would have surprised me if Gparted would really have erased your main partition if you just chose to shrink it, but I can't guarantee of course. Anyway, partitioning is always a bit tricky, just making a file feels a lot safer (as long as there is enough space for it and you don't enter too many zeroes after 'count=').
When you get to the point that swap is heavily being used, it's time to close some applications anyway as swap is not a real substitute for RAM, it just functions as a bit of a safety measure, but when a lot of swap is being used your pc becomes unworkably slow anyway. At least in my experience.

tony37
Posts: 1306
Joined: Sat Jul 18, 2020 12:34 pm

Re: More Gparted problems. [SOLVED]

#43 Post by tony37 »

Stuart_M wrote: Sun Sep 27, 2020 6:25 pm I am not sure swap files as opposed to a dedicated swap partition is a good option.
If the OP would have used hibernation, then I would have been more cautious about using a swap file.
I think Linux Mint uses a swap file by default now, so it can't be that outlandish.

User avatar
tascoast
Posts: 503
Joined: Sat Aug 06, 2011 4:58 am

Re: More Gparted problems. [SOLVED]

#44 Post by tascoast »

I like having a 'data' partition, so that rearranging a drive with Gparted becomes easier. I have moved partitions few times without errors and find Gparted reliable, warnings of potential data loss aside.

Having spent some time setting up and modifying multiple partitions on several drives there are some tricks and strategies you can adopt to move, resize, create... with minimal juggling, such a keeping free target space to the right etc. It's really helpful to size partitions in multiples of 1,024, I think, if you want a precise 20GB root/30MB home, a rough target I go for (having big files in a 'data' partition). You can even try to create partitions in a specific order to get sda1, sda2, sda2...in the sequence you prefer, although labeling partitions in Gparted is probably the most effective way to keep things manageable in Thunar etc, where partitions become easily identifiable.
Inspiron 15 5000-5593- (i7-1065G7) MX 23..2 AHS/MX-21//W10 - Lenovo ThinkCentre A58 4GBRAM (64-bit), MX-23.2/MX21.3./antiX 23/Mint 21.3, Ubuntu 22.04.4, openSUSE Tumbleweed,

User avatar
Sparky
Posts: 1205
Joined: Sun Dec 23, 2018 6:07 pm

Re: More Gparted problems. [SOLVED]

#45 Post by Sparky »

This is correct for fstab right?

Code: Select all

UUID=2f851df4-e0ec-425b-8944-8276cf36f4e0 / ext4 defaults 1 1
UUID=db352309-b3e7-4d6b-83bd-2ef92cd8dac1 swap swap defaults 0 0 
/swapfile    none    swap    sw    0    0
MX Linux Asus F552, 12GB RAM, 500GB WD SSD MX19.2
Dell Inspiron 7559 16GB RAM 1X 256GB SSD & 1TB SSD MX KDE 21.1 & Windows 11
Mini Tower PC 2X 256GB SSD MX KDE21.1

tony37
Posts: 1306
Joined: Sat Jul 18, 2020 12:34 pm

Re: More Gparted problems. [SOLVED]

#46 Post by tony37 »

That second entry is of your disappeared swap partition, didn't you already delete that?
The rest is ok.

User avatar
Sparky
Posts: 1205
Joined: Sun Dec 23, 2018 6:07 pm

Re: More Gparted problems. [SOLVED]

#47 Post by Sparky »

Code: Select all

UUID=2f851df4-e0ec-425b-8944-8276cf36f4e0 / ext4 defaults 1 1 
/swapfile    none    swap    sw    0    0
Thanks!
MX Linux Asus F552, 12GB RAM, 500GB WD SSD MX19.2
Dell Inspiron 7559 16GB RAM 1X 256GB SSD & 1TB SSD MX KDE 21.1 & Windows 11
Mini Tower PC 2X 256GB SSD MX KDE21.1

User avatar
Sparky
Posts: 1205
Joined: Sun Dec 23, 2018 6:07 pm

Re: More Gparted problems. [SOLVED]

#48 Post by Sparky »

tascoast wrote: Sun Sep 27, 2020 6:49 pm I like having a 'data' partition, so that rearranging a drive with Gparted becomes easier. I have moved partitions few times without errors and find Gparted reliable, warnings of potential data loss aside.

Having spent some time setting up and modifying multiple partitions on several drives there are some tricks and strategies you can adopt to move, resize, create... with minimal juggling, such a keeping free target space to the right etc. It's really helpful to size partitions in multiples of 1,024, I think, if you want a precise 20GB root/30MB home, a rough target I go for (having big files in a 'data' partition). You can even try to create partitions in a specific order to get sda1, sda2, sda2...in the sequence you prefer, although labeling partitions in Gparted is probably the most effective way to keep things manageable in Thunar etc, where partitions become easily identifiable.
Aren't you limited by 4 partitions in MBR?
If I hadn't deleted my SWAP by accident, I'd be able to create a new partition, but with the 1, even Live Gparted gave me a warning of potential data loss to my MX install (the 1 and only partition). I keep Timeshift updates, but I have so many apps and downloads, that reinstalling MX would be a pain.
MX Linux Asus F552, 12GB RAM, 500GB WD SSD MX19.2
Dell Inspiron 7559 16GB RAM 1X 256GB SSD & 1TB SSD MX KDE 21.1 & Windows 11
Mini Tower PC 2X 256GB SSD MX KDE21.1

tony37
Posts: 1306
Joined: Sat Jul 18, 2020 12:34 pm

Re: More Gparted problems. [SOLVED]

#49 Post by tony37 »

Sparky wrote: Mon Sep 28, 2020 12:11 pm Aren't you limited by 4 partitions in MBR?
In principle, yes, but in MBR you can create an 'extended' partition in which you can create as many 'locigal' partitions as you want.
Sparky wrote: Mon Sep 28, 2020 12:11 pmIf I hadn't deleted my SWAP by accident, I'd be able to create a new partition, but with the 1, even Live Gparted gave me a warning of potential data loss to my MX install (the 1 and only partition).
Gparted always warns about potential data loss, even if you want to simply change a label. So by all likelihood, creating a swap partition would have gone just fine.

User avatar
Sparky
Posts: 1205
Joined: Sun Dec 23, 2018 6:07 pm

Re: More Gparted problems. [SOLVED]

#50 Post by Sparky »

So I know for the next time, what should I use instead of MBR?
What If I want MX, MX-KDE- and another distro on the same computer?
MX Linux Asus F552, 12GB RAM, 500GB WD SSD MX19.2
Dell Inspiron 7559 16GB RAM 1X 256GB SSD & 1TB SSD MX KDE 21.1 & Windows 11
Mini Tower PC 2X 256GB SSD MX KDE21.1

Post Reply

Return to “Software / Configuration”