Saturday, June 14, 2025

Formatting Lunix drives, USB external or internal, how to

Replace ? with your the letter that will be assigned when you plug in and power up the drive,  dmesg -T will tell you what letter has been assigned, df which show you what letters are already in use.

1) gdisk -l /dev/sd? (got the right drive??)

2) gdisk /dev/sd?

3) d = delete existing partion

4) n = create new, 8300 for Linux

5) w = write/exit

6) power off, or reread??

7) gdisk -l /dev/sd? ; umount  /run/media/charles/EFI

8) mkfs -V -t ext4 /dev/sd?1 = newfs

9) tune2fs -L seagate5 /dev/sd?1

10) tune2fs -m 0 /dev/sd?1

11) vi /etc/fstab, LABEL=seagate5  /seagate5       ext4    defaults 0 0

12) mkdir /seagate5; mount /seagate5 ; df


NOTES and example output:

If you are getting Ring error in your dmesg -T output, bad cable usually what causes that. I've had new USB cables go bad right out of the package, have a few different brands on hand!



narnia<129># gdisk /dev/sdd

GPT fdisk (gdisk) version 1.0.9


Partition table scan:

  MBR: protective

  BSD: not present

  APM: not present

  GPT: present


Found valid GPT with protective MBR; using GPT.


Command (? for help): d

Partition number (1-2): 2

or {+-}size{KMGTP}: 

Partition number (2-128, default 2): 

First sector (34-42970644445, default = 409640) or {+-}size{KMGTP}: 

Last sector (409640-42970644445, default = 42970644439) or {+-}size{KMGTP}: 


Current type is 8300 (Linux filesystem)

Hex code or GUID (L to show codes, Enter = 8300): 

Changed type of partition to 'Linux filesystem'


Command (? for help): w


Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING

PARTITIONS!!


Do you want to proceed? (Y/N): y

OK; writing new GUID partition table (GPT) to /dev/sdd.

The operation has completed succes


gdisk -l /dev/sdd

Number  Start (sector)    End (sector)  Size       Code  Name

   1              40          409639   200.0 MiB   EF00  EFI System Partition

   2          409640     42970644439   20.0 TiB    8300  Linux filesystem

narnia<136># mount  /seagate2025
mount: (hint) your fstab has been modified, but systemd still uses
       the old version; use 'systemctl daemon-reload' to reload.




Thursday, February 16, 2023

NFS won't start, down the rabbit hole we are going




NFS stopped working? 

systemctl start nfs-server.service - hangs and tells you to check journalctl -xe ??

journalctl -xe saying something about a missing drive, even though the drive was never exported?

-- Subject: Unit nfs-server.service has failed

-- Defined-By: systemd

Feb 14 20:31:16 amber systemd[1]: nfs-server.service: Job nfs-server.service/st>

Feb 14 20:31:16 amber systemd[1]: seagate8.mount: Job seagate8.mount/start fail>

Feb 14 20:31:16 amber systemd[1]: dev-disk-by\x2dlabel-seagate8.device: Job dev>

Feb 14 20:31:16 amber systemd[1]: dev-disk-by\x2dlabel-seagate7.device: Job dev>

Feb 14 20:31:16 amber systemd[1]: Timed out waiting for device Expansion_Desk s>

-- Subject: Unit dev-disk-by\x2dlabel-seagate7.device has failed

WAIT! No need to reboot! Hey, this isn't Windows, we can fix it!

And the solution (likely) is: 

systemctl daemon-reexec

OR

systemctl daemon-reload

The the reason NFS won't run (in some cases) has nothing to do with NFS or /etc/exports - it's a problem with systemd. One could consider it a "feature" or a bug. Personally I think systemd is a bug, causes more trouble than it solves. I've seen and fixed this NFS won't start problem several times over the years and finally got around to writing down the solution, as from Google I see a ton of posts with these errors messages and no correct answers. Just a lot of jump through hoops, chase down rabbit holes and check your kernel module FUD.



Sunday, October 30, 2022

2021 ISP speeds

     Server: Winchester Wireless - Winchester, VA (id = 21859)

        ISP: Shentel Communications

    Latency:    13.59 ms   (2.46 ms jitter)

   Download:   101.47 Mbps (data used: 86.0 MB)                               

     Upload:    10.46 Mbps (data used: 9.9 MB)                               

Packet Loss:     0.0%

 Result URL: https://www.speedtest.net/result/c/59e0b2d6-d137-4772-970b-56fda42a92e5

     Server: Shentel - Edinburg, VA (id = 3785)

        ISP: Shentel Communications

    Latency:    11.39 ms   (5.41 ms jitter)

   Download:   261.87 Mbps (data used: 424.2 MB)                               

     Upload:    10.48 Mbps (data used: 10.3 MB)                               

Packet Loss:    13.3%

 Result URL: https://www.speedtest.net/result/c/4f7dadd6-1d85-42e0-8a5e-2de736347db9

locnar<1098>% date

Fri 19 May 16:56:48 PDT 2023




2022

 Server: Lumos Fiber - Waynesboro, VA (id = 7085)

        ISP: Shentel Communications

    Latency:    16.88 ms   (3.79 ms jitter)

   Download:   159.52 Mbps (data used: 164.9 MB)                               

     Upload:    10.22 Mbps (data used: 9.7 MB)   






 

1  gateway2 (89.7.1.30)  0.200 ms  0.217 ms  0.192 ms
 2  10.228.32.1 (10.228.32.1)  11.670 ms  21.255 ms  21.303 ms
 3  10.17.0.205 (10.17.0.205)  21.666 ms  21.858 ms  21.909 ms
 4  10.25.0.109 (10.25.0.109)  23.564 ms  23.621 ms  23.598 ms
 5  204.111.0.65 (204.111.0.65)  23.034 ms  22.949 ms  30.933 ms
 6  * * *
 7  108.170.240.97 (108.170.240.97)  29.647 ms  16.025 ms 209.85.252.18 (209.85.252.18)  15.405 ms
 8  108.170.246.49 (108.170.246.49)  24.230 ms 108.170.240.112 (108.170.240.112)  23.915 ms 108.170.246.49 (108.170.246.49)  24.058 ms
 9  * * 216.239.42.137 (216.239.42.137)  24.570 ms
10  108.170.225.156 (108.170.225.156)  29.315 ms 142.251.66.21 (142.251.66.21)  28.831 ms *
11  142.250.57.144 (142.250.57.144)  29.263 ms 142.251.69.63 (142.251.69.63)  39.602 ms 142.251.49.86 (142.251.49.86)  24.270 ms
12  108.170.248.33 (108.170.248.33)  24.154 ms  24.180 ms 108.170.248.97 (108.170.248.97)  31.631 ms
13  216.239.40.167 (216.239.40.167)  22.523 ms 216.239.40.187 (216.239.40.187)  29.248 ms 216.239.40.167 (216.239.40.167)  28.411 ms
14  lga34s38-in-f4.1e100.net (142.251.40.196)  28.576 ms  29.010 ms  29.115 ms




Thursday, August 27, 2020

GeForce GT 710 graphics card and Fedora Linux

 It works. Plug and play.

Where this get interesting is after installing the Nvidia drivers, which you don't need as the Nouveau drivers that come with Linux work just fine. I had a go with Nvidia drivers and this fanless $35 card to see if there would be any difference in picture quality over the build in graphics card on my ThinkCentre M93p running Fedora 32. Doesn't seem to be any difference as far as I can tell. Except for the one film I have in x265.10bit.HDR format, playback is choppy. I noted Kodi says the GT710 does not support the x265 codex, so no hardware excelleration. However, when I switched to the Nvidia drivers, playback of my x265 4K file is smooth.

Here's where the fun started. With the Nvidia drivers installed, the card wasn't getting the same EDID info from my Athem AVM 60 media center as I did with the Nouveau drivers. When I switched to the Nvidia drivers, Pulseaudio  (pavucontrol) showed the HDMI audio profiles as unplugged unavailible, so no sound. Even with Pulseaudio disabled, Kodi would see 4 HDMI profiles, but no sound.

edid-decode /sys/class/drm/card0-HDMI-A-1/edid

EDID and xorg.conf files


 


Monday, August 17, 2020

Welcome to Linux emergency mode! Enter control-d to continue

 


If you're stuck in this "emergency mode" boot cycle, and/or the system just hangs on boot, a common reason is a mistake in /etc/fstab. Recently I removed a drive but forgot to delete the entry in fstab, and it bit me on reboot. Just boot rescue mode, mount the / file system and edit the fstab.