Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
the
Jul 18, 2004

by Cowcaster
I have Ubuntu 14.04 LTS installed on a Lenovo Z400 touch laptop.

I've been having this weird issue lately where when I open the laptop (after it goes to sleep when I shut the lid), the login password box is unresponsive. Typing the password does nothing. I've found a workaround where I can select "change user" from the available menu which will then let me type in the password box to log in.

Well, I just found out today that the laptop is still accepting input, but in an odd way. After trying to type the password a bunch of times, I did my workaround, and then got back to my main desktop. I saw I had Chromium open, on Facebook, and that I had repeatedly typed my login password into a chat window over and over. Weird. So, not sure what's going on our how to fix it, but yeah that's happening.

Adbot
ADBOT LOVES YOU

Experto Crede
Aug 19, 2008

Keep on Truckin'
What's the easiest way to move a user account from one linux machine to another? Specifically from Mint 15 to 16? Can I just recreate the user manually on the new system, copy across the home folder and use chown to make sure the ownership is set correctly?

spankmeister
Jun 15, 2008






Experto Crede posted:

What's the easiest way to move a user account from one linux machine to another? Specifically from Mint 15 to 16? Can I just recreate the user manually on the new system, copy across the home folder and use chown to make sure the ownership is set correctly?

Pretty much yeah.

kiwid
Sep 30, 2013

I have a /etc/init.d script that's loving up when I type "service php-fastcgi restart".

The script looks like this:

code:
    restart)
      if [[ -r $PID_FILE ]]
      then
        kill `cat $PID_FILE`
        rm $PID_FILE
        RET_VAL=$?
      else
        echo "Could not find PID file $PID_FILE"
      fi
      $PHP_SCRIPT
      RET_VAL=$?
  ;;
The problem I'm having is that the $PHP_SCRIPT is executing before the kill `cat $PID_FILE` command is done.

I've gotten it to work now by putting a "sleep 1" after the kill command but something tells me this might not be a good solution if the server was busy. Is there a way to wait for the kill process to finish before continuing with the script?

minato
Jun 7, 2004

cutty cain't hang, say 7-up.
Taco Defender
The answer is to poll to see when the PID is gone.
code:
if [[ -r $PID_FILE ]]
then
   PID=`cat $PID_FILE`
   kill $PID
   rm $PID_FILE
   while kill -0 $PID ; do
     sleep 1 ;
   done
else
   echo "Could not find PID file $PID_FILE"
fi

evol262
Nov 30, 2010
#!/usr/bin/perl

the posted:

I have Ubuntu 14.04 LTS installed on a Lenovo Z400 touch laptop.

I've been having this weird issue lately where when I open the laptop (after it goes to sleep when I shut the lid), the login password box is unresponsive. Typing the password does nothing. I've found a workaround where I can select "change user" from the available menu which will then let me type in the password box to log in.

Well, I just found out today that the laptop is still accepting input, but in an odd way. After trying to type the password a bunch of times, I did my workaround, and then got back to my main desktop. I saw I had Chromium open, on Facebook, and that I had repeatedly typed my login password into a chat window over and over. Weird. So, not sure what's going on our how to fix it, but yeah that's happening.

Not actually in an odd way. Typical Ubuntu development.

What app is logging the screen? Open it up, ssh in, and ps

telcoM
Mar 21, 2009
Fallen Rib

Megaman posted:

Ok, so the problem looks to be the initrd.gz I've used the one for stable hd-media and it now progresses past preseed, but errors out on finding the image. The image I'm using is stable mini.iso, is there a way I can get it to detect this particular image? The reason I'm using mini.iso is to be able to install testing, you cannot do this with regular netinstall.

If your goal is testing, have you tried to use testing's installer directly? The erratas for the Jessie Alpha 1 installer look tolerable... unless of course you have some essential hardware that needs to have firmware loaded before installation can proceed.

Apparently the Debian organization recommends using the Jessie Alpha 1 installer now:
https://www.debian.org/devel/debian-installer/

And here are the kernel and initrd images for the testing installer:
http://ftp.nl.debian.org/debian/dists/testing/main/installer-amd64/current/images/hd-media/

kiwid
Sep 30, 2013

minato posted:

The answer is to poll to see when the PID is gone.
code:
if [[ -r $PID_FILE ]]
then
   PID=`cat $PID_FILE`
   kill $PID
   rm $PID_FILE
   while kill -0 $PID ; do
     sleep 1 ;
   done
else
   echo "Could not find PID file $PID_FILE"
fi

Great, thanks!

spankmeister
Jun 15, 2008






I wonder why that after two decades Debian still can't get the installer right.

Riso
Oct 11, 2008

by merry exmarx
Because they don't give a poo poo.

the
Jul 18, 2004

by Cowcaster

evol262 posted:

What app is logging the screen? Open it up, ssh in, and ps

What do you mean what app is logging the screen? Do you mean what app is taking input when I am supposed to be at the login prompt?

evol262
Nov 30, 2010
#!/usr/bin/perl

the posted:

What do you mean what app is logging the screen? Do you mean what app is taking input when I am supposed to be at the login prompt?

Sorry, that was phone autocorrect.

What app is locking the screen. kscreenlock? gdm? gnome-screensaver? xscreensaver? Something built into Unity?

telcoM
Mar 21, 2009
Fallen Rib

spankmeister posted:

I wonder why that after two decades Debian still can't get the installer right.

In this case, it's because those sneaky kernel developers went and changed some firmware-loading related things, and the udev component of the installer could no longer get the info that a particular firmware file is needed.

The relevant bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725714

Debian being Debian, the installer must have the user answer one question before downloading the appropriate firmware or whatever:
"Your <computer part> needs <firmware> to work. This means using a piece of code that is not 100% Free Software. Are you OK with this?" Answer choices: "Hell yes, I want my computer to work." / "I am RMS, enable sperg mode."

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Suspicious Dish posted:

~/.gnome2/panel2.d/default/launchers it seems

I put my whatever.desktop file in there but it didn't create the launcher. Apparently there is another folder it needs to register in? But I also copied my whatever.desktop there and it's still not working. Any ideas?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

fletcher posted:

I put my whatever.desktop file in there but it didn't create the launcher. Apparently there is another folder it needs to register in? But I also copied my whatever.desktop there and it's still not working. Any ideas?

I don't have an answer for you because I gave up trying to understand how gnome does this a long time ago, but I just wanted to say I always found what Gnome was doing here hilariously un-understandable.

I mean, on one hand I can see saying the user shouldn't care about the filesystem and just use whatever tools Gnome provides to do this poo poo, but I was never able to figure out what Gnome wanted you to do either.

Queue someone jumping in and telling me how simple it actually is...

Megaman
May 8, 2004
I didn't read the thread BUT...

telcoM posted:

If your goal is testing, have you tried to use testing's installer directly? The erratas for the Jessie Alpha 1 installer look tolerable... unless of course you have some essential hardware that needs to have firmware loaded before installation can proceed.

Apparently the Debian organization recommends using the Jessie Alpha 1 installer now:
https://www.debian.org/devel/debian-installer/

And here are the kernel and initrd images for the testing installer:
http://ftp.nl.debian.org/debian/dists/testing/main/installer-amd64/current/images/hd-media/

This is all well and good, except that the installer seems to be totally busted as far as wireless goes. Connecting to my home network on WPA2 with the same key I've always used for every device fails, and passes with stable mini.iso using testing or stable, or SID. Also, many preseed options have either changed or are broken as well, I'm guessing broken. This is why I would like to use stable mini.iso, so I can have a working installer that I can select testing from, and preseed it. Does absolutely no one do the same thing I'm trying to do? I find this hard to believe. Stable mini.iso selecting testing works perfectly fine, and the installer is fine as well, but I just can't preseed it due to initrd.gz. Can anyone test this exact same mini.iso setup?

Megaman fucked around with this message at 00:20 on Jul 29, 2014

CaptainSarcastic
Jul 6, 2013



Thermopyle posted:

I don't have an answer for you because I gave up trying to understand how gnome does this a long time ago, but I just wanted to say I always found what Gnome was doing here hilariously un-understandable.

I mean, on one hand I can see saying the user shouldn't care about the filesystem and just use whatever tools Gnome provides to do this poo poo, but I was never able to figure out what Gnome wanted you to do either.

Queue someone jumping in and telling me how simple it actually is...

Gnome 3 was my cue to abandon Gnome altogether, so it's been years since I dealt with it at all. I switched initially to using XFCE mostly, but at this point I run almost entirely KDE.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Thermopyle posted:

I don't have an answer for you because I gave up trying to understand how gnome does this a long time ago, but I just wanted to say I always found what Gnome was doing here hilariously un-understandable.

I mean, on one hand I can see saying the user shouldn't care about the filesystem and just use whatever tools Gnome provides to do this poo poo, but I was never able to figure out what Gnome wanted you to do either.

Queue someone jumping in and telling me how simple it actually is...

drat, I thought it was gonna be something super easy :(

Unfortunately I am stuck with this CentOS 5.10 box running GNOME 2 for awhile. I really want the environment to be fully setup after a vagrant up but dumb crap like this just has to be a pain in the butt.

evol262
Nov 30, 2010
#!/usr/bin/perl

fletcher posted:

drat, I thought it was gonna be something super easy :(

Unfortunately I am stuck with this CentOS 5.10 box running GNOME 2 for awhile. I really want the environment to be fully setup after a vagrant up but dumb crap like this just has to be a pain in the butt.

You probably have to wedge something in gconf.

Suspicious Dish?

thebigcow
Jan 3, 2001

Bully!
Ubuntu has a server guide that explains the distro approved way to do a bunch of things. Does CentOS have anything similar? Their wiki is a mess and the documentation is for CentOS 5.

spankmeister
Jun 15, 2008






thebigcow posted:

Ubuntu has a server guide that explains the distro approved way to do a bunch of things. Does CentOS have anything similar? Their wiki is a mess and the documentation is for CentOS 5.

Just use the RHEL documentation: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

evol262 posted:

You probably have to wedge something in gconf.

Suspicious Dish?

I'm in France right now and am on lovely hotel Wi-Fi, and I don't want to spend time I could be getting drunk on debugging a version of GNOME I've never hacked on or used. I'll look at it when I get home.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Suspicious Dish posted:

I'm in France right now and am on lovely hotel Wi-Fi, and I don't want to spend time I could be getting drunk on debugging a version of GNOME I've never hacked on or used. I'll look at it when I get home.

Haha totally understandable, I appreciate the reply nonetheless. I'll poke around on irc.gnome.org and see if I can find an answer. :france:

thebigcow
Jan 3, 2001

Bully!

Thank You

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
I'm trying to get a bigger root volume on an EC2 instance (12GB to 30GB). I made a snapshot of it, then created a new volume that was bigger from the snapshot, and attached it to my instance @ /dev/sda, just like the previous one was attached.

Now I get this:
code:
$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             9.9G  1.5G  7.9G  16% /
none                   30G     0   30G   0% /dev/shm
code:
$ resize2fs /dev/sda1
resize2fs 1.39 (29-May-2006)
The filesystem is already 2620595 blocks long.  Nothing to do!
What's goin on here?

jre
Sep 2, 2011

To the cloud ?



fletcher posted:

I'm trying to get a bigger root volume on an EC2 instance (12GB to 30GB). I made a snapshot of it, then created a new volume that was bigger from the snapshot, and attached it to my instance @ /dev/sda, just like the previous one was attached.

Now I get this:
code:
$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             9.9G  1.5G  7.9G  16% /
none                   30G     0   30G   0% /dev/shm
code:
$ resize2fs /dev/sda1
resize2fs 1.39 (29-May-2006)
The filesystem is already 2620595 blocks long.  Nothing to do!
What's goin on here?

Could you post the output of "parted /dev/sda p" or "fdisk -l"

The problem might be that although the underlying block device is bigger the partition is still 12G

luminalflux
May 27, 2005



You might need to poke the device with partprobe to detect the size change, but it can very well be that you chagned the size of sda and not the size of the partition sda1. In that case you need to fire up parted or fdisk to resize the partition, then run resize2fs.

caveat: I only do this on vmware, no idea on ec2.

the
Jul 18, 2004

by Cowcaster

evol262 posted:

Sorry, that was phone autocorrect.

What app is locking the screen. kscreenlock? gdm? gnome-screensaver? xscreensaver? Something built into Unity?

Uh, I have no idea. I have ubuntu 14.04 lts. When I shut my laptop lid the screen locks. I assumed that was built into Unity.

evol262
Nov 30, 2010
#!/usr/bin/perl

the posted:

Uh, I have no idea. I have ubuntu 14.04 lts. When I shut my laptop lid the screen locks. I assumed that was built into Unity.

If you're using unity, then it's probably some thing Canonical built half-assed.

File a bug. This is a Unity problem that Canonical needs to fix.

SurgicalOntologist
Jun 17, 2004

It's probably lightdm, no? Is it similar to the screen you get logging in after boot-up?

evol262
Nov 30, 2010
#!/usr/bin/perl

SurgicalOntologist posted:

It's probably lightdm, no? Is it similar to the screen you get logging in after boot-up?

Judging from another bug filed against unity, no.

I don't use Ubuntu, so I couldn't say directly, but trivial Googling of other reported problems leads me to believe that LightDM is a fallback method which is only used for changing sessions/users, not locking/unlocking.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

jre posted:

Could you post the output of "parted /dev/sda p" or "fdisk -l"

The problem might be that although the underlying block device is bigger the partition is still 12G

US-WEST-2 is finally back up so I can look at this again

code:
$ fdisk -l

Disk /dev/sda: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1305    10482381   83  Linux
/dev/sda2            1306        1566     2096482+  82  Linux swap / Solaris

luminalflux posted:

You might need to poke the device with partprobe to detect the size change, but it can very well be that you chagned the size of sda and not the size of the partition sda1. In that case you need to fire up parted or fdisk to resize the partition, then run resize2fs.

caveat: I only do this on vmware, no idea on ec2.

Hmmm how do I do that?

luminalflux
May 27, 2005



fletcher posted:

Hmmm how do I do that?

You can't in this case since the partition you want to grow isn't the last, but if it is you can just delete the last partition and re-add it using the new free space. This also is hard to do live.

I end up in most cases just using LVM, adding a new partition in the free space on the datastore, adding that to the VG with vgextend and extending the LV with lvextend, then running resize2fs. All that can be done live.

jre
Sep 2, 2011

To the cloud ?



fletcher posted:

US-WEST-2 is finally back up so I can look at this again

code:
$ fdisk -l

Disk /dev/sda: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1305    10482381   83  Linux
/dev/sda2            1306        1566     2096482+  82  Linux swap / Solaris
Hmmm how do I do that?

Are you sure you've expanded the EBS volume properly ? I would expect /dev/sda to report 30G yet its still showing as 12.8G

what does lsblk show?

evol262
Nov 30, 2010
#!/usr/bin/perl
You may also need to partprobe if you didn't restart the instance

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

luminalflux posted:

You can't in this case since the partition you want to grow isn't the last, but if it is you can just delete the last partition and re-add it using the new free space. This also is hard to do live.

I end up in most cases just using LVM, adding a new partition in the free space on the datastore, adding that to the VG with vgextend and extending the LV with lvextend, then running resize2fs. All that can be done live.

Sounds tricky :(

jre posted:

Are you sure you've expanded the EBS volume properly ? I would expect /dev/sda to report 30G yet its still showing as 12.8G

what does lsblk show?

I thought so, from the Amazon Docs it seemed pretty straightforward. Maybe I screwed it up though, I'm gonna try again from scratch.

lsblk doesn't appear to be in any CentOS 5 repos, not sure how to get it on this machine

evol262 posted:

You may also need to partprobe if you didn't restart the instance

The instance has since been restarted, still reports the same output for those comands as before.

I wonder if any of my problems have to do with this janky CentOS 5.10 image I'm using? It didn't even have an /etc/hosts file...

fletcher fucked around with this message at 18:27 on Jul 31, 2014

evol262
Nov 30, 2010
#!/usr/bin/perl

fletcher posted:

Sounds tricky :(


I thought so, from the Amazon Docs it seemed pretty straightforward. Maybe I screwed it up though, I'm gonna try again from scratch.

lsblk doesn't appear to be in any CentOS 5 repos, not sure how to get it on this machine
yum whatprovides "*/somefile"

I don't have any EL5 boxes around to actually check if it's available.

fletcher posted:

The instance has since been restarted, still reports the same output for those comands as before.

I wonder if any of my problems have to do with this janky CentOS 5.10 image I'm using? It didn't even have an /etc/hosts file...
No, the disk size is independent.

Cloud images/AMIs are intentionally stripped, and a lot of things which look "janky" are intentional. Missing /etc/hosts probably isn't, but it's extremely likely that whatever AMI you're using expects you to configure it with cloud-init.

Disk isn't, though.

Is this ephemeral disk or EBS?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

evol262 posted:

yum whatprovides "*/somefile"

I don't have any EL5 boxes around to actually check if it's available.

No, the disk size is independent.

Cloud images/AMIs are intentionally stripped, and a lot of things which look "janky" are intentional. Missing /etc/hosts probably isn't, but it's extremely likely that whatever AMI you're using expects you to configure it with cloud-init.

Disk isn't, though.

Is this ephemeral disk or EBS?

Nice, never used whatprovides before.
code:
$ yum whatprovides "*/lsblk"
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.nwresd.org
 * centosplus: mirror.keystealth.org
 * contrib: mirror.web-ster.com
 * epel: mirrors.syringanetworks.net
 * extras: mirror.keystealth.org
 * updates: mirror.cs.uwp.edu
No Matches found
The disk in question is an EBS volume. Although I am curious if I would get better performance using the instance store since I'm using a c3.2xlarge and it gets 2 x 80GB SSDs (and I have nothing that needs to persist on this instance). It's for a build machine so I/O performance is important.

evol262
Nov 30, 2010
#!/usr/bin/perl

fletcher posted:

Nice, never used whatprovides before.
code:
$ yum whatprovides "*/lsblk"
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.nwresd.org
 * centosplus: mirror.keystealth.org
 * contrib: mirror.web-ster.com
 * epel: mirrors.syringanetworks.net
 * extras: mirror.keystealth.org
 * updates: mirror.cs.uwp.edu
No Matches found
The disk in question is an EBS volume. Although I am curious if I would get better performance using the instance store since I'm using a c3.2xlarge and it gets 2 x 80GB SSDs (and I have nothing that needs to persist on this instance). It's for a build machine so I/O performance is important.

It's normally in util-linux-ng, I think.

Ephemeral disk is almost always faster than EBS. But it's probably a non-issue.

It does look like the volume hasn't been resized correctly, though. Have you considered creating a new EBS volume, attaching it, mounting it, moving everything over, and just using that?

Adbot
ADBOT LOVES YOU

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

evol262 posted:

It's normally in util-linux-ng, I think.

Ephemeral disk is almost always faster than EBS. But it's probably a non-issue.

It does look like the volume hasn't been resized correctly, though. Have you considered creating a new EBS volume, attaching it, mounting it, moving everything over, and just using that?

Ah ok. Doesn't look like that package is available in the CentOS 5 repos.

That's the path I'm going down now. Thanks for all the help guys.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply