You are not logged in.

#1 2012-05-30 08:35:12

jolivier
Member
Registered: 2012-05-30
Posts: 17

[SOLVED] gnome-terminal wont launch grantpt failed: Exec format error

Hello all,

I've been using Arch for ~3 years and it's my first forum post, I always found a solution online normally but now I'm stuck!

I changed violently all mods in /usr after a mess up (I put everything owned by root with chmod 755)
Most of my applications could not start anymore, I fixed them by reinstalling them (xorg-server, chromium etc...). It seems I broke something related to setuid (whose mechanism is still quite unclear to me) since all programs requiring privilege elevation failed (I had to reinstall sudo, mlocate)...
Only one of them is still failing to recover: gnome-terminal, I get the following GUI message "grantpt failed: Exec format error".

I could not find any way to start gnome-terminal in a more verbose mode to have more information.
Reinstalling it does not fix this problem. (yaourt -Sf gnome-terminal)
xterm is working fine
I couldn't find any reference on modes to set for basic folders in arch linux so I might still have missing mods.
I saw that this problem could be linked to wrongly mounted /dev/pts, I had:

~ cat /etc/mtab|grep pts
devpts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0

I switched it to 755 via mount /dev/pts -o mode=755 -o remount and have now
devpts /dev/pts devpts rw,relatime,mode=755,ptmxmode=000 0 0

but I still get the same problem.

It seems that the problem is in vte, when I start it I get the same error message:
~ vte -d   
** (vte:11996): WARNING **: Failed to fork: grantpt failed: Exec format error

Do you have any idea where to look at to fix this? Which file mode should still be changed or what can I do to have more information on this failure?

Regards,

Olivier

Last edited by jolivier (2012-11-30 09:55:07)

Offline

#2 2012-05-30 08:41:10

JackH79
Member
From: Australia
Registered: 2009-06-18
Posts: 663
Website

Re: [SOLVED] gnome-terminal wont launch grantpt failed: Exec format error

Have you tried this?

Offline

#3 2012-05-30 09:00:16

jolivier
Member
Registered: 2012-05-30
Posts: 17

Re: [SOLVED] gnome-terminal wont launch grantpt failed: Exec format error

Yes it's quite similar to what I tried already, but I had a try:
~ sudo mount -o remount,mode=620 /dev/pts
~ vte
** (vte:17418): WARNING **: Failed to fork: grantpt failed: Exec format error

Maybe there is a cache to clear after having remounted /dev/pts but I don't know which one...

Offline

#4 2012-05-30 09:02:52

JackH79
Member
From: Australia
Registered: 2009-06-18
Posts: 663
Website

Re: [SOLVED] gnome-terminal wont launch grantpt failed: Exec format error

I only did a very quick google, but I saw some bugreports about gnome-terminal and grantpt errors. Not sure if they're related. Maybe have another browse.

Offline

#5 2012-06-01 08:02:38

jolivier
Member
Registered: 2012-05-30
Posts: 17

Re: [SOLVED] gnome-terminal wont launch grantpt failed: Exec format error

Ok I fixed by changing my fstab to
devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0 like described here https://bugzilla.redhat.com/show_bug.cgi?id=509632
and rebooting, maybe the gid was also important or reboot was needed, anyway it's fixed now.
Thans for your help smile

Offline

#6 2012-06-01 08:25:24

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: [SOLVED] gnome-terminal wont launch grantpt failed: Exec format error

Good to hear you managed to solve the issue.

Don't forget to mark your thread as [SOLVED].


Burninate!

Offline

#7 2013-08-15 20:18:32

jstoik1
Member
From: Las Vegas
Registered: 2012-02-15
Posts: 13

Re: [SOLVED] gnome-terminal wont launch grantpt failed: Exec format error

I just wanted to quickly update this thread for users who experience this issue after updating glibc:

The update to glibc-2.18 removes pt_chown which is a security risk. It is not needed on an Arch system given we have /dev/pts.

However, some people appear to have /dev/pts in their /etc/fstab file, which generates it with the wrong permissions. This will result in errors like "grantpt failed: Operation not permitted".

To fix this, remove that line from your fstab file. systemd will take care of generating /dev/pts with the right permissions

Via https://bugs.archlinux.org/task/36548

Offline

#8 2013-08-17 05:27:45

maevius
Member
From: Greece
Registered: 2009-09-10
Posts: 134
Website

Re: [SOLVED] gnome-terminal wont launch grantpt failed: Exec format error

Somehow I missed the heads-up in arch-dev-public. Thanks jstoik1 smile

Offline

#9 2013-08-24 12:47:42

dennymallow
Member
Registered: 2011-07-08
Posts: 10

Re: [SOLVED] gnome-terminal wont launch grantpt failed: Exec format error

Commenting the devpts line in /etc/fstab file also did the trick for me. Changing permissions at runtime, by remounting /dev/pts, was instead not working.
Glad that I found the solution guys, each day I love Arch more... smile
And many many thanks to jstoik1!

Last edited by dennymallow (2013-08-24 12:49:15)


A good Arch can hold any weight!

Offline

#10 2013-08-26 06:45:00

dx
Member
Registered: 2013-08-10
Posts: 3

Re: [SOLVED] gnome-terminal wont launch grantpt failed: Exec format error

I removed the line from /dev/fstab, but I guess the systemd reload happens after a reboot, right? (edit: systemctl daemon-reload didn't change anything either)

Since I can't reboot right now, this remount did the trick for me (note how it includes gid=5). It's a variation of the fstab line jolivier posted, I took it from the redhat bug:

sudo mount -o remount,gid=5,mode=620 /dev/pts

Last edited by dx (2013-08-26 06:46:06)


(whoa it's like i'm actually using a forum, i can even use bbcode)

Offline

#11 2013-08-28 14:39:11

fsckd
Forum Moderator
Registered: 2009-06-15
Posts: 3,564

Re: [SOLVED] gnome-terminal wont launch grantpt failed: Exec format error

Hi, thanks for the feedback but this is necro-bumping. The original issue predates systemd as the default init for Arch and the thread was marked solved over a year ago. I am closing this thread to prevent further replies. If anyone needs more help, start a new thread.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB