When starting gparted “Gtk-WARNING **: cannot open display:”
This is exactly my problem. running ubuntu server 12.04. sorry I couldn't find a way to mark the thread "unanswered".
Resize a 2TB partition on a 3TB disk created with fdisk
I downloaded and installed gparted - however I get an errors when trying to run it. can you guys help me? my terminal output is below:
keysersoze@the-usual-suspects:/$ sudo gparted /dev/sda
(gpartedbin:18064): Gtk-WARNING **: cannot open display:
keysersoze@the-usual-suspects:/$
note that I am fairly new to linux. thanks for your patience.
partitioning gparted
add a comment |
This is exactly my problem. running ubuntu server 12.04. sorry I couldn't find a way to mark the thread "unanswered".
Resize a 2TB partition on a 3TB disk created with fdisk
I downloaded and installed gparted - however I get an errors when trying to run it. can you guys help me? my terminal output is below:
keysersoze@the-usual-suspects:/$ sudo gparted /dev/sda
(gpartedbin:18064): Gtk-WARNING **: cannot open display:
keysersoze@the-usual-suspects:/$
note that I am fairly new to linux. thanks for your patience.
partitioning gparted
gparted is a gui, so you should be launching it from command line with gksudo or gksu. But if you have 2TB that is MBR(msdos) you may need to convert to gpt(GUID). You can use gdisk for conversion as well as setting up partitions.
– oldfred
Sep 5 '13 at 22:51
add a comment |
This is exactly my problem. running ubuntu server 12.04. sorry I couldn't find a way to mark the thread "unanswered".
Resize a 2TB partition on a 3TB disk created with fdisk
I downloaded and installed gparted - however I get an errors when trying to run it. can you guys help me? my terminal output is below:
keysersoze@the-usual-suspects:/$ sudo gparted /dev/sda
(gpartedbin:18064): Gtk-WARNING **: cannot open display:
keysersoze@the-usual-suspects:/$
note that I am fairly new to linux. thanks for your patience.
partitioning gparted
This is exactly my problem. running ubuntu server 12.04. sorry I couldn't find a way to mark the thread "unanswered".
Resize a 2TB partition on a 3TB disk created with fdisk
I downloaded and installed gparted - however I get an errors when trying to run it. can you guys help me? my terminal output is below:
keysersoze@the-usual-suspects:/$ sudo gparted /dev/sda
(gpartedbin:18064): Gtk-WARNING **: cannot open display:
keysersoze@the-usual-suspects:/$
note that I am fairly new to linux. thanks for your patience.
partitioning gparted
partitioning gparted
edited Apr 13 '17 at 12:23
Community♦
1
1
asked Sep 5 '13 at 21:46
seraphseraph
19112
19112
gparted is a gui, so you should be launching it from command line with gksudo or gksu. But if you have 2TB that is MBR(msdos) you may need to convert to gpt(GUID). You can use gdisk for conversion as well as setting up partitions.
– oldfred
Sep 5 '13 at 22:51
add a comment |
gparted is a gui, so you should be launching it from command line with gksudo or gksu. But if you have 2TB that is MBR(msdos) you may need to convert to gpt(GUID). You can use gdisk for conversion as well as setting up partitions.
– oldfred
Sep 5 '13 at 22:51
gparted is a gui, so you should be launching it from command line with gksudo or gksu. But if you have 2TB that is MBR(msdos) you may need to convert to gpt(GUID). You can use gdisk for conversion as well as setting up partitions.
– oldfred
Sep 5 '13 at 22:51
gparted is a gui, so you should be launching it from command line with gksudo or gksu. But if you have 2TB that is MBR(msdos) you may need to convert to gpt(GUID). You can use gdisk for conversion as well as setting up partitions.
– oldfred
Sep 5 '13 at 22:51
add a comment |
6 Answers
6
active
oldest
votes
Continue on your own risk
(Please, go to the next section if you want a more secure method to resize ext partitions)
The tool you are looking for is parted
which is the backend for gparted, also you must make sure that your partition table is GPT, if it's MBR it won't support partitions bigger than 2TB.
This method is only for non-mounted partitions, so you might like to do a backup too if something go wire.
First open
parted
braiam@bt:~$ sudo parted
[sudo] password for braiam:
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
Now that you are here, you must make sure what driver you want to modify. As you see, I'm using
sda
, if what you want is usesdb
orsd-something
you must useselect
:
(parted) select
New device? [/dev/sda]? /dev/sd
sda sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8 sdb sdc sdd sde sdf sdf1 sdf2
New device? [/dev/sda]? /dev/sdf
Using /dev/sdf
(parted)
List all the partitions with
print /dev/sdf
:
(parted) print /dev/sdf
Model: SanDisk Cruzer (scsi)
Disk /dev/sdf: 8040MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.8kB 2418MB 2418MB primary boot, hidden
2 2418MB 8039MB 5621MB primary ntfs
Let assume that my NTFS partition is empty for now. Now I want to grow partition number one (notice that my partition table says
msdos
in your case it should saygpt
).
Now comes the truth hour. Using
resize
we must set the partition number one to use all the disk, how we do this?
resize NUMBER START END resize partition NUMBER and its file system
Hence, number should be
1
, start should be the same32.8kB
and the end should be8039MB
(remember that you should change the numbers, since I don't have a >1TB drive).
resize 1 32.8kB 8039MB
WARNING: you are attempting to use parted to operate on (resize) a file system.
parted's file system manipulation code is not as robust as what you'll find in
dedicated, file-system-specific packages like e2fsprogs. We recommend
you use parted only to manipulate partition tables, whenever possible.
Support for performing most operations on most types of file systems
will be removed in an upcoming release.
Nice warning, continue reading.
The recommended method? e2fsprogs? but I don't have that!
Seems that the message is quite old, and e2fsprogs
is not called like that anymore (the package keep its name, through), but resize2fs
. This program is capable of resize any ext2/3/4 filesystem. Cool! Now how I do it? Simple:
sudo resize2fs /dev/sdf1 8039M
(Remember that the size is the current size + the size you want to add)
Here you could use M for Megabytes, G for Gigabytes. You should also verify for errors:
sudo e2fsck -f -p /dev/sdf1
Done.
The resize command will fail because as the warning says, parted's filesystem manipulation code is old and broken. You also don't want to specify a size toresize2fs
and let it assume the maximum available.
– psusi
Sep 13 '13 at 13:41
@psusi I'm not letting resize2fs assume maximum available because OP wants a specific size, also, I'm in no way recommending parted over other tool, as it says at the beginning "Please, go to the next section if you want a more secure method to resize ext partitions". I'm only telling him thatparted
is not the way to go and why.
– Braiam
Sep 13 '13 at 13:52
You can't resize the filesystem until after you have resized the partition holding it. Tryingresize2fs
and specifying the size without first enlarging the partition will just throw an error saying it isn't large enough. Once you have changed the size of the partition, it is best to omit the size toresize2fs
so it will automatically fill the whole partition.
– psusi
Sep 13 '13 at 14:08
add a comment |
The trick here is to use an Xserver on another machine to display the GUI elements you can't see on a server. Set the environment variable to the local machine running the Xserver. Where this is an IP address and the screen # on the X server.
export DISPLAY="192.168.1.5:0"
then run :
sudo gparted
With another Ubuntu machine you will need to change firewall rules to allow this. Using windows you can do this with MobaXterm which runs a local X server.
It didn't work for me.(gpartedbin:16598): Gtk-WARNING **: cannot open display: 192.168.1.200:0
– Ali Yousefi Sabzevar
Oct 17 '17 at 9:03
add a comment |
As David pointed out, gparted
is a gui application, so you won't be able to use it on a server without a gui. You will need to use parted
to manipulate partitions on the command line. It can not directly resize partitions however. Instead you will have to delete the existing partition and recreate it with the exact same start position, but a longer length, and then run another tool to resize the filesystem inside the partition.
First you need to put it into sector mode with the unit s
command and print
the existing table. Use rm 1
to remove the partition, then mkpart
to create a new one. Specify the same starting sector it had before, then specify the end. You can do that in a form like "+2500G" for 2,500 GB from the start rather than having to specify the exact sector. quit
when done, then run sudo resize2fs /dev/sda1
. This is assuming the partition is number 1 on the first disk in the system.
If the partition is mounted at the time, then in 12.04 you will get an error trying to change it with parted
and will have to reboot for the change to take effect before using resize2fs
.
add a comment |
gparted
is a graphical application for managing partitions.
The error you see above is because gparted
is trying to open a graphical console, but since this is Ubuntu server there is no graphical display.
Some options:
You can use command line partitioning tools such as fdisk
or sfdisk
. These are harder to drive, so read the manual carefully.
Alternately, if you have another machine running ubuntu desktop, you can use ssh -X
from that machine to the server to log in with X11 forwarding. In that shell you can run gparted
and it should display on the desktop machine - although you will probably have to tweak the ssh
configs a bit and install some X11 programs on the server to get it all working.
1
You will need to useparted
sincefdisk
andsfdisk
don't understand GPT, which is needed on disks > 2 TB.
– psusi
Sep 5 '13 at 23:55
Is that still that case? I used fdisk and sfdisk to partition two 3TB disks on Monday and it seemed to work fine.
– David Purdue
Sep 10 '13 at 23:55
Yep.. if you did that then you're only using 2TB of the disk. Or technically I think you can make a 1TB partition then a second one that starts at 1TB and is 2TB long.
– psusi
Sep 11 '13 at 1:00
Ok, so the single partition on the drive is 2TB. Why does pvdisplay say the partition is 2.73 TB? Why does vgdisplay reckon I have over 2.5TB allocated to volumes?
– David Purdue
Sep 11 '13 at 6:34
Just repartitioned the disk as GPT with gparted - ended up with exactly the same amount of space.
– David Purdue
Sep 11 '13 at 7:34
|
show 3 more comments
Is simple, put this commands in console:
sudo touch .Xauthority
sudo xauth merge ~name_of_user/.Xauthority
export DISPLAY=:0.0
sudo gparted
*change name_of_user to your login user
sudo touch .Xauthority sudo xauth merge ~name_of_user/.Xauthority export DISPLAY=:0.0
– Rafael Duarte
Jul 28 '17 at 20:47
add a comment |
I was having same trouble. The error message said I was in trouble because of some 'MIT-Magic-Cookie-1'. None of the above advice helped, but I figured out it was all about root, server and desktop complications, because I had an upgrade from zesty to artful before. Some packages were removed of course.
Here is what solved my problem:
- Create user root.
- Login as user root, ...this worked out for me pressing the keyboard combination Ctrl+Alt+F2
- From the terminal simply:
startx
- Super key and look for GParted.
I believe this is an ideal solution to switch between the X-server and wayland/mir. If you want to return back to your previous account, logout from X Window and terminal, press Ctrl+Alt+F1.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f341937%2fwhen-starting-gparted-gtk-warning-cannot-open-display%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
Continue on your own risk
(Please, go to the next section if you want a more secure method to resize ext partitions)
The tool you are looking for is parted
which is the backend for gparted, also you must make sure that your partition table is GPT, if it's MBR it won't support partitions bigger than 2TB.
This method is only for non-mounted partitions, so you might like to do a backup too if something go wire.
First open
parted
braiam@bt:~$ sudo parted
[sudo] password for braiam:
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
Now that you are here, you must make sure what driver you want to modify. As you see, I'm using
sda
, if what you want is usesdb
orsd-something
you must useselect
:
(parted) select
New device? [/dev/sda]? /dev/sd
sda sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8 sdb sdc sdd sde sdf sdf1 sdf2
New device? [/dev/sda]? /dev/sdf
Using /dev/sdf
(parted)
List all the partitions with
print /dev/sdf
:
(parted) print /dev/sdf
Model: SanDisk Cruzer (scsi)
Disk /dev/sdf: 8040MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.8kB 2418MB 2418MB primary boot, hidden
2 2418MB 8039MB 5621MB primary ntfs
Let assume that my NTFS partition is empty for now. Now I want to grow partition number one (notice that my partition table says
msdos
in your case it should saygpt
).
Now comes the truth hour. Using
resize
we must set the partition number one to use all the disk, how we do this?
resize NUMBER START END resize partition NUMBER and its file system
Hence, number should be
1
, start should be the same32.8kB
and the end should be8039MB
(remember that you should change the numbers, since I don't have a >1TB drive).
resize 1 32.8kB 8039MB
WARNING: you are attempting to use parted to operate on (resize) a file system.
parted's file system manipulation code is not as robust as what you'll find in
dedicated, file-system-specific packages like e2fsprogs. We recommend
you use parted only to manipulate partition tables, whenever possible.
Support for performing most operations on most types of file systems
will be removed in an upcoming release.
Nice warning, continue reading.
The recommended method? e2fsprogs? but I don't have that!
Seems that the message is quite old, and e2fsprogs
is not called like that anymore (the package keep its name, through), but resize2fs
. This program is capable of resize any ext2/3/4 filesystem. Cool! Now how I do it? Simple:
sudo resize2fs /dev/sdf1 8039M
(Remember that the size is the current size + the size you want to add)
Here you could use M for Megabytes, G for Gigabytes. You should also verify for errors:
sudo e2fsck -f -p /dev/sdf1
Done.
The resize command will fail because as the warning says, parted's filesystem manipulation code is old and broken. You also don't want to specify a size toresize2fs
and let it assume the maximum available.
– psusi
Sep 13 '13 at 13:41
@psusi I'm not letting resize2fs assume maximum available because OP wants a specific size, also, I'm in no way recommending parted over other tool, as it says at the beginning "Please, go to the next section if you want a more secure method to resize ext partitions". I'm only telling him thatparted
is not the way to go and why.
– Braiam
Sep 13 '13 at 13:52
You can't resize the filesystem until after you have resized the partition holding it. Tryingresize2fs
and specifying the size without first enlarging the partition will just throw an error saying it isn't large enough. Once you have changed the size of the partition, it is best to omit the size toresize2fs
so it will automatically fill the whole partition.
– psusi
Sep 13 '13 at 14:08
add a comment |
Continue on your own risk
(Please, go to the next section if you want a more secure method to resize ext partitions)
The tool you are looking for is parted
which is the backend for gparted, also you must make sure that your partition table is GPT, if it's MBR it won't support partitions bigger than 2TB.
This method is only for non-mounted partitions, so you might like to do a backup too if something go wire.
First open
parted
braiam@bt:~$ sudo parted
[sudo] password for braiam:
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
Now that you are here, you must make sure what driver you want to modify. As you see, I'm using
sda
, if what you want is usesdb
orsd-something
you must useselect
:
(parted) select
New device? [/dev/sda]? /dev/sd
sda sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8 sdb sdc sdd sde sdf sdf1 sdf2
New device? [/dev/sda]? /dev/sdf
Using /dev/sdf
(parted)
List all the partitions with
print /dev/sdf
:
(parted) print /dev/sdf
Model: SanDisk Cruzer (scsi)
Disk /dev/sdf: 8040MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.8kB 2418MB 2418MB primary boot, hidden
2 2418MB 8039MB 5621MB primary ntfs
Let assume that my NTFS partition is empty for now. Now I want to grow partition number one (notice that my partition table says
msdos
in your case it should saygpt
).
Now comes the truth hour. Using
resize
we must set the partition number one to use all the disk, how we do this?
resize NUMBER START END resize partition NUMBER and its file system
Hence, number should be
1
, start should be the same32.8kB
and the end should be8039MB
(remember that you should change the numbers, since I don't have a >1TB drive).
resize 1 32.8kB 8039MB
WARNING: you are attempting to use parted to operate on (resize) a file system.
parted's file system manipulation code is not as robust as what you'll find in
dedicated, file-system-specific packages like e2fsprogs. We recommend
you use parted only to manipulate partition tables, whenever possible.
Support for performing most operations on most types of file systems
will be removed in an upcoming release.
Nice warning, continue reading.
The recommended method? e2fsprogs? but I don't have that!
Seems that the message is quite old, and e2fsprogs
is not called like that anymore (the package keep its name, through), but resize2fs
. This program is capable of resize any ext2/3/4 filesystem. Cool! Now how I do it? Simple:
sudo resize2fs /dev/sdf1 8039M
(Remember that the size is the current size + the size you want to add)
Here you could use M for Megabytes, G for Gigabytes. You should also verify for errors:
sudo e2fsck -f -p /dev/sdf1
Done.
The resize command will fail because as the warning says, parted's filesystem manipulation code is old and broken. You also don't want to specify a size toresize2fs
and let it assume the maximum available.
– psusi
Sep 13 '13 at 13:41
@psusi I'm not letting resize2fs assume maximum available because OP wants a specific size, also, I'm in no way recommending parted over other tool, as it says at the beginning "Please, go to the next section if you want a more secure method to resize ext partitions". I'm only telling him thatparted
is not the way to go and why.
– Braiam
Sep 13 '13 at 13:52
You can't resize the filesystem until after you have resized the partition holding it. Tryingresize2fs
and specifying the size without first enlarging the partition will just throw an error saying it isn't large enough. Once you have changed the size of the partition, it is best to omit the size toresize2fs
so it will automatically fill the whole partition.
– psusi
Sep 13 '13 at 14:08
add a comment |
Continue on your own risk
(Please, go to the next section if you want a more secure method to resize ext partitions)
The tool you are looking for is parted
which is the backend for gparted, also you must make sure that your partition table is GPT, if it's MBR it won't support partitions bigger than 2TB.
This method is only for non-mounted partitions, so you might like to do a backup too if something go wire.
First open
parted
braiam@bt:~$ sudo parted
[sudo] password for braiam:
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
Now that you are here, you must make sure what driver you want to modify. As you see, I'm using
sda
, if what you want is usesdb
orsd-something
you must useselect
:
(parted) select
New device? [/dev/sda]? /dev/sd
sda sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8 sdb sdc sdd sde sdf sdf1 sdf2
New device? [/dev/sda]? /dev/sdf
Using /dev/sdf
(parted)
List all the partitions with
print /dev/sdf
:
(parted) print /dev/sdf
Model: SanDisk Cruzer (scsi)
Disk /dev/sdf: 8040MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.8kB 2418MB 2418MB primary boot, hidden
2 2418MB 8039MB 5621MB primary ntfs
Let assume that my NTFS partition is empty for now. Now I want to grow partition number one (notice that my partition table says
msdos
in your case it should saygpt
).
Now comes the truth hour. Using
resize
we must set the partition number one to use all the disk, how we do this?
resize NUMBER START END resize partition NUMBER and its file system
Hence, number should be
1
, start should be the same32.8kB
and the end should be8039MB
(remember that you should change the numbers, since I don't have a >1TB drive).
resize 1 32.8kB 8039MB
WARNING: you are attempting to use parted to operate on (resize) a file system.
parted's file system manipulation code is not as robust as what you'll find in
dedicated, file-system-specific packages like e2fsprogs. We recommend
you use parted only to manipulate partition tables, whenever possible.
Support for performing most operations on most types of file systems
will be removed in an upcoming release.
Nice warning, continue reading.
The recommended method? e2fsprogs? but I don't have that!
Seems that the message is quite old, and e2fsprogs
is not called like that anymore (the package keep its name, through), but resize2fs
. This program is capable of resize any ext2/3/4 filesystem. Cool! Now how I do it? Simple:
sudo resize2fs /dev/sdf1 8039M
(Remember that the size is the current size + the size you want to add)
Here you could use M for Megabytes, G for Gigabytes. You should also verify for errors:
sudo e2fsck -f -p /dev/sdf1
Done.
Continue on your own risk
(Please, go to the next section if you want a more secure method to resize ext partitions)
The tool you are looking for is parted
which is the backend for gparted, also you must make sure that your partition table is GPT, if it's MBR it won't support partitions bigger than 2TB.
This method is only for non-mounted partitions, so you might like to do a backup too if something go wire.
First open
parted
braiam@bt:~$ sudo parted
[sudo] password for braiam:
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
Now that you are here, you must make sure what driver you want to modify. As you see, I'm using
sda
, if what you want is usesdb
orsd-something
you must useselect
:
(parted) select
New device? [/dev/sda]? /dev/sd
sda sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8 sdb sdc sdd sde sdf sdf1 sdf2
New device? [/dev/sda]? /dev/sdf
Using /dev/sdf
(parted)
List all the partitions with
print /dev/sdf
:
(parted) print /dev/sdf
Model: SanDisk Cruzer (scsi)
Disk /dev/sdf: 8040MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.8kB 2418MB 2418MB primary boot, hidden
2 2418MB 8039MB 5621MB primary ntfs
Let assume that my NTFS partition is empty for now. Now I want to grow partition number one (notice that my partition table says
msdos
in your case it should saygpt
).
Now comes the truth hour. Using
resize
we must set the partition number one to use all the disk, how we do this?
resize NUMBER START END resize partition NUMBER and its file system
Hence, number should be
1
, start should be the same32.8kB
and the end should be8039MB
(remember that you should change the numbers, since I don't have a >1TB drive).
resize 1 32.8kB 8039MB
WARNING: you are attempting to use parted to operate on (resize) a file system.
parted's file system manipulation code is not as robust as what you'll find in
dedicated, file-system-specific packages like e2fsprogs. We recommend
you use parted only to manipulate partition tables, whenever possible.
Support for performing most operations on most types of file systems
will be removed in an upcoming release.
Nice warning, continue reading.
The recommended method? e2fsprogs? but I don't have that!
Seems that the message is quite old, and e2fsprogs
is not called like that anymore (the package keep its name, through), but resize2fs
. This program is capable of resize any ext2/3/4 filesystem. Cool! Now how I do it? Simple:
sudo resize2fs /dev/sdf1 8039M
(Remember that the size is the current size + the size you want to add)
Here you could use M for Megabytes, G for Gigabytes. You should also verify for errors:
sudo e2fsck -f -p /dev/sdf1
Done.
edited Mar 29 '14 at 2:24
Community♦
1
1
answered Sep 6 '13 at 1:04
BraiamBraiam
52k20136222
52k20136222
The resize command will fail because as the warning says, parted's filesystem manipulation code is old and broken. You also don't want to specify a size toresize2fs
and let it assume the maximum available.
– psusi
Sep 13 '13 at 13:41
@psusi I'm not letting resize2fs assume maximum available because OP wants a specific size, also, I'm in no way recommending parted over other tool, as it says at the beginning "Please, go to the next section if you want a more secure method to resize ext partitions". I'm only telling him thatparted
is not the way to go and why.
– Braiam
Sep 13 '13 at 13:52
You can't resize the filesystem until after you have resized the partition holding it. Tryingresize2fs
and specifying the size without first enlarging the partition will just throw an error saying it isn't large enough. Once you have changed the size of the partition, it is best to omit the size toresize2fs
so it will automatically fill the whole partition.
– psusi
Sep 13 '13 at 14:08
add a comment |
The resize command will fail because as the warning says, parted's filesystem manipulation code is old and broken. You also don't want to specify a size toresize2fs
and let it assume the maximum available.
– psusi
Sep 13 '13 at 13:41
@psusi I'm not letting resize2fs assume maximum available because OP wants a specific size, also, I'm in no way recommending parted over other tool, as it says at the beginning "Please, go to the next section if you want a more secure method to resize ext partitions". I'm only telling him thatparted
is not the way to go and why.
– Braiam
Sep 13 '13 at 13:52
You can't resize the filesystem until after you have resized the partition holding it. Tryingresize2fs
and specifying the size without first enlarging the partition will just throw an error saying it isn't large enough. Once you have changed the size of the partition, it is best to omit the size toresize2fs
so it will automatically fill the whole partition.
– psusi
Sep 13 '13 at 14:08
The resize command will fail because as the warning says, parted's filesystem manipulation code is old and broken. You also don't want to specify a size to
resize2fs
and let it assume the maximum available.– psusi
Sep 13 '13 at 13:41
The resize command will fail because as the warning says, parted's filesystem manipulation code is old and broken. You also don't want to specify a size to
resize2fs
and let it assume the maximum available.– psusi
Sep 13 '13 at 13:41
@psusi I'm not letting resize2fs assume maximum available because OP wants a specific size, also, I'm in no way recommending parted over other tool, as it says at the beginning "Please, go to the next section if you want a more secure method to resize ext partitions". I'm only telling him that
parted
is not the way to go and why.– Braiam
Sep 13 '13 at 13:52
@psusi I'm not letting resize2fs assume maximum available because OP wants a specific size, also, I'm in no way recommending parted over other tool, as it says at the beginning "Please, go to the next section if you want a more secure method to resize ext partitions". I'm only telling him that
parted
is not the way to go and why.– Braiam
Sep 13 '13 at 13:52
You can't resize the filesystem until after you have resized the partition holding it. Trying
resize2fs
and specifying the size without first enlarging the partition will just throw an error saying it isn't large enough. Once you have changed the size of the partition, it is best to omit the size to resize2fs
so it will automatically fill the whole partition.– psusi
Sep 13 '13 at 14:08
You can't resize the filesystem until after you have resized the partition holding it. Trying
resize2fs
and specifying the size without first enlarging the partition will just throw an error saying it isn't large enough. Once you have changed the size of the partition, it is best to omit the size to resize2fs
so it will automatically fill the whole partition.– psusi
Sep 13 '13 at 14:08
add a comment |
The trick here is to use an Xserver on another machine to display the GUI elements you can't see on a server. Set the environment variable to the local machine running the Xserver. Where this is an IP address and the screen # on the X server.
export DISPLAY="192.168.1.5:0"
then run :
sudo gparted
With another Ubuntu machine you will need to change firewall rules to allow this. Using windows you can do this with MobaXterm which runs a local X server.
It didn't work for me.(gpartedbin:16598): Gtk-WARNING **: cannot open display: 192.168.1.200:0
– Ali Yousefi Sabzevar
Oct 17 '17 at 9:03
add a comment |
The trick here is to use an Xserver on another machine to display the GUI elements you can't see on a server. Set the environment variable to the local machine running the Xserver. Where this is an IP address and the screen # on the X server.
export DISPLAY="192.168.1.5:0"
then run :
sudo gparted
With another Ubuntu machine you will need to change firewall rules to allow this. Using windows you can do this with MobaXterm which runs a local X server.
It didn't work for me.(gpartedbin:16598): Gtk-WARNING **: cannot open display: 192.168.1.200:0
– Ali Yousefi Sabzevar
Oct 17 '17 at 9:03
add a comment |
The trick here is to use an Xserver on another machine to display the GUI elements you can't see on a server. Set the environment variable to the local machine running the Xserver. Where this is an IP address and the screen # on the X server.
export DISPLAY="192.168.1.5:0"
then run :
sudo gparted
With another Ubuntu machine you will need to change firewall rules to allow this. Using windows you can do this with MobaXterm which runs a local X server.
The trick here is to use an Xserver on another machine to display the GUI elements you can't see on a server. Set the environment variable to the local machine running the Xserver. Where this is an IP address and the screen # on the X server.
export DISPLAY="192.168.1.5:0"
then run :
sudo gparted
With another Ubuntu machine you will need to change firewall rules to allow this. Using windows you can do this with MobaXterm which runs a local X server.
answered Feb 10 '17 at 0:54
theoremtheorem
211
211
It didn't work for me.(gpartedbin:16598): Gtk-WARNING **: cannot open display: 192.168.1.200:0
– Ali Yousefi Sabzevar
Oct 17 '17 at 9:03
add a comment |
It didn't work for me.(gpartedbin:16598): Gtk-WARNING **: cannot open display: 192.168.1.200:0
– Ali Yousefi Sabzevar
Oct 17 '17 at 9:03
It didn't work for me.
(gpartedbin:16598): Gtk-WARNING **: cannot open display: 192.168.1.200:0
– Ali Yousefi Sabzevar
Oct 17 '17 at 9:03
It didn't work for me.
(gpartedbin:16598): Gtk-WARNING **: cannot open display: 192.168.1.200:0
– Ali Yousefi Sabzevar
Oct 17 '17 at 9:03
add a comment |
As David pointed out, gparted
is a gui application, so you won't be able to use it on a server without a gui. You will need to use parted
to manipulate partitions on the command line. It can not directly resize partitions however. Instead you will have to delete the existing partition and recreate it with the exact same start position, but a longer length, and then run another tool to resize the filesystem inside the partition.
First you need to put it into sector mode with the unit s
command and print
the existing table. Use rm 1
to remove the partition, then mkpart
to create a new one. Specify the same starting sector it had before, then specify the end. You can do that in a form like "+2500G" for 2,500 GB from the start rather than having to specify the exact sector. quit
when done, then run sudo resize2fs /dev/sda1
. This is assuming the partition is number 1 on the first disk in the system.
If the partition is mounted at the time, then in 12.04 you will get an error trying to change it with parted
and will have to reboot for the change to take effect before using resize2fs
.
add a comment |
As David pointed out, gparted
is a gui application, so you won't be able to use it on a server without a gui. You will need to use parted
to manipulate partitions on the command line. It can not directly resize partitions however. Instead you will have to delete the existing partition and recreate it with the exact same start position, but a longer length, and then run another tool to resize the filesystem inside the partition.
First you need to put it into sector mode with the unit s
command and print
the existing table. Use rm 1
to remove the partition, then mkpart
to create a new one. Specify the same starting sector it had before, then specify the end. You can do that in a form like "+2500G" for 2,500 GB from the start rather than having to specify the exact sector. quit
when done, then run sudo resize2fs /dev/sda1
. This is assuming the partition is number 1 on the first disk in the system.
If the partition is mounted at the time, then in 12.04 you will get an error trying to change it with parted
and will have to reboot for the change to take effect before using resize2fs
.
add a comment |
As David pointed out, gparted
is a gui application, so you won't be able to use it on a server without a gui. You will need to use parted
to manipulate partitions on the command line. It can not directly resize partitions however. Instead you will have to delete the existing partition and recreate it with the exact same start position, but a longer length, and then run another tool to resize the filesystem inside the partition.
First you need to put it into sector mode with the unit s
command and print
the existing table. Use rm 1
to remove the partition, then mkpart
to create a new one. Specify the same starting sector it had before, then specify the end. You can do that in a form like "+2500G" for 2,500 GB from the start rather than having to specify the exact sector. quit
when done, then run sudo resize2fs /dev/sda1
. This is assuming the partition is number 1 on the first disk in the system.
If the partition is mounted at the time, then in 12.04 you will get an error trying to change it with parted
and will have to reboot for the change to take effect before using resize2fs
.
As David pointed out, gparted
is a gui application, so you won't be able to use it on a server without a gui. You will need to use parted
to manipulate partitions on the command line. It can not directly resize partitions however. Instead you will have to delete the existing partition and recreate it with the exact same start position, but a longer length, and then run another tool to resize the filesystem inside the partition.
First you need to put it into sector mode with the unit s
command and print
the existing table. Use rm 1
to remove the partition, then mkpart
to create a new one. Specify the same starting sector it had before, then specify the end. You can do that in a form like "+2500G" for 2,500 GB from the start rather than having to specify the exact sector. quit
when done, then run sudo resize2fs /dev/sda1
. This is assuming the partition is number 1 on the first disk in the system.
If the partition is mounted at the time, then in 12.04 you will get an error trying to change it with parted
and will have to reboot for the change to take effect before using resize2fs
.
answered Sep 6 '13 at 0:06
psusipsusi
31.2k15089
31.2k15089
add a comment |
add a comment |
gparted
is a graphical application for managing partitions.
The error you see above is because gparted
is trying to open a graphical console, but since this is Ubuntu server there is no graphical display.
Some options:
You can use command line partitioning tools such as fdisk
or sfdisk
. These are harder to drive, so read the manual carefully.
Alternately, if you have another machine running ubuntu desktop, you can use ssh -X
from that machine to the server to log in with X11 forwarding. In that shell you can run gparted
and it should display on the desktop machine - although you will probably have to tweak the ssh
configs a bit and install some X11 programs on the server to get it all working.
1
You will need to useparted
sincefdisk
andsfdisk
don't understand GPT, which is needed on disks > 2 TB.
– psusi
Sep 5 '13 at 23:55
Is that still that case? I used fdisk and sfdisk to partition two 3TB disks on Monday and it seemed to work fine.
– David Purdue
Sep 10 '13 at 23:55
Yep.. if you did that then you're only using 2TB of the disk. Or technically I think you can make a 1TB partition then a second one that starts at 1TB and is 2TB long.
– psusi
Sep 11 '13 at 1:00
Ok, so the single partition on the drive is 2TB. Why does pvdisplay say the partition is 2.73 TB? Why does vgdisplay reckon I have over 2.5TB allocated to volumes?
– David Purdue
Sep 11 '13 at 6:34
Just repartitioned the disk as GPT with gparted - ended up with exactly the same amount of space.
– David Purdue
Sep 11 '13 at 7:34
|
show 3 more comments
gparted
is a graphical application for managing partitions.
The error you see above is because gparted
is trying to open a graphical console, but since this is Ubuntu server there is no graphical display.
Some options:
You can use command line partitioning tools such as fdisk
or sfdisk
. These are harder to drive, so read the manual carefully.
Alternately, if you have another machine running ubuntu desktop, you can use ssh -X
from that machine to the server to log in with X11 forwarding. In that shell you can run gparted
and it should display on the desktop machine - although you will probably have to tweak the ssh
configs a bit and install some X11 programs on the server to get it all working.
1
You will need to useparted
sincefdisk
andsfdisk
don't understand GPT, which is needed on disks > 2 TB.
– psusi
Sep 5 '13 at 23:55
Is that still that case? I used fdisk and sfdisk to partition two 3TB disks on Monday and it seemed to work fine.
– David Purdue
Sep 10 '13 at 23:55
Yep.. if you did that then you're only using 2TB of the disk. Or technically I think you can make a 1TB partition then a second one that starts at 1TB and is 2TB long.
– psusi
Sep 11 '13 at 1:00
Ok, so the single partition on the drive is 2TB. Why does pvdisplay say the partition is 2.73 TB? Why does vgdisplay reckon I have over 2.5TB allocated to volumes?
– David Purdue
Sep 11 '13 at 6:34
Just repartitioned the disk as GPT with gparted - ended up with exactly the same amount of space.
– David Purdue
Sep 11 '13 at 7:34
|
show 3 more comments
gparted
is a graphical application for managing partitions.
The error you see above is because gparted
is trying to open a graphical console, but since this is Ubuntu server there is no graphical display.
Some options:
You can use command line partitioning tools such as fdisk
or sfdisk
. These are harder to drive, so read the manual carefully.
Alternately, if you have another machine running ubuntu desktop, you can use ssh -X
from that machine to the server to log in with X11 forwarding. In that shell you can run gparted
and it should display on the desktop machine - although you will probably have to tweak the ssh
configs a bit and install some X11 programs on the server to get it all working.
gparted
is a graphical application for managing partitions.
The error you see above is because gparted
is trying to open a graphical console, but since this is Ubuntu server there is no graphical display.
Some options:
You can use command line partitioning tools such as fdisk
or sfdisk
. These are harder to drive, so read the manual carefully.
Alternately, if you have another machine running ubuntu desktop, you can use ssh -X
from that machine to the server to log in with X11 forwarding. In that shell you can run gparted
and it should display on the desktop machine - although you will probably have to tweak the ssh
configs a bit and install some X11 programs on the server to get it all working.
edited Sep 14 '13 at 7:36
Alaa Ali
22.3k96994
22.3k96994
answered Sep 5 '13 at 22:49
David PurdueDavid Purdue
1,927714
1,927714
1
You will need to useparted
sincefdisk
andsfdisk
don't understand GPT, which is needed on disks > 2 TB.
– psusi
Sep 5 '13 at 23:55
Is that still that case? I used fdisk and sfdisk to partition two 3TB disks on Monday and it seemed to work fine.
– David Purdue
Sep 10 '13 at 23:55
Yep.. if you did that then you're only using 2TB of the disk. Or technically I think you can make a 1TB partition then a second one that starts at 1TB and is 2TB long.
– psusi
Sep 11 '13 at 1:00
Ok, so the single partition on the drive is 2TB. Why does pvdisplay say the partition is 2.73 TB? Why does vgdisplay reckon I have over 2.5TB allocated to volumes?
– David Purdue
Sep 11 '13 at 6:34
Just repartitioned the disk as GPT with gparted - ended up with exactly the same amount of space.
– David Purdue
Sep 11 '13 at 7:34
|
show 3 more comments
1
You will need to useparted
sincefdisk
andsfdisk
don't understand GPT, which is needed on disks > 2 TB.
– psusi
Sep 5 '13 at 23:55
Is that still that case? I used fdisk and sfdisk to partition two 3TB disks on Monday and it seemed to work fine.
– David Purdue
Sep 10 '13 at 23:55
Yep.. if you did that then you're only using 2TB of the disk. Or technically I think you can make a 1TB partition then a second one that starts at 1TB and is 2TB long.
– psusi
Sep 11 '13 at 1:00
Ok, so the single partition on the drive is 2TB. Why does pvdisplay say the partition is 2.73 TB? Why does vgdisplay reckon I have over 2.5TB allocated to volumes?
– David Purdue
Sep 11 '13 at 6:34
Just repartitioned the disk as GPT with gparted - ended up with exactly the same amount of space.
– David Purdue
Sep 11 '13 at 7:34
1
1
You will need to use
parted
since fdisk
and sfdisk
don't understand GPT, which is needed on disks > 2 TB.– psusi
Sep 5 '13 at 23:55
You will need to use
parted
since fdisk
and sfdisk
don't understand GPT, which is needed on disks > 2 TB.– psusi
Sep 5 '13 at 23:55
Is that still that case? I used fdisk and sfdisk to partition two 3TB disks on Monday and it seemed to work fine.
– David Purdue
Sep 10 '13 at 23:55
Is that still that case? I used fdisk and sfdisk to partition two 3TB disks on Monday and it seemed to work fine.
– David Purdue
Sep 10 '13 at 23:55
Yep.. if you did that then you're only using 2TB of the disk. Or technically I think you can make a 1TB partition then a second one that starts at 1TB and is 2TB long.
– psusi
Sep 11 '13 at 1:00
Yep.. if you did that then you're only using 2TB of the disk. Or technically I think you can make a 1TB partition then a second one that starts at 1TB and is 2TB long.
– psusi
Sep 11 '13 at 1:00
Ok, so the single partition on the drive is 2TB. Why does pvdisplay say the partition is 2.73 TB? Why does vgdisplay reckon I have over 2.5TB allocated to volumes?
– David Purdue
Sep 11 '13 at 6:34
Ok, so the single partition on the drive is 2TB. Why does pvdisplay say the partition is 2.73 TB? Why does vgdisplay reckon I have over 2.5TB allocated to volumes?
– David Purdue
Sep 11 '13 at 6:34
Just repartitioned the disk as GPT with gparted - ended up with exactly the same amount of space.
– David Purdue
Sep 11 '13 at 7:34
Just repartitioned the disk as GPT with gparted - ended up with exactly the same amount of space.
– David Purdue
Sep 11 '13 at 7:34
|
show 3 more comments
Is simple, put this commands in console:
sudo touch .Xauthority
sudo xauth merge ~name_of_user/.Xauthority
export DISPLAY=:0.0
sudo gparted
*change name_of_user to your login user
sudo touch .Xauthority sudo xauth merge ~name_of_user/.Xauthority export DISPLAY=:0.0
– Rafael Duarte
Jul 28 '17 at 20:47
add a comment |
Is simple, put this commands in console:
sudo touch .Xauthority
sudo xauth merge ~name_of_user/.Xauthority
export DISPLAY=:0.0
sudo gparted
*change name_of_user to your login user
sudo touch .Xauthority sudo xauth merge ~name_of_user/.Xauthority export DISPLAY=:0.0
– Rafael Duarte
Jul 28 '17 at 20:47
add a comment |
Is simple, put this commands in console:
sudo touch .Xauthority
sudo xauth merge ~name_of_user/.Xauthority
export DISPLAY=:0.0
sudo gparted
*change name_of_user to your login user
Is simple, put this commands in console:
sudo touch .Xauthority
sudo xauth merge ~name_of_user/.Xauthority
export DISPLAY=:0.0
sudo gparted
*change name_of_user to your login user
edited Jul 28 '17 at 21:04
Rinzwind
207k28397528
207k28397528
answered Jul 28 '17 at 19:32
Rafael DuarteRafael Duarte
11
11
sudo touch .Xauthority sudo xauth merge ~name_of_user/.Xauthority export DISPLAY=:0.0
– Rafael Duarte
Jul 28 '17 at 20:47
add a comment |
sudo touch .Xauthority sudo xauth merge ~name_of_user/.Xauthority export DISPLAY=:0.0
– Rafael Duarte
Jul 28 '17 at 20:47
sudo touch .Xauthority sudo xauth merge ~name_of_user/.Xauthority export DISPLAY=:0.0
– Rafael Duarte
Jul 28 '17 at 20:47
sudo touch .Xauthority sudo xauth merge ~name_of_user/.Xauthority export DISPLAY=:0.0
– Rafael Duarte
Jul 28 '17 at 20:47
add a comment |
I was having same trouble. The error message said I was in trouble because of some 'MIT-Magic-Cookie-1'. None of the above advice helped, but I figured out it was all about root, server and desktop complications, because I had an upgrade from zesty to artful before. Some packages were removed of course.
Here is what solved my problem:
- Create user root.
- Login as user root, ...this worked out for me pressing the keyboard combination Ctrl+Alt+F2
- From the terminal simply:
startx
- Super key and look for GParted.
I believe this is an ideal solution to switch between the X-server and wayland/mir. If you want to return back to your previous account, logout from X Window and terminal, press Ctrl+Alt+F1.
add a comment |
I was having same trouble. The error message said I was in trouble because of some 'MIT-Magic-Cookie-1'. None of the above advice helped, but I figured out it was all about root, server and desktop complications, because I had an upgrade from zesty to artful before. Some packages were removed of course.
Here is what solved my problem:
- Create user root.
- Login as user root, ...this worked out for me pressing the keyboard combination Ctrl+Alt+F2
- From the terminal simply:
startx
- Super key and look for GParted.
I believe this is an ideal solution to switch between the X-server and wayland/mir. If you want to return back to your previous account, logout from X Window and terminal, press Ctrl+Alt+F1.
add a comment |
I was having same trouble. The error message said I was in trouble because of some 'MIT-Magic-Cookie-1'. None of the above advice helped, but I figured out it was all about root, server and desktop complications, because I had an upgrade from zesty to artful before. Some packages were removed of course.
Here is what solved my problem:
- Create user root.
- Login as user root, ...this worked out for me pressing the keyboard combination Ctrl+Alt+F2
- From the terminal simply:
startx
- Super key and look for GParted.
I believe this is an ideal solution to switch between the X-server and wayland/mir. If you want to return back to your previous account, logout from X Window and terminal, press Ctrl+Alt+F1.
I was having same trouble. The error message said I was in trouble because of some 'MIT-Magic-Cookie-1'. None of the above advice helped, but I figured out it was all about root, server and desktop complications, because I had an upgrade from zesty to artful before. Some packages were removed of course.
Here is what solved my problem:
- Create user root.
- Login as user root, ...this worked out for me pressing the keyboard combination Ctrl+Alt+F2
- From the terminal simply:
startx
- Super key and look for GParted.
I believe this is an ideal solution to switch between the X-server and wayland/mir. If you want to return back to your previous account, logout from X Window and terminal, press Ctrl+Alt+F1.
edited Dec 26 '17 at 5:28
karel
59.5k13129151
59.5k13129151
answered Dec 26 '17 at 2:16
SasaSasa
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f341937%2fwhen-starting-gparted-gtk-warning-cannot-open-display%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
gparted is a gui, so you should be launching it from command line with gksudo or gksu. But if you have 2TB that is MBR(msdos) you may need to convert to gpt(GUID). You can use gdisk for conversion as well as setting up partitions.
– oldfred
Sep 5 '13 at 22:51