Gparted Vm

0 views
Skip to first unread message

Annegret Haldiman

unread,
Aug 3, 2024, 3:13:59 PM8/3/24
to guigrimcentpres

This one can be corrected with xhost, but ideally I would have liked a solution less dangerous security-wise than xhost si:localuser:root && sudo sudo; sudo gparted & sleep 1 && xhost -si:localuser:root, and it takes root environment who is, if not already configured, quite not adapted to graphical parameters of the current user WM

In new versions of ubuntu, gparted seems to take a long time shrinking and expanding partitions. I guess it's because it moves fragmented spaces and moving is very time-consuming, so the overall time of shrinking or expanding a partition is shrinking or expanding time plus time taken in moving fragmented spaces. That is huge if we are expanding or shrinking a big partition.

The problem with this is that it requires the file system to be in a definitiely clean state - otherwise, the resize operations (especially shrinking) would destroy data. While this is relatively easy to ensure for the typical Linux file systems (GParted brings the tools required to check and fix them with it on the Live media), it is not so easy for third-parts file systems like NTFS: For these file systems, you often need to boot the "native" operating system for these file systems and perform some magic there. In addition to this, even some of the Linux file systems can not be moved this way, since there is no known way to shrink them (jfs / XFS / Reiser4) - and to enlarge them, they need to be mounted, and growing must be done on-line (jfs / XFS). Depending on your machine, this is not a very clever idea - maybe you perform the resize operations on a system with very little RAM (and modern file systems can consume huge amounts of memory).

First, you shouldn't be resizing partitions on a regular basis. In addition to being a time-consuming operation, partition resizing is risky. This is especially true if the partition resize involves adjusting the start point of the partition, which requires a great deal of the filesystem's data to be rewritten. A power failure, a bug, a system crash, or some other problem can cause damage to the filesystem that will be difficult or impossible to fix. Thus, you should resize partitions only if doing so is absolutely necessary; and when you do resize partitions, you should be prepared to lose all the data they contain. If that data is irreplaceable, you should make a backup before resizing the partition.

Second, if for some reason you need to resize partitions frequently, you should look into logical volume manager (LVM). This enables you to treat filesystems something like files, so that you can add, remove, shrink, and grow them without worrying about start and stop points. This means that you'll never have to adjust a filesystem's start point, thus taking some of the danger out of the process. Unfortunately, Ubuntu's LVM support is weak, especially for desktop editions. LVM is also more complex than using partitions directly, so it'll take some learning, and the complexity can make recovery more difficult should something go wrong. Still, if you need to juggle your partitions a lot, LVM can be a net plus.

whenever i try to install gparted via the webui it starts the download and then just freezes (the terminal window displayed on the ui). It never finishes even when left alone for a few hours. I can not find any errors in the syslog. Is there a way to do the same from cli (as in integrate into grub and the webui)?

i see. i remember it working in omv 5 but that was running bare metal. just to be sure: i am talking about the webui setting to install it as a boot option - you could select to boot gparted instead of omv via grub

My experience is that when gparted takes a long time, the problem is always that there is something wrong with the medium. In fact, I use it as one of my tests when someone reports problems with a medium.

Now, for someone like me, installing Gparted after installation is no big deal. But, for a new user, wanting to resize and add extra partitions, I fail to see how gnome disks makes this easier or, even, is simply as easy as Gparted.

I agree, additionally having gparted in the live session is nice since one usually makes changes to partitions using a live session. Gnome disks could be seen as a replacement of the ubuntu disk creator but not gparted IMO.

On the other hand, I am quite happy to be shown how I have hitherto missed an easy to use method of disk partitioning in Disks, as compared to Gparted. In which case, the removal of Gparted would make some sense. So, if anyone would like to post an explanation of that easy method on here, I would appreciate it.

I agree with @stevecook172001 about this being an environment where partitioning is used the most. Especially if we consider dual boot users or even Windows power users who know about partitioning, but are new to Ubuntu.

Thank you for reconsidering this Martin. It seems a good compromise to have it only on the live session since, as has already been mentioned, if someone wants it on their installed OS, they can always install it after the fact of OS installation.

Personally I like both tools, but for different reasons. If I am giving someone less on the tech side of things, I make sure they have disks. At most, people need to ID a device as the one they want to work with and at most, install a single partition maybe two? onto a disk of some sort. My experience says those people are going to be using external hard drives and flash drives for backing up. If I am going to do something more complex with a disk that command line tools are not going to be fast enough for, I always default to gparted. Most of my gparted usage on a monthly basis is going to be for data recovery or repair of corrupted data on customer drives. In that case gparted is my tool of choice. I prefer the data overload on the screen to make sure I am certain I did the right thing before applying the changes

hi, sorry to ask again, installed fedora 37 with cinnamon DE, installed gparted, tried from software center, terminal and dnfdragora, all seem to install, appears in menu, but when trying to start it says requires root priviledges and will not start, does not ask for pw, fails in terminal also. i did some searching, maybe something to do with policies, everything else seems to work fine ( have used cinnamon for years with mint and ubuntu remix, so quite familiar with it, second time trying fedora so not much experience there)

t hank you for the replies, yes I got it running in terminal now, but still wont run from cinnamon menu. not sure what I did, reinstalled it a couple different ways and it finally ran with root privileges. anyway, I 'll wait for an update now that it runs from terminal. tks for the suggestions.

On gnome it pops up the authentication window. The password I use is my user password since that actually seems to use sudo for authentication. No root password required, only the users password. (The user must be able to use sudo!)

I, too, am running f37 Workstation, fully updated, and using Gnome. When I try to run gparted from the launcher, I now get a popup panel informing me that it now must be started as root; it no longer prompts for a password to allow sudo.

This change does not seem reasonable on workstation which by default has no root access except with sudo and the change makes it harder for the average user to manage the system. The earlier method seems to provide the same security.

Over the past year or so there have been a few times where I've need to expand a disk attached to a Debian system. Now this isn't a hard task by any means, and may not even warrant a blog post, but the matter of it is that I always seem to forget the steps I need to take to get that unallocated space that I've added next to my actual EXT3 partition since the swap partition is always in the way! So, I thought I would just throw up how I've done it in the past in hopes to maybe help a few others that visit, but more-so for myself and my memory (or lack there of). Now keep in mind I'm sure there are ways to perform this exact same thing without taking the VM online, or I'm sure there are other 'better' ways to achieve the same results, but this way has worked for me consistently so it's what I chose to do. Any other suggestions are certainly welcome in the comment box below.

First, resize your extended partition (not the one labeled linux-swap) to include the free space. In my case this is done by selecting /dev/sda2 and then selecting the Resize/Move button. In the popup, simply drag the arrow on the right side of the bar to include all of the free space available and again select Resize/Move.

Just to note, we are not actually performing and moves or resizes at this point, we are simply just creating a chain of commands that gparted will follow once it is applied. You can either apply at the end of each step, or wait till the bitter end and do it, its up to you. Either way when you are done, you should see your unallocated space move into /dev/sda2 as shown below.

So, as you can see from the screen capture, the next thing we need to do is move that swap partition to the end of /dev/sda2. This will allow us to proceed with the next few steps that we need to perform in order to accomplish our end goal of expanding /dev/sda1. This time we will need to select the linux-swap partition (/dev/sda5) and select Resize/Move. Inside the popup, this time click the actual white space inside the partition and drag the complete box over to the right (don't use the arrows). This will move the swap partition to the end of /dev/sda2 for us which we will next resize. Once your looking like the below images, again, click 'Resize/Move'.

Alright, now we are getting somewhere, you should be looking pretty similar to the shot below by now. And yes you guessed it, now we need to move that unallocated space right outside of /dev/sda2 in order to make it available for the expansion of /dev/sda1.

So, once again select /dev/sda2 and select 'Resize/Move'. This time we will use the arrows. What we want is to move the left arrow this time to the right all the way over to edge of the yellow box (swap). This will resize the complete /dev/sda2 to the same size as the swap it contains (/dev/sda5) and in turn, create that unallocated space in between the partitions. Once done, click 'Resize/Move'.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages