Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 303 304 [305] 306 307 ... 350

Author Topic: The Generic Computer Advice Thread  (Read 572526 times)

methylatedspirit

  • Bay Watcher
  • it/its
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4560 on: May 10, 2021, 12:39:39 am »

The connection to google server failed because I'm in China where google is blocked.

I don't know my NTP servers (or much of Linux, admittedly), but I'll just give a list of servers that are based in China:
Code: [Select]
server 0.cn.pool.ntp.org
server 1.cn.pool.ntp.org
server 2.cn.pool.ntp.org
server 3.cn.pool.ntp.org
pool.ntp.org

Code: (Alibaba NTP server) [Select]
ntp.cloud.aliyuncs.com
Code: (Backbone Network of Beijing China Education and Research Computer Network) [Select]
1.cn.pool.ntp.org 
2.cn.pool.ntp.org
3.cn.pool.ntp.org
0.cn.pool.ntp.org
cn.pool.ntp.org

Surely at least one of these should work. According to Stack Overflow (and I'm plagiarizing here for convenience), the file you want to edit is in /etc/systemd/timesyncd.conf, assuming an Ubuntu-like distro. You'll then have to uncomment the NTP= line, and set the one you want.

Code: [Select]
[Time]
NTP=some.ntp.server.com

To "audit" the time-synchronization events and verify the server that was contacted, use the following command:

Code: [Select]
cat /var/log/syslog | grep systemd-timesyncd
Logged

coalboat

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4561 on: May 10, 2021, 01:22:58 am »

Thanks I've set the server to cn.pool.ntp.org.

"cat /var/log/syslog | grep systemd-timesyncd" gives no result though.
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4562 on: May 10, 2021, 02:05:36 am »

Did you run "update-grub" afterwards?

Now I can see GRUB but there's no entry of memtest. Only "Ubuntu" and "Advanced Options for Ubuntu".

sudo apt-get purge -f gnome3

I have done this and it returned an error:
Unable to locate package gnome3

The connection to google server failed because I'm in China where google is blocked.

Try

sudo apt-get purge -f gnome*

That should get rid of basically anything associated with gnome desktop environment. 
PAY ATTENTION-- It may uninstall things you want to keep!
Logged

coalboat

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4563 on: May 10, 2021, 02:38:56 am »

After I removeed all gnome*, I restarted the computer and it seems to lose the GUI. :o

It became all black and white pure text. How can I restore the GUI?

I even can still play achaea via telnet :P But I still want to restore the graphics.
« Last Edit: May 10, 2021, 02:42:23 am by coalboat »
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4564 on: May 10, 2021, 02:54:52 am »

Which GUI do you want?

XFCE:
sudo apt-get install xfce4

LXDE;
sudo apt-get install lxde

MATE:
sudo apt-get install mate-desktop

Unity:
sudo apt-get install ubuntu-unity-desktop

Gnome:
sudo apt-get install gnome

KDE:
sudo apt-get install kde-standard


Logged

coalboat

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4565 on: May 10, 2021, 03:28:27 am »

I had a GUI before gnome. How do I check what it is?

edit: I ended up installing unity.
« Last Edit: May 10, 2021, 03:50:40 am by coalboat »
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4566 on: May 10, 2021, 03:45:57 am »

What distro do you have?
Logged

coalboat

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4567 on: May 10, 2021, 05:21:51 am »

GUI restored. Distro is Ubuntu 18.04 LTS.

Somehow I still see "gnome" in syslog, but I'm not going to try to remove it.

So the freezing is likely caused by either a memory problem, or an IPV6 address? If I disable IPV6, can I still use the internet? Can I just block that problematic address?
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4568 on: May 10, 2021, 05:50:11 am »

My hypothesis--- needs more diagnostics.  It's little more than a hunch.


The error happens with the libc installed on the system.
 
I suspect that there is a system service that relies on having a sensible response from network time server, which fails, because "YOU MIGHT BE EXPOSED TO SEDITIOUS IDEAS, CITIZEN!" from your government. This causes a downstream computation to return a null value used in division, which then BAM-- division by zero, system halt. That seems to be getting called from a .desktop file's called script. I would doctor that script to substitute the NNTP server it is trying to contact. (It's a google one.)

I would also disable IPv6, which will not do anything really.  The internet in general still uses IPv4, which is all you really need. Honest.  It is possible your release has buggy IPv6 support.

the next thing I would investigate would be issues with your network card's driver.

« Last Edit: May 10, 2021, 06:01:54 am by wierd »
Logged

coalboat

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4569 on: May 10, 2021, 06:23:21 am »

Now it can’t even start. It stucks at the purple starting screen.
Logged

coalboat

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4570 on: May 10, 2021, 06:35:58 am »

I can now start it in recovery mode. So GUI seems to be the problem. Now I genuinely worry about losing all the data. Can I send mail without GUI? I need to backup.

Is it safe to do-release-upgrade it now? Will this fix it?
« Last Edit: May 10, 2021, 09:00:54 am by coalboat »
Logged

gimlet

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4571 on: May 10, 2021, 09:49:31 am »

You can boot from a USB right?   I would make a bootable memtest usb and run the memory test overnight, it would be nice to eliminate that as a cause.

Also, I suggest you make a "live linux" bootable usb, then you can boot to that gui and do your backups and diagnostics.  Don't install or format anything on the laptop drive, it should be clear warnings if you are about to, just use it to access your laptop drive for backups and diagnostics, it's handy to do that because you know nothing is changing on the laptop drive when you are running off the USB OS.
Logged

coalboat

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4572 on: May 10, 2021, 10:17:38 am »

I don’t know how to boot from USB. But now I can boot in recovery mode. What I plan to do right now is first transfer every file I don’t want to lose to some place else. How can I do that?
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4573 on: May 10, 2021, 05:30:51 pm »

it can be done from the console.
Recovery console is always root, so there is no need for sudo.

drop in a usb stick, wait a bit, then check dmseg to be sure it saw it-

then run

mount

without any arguments.  See if the USB stick got mounted or not.  In recovery mode, it might not. If it did not, here is how to mount it from the console:

first, make a mountpoint to mount it at.  Traditionally, manual mounts are done at /mnt.

So, make a folder there to serve as the mount point.

mkdir /mnt/usb


once the mountpoint is made, we can mount the USB device.  The info we got from dmesg will tell us what device ID it got when it was attached.  For the sake of argument, I will assume it is /dev/sdb.  Substitute as appropriate.

We actually want to mount the first partition on the device, which with the example, would be /dev/sdb1

[for FAT flavored partition]
mount -t msdos /dev/sdb1 /mnt/usb

[for ext3 flavor partition]
mount -t ext3 /dev/sdb1 /mnt/usb

[for ext4 flavor partition]
mount -t ext4 /dev/sdb1 /mnt/usb


Verify that the mount completed by calling mount with no options again.

mount

it should show up in the list, usually toward the bottom.

verify that there is sufficient free space on the volume by calling df.

df

Once you have that done, the best way to get all your data, is to just copy *EVERYTHING* in your /home directory there.  I prefer to use rsync for this, since it can resume if there is an error, and give a nice progress indication.

rsync -v -r -L -k --progress /home /mnt/usb

wait for it to finish doing its thing, then flush the cache manually with sync

sync

then unmount the USB stick

umount /dev/sdb1

you can then remove the stick safely.


For creating a bootable USB device:

Modern distro ISO files are often "Hybrid ISO" images, that can be directly written to USB devices with dd.

Pull a suitable installer image from the internet with wget.  You said you are using ubuntu 18.04?

first, put the iso some place you can store it safely.  /home/[your user acct] usually works fine.

cd /home/[your user account]

then get it with wget. (hopefully it is installed...)

[this will get the 64 bit flavor desktop image iso for that release.]
wget https://releases.ubuntu.com/18.04/ubuntu-18.04.5-desktop-amd64.iso

once you have it, dd the image to a USB stick.

insert the USB stick, then check dmesg to get its device ID.  Once you have it, we are ready to proceed.  For the sake of argument, I will assume it is /dev/sdb once again.

dd if=ubuntu-18.04.5-desktop-amd64.iso of=/dev/sdb bs=4096 status=progress

Wait for it to finish. then issue sync.

sync

once it returns to console, you can safely remove, because nothing was mounted.  attempt to boot on the stick, and see if it works.
« Last Edit: May 10, 2021, 05:43:50 pm by wierd »
Logged

coalboat

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4574 on: May 10, 2021, 06:31:32 pm »

How do I check how much storage the usb stick need? I need to buy a new one.

Before the new stick arrives, I want to backup as much as possible. Can I transfer file to another computer in the same wifi? Is it possible to upload things to github?

When I boot in recovery mode, there’s an fsck option. When I run it it says (among other things) “/etc/default/rcS no such file or directory”. What does this mean?
« Last Edit: May 10, 2021, 08:03:29 pm by coalboat »
Logged
Pages: 1 ... 303 304 [305] 306 307 ... 350