How to build a custom (CentOS) ISO with preinstalled software? Posted: 05 Dec 2021 11:11 PM PST I'm trying to create a modified ISO of CentOS with some custom software pre-installed. I have been searching for quite a while and found this github repository https://github.com/fabaff/make_centos which seems to be able to do exactly what I want. However, I don't quite understand how to use this and wasn't able to find any documentation besides the readme, so I tried finding alternative ideas. For example setting up a VM with the original ISO, modifying it by downloading/installing the needed software and then converting the .vdi to a iso file. But someone said that this will only produce a .raw file and it is likely that the ISO won't work. Does anyone have a (working) tutorial or advice on how to do this? Any pointers are greatly appreciated! |
Frequency scaling governor scales up too many cores Posted: 05 Dec 2021 10:40 PM PST I have two machines on which I run the same OS, the same kernel, the same CPU freq scaling driver, and the same CPU freq scaling governor. One will boost all core frequencies if one process pins a core. One will boost only one physical core if there is one process pinning a core. Machine A CPU: Intel(R) Xeon(R) W-2140B CPU @ 3.20GHz Scaling driver: intel_pstate Scaling governor: powersave OS: Ubuntu 21.10 Kernel: 5.13.0-22-generic Machine B CPU: 11th Gen Intel(R) Core(TM) i5-11600K @ 3.90GHz Scaling driver: intel_pstate Scaling governor: powersave OS: Ubuntu 21.10 Kernel: 5.13.0-22-generic Observe these examples: Pinning two cores on machine A: (NOTE that this machine has Hyperthreading, so scales up 4 of the 16 available virtual cores.) Pinning two cores on machine B: (NOTE that this machine has 6 cores with HT, and scales up all 12 virtual cores.) The screenshots are of freqtop, an open sourced frequency monitor that I wrote myself. The orange ticks show the load on each core defined as a percentage of user+kernel cycles in relation of total cycles (user+kernel+idle.) Why does the i5-11600K CPU throttle up all cores, even if there is demand for just one? |
Suspend-to-RAM stopped just before the end Posted: 05 Dec 2021 10:04 PM PST After installing Debian 11 Bullseyes, each time I want to wake up after suspend, no reaction AT ALL happens. Every thing stay sleeping (hard drive, fans, screen, ...) as if didn't do anything. I tried clicking, hitting my keyboard or pushing my power button. Nothing happens. In order to restart I must keep my power button down for some seconds, then I only hear a crackle in the speaker (this crackle is also present when I power off the computer normaly), so I know that the computer is turned off, and then I can power on again as usual. Here is my uname Linux mandarine 5.10.0-8-amd64 #1 SMP Debian 5.10.46-5 (2021-09-23) x86_64 GNU/Linux I use a MacBook Pro Mid-2010 (MacBookPro6,2) Here is my syslog (see the bugging chars at the end...) Dec 6 06:29:56 mandarine ModemManager[983]: <info> [sleep-monitor] system is about to suspend Dec 6 06:29:56 mandarine NetworkManager[868]: <info> [1638768596.7353] manager: sleep: sleep requested (sleeping: no enabled: yes) Dec 6 06:29:56 mandarine NetworkManager[868]: <info> [1638768596.7355] device (wlp3s0b1): state change: unavailable -> unmanaged (reason 'sleeping', sys-iface-state: 'managed') Dec 6 06:29:56 mandarine dbus-daemon[867]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.9' (uid=0 pid=868 comm="/usr/sbin/NetworkManager --no-daemon ") Dec 6 06:29:56 mandarine NetworkManager[868]: <info> [1638768596.7365] device (wlp3s0b1): set-hw-addr: reset MAC address to C8:BC:C8:CB:49:50 (unmanage) Dec 6 06:29:56 mandarine dbus-daemon[867]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher' Dec 6 06:29:56 mandarine NetworkManager[868]: <info> [1638768596.7380] manager: NetworkManager state is now ASLEEP Dec 6 06:29:56 mandarine NetworkManager[868]: <info> [1638768596.7383] device (enp2s0): state change: activated -> deactivating (reason 'sleeping', sys-iface-state: 'managed') Dec 6 06:29:56 mandarine systemd[1]: Starting Network Manager Script Dispatcher Service... Dec 6 06:29:56 mandarine systemd[1]: Started Network Manager Script Dispatcher Service. Dec 6 06:29:56 mandarine NetworkManager[868]: <info> [1638768596.9420] device (enp2s0): state change: deactivating -> disconnected (reason 'sleeping', sys-iface-state: 'managed') Dec 6 06:29:56 mandarine avahi-daemon[862]: Withdrawing address record for fe80::c62c:3ff:fe0e:91c0 on enp2s0. Dec 6 06:29:56 mandarine avahi-daemon[862]: Leaving mDNS multicast group on interface enp2s0.IPv6 with address fe80::c62c:3ff:fe0e:91c0. Dec 6 06:29:56 mandarine avahi-daemon[862]: Interface enp2s0.IPv6 no longer relevant for mDNS. Dec 6 06:29:56 mandarine avahi-daemon[862]: Withdrawing address record for 192.168.1.10 on enp2s0. Dec 6 06:29:56 mandarine avahi-daemon[862]: Leaving mDNS multicast group on interface enp2s0.IPv4 with address 192.168.1.10. Dec 6 06:29:56 mandarine avahi-daemon[862]: Interface enp2s0.IPv4 no longer relevant for mDNS. Dec 6 06:29:57 mandarine NetworkManager[868]: <info> [1638768597.0590] device (enp2s0): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed') Dec 6 06:29:57 mandarine systemd[1]: Reached target Sleep. Dec 6 06:29:57 mandarine systemd[1]: Starting Suspend... ���������������������������������������������������������������������������������������������������������������������������������Dec 6 06:38:23 mandarine lvm[380]: 3 logical volume(s) in volume group "mandarine-vg" monitored Previous Debian version was free of this bug. Anybody has an idea? |
How to fix "cannot find name for group ID xxx" Posted: 05 Dec 2021 09:36 PM PST I have read Linux: id: cannot find name for group ID 999 but that does not answer my problem. The following is what I got (the username ABC and group name NAMEX are fictitious, I did adduser NAMEX, upon creation the group name NAMEX was created automatically) When I logged in as user ABC and typed "groups ABC" I got: ABC : ABC adm cdrom sudo dip plugdev lxd git NAMEX But if I typed "groups" instead I got: ABC : ABC adm cdrom sudo dip plugdev groups: cannot find name for group ID 515 515 grep 515 /etc/group returns nothing grep ABC /etc/group gives: adm:x:4:syslog,ABC .... ABC:x:1000: git:x:509:ABC,NAMEX NAMEX:1002:user1,user2...,ABC touch filename.txt failed due to Permission denied: -rw-rw-r-- 1 NAMEX NAMEX 1234 Dec 1 17:01 filename.txt I tried removing ABC from group NAMEX with gpasswd -d and adding back with usermod -a -G, that did not help. How can I fix? |
I'm looking for a text editor (or an extension to a text editor) with a shortcut key that lets me bring up the next file in the directory Posted: 05 Dec 2021 09:22 PM PST The same way picture viewers let you navigate to the next file [by the arrows or pg-down keys] - I would like to browse through text files. (At the moment I am tempted to turn those text files into .png just so I can browse through them with ease.) |
I can't create a character device inside of /dev/pts/ even as root Posted: 05 Dec 2021 09:11 PM PST sudo mknod /dev/pts/mytty c 0 9 mknod: /dev/pts/mytty: Operation not permitted How come I cannot create a character device file in this directory? |
Screen Turns Off after Ubuntu Login - New Install Posted: 05 Dec 2021 10:47 PM PST Booting from the live USB, UEFI, I can use Ubuntu. I install to my SSD, with "Install 3rd party drivers" and reboot. I get presented with the Ubuntu login screen, but the mouse movements are incredibly jerky. After logging in, my monitor goes to sleep. I have tried various methods, and have wasted countless hours. This involved... Various boot options Boot repair Hitting escape tab and a plethora of ineffectual keys at startup My question is... why does the live screen have no issue, but the full install won't drive my monitor? |
Make npm work in tails Posted: 05 Dec 2021 07:24 PM PST The latest tails comes with nodejs v10.24.0. Trying to get tails to run a newer node has been unsuccessful even after running script from deb.nodesource.com/setup_14x which said buster was unsupported. I think updating node was a red herring anyway. npm is not included so I use sudo apt install npm to install npm. I get version 5.8.0. I need npm to install create-react-app and other node tools. All npm commands return warning Npm does not support node.js v10.24.0 (hence the red herring to update that) In persistant storage I create a directory "foo" and cd to foo, I run npm init And then npm install And in addition to the warning above it seems to fail to connect to registry.npmjs.org:443 with getaddrinfo EAI_AGAIN Putting that url into the tor browser connects just fine. My current working theory is that I need to configure npm proxy and npm https-proxy, but for that I seem to require proxy credentials, url, and port. I don't know what those are or how to find them in tails. I am not behind any other proxy besides tor running in Tails. Question: how to make npm work in tails. |
I have a problem when using "iconfig" command Posted: 05 Dec 2021 06:54 PM PST When I use the command iconfig I get this : ┌──(kali㉿kali)-[~] └─$ iconfig ipmiutil config ver 3.17 Cannot map memory. Cannot open an IPMI driver: /dev/imb, /dev/ipmi0, /dev/ipmi/0, or direct driverless. ipmiutil config, cannot open IPMI driver ..... |
Why does Apache's mod-rewrite module process some GET requests and not process others? Posted: 05 Dec 2021 07:00 PM PST I am trying to get mod_rewrite working. I'm experimenting with a very simple rule: RewriteEngine On RewriteRule ^/one /var/www/html/oldindex.html Here is the complete config file: /etc/apache2/sites-available/govmeeting.org.conf <Directory /var/www/html> Require all granted </Directory> <VirtualHost *:80> ServerName govmeeting.org ServerAlias www.govmeeting.org ServerAdmin webmaster@localhost DocumentRoot /var/www/html LogLevel trace6 rewrite_module:trace8 ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined RewriteEngine On RewriteRule ^/one /var/www/html/oldindex.html </VirtualHost> I send two requests from the browser for "govmeeting.org/one". "oldindex.html" exists in my DocumentRoot. I see no processing occurring for either in error.log. However, at about the same time, an external request arrived from someone else. That request DOES get processed, but not mine. Below is the error.log and access.log for this time period. Note that the GET at 23:05:45 and 23:07:04 for "/one" is NOT processed. But the GET at 23:07:06 for "//wp-config.php" is processed. I have: Server version: Apache/2.4.41 (Ubuntu) Server built: 2021-10-14T16:24:43. The server is running on a VM in Google Compute Engine. 116.179.32.156 - - [05/Dec/2021:22:41:08 +0000] "GET / HTTP/1.1" 200 8945 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36" 67.80.142.21 - - [05/Dec/2021:23:05:45 +0000] "GET /one HTTP/1.1" 404 5729 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36" 67.80.142.21 - - [05/Dec/2021:23:06:05 +0000] "-" 408 5213 "-" "-" 67.80.142.21 - - [05/Dec/2021:23:07:04 +0000] "GET /one HTTP/1.1" 404 1079 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36" 136.144.41.231 - - [05/Dec/2021:23:07:06 +0000] "GET //wp-config.php HTTP/1.1" 404 493 "-" "Mozlila/5.0 (Linux; Android 7.0; SM-G892A Bulid/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/60.0.3112.107 Moblie Safari/537.36" 67.80.142.21 - - [05/Dec/2021:23:07:24 +0000] "-" 408 563 "-" "-" 209.17.97.34 - - [05/Dec/2021:23:11:47 +0000] "GET / HTTP/1.1" 200 4153 "-" "Mozilla/5.0 (compatible; Nimbostratus-Bot/v1.3.2; http://cloudsystemnetworks.com)" Here is the part of error.log for that time period: [Sun Dec 05 23:04:26.847532 2021] [mpm_prefork:notice] [pid 17645] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations [Sun Dec 05 23:04:26.847605 2021] [core:notice] [pid 17645] AH00094: Command line: '/usr/sbin/apache2' [Sun Dec 05 23:07:06.213591 2021] [core:trace5] [pid 17650] protocol.c(708): [client 136.144.41.231:35566] Request received from client: GET //wp-config.php HTTP/1.1 [Sun Dec 05 23:07:06.213740 2021] [http:trace4] [pid 17650] http_request.c(436): [client 136.144.41.231:35566] Headers received from client: [Sun Dec 05 23:07:06.213747 2021] [http:trace4] [pid 17650] http_request.c(439): [client 136.144.41.231:35566] Host: govmeeting.org [Sun Dec 05 23:07:06.213751 2021] [http:trace4] [pid 17650] http_request.c(439): [client 136.144.41.231:35566] User-Agent: Mozlila/5.0 (Linux; Android 7.0; SM-G892A Bulid/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/60.0.3112.107 Moblie Safari/537.36 [Sun Dec 05 23:07:06.213755 2021] [http:trace4] [pid 17650] http_request.c(439): [client 136.144.41.231:35566] Accept-Encoding: gzip, deflate [Sun Dec 05 23:07:06.213759 2021] [http:trace4] [pid 17650] http_request.c(439): [client 136.144.41.231:35566] Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 [Sun Dec 05 23:07:06.213763 2021] [http:trace4] [pid 17650] http_request.c(439): [client 136.144.41.231:35566] Connection: keep-alive [Sun Dec 05 23:07:06.213766 2021] [http:trace4] [pid 17650] http_request.c(439): [client 136.144.41.231:35566] Cache-Control: max-age=0 [Sun Dec 05 23:07:06.213770 2021] [http:trace4] [pid 17650] http_request.c(439): [client 136.144.41.231:35566] Upgrade-Insecure-Requests: 1 [Sun Dec 05 23:07:06.213773 2021] [http:trace4] [pid 17650] http_request.c(439): [client 136.144.41.231:35566] Accept-Language: en-US,en;q=0.9,fr;q=0.8 [Sun Dec 05 23:07:06.213803 2021] [rewrite:trace2] [pid 17650] mod_rewrite.c(483): [client 136.144.41.231:35566] 136.144.41.231 - - [govmeeting.org/sid#7fafa63c3810][rid#7fafa64820a0/initial] init rewrite engine with requested uri /wp-config.php [Sun Dec 05 23:07:06.213809 2021] [rewrite:trace3] [pid 17650] mod_rewrite.c(483): [client 136.144.41.231:35566] 136.144.41.231 - - [govmeeting.org/sid#7fafa63c3810][rid#7fafa64820a0/initial] applying pattern '^/one' to uri '/wp-config.php' [Sun Dec 05 23:07:06.213821 2021] [rewrite:trace1] [pid 17650] mod_rewrite.c(483): [client 136.144.41.231:35566] 136.144.41.231 - - [govmeeting.org/sid#7fafa63c3810][rid#7fafa64820a0/initial] pass through /wp-config.php [Sun Dec 05 23:07:06.213922 2021] [authz_core:debug] [pid 17650] mod_authz_core.c(817): [client 136.144.41.231:35566] AH01626: authorization result of Require all granted: granted [Sun Dec 05 23:07:06.213929 2021] [authz_core:debug] [pid 17650] mod_authz_core.c(817): [client 136.144.41.231:35566] AH01626: authorization result of <RequireAny>: granted [Sun Dec 05 23:07:06.213933 2021] [core:trace3] [pid 17650] request.c(310): [client 136.144.41.231:35566] request authorized without authentication by access_checker_ex hook: /wp-config.php [Sun Dec 05 23:07:06.214003 2021] [php7:error] [pid 17650] [client 136.144.41.231:35566] script '/var/www/html/wp-config.php' not found or unable to stat [Sun Dec 05 23:07:06.214051 2021] [http:trace3] [pid 17650] http_filters.c(1125): [client 136.144.41.231:35566] Response sent with status 404, headers: [Sun Dec 05 23:07:06.214070 2021] [http:trace5] [pid 17650] http_filters.c(1134): [client 136.144.41.231:35566] Date: Sun, 05 Dec 2021 23:07:06 GMT [Sun Dec 05 23:07:06.214074 2021] [http:trace5] [pid 17650] http_filters.c(1137): [client 136.144.41.231:35566] Server: Apache/2.4.41 (Ubuntu) [Sun Dec 05 23:07:06.214077 2021] [http:trace4] [pid 17650] http_filters.c(955): [client 136.144.41.231:35566] Content-Length: 276 [Sun Dec 05 23:07:06.214084 2021] [http:trace4] [pid 17650] http_filters.c(955): [client 136.144.41.231:35566] Keep-Alive: timeout=5, max=100 [Sun Dec 05 23:07:06.214087 2021] [http:trace4] [pid 17650] http_filters.c(955): [client 136.144.41.231:35566] Connection: Keep-Alive [Sun Dec 05 23:07:06.214090 2021] [http:trace4] [pid 17650] http_filters.c(955): [client 136.144.41.231:35566] Content-Type: text/html; charset=iso-8859-1 [Sun Dec 05 23:07:06.214111 2021] [core:trace6] [pid 17650] core_filters.c(519): [client 136.144.41.231:35566] will flush because of FLUSH bucket [Sun Dec 05 23:07:06.313890 2021] [core:trace6] [pid 17650] core_filters.c(519): [client 136.144.41.231:35566] will flush because of FLUSH bucket |
Growing a zpool raidz2 with larger disks? Posted: 05 Dec 2021 10:41 PM PST I have Linux PC with RaidZ2 over 6 disks, 3T each. Disks is shared between several partitions; the zpool lays only on part 6 on each disk; other partitions are used for other purposes. I am going to buy 6x4T. My plan is to: - boot a live CD that is not aware of ZFS
- copy each 3T disk onto a 4T disk
- create on each 4T disk a new partition n° 18
- reboot my normal system
- expand my zpool over all partitions 18
Will it work ? what's the command to expand the pool with a set of 6 partitions sda18...sdf18 ? If its not possible, I have a fallback method I don't like: make partitions 18 as large as possible (probably 1T), dump sd[abcdef]6 into sd[abcdef]18, erase sd[abcdef]6, and then, ask the zpool to expand in a partition larger than it used to be. Thanks |
What does the -a option do exactly with the cp command? Posted: 05 Dec 2021 06:35 PM PST I am trying to understand what the -a option does exactly with the cp command? The man pages on my system does not give much information about this. |
ssh, heredoc and environment variables Posted: 05 Dec 2021 07:08 PM PST (This is RHEL 8.4, if it matters.) The echo commands on lines 5 and 7 in this script run on the local host, but the hostname commands on lines 6 and 8 run on the remote host as expected. Why do lines 5 and 7 run on the local host? More importantly, how do I get them to run on the remote host? EDIT: I do not want to pass in variables. I want the variables to be solely defined and used on the remote server. 1 #!/bin/bash 2 export foo=bar 3 ssh -q ${1} <<EOF 4 export foo=blarge 5 echo $foo 6 hostname 7 echo $foo 8 hostname 9 EOF 10 hostname |
AWS EC2 forwarding google-chrome to Mac Big Sure xquartz: No matching fbConfigs or visuals found; libGL error: failed to load driver: swrast Posted: 05 Dec 2021 11:01 PM PST Attempting to run Chrome google-chrome v96.0.4664.45 from an AWS EC2 Ubuntu 20.04 instance, and redirect display to my Macbook running Big Sur and xquartz v2.8.1. Why am I getting the errors below? The application launches, but is painfully slow. xeyes, xclock, and xcalc all work. UPDATE1: Seems an issue with Mac Big Sur and xquartz. See: https://github.com/XQuartz/XQuartz/issues/144 UBUNTU: sudo cat /etc/ssh/sshd_config | grep X11 X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes ERROR libGL error: No matching fbConfigs or visuals found libGL error: failed ot load driver: swrast MACBOOK - X11 server (xquartz) installed
- Connection command:
ssh -X -i qwerty.pem ubuntu@192.0.2.0 REFERENCES - How to forward X over SSH to run graphics applications remotely?
|
Bash Script to replace attachment paths in file with full path Posted: 05 Dec 2021 07:24 PM PST I have a mix of filenames and relative paths in a markdown file that I want to refactor so that the full relative path to ~/app/ is inserted for interoperability between markdown readers. For my files in ~/app/ I have e.g. a file ~/app/file1.md that references attachements in ~/app/attachments/ Example: file1.md contains: Here is an image: ![[img1.png]] Here is another image: ![[attachments/img2.png]] (both images reside in ~/app/attachments/ ) I can get the references between the ![[ and ]] with sed -n 's/!\[\[\(.*\.png\)]]/\1/gp' But how do I combine this with the find command to replace inline with the full relative path? - Note I would want this to work with wherever the images are located not just under attachments/ The resulting file1.md would be: Here is an image: ![[attachments/img1.png]] Here is another image: ![[attachments/img2.png]] |
mount can't read superblock on /dev/sda5 Posted: 05 Dec 2021 07:05 PM PST My notebook couldn't start anymore. I started it with a live USB Ubuntu 20.04 and tried mount /dev/sda5 but receive this error: mount: /mnt: can't read superblock on /dev/sda5 So I tried the commands below: ubuntu@ubuntu:~$ sudo fdisk -l /dev/sda Disk /dev/sda: 931,53 GiB, 1000204886016 bytes, 1953525168 sectors Disk model: WDC WD10SPZX-21Z Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: 8798743C-1711-4EC3-9829-F392872338D3 Device Start End Sectors Size Type /dev/sda1 2048 206847 204800 100M EFI System /dev/sda2 206848 239615 32768 16M Microsoft reserved /dev/sda3 239616 408477642 408238027 194,7G Microsoft basic data /dev/sda4 1951424512 1953521663 2097152 1G Windows recovery environment /dev/sda5 408477696 1951424511 1542946816 735,8G Linux filesystem Partition table entries are not in disk order. I tried the solution that Xiao Guoa give in this site, but I haven't sucesss. Source: https://www.linuxbabe.com/desktop-linux/fix-cant-read-superblock-error ubuntu@ubuntu:~$ sudo mke2fs -n /dev/sda5 mke2fs 1.45.5 (07-Jan-2020) Creating filesystem with 192868352 4k blocks and 48218112 inodes Filesystem UUID: 9f522638-1d6a-451f-b608-dc03acd3250b Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000 Now I tried with all blocks * 4, without success. block 98304 * 4 = 393216 Source: https://unix.stackexchange.com/questions/315063/mount-wrong-fs-type-bad-option-bad-superblock ubuntu@ubuntu:~$ sudo mount -o sb=393216 /dev/sda5 /mnt mount: /mnt: can't read superblock on /dev/sda5. ubuntu@ubuntu:~$ sudo mount -o sb=655360 /dev/sda5 /mnt mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda5, missing codepage or helper program, or other error. ubuntu@ubuntu:~$ sudo mount -o sb=917504 /dev/sda5 /mnt mount: /mnt: can't read superblock on /dev/sda5. ubuntu@ubuntu:~$ sudo mount -o sb=1179648 /dev/sda5 /mnt mount: /mnt: can't read superblock on /dev/sda5. ubuntu@ubuntu:~$ sudo mount -o sb=3276800 /dev/sda5 /mnt mount: /mnt: can't read superblock on /dev/sda5. ubuntu@ubuntu:~$ sudo mount -o sb=3538944 /dev/sda5 /mnt mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda5, missing codepage or helper program, or other error. ubuntu@ubuntu:~$ sudo mount -o sb=6422528 /dev/sda5 /mnt mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda5, missing codepage or helper program, or other error. ubuntu@ubuntu:~$ sudo mount -o sb=10616832 /dev/sda5 /mnt mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda5, missing codepage or helper program, or other error. ubuntu@ubuntu:~$ sudo mount -o sb=16384000 /dev/sda5 /mnt mount: /mnt: can't read superblock on /dev/sda5. ubuntu@ubuntu:~$ sudo mount -o sb=31850496 /dev/sda5 /mnt mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda5, missing codepage or helper program, or other error. ubuntu@ubuntu:~$ sudo mount -o sb=44957696 /dev/sda5 /mnt mount: /mnt: can't read superblock on /dev/sda5. ubuntu@ubuntu:~$ sudo mount -o sb=81920000 /dev/sda5 /mnt mount: /mnt: can't read superblock on /dev/sda5. ubuntu@ubuntu:~$ sudo mount -o sb=95551488 /dev/sda5 /mnt mount: /mnt: can't read superblock on /dev/sda5. ubuntu@ubuntu:~$ sudo mount -o sb=286654464 /dev/sda5 /mnt mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda5, missing codepage or helper program, or other error. ubuntu@ubuntu:~$ sudo mount -o sb=314703872 /dev/sda5 /mnt mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda5, missing codepage or helper program, or other error. ubuntu@ubuntu:~$ sudo mount -o sb=409600000 /dev/sda5 /mnt mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda5, missing codepage or helper program, or other error. After that I have runned e2fsck for 3 days, without success. ubuntu@ubuntu:~$ sudo e2fsck -f -y -v -c -b 32768 /dev/sda5 e2fsck 1.45.5 (07-Jan-2020) Error reading block 1149 (Input/output error). Ignore error? yes Force rewrite? yes Superblock has an invalid journal (inode 8). Clear? yes *** journal has been deleted *** Resize inode not valid. Recreate? yes Error reading block 1117 (Input/output error) while reading inode and block bitmaps. Ignore error? yes Force rewrite? yes Error reading block 1133 (Input/output error) while reading inode and block bitmaps. Ignore error? yes Force rewrite? yes Error reading block 1118 (Input/output error) while reading inode and block bitmaps. Ignore error? yes Force rewrite? yes Error reading block 1134 (Input/output error) while reading inode and block bitmaps. Ignore error? yes Force rewrite? yes Error reading block 1119 (Input/output error) while reading inode and block bitmaps. Ignore error? yes Force rewrite? yes Error reading block 1120 (Input/output error) while reading inode and block bitmaps. Ignore error? yes Force rewrite? yes Error reading block 1122 (Input/output error) while reading inode and block bitmaps. Ignore error? yes Error dmesg [217797.911529] ata1: EH complete [217807.220171] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 [217807.220191] ata1.00: irq_stat 0x40000001 [217807.220198] ata1.00: failed command: READ DMA EXT [217807.220203] ata1.00: cmd 25/00:08:d8:e0:98/00:00:18:00:00/e0 tag 24 dma 4096 in res 51/40:08:d8:e0:98/00:00:18:00:00/e0 Emask 0x9 (media error) [217807.220220] ata1.00: status: { DRDY ERR } [217807.220225] ata1.00: error: { UNC } [217812.260182] ata1.00: qc timeout (cmd 0xec) [217812.260211] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x5) [217812.260222] ata1.00: revalidation failed (errno=-5) [217812.260240] ata1: hard resetting link [217812.575276] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310) [217818.410875] ata1.00: configured for UDMA/133 [217818.410924] sd 0:0:0:0: [sda] tag#24 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=20s [217818.410936] sd 0:0:0:0: [sda] tag#24 Sense Key : Medium Error [current] [217818.410945] sd 0:0:0:0: [sda] tag#24 Add. Sense: Unrecovered read error - auto reallocate failed [217818.410955] sd 0:0:0:0: [sda] tag#24 CDB: Read(10) 28 00 18 98 e0 d8 00 00 08 00 [217818.410960] blk_update_request: I/O error, dev sda, sector 412672216 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [217818.411029] ata1: EH complete [217821.396529] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 [217821.396556] ata1.00: irq_stat 0x40000001 [217821.396568] ata1.00: failed command: READ DMA EXT [217821.396575] ata1.00: cmd 25/00:08:d8:e0:98/00:00:18:00:00/e0 tag 20 dma 4096 in res 51/40:08:d8:e0:98/00:00:18:00:00/e0 Emask 0x9 (media error) [217821.396604] ata1.00: status: { DRDY ERR } [217821.396612] ata1.00: error: { UNC } [217826.592096] ata1.00: qc timeout (cmd 0xec) [217826.592112] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x5) [217826.592116] ata1.00: revalidation failed (errno=-5) [217826.592122] ata1: hard resetting link [217826.908977] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310) [217845.710563] ata1.00: configured for UDMA/133 [217845.710611] sd 0:0:0:0: [sda] tag#20 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=27s [217845.710624] sd 0:0:0:0: [sda] tag#20 Sense Key : Medium Error [current] [217845.710632] sd 0:0:0:0: [sda] tag#20 Add. Sense: Unrecovered read error - auto reallocate failed [217845.710641] sd 0:0:0:0: [sda] tag#20 CDB: Read(10) 28 00 18 98 e0 d8 00 00 08 00 [217845.710647] blk_update_request: I/O error, dev sda, sector 412672216 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [217845.710670] Buffer I/O error on dev sda5, logical block 524315, async page read [217845.710722] ata1: EH complete [217861.384383] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 [217861.384409] ata1.00: irq_stat 0x40000001 [217861.384420] ata1.00: failed command: READ DMA EXT [217861.384428] ata1.00: cmd 25/00:08:d8:e0:98/00:00:18:00:00/e0 tag 0 dma 4096 in res 51/40:08:d8:e0:98/00:00:18:00:00/e0 Emask 0x9 (media error) [217861.384457] ata1.00: status: { DRDY ERR } [217861.384465] ata1.00: error: { UNC } [217866.528299] ata1.00: qc timeout (cmd 0xec) [217866.528326] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x5) [217866.528335] ata1.00: revalidation failed (errno=-5) [217866.528352] ata1: hard resetting link [217866.843346] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310) [217885.732336] ata1.00: configured for UDMA/133 [217885.732383] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=40s [217885.732395] sd 0:0:0:0: [sda] tag#0 Sense Key : Medium Error [current] [217885.732404] sd 0:0:0:0: [sda] tag#0 Add. Sense: Unrecovered read error - auto reallocate failed [217885.732414] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 18 98 e0 d8 00 00 08 00 [217885.732419] blk_update_request: I/O error, dev sda, sector 412672216 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [217885.732442] Buffer I/O error on dev sda5, logical block 524315, async page read [217885.732492] ata1: EH complete [217895.039725] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 [217895.039750] ata1.00: irq_stat 0x40000001 [217895.039761] ata1.00: failed command: READ DMA EXT [217895.039769] ata1.00: cmd 25/00:08:60:e0:98/00:00:18:00:00/e0 tag 1 dma 4096 in res 51/40:08:60:e0:98/00:00:18:00:00/e0 Emask 0x9 (media error) [217895.039797] ata1.00: status: { DRDY ERR } [217895.039806] ata1.00: error: { UNC } [217900.067695] ata1.00: qc timeout (cmd 0xec) [217900.067710] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x5) [217900.067715] ata1.00: revalidation failed (errno=-5) [217900.067723] ata1: hard resetting link [217900.383017] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310) [217919.221200] ata1.00: configured for UDMA/133 [217919.221247] sd 0:0:0:0: [sda] tag#1 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=33s [217919.221260] sd 0:0:0:0: [sda] tag#1 Sense Key : Medium Error [current] [217919.221269] sd 0:0:0:0: [sda] tag#1 Add. Sense: Unrecovered read error - auto reallocate failed [217919.221279] sd 0:0:0:0: [sda] tag#1 CDB: Read(10) 28 00 18 98 e0 60 00 00 08 00 [217919.221285] blk_update_request: I/O error, dev sda, sector 412672096 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [217919.221353] ata1: EH complete In this thread rknichols show how to find a sector offset in the partition to zero the block safely, but I don't really understand and I was afraid to do that. Source: https://www.linuxquestions.org/questions/linux-hardware-18/buffer-i-o-error-on-dev-sdb1-async-page-read-4175600715/ ubuntu@ubuntu:~$ sudo smartctl -a /dev/sda5 smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.11.0-27-generic] (local build) Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: Western Digital Blue Device Model: WDC WD10SPZX-21Z10T0 Serial Number: WD-WXS1A877RJED LU WWN Device Id: 5 0014ee 6081e1249 Firmware Version: 02.01A02 User Capacity: 1.000.204.886.016 bytes [1,00 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 5400 rpm Form Factor: 2.5 inches Device is: In smartctl database [for details use: -P show] ATA Version is: ACS-3 T13/2161-D revision 5 SATA Version is: SATA 3.1, 6.0 Gb/s (current: 1.5 Gb/s) Local Time is: Wed Nov 10 02:11:30 2021 UTC SMART support is: Available - device has SMART capability. SMART support is: Enabled === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: FAILED! Drive failure expected in less than 24 hours. SAVE ALL DATA. See vendor-specific Attribute list for failed Attributes. General SMART Values: Offline data collection status: (0x00) Offline data collection activity was never started. Auto Offline Data Collection: Disabled. Self-test execution status: ( 0) The previous self-test routine completed without error or no self-test has ever been run. Total time to complete Offline data collection: ( 7680) seconds. Offline data collection capabilities: (0x71) SMART execute Offline immediate. No Auto Offline data collection support. Suspend Offline collection upon new command. No Offline surface scan supported. Self-test supported. Conveyance Self-test supported. Selective Self-test supported. SMART capabilities: (0x0003) Saves SMART data before entering power-saving mode. Supports SMART auto save timer. Error logging capability: (0x01) Error logging supported. General Purpose Logging supported. Short self-test routine recommended polling time: ( 2) minutes. Extended self-test routine recommended polling time: ( 223) minutes. Conveyance self-test routine recommended polling time: ( 1) minutes. SCT capabilities: (0x3035) SCT Status supported. SCT Feature Control supported. SCT Data Table supported. SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x002f 001 001 051 Pre-fail Always FAILING_NOW 19950 3 Spin_Up_Time 0x0027 194 187 021 Pre-fail Always - 1258 4 Start_Stop_Count 0x0032 092 092 000 Old_age Always - 8733 5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0 7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0 9 Power_On_Hours 0x0032 093 093 000 Old_age Always - 5258 10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0 11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 1222 191 G-Sense_Error_Rate 0x0032 001 001 000 Old_age Always - 31491 192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 44 193 Load_Cycle_Count 0x0032 181 181 000 Old_age Always - 59346 194 Temperature_Celsius 0x0022 104 098 000 Old_age Always - 39 196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0 197 Current_Pending_Sector 0x0032 198 198 000 Old_age Always - 441 198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0 SMART Error Log Version: 1 ATA Error Count: 219 (device log contains only the most recent five errors) CR = Command Register [HEX] FR = Features Register [HEX] SC = Sector Count Register [HEX] SN = Sector Number Register [HEX] CL = Cylinder Low Register [HEX] CH = Cylinder High Register [HEX] DH = Device/Head Register [HEX] DC = Device Command Register [HEX] ER = Error register [HEX] ST = Status register [HEX] Powered_Up_Time is measured from power on, and printed as DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes, SS=sec, and sss=millisec. It "wraps" after 49.710 days. Error 219 occurred at disk power-on lifetime: 5257 hours (219 days + 1 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 40 51 02 02 a8 03 e0 Error: UNC 2 sectors at LBA = 0x0003a802 = 239618 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- c8 00 02 02 a8 03 e0 08 2d+00:46:14.317 READ DMA ec 00 00 00 00 00 a0 08 2d+00:46:14.316 IDENTIFY DEVICE ef 03 46 00 00 00 a0 08 2d+00:46:14.316 SET FEATURES [Set transfer mode] ec 00 00 00 00 00 a0 08 2d+00:46:14.212 IDENTIFY DEVICE Error 218 occurred at disk power-on lifetime: 5200 hours (216 days + 16 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 40 51 08 00 28 03 e0 Error: UNC 8 sectors at LBA = 0x00032800 = 206848 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- c8 00 08 00 28 03 e0 08 02:27:11.836 READ DMA e5 00 00 00 00 00 00 08 02:27:11.836 CHECK POWER MODE ec 00 00 00 00 00 a0 08 02:27:11.835 IDENTIFY DEVICE ef 03 46 00 00 00 a0 08 02:27:11.825 SET FEATURES [Set transfer mode] ec 00 00 00 00 00 a0 08 02:27:11.704 IDENTIFY DEVICE Error 217 occurred at disk power-on lifetime: 5200 hours (216 days + 16 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 40 51 08 00 28 03 e0 Error: UNC 8 sectors at LBA = 0x00032800 = 206848 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- c8 00 08 00 28 03 e0 08 02:26:57.401 READ DMA e5 00 00 00 00 00 00 08 02:26:57.400 CHECK POWER MODE ec 00 00 00 00 00 a0 08 02:26:57.384 IDENTIFY DEVICE ef 03 46 00 00 00 a0 08 02:26:57.384 SET FEATURES [Set transfer mode] Error 216 occurred at disk power-on lifetime: 5200 hours (216 days + 16 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 40 51 08 80 27 03 e0 Error: UNC 8 sectors at LBA = 0x00032780 = 206720 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- c8 00 08 80 27 03 e0 08 02:26:15.363 READ DMA ec 00 00 00 00 00 a0 08 02:26:15.349 IDENTIFY DEVICE ef 03 46 00 00 00 a0 08 02:26:15.337 SET FEATURES [Set transfer mode] ec 00 00 00 00 00 a0 08 02:26:15.223 IDENTIFY DEVICE Error 215 occurred at disk power-on lifetime: 5200 hours (216 days + 16 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 40 51 08 80 27 03 e0 Error: UNC 8 sectors at LBA = 0x00032780 = 206720 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- c8 00 08 80 27 03 e0 08 02:26:03.763 READ DMA ec 00 00 00 00 00 a0 08 02:26:03.762 IDENTIFY DEVICE ef 03 46 00 00 00 a0 08 02:26:03.759 SET FEATURES [Set transfer mode] ec 00 00 00 00 00 a0 08 02:26:03.630 IDENTIFY DEVICE SMART Self-test log structure revision number 1 No self-tests have been logged. [To run self-tests, use: smartctl -t] SMART Selective self-test log data structure revision number 1 SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS 1 0 0 Not_testing 2 0 0 Not_testing 3 0 0 Not_testing 4 0 0 Not_testing 5 0 0 Not_testing Selective self-test flags (0x0): After scanning selected spans, do NOT read-scan remainder of disk. If Selective self-test is pending on power-up, resume after 0 minute delay. Someone can help me to solve this issue. I have some files that I don't have backup and I wouldn't like to give up before try everything to recover this hard disk. Thank you. |
sas drive i/o error 5 via raid card - sed locked partition table Posted: 05 Dec 2021 10:11 PM PST I am trying to find a better way to access my newly purchased SAS drives (deepdiscountserver 3tb IBM platters(used or refurb i think yes)), using a 2x4 LSI PCIe3 card. I think the card is only half working based on a few things mentioned below. For now, I'm simply trying to put a file system on it, running into error 5 , and i/o errors(need to remove SED encryption?). I worked out a way to do it with dd , see below. I don't have options in my SAS/RAID controller card or I would reset it there. When I press the hotkey during boot, it responds says it will load, but never loads. If i understand correctly, this should be where one woud normally turn off the encryption, right? sedutil-cli , and hdparm report this, not helpful. sedutil-cli --scan ... /dev/sdf No sdc 8:32 0 2.7T 0 disk The Kernel flag libata.allow_tpm is not set correctly ├─sdc1 8:33 0 2.7T 0 part Please see the readme note about setting the libata.allow_tpm ... hdparm -I /dev/sdd /dev/sdd: SG_IO: bad/missing sense data, sb[]: 72 05 20 00 00 00 00 1c 02 06 00 00 cf 00 00 00 03 02 00 01 80 0e 0 0 00 05 20 00 01 ff ff ff ff SG_IO: bad/missing sense data, sb[]: 72 05 20 00 00 00 00 1c 02 06 00 00 cf 00 00 00 03 02 00 01 80 0e 0 0 00 05 20 00 01 ff ff ff ff HDIO_DRIVE_CMD(identify) failed: Input/output error I will do what worked for me last time. These drives are going to be a pain in the ass. See below, and also let me know If I do this a better way; dd /dev/sdd if=/dev/zero of=/dev/sdd bs=1M dd: error writing '/dev/disk/by-id/scsi-35000c50084889cf3': No space left on device 2861589+0 records in 2861588+0 records out 3000592982016 bytes (3.0 TB) copied, 21272.1 s, 141 MB/s SED is gone, should no longer receive I/O errors. Now use gdisk to lay in a new partition table. If you run gdisk before you dd the entire drive, it reports the I/O error, usually that means i didnt DD enough of the drive. usualy I think thats some stuff at the very end of the drive. This option deletes all partitions and creates a new protective MBR. Proceed? (Y/N): y 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 successfully. I've tried parted, fdisk , etc.. If I don't run dd at all, or run it just on the beginning, SED takes over I think, and I/O errors, error 5 , and everything points to bad controller card, cabling, or drive. However, trying every other cable, and running through smartctl says thats a false alarm, that things are fine. I even have some other IBM drives to compare to on the system, and can tell you, this is normal behaviour, for these drives in their received condition. If I could get into the SAS settings, I would just clear the drive there. So in the end, dd is all that's working for me, thankfully at least :-) is there is a better (quicker) way? Is it normal to not access to sedutil , and hdparm for SAS drives? I better be careful when I choose my next RAID controller card based on this. |
Setting up squid transparent proxy with SSL bumping on Debian 10 Posted: 05 Dec 2021 06:55 PM PST Debian 10 with squid working as a transparent proxy. Now want to add SSL. # apt-get install openssl # mkdir -p /etc/squid/cert # cd /etc/squid/cert # openssl req -new -newkey rsa:4096 -sha256 -days 365 -nodes -x509 -keyout myCA.pem -out myCA.pem # openssl x509 -in myCA.pem -outform DER -out myCA.der # # iptables -t nat -A PREROUTING -i br0 -p tcp --dport 443 -j DNAT --to 192.168.1.51:3129 # iptables -t nat -A PREROUTING -i br0 -p tcp --dport 443 -j REDIRECT --to-port 3129 # iptables-save > /etc/iptables/rules.v4 Question 1: Now what I read says that next I need to /usr/lib/squid/security_file_certgen -c -s /var/cache/squid/ssl_db -M 4MB however I cannot find security_file_certgen on my system. Question 2: If I now proceed anyway to add in squid.conf : https_port 3129 intercept ssl-bump cert=/etc/squid/cert/myCA.pem generate-host-certificates=on then squid fails to start: 2020/10/07 14:09:27| FATAL: Unknown https_port option 'ssl-bump'. 2020/10/07 14:09:27| FATAL: Bungled /etc/squid/squid.conf line 5: https_port 3129 int 2020/10/07 14:09:27| Squid Cache (Version 4.6): Terminated abnormally. CPU Usage: 0.017 seconds = 0.017 user + 0.000 sys Maximum Resident Size: 57792 KB Page faults with physical i/o: 0 FATAL: Bungled /etc/squid/squid.conf line 5: https_port 3129 intercept ssl-bump cert= squid.service: Control process exited, code=exited, status=1/FAILURE squid.service: Failed with result 'exit-code'. Failed to start Squid Web Proxy Server. I notice that squid -v contains neither --enable-ssl-crtd nor --with-openssl , but I don't understand what to do about this. Update All of the guides on the Internet at the time of writing are obsolete because https://wiki.squid-cache.org/Features/SslBump ssl-bump has been replaced with https://wiki.squid-cache.org/Features/BumpSslServerFirst server-first and server-first has been replaced with https://wiki.squid-cache.org/Features/SslPeekAndSplice peek-n-splice . I was hoping this might work that I got from https://serverfault.com/questions/743483/transparent-http-https-domain-filtering-proxy : https_port 3129 intercept ssl-bump ssl_bump peek all ssl_bump splice all but no: 2020/10/08 09:57:49| FATAL: Unknown https_port option 'ssl-bump'. 2020/10/08 09:57:49| FATAL: Bungled /etc/squid/squid.conf line 6: https_port 3129 int 2020/10/08 09:57:49| Squid Cache (Version 4.6): Terminated abnormally. CPU Usage: 0.017 seconds = 0.008 user + 0.008 sys Maximum Resident Size: 57152 KB Page faults with physical i/o: 0 FATAL: Bungled /etc/squid/squid.conf line 6: https_port 3129 intercept ssl-bump squid.service: Control process exited, code=exited, status=1/FAILURE squid.service: Failed with result 'exit-code'. Failed to start Squid Web Proxy Server. Update: compiling squid with SSL # cd ~ # mkdir squid-build # cd squid-build # apt-get install openssh-server net-tools # apt-get install openssl devscripts build-essential fakeroot libdbi-perl libssl-dev# libssl1.0-dev # apt-get install dpkg-dev # apt-get source squid # apt-get build-dep squid # cd squid-4.6/ # vi debian/rules # dpkg-source --commit In debian/rules file add to DEB_CONFIGURE_EXTRA_FLAGS the flags: --with-default-user=proxy \ --enable-ssl \ --enable-ssl-crtd \ --with-openssl \ --disable-ipv6 ...and build... # debuild -us -uc ...and install... # cd .. # pwd /root/squid-build # mv squid3*.deb squid3.deb.NotIncluded # dpkg -i *.deb However, still no ssl_crtd . Has it been renamed to security_file_certgen ? (https://bugzilla.redhat.com/show_bug.cgi?id=1397644) Update: compiled squid Got squid compiled and running for HTTP but don't know what to do for HTTPS -- and nor apparently does anyone else. Is it impossible? It seems to be something to do with certificates and squid.conf . |
Constantly I have to use `fsck` to fix my PC Posted: 05 Dec 2021 08:39 PM PST It isn't the first time I have this kind of error. I was using my computer (Ubuntu 3.2) when my file permissions turned to read-only , so I restarted the computer, it wasn't finishing turning on, so I forced to turn it off (hard power off), and I was turning it on again, and I saw this: /dev/sda2 contains a file system with errors, check forced. Inodes that were part of a corrupted orphan linked list found. /dev/sda2: UNEXPECTED INCOSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) fsck exited with status code 4 The root filesystem on /dev/sda2 requires a manual fsck BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3.2) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs) I wrote fsck /dev/sda2 (with -a because i don't know how to do it without that), I am worried because this is not the first time, maybe the hard-disk is broken or I don't know. Maybe this is not the best place for my problem. Will you tell me what to do? What is it next? I want to learn, so your suggestions are too helpful. P.D.: Sorry for my English I wrote fsck /dev/sda2 , and the next was: fsck from util-linux 2.31.1 e2fsck 1.44.1 (24-Mar-2018) /dev/sda2 contains a file system with errors, check forced. Pass 1: Checking inodes, blocks, and sizes Inodes that were of a corrupted orphan linked list found. Fix<y>? I put y and the screen prints: Inode 18874440 was part of the orphaned inode list. FIXED Inode 18874445 was part of the orphaned inode list. FIXED Inode 18874466 was part of the orphaned inode list. FIXED And 20 lines of that, the following was Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information Block bitmap differences: -(2494976--2495023) - (so many numbers).... Fix<y>? yes Free blocks count wrong for group #76 (19099, counted 19147). Fix<y>? yes Free blocks count wrong for group #81 (30339, counted=30365) Fix<y>? yes Free blocks count wrong for group #1577 (28430, counted=28437) Fix<y>? yes ... Finally /dev/sda2: ***** FILE SYSTEM WAS MODIFIED ***** /dev/sda2: 541701/61022208 files (0.4% non-contiguous), 18674207/244059136 blocks After of this, I wrote reboot and the computer came back to work. But this will happens again, and I need stop it. I need some book to invetigate this, i want to learn why this happens. Update: It happens again, when I was using Mozilla Firefox, the files' permissions were turned to read only . Then I restart the pc, and it doesn't finish. I will have to restart it and use fsck again. Output of sudo smartctl -a /dev/sda : smartctl 6.6 2016-05-31 r4324 [x86_64-linux-5.3.0-42-generic] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Device Model: TOSHIBA MQ04ABF100 Serial Number: X8JBP3K2T LU WWN Device Id: 5 000039 8d268714d Firmware Version: JU001J User Capacity: 1.000.204.886.016 bytes [1,00 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 5400 rpm Form Factor: 2.5 inches Device is: Not in smartctl database [for details use: -P showall] ATA Version is: ACS-3 T13/2161-D revision 5 SATA Version is: SATA >3.2 (0x1ff), 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Sun Mar 29 03:48:34 2020 -03 SMART support is: Available - device has SMART capability. SMART support is: Enabled === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED General SMART Values: Offline data collection status: (0x00) Offline data collection activity was never started. Auto Offline Data Collection: Disabled. Self-test execution status: ( 0) The previous self-test routine completed without error or no self-test has ever been run. Total time to complete Offline data collection: ( 120) seconds. Offline data collection capabilities: (0x5b) SMART execute Offline immediate. Auto Offline data collection on/off support. Suspend Offline collection upon new command. Offline surface scan supported. Self-test supported. No Conveyance Self-test supported. Selective Self-test supported. SMART capabilities: (0x0003) Saves SMART data before entering power-saving mode. Supports SMART auto save timer. Error logging capability: (0x01) Error logging supported. General Purpose Logging supported. Short self-test routine recommended polling time: ( 2) minutes. Extended self-test routine recommended polling time: ( 172) minutes. SCT capabilities: (0x003d) SCT Status supported. SCT Error Recovery Control supported. SCT Feature Control supported. SCT Data Table supported. SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000b 100 100 050 Pre-fail Always - 0 2 Throughput_Performance 0x0005 100 100 050 Pre-fail Offline - 0 3 Spin_Up_Time 0x0027 100 100 001 Pre-fail Always - 1348 4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 596 5 Reallocated_Sector_Ct 0x0033 100 100 050 Pre-fail Always - 0 7 Seek_Error_Rate 0x000b 100 095 050 Pre-fail Always - 0 8 Seek_Time_Performance 0x0005 100 100 050 Pre-fail Offline - 0 9 Power_On_Hours 0x0032 097 097 000 Old_age Always - 1544 10 Spin_Retry_Count 0x0033 111 100 030 Pre-fail Always - 0 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 421 191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 1265 192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 20 193 Load_Cycle_Count 0x0032 096 096 000 Old_age Always - 48581 194 Temperature_Celsius 0x0022 100 100 000 Old_age Always - 35 (Min/Max 13/45) 196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0 197 Current_Pending_Sector 0x0032 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0030 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x0032 200 253 000 Old_age Always - 0 220 Disk_Shift 0x0002 100 100 000 Old_age Always - 0 222 Loaded_Hours 0x0032 097 097 000 Old_age Always - 1346 223 Load_Retry_Count 0x0032 100 100 000 Old_age Always - 0 224 Load_Friction 0x0022 100 100 000 Old_age Always - 0 226 Load-in_Time 0x0026 100 100 000 Old_age Always - 260 240 Head_Flying_Hours 0x0001 100 100 001 Pre-fail Offline - 0 SMART Error Log Version: 1 ATA Error Count: 1 CR = Command Register [HEX] FR = Features Register [HEX] SC = Sector Count Register [HEX] SN = Sector Number Register [HEX] CL = Cylinder Low Register [HEX] CH = Cylinder High Register [HEX] DH = Device/Head Register [HEX] DC = Device Command Register [HEX] ER = Error register [HEX] ST = Status register [HEX] Powered_Up_Time is measured from power on, and printed as DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes, SS=sec, and sss=millisec. It "wraps" after 49.710 days. Error 1 occurred at disk power-on lifetime: 1096 hours (45 days + 16 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 04 31 00 02 59 d7 a9 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- ea 00 00 00 00 00 a0 00 05:01:42.830 FLUSH CACHE EXT 61 58 30 38 f9 20 40 00 05:01:42.830 WRITE FPDMA QUEUED 61 08 80 08 f9 1b 40 00 05:01:42.829 WRITE FPDMA QUEUED 61 08 78 a0 b8 52 40 00 05:01:42.788 WRITE FPDMA QUEUED 61 30 70 58 0c 50 40 00 05:01:42.788 WRITE FPDMA QUEUED SMART Self-test log structure revision number 1 No self-tests have been logged. [To run self-tests, use: smartctl -t] SMART Selective self-test log data structure revision number 1 SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS 1 0 0 Not_testing 2 0 0 Not_testing 3 0 0 Not_testing 4 0 0 Not_testing 5 0 0 Not_testing Selective self-test flags (0x0): After scanning selected spans, do NOT read-scan remainder of disk. If Selective self-test is pending on power-up, resume after 0 minute delay. |
How to queue up videos or media using mpv? Posted: 05 Dec 2021 11:06 PM PST In particular I'd like a command for mpv that will automatically play youtube links I add in order. For example, at a party I might want to queue up songs as we think of them, and have them automatically play. |
Boot issues - GPU pci config reset Posted: 05 Dec 2021 09:02 PM PST I have some issue to boot to Kali since i reboot the computer. I don't think i install some software, but i may be have run apt-get update since the last success boot. With the kernel 4.9.0-Kali4-amd64, the system fails booting with the following message: [ powerplay ] VBIOS did not find boot engine clock value in dependency table. Using Memory DPM level 0! In recovery mode the system boot stop progressing at the following step: admgpu 0000:0a:00.0: GPU pci config reset I have a multi boot with windows 10 who is still working. The system is running on a HP laptop with intel i5-5200 cpu and ADM R5 m255 GPU Any clue how i can solve my boot issue? thanks |
Why doesn't SSH -t wait for background processes? Posted: 05 Dec 2021 10:34 PM PST Why is it that ssh -t doesn't wait for background jobs to finish? Example: ssh user@example 'sleep 2 &' This works as expected, since ssh returns after 2 seconds, whereas ssh user@example -t 'sleep 2 &' does not wait for sleep to finish and returns immediately. Can anyone explain the reason behind this? Is there a way to let ssh -t wait for all background processes to finish before returning? My use case is that I start a script with ssh -t , and this script starts several background jobs that should stay alive after the main script finishes. With ssh -t this is not possible so far. |
remove lines from a vcf.gz file with awk command Posted: 05 Dec 2021 07:06 PM PST I just asked a question about filtering out lines with a specific value in a specific column. If I now want to delete lines with a specific value in a specific column. How do I do that? E.g. delete lines with 1/1 in the column labelled 12345 in the file.vcf.gz and put the remaining lines in new file called newfile.vcf.gz E.g. #CHROM POS ALT 12345 1 345632 T 0/1:4,4:8:99:105,0,106 4 032184 C 1/1:46,9:55:99:99,0,1222 6 843290 A 0/1:67,20:87:99:336,0,1641 Expected result: 1 345632 T 0/1:4,4:8:99:105,0,106 6 843290 A 0/1:67,20:87:99:336,0,1641 |
Location of Wifi SSID configs and how to make a hotspot in Ubuntu 14.04 Posted: 05 Dec 2021 08:03 PM PST What is the location of wifi ssid config in Ubuntu 14.04. Also, making a wifi connection as Hotspot does not work. I am unable to make a hotspot in Ubuntu 14.04 via UI. One of the reasons that I found was that mode is set to infrastructure in the hotspot config and I need to change it. I tried locating the file in /etc/network/interfaces from online search but that configuration is not something that I am looking for. |
view IPs from apache access.log for date period Posted: 05 Dec 2021 10:00 PM PST I have seen someone use this command -- and it works where it pulls back all the IPS in a list/group: cat access.* | awk '{ print $1 }' | sort | uniq -c | sort -n However, I want to choose the past 2 days; how can I do that? |
How to replace sysvinit with systemd in a Debian based distribution? Posted: 05 Dec 2021 10:37 PM PST I've been using systemd for a while in my Debian installation, just that to make it possible I had to add a boot parameter to the /etc/default/grub file to make it work, which is added to Ubuntu boot parameters. Ubuntu doesn't have installed systemd yet so I have to remove it or the boot can fail. So, I'm looking for a way to replace sysvinit with systemd and remove the boot parameter, how would I do this? |
What does aux mean in `ps aux`? Posted: 05 Dec 2021 08:57 PM PST ps aux seems to conveniently list all processes and their status and resource usage (Linux/BSD/MacOS), however I cannot comprehend the meaning of parameter aux using man ps . What does aux mean? |
How to mount an image file without root permission? Posted: 05 Dec 2021 10:53 PM PST Can I mount a file system image without root permission? Normally I would do: mount -o loop DISK_IMAGE FOLDER Without using sudo or setting the suid on mount , is there any suitable way to do this? I know I can use fusermount with some ISO images, but that is pretty limited, even for ISO images, some of my images cannot be mounted, but mount always works. |
No comments:
Post a Comment