Strange behaviour when getting IP address via DHCP from wifi access point Posted: 02 Dec 2021 12:00 PM PST I'm experiencing a strange behaviour with wifi connection on Lubuntu. Basically, Lubuntu is getting only an IPv6 address when connecting to certain access point, although it should be getting an IPv4 address too. The scenario is the following: - Two wifi access points for different networks. Both of them providing IP addresses via DHCP. Call them A and B.
- A laptop with Fedora 31 and Intel wireless adapter (call if F).
- A laptop with Lubuntu 20.04 and Realtek wireless adapter (call it L).
This is what happens: - Both F and L get IPv4 and IPv6 addresses when connecting to A. Everything works OK.
- If F connects to B it gets IPv4 and IPv6 addresses. Everything works OK.
- If L connects to B it gets only an IPv6 address. L cannot visit some domains (e.g. google.com works but amazon.com is not working).
- If L renews the DHCP lease (doing
sudo dhclient wlo1 ) when connected to B, then it does get IPv4 and IPv6 addresses and everything works OK. Some comments: The Realtek wireless adapter of L was not working properly after a fresh install of Lubuntu. So I installed the driver provided by the package rtl8821ce-dkms . The problem is what happens when L connects to B (described in 3 and 4). The behaviour described in 1 and 2 is provided for comparison purposes only. My questions Why is this? How could I force L to get both IPv4 and IPv6 addresses from the start when connecting to B? |
How to get a serial console on a modern Laptop Posted: 02 Dec 2021 11:52 AM PST I would like to observe my Linux system while getting suspended. Reading out the dmesg does not work, because my system stops logging until the device resumes. But that's exactly the problem, my device does not return and the log is gone therefore. There is an option to stop putting consoles into standby, it's called no_console_suspend . That's nice, the only problem is: most modern laptops do not have a serial port. How can I connect a serial console to those devices? I thought about using an USB to serial adapter, unfortunately I guess that wouldn't work because USB is pretty sure suspended. Any ideas? |
skip row if column empty Posted: 02 Dec 2021 11:31 AM PST so I have a problem with filter rows with empty row in 4 column. Input: 1242 2021-11-22 Text 5.0 1242 2021-11-22 Text 1242 2021-11-22 Text 5.0 1242 2021-11-22 Text 5.0 4095 2021-11-22 Text 4095 2021-11-22 Text 5.0 4095 2021-11-22 Text 4095 2021-11-22 Text 5.0 4095 2021-11-22 Text 4095 2021-11-22 Text 5.0 and I want output: 1242 2021-11-22 Text 5.0 1242 2021-11-22 Text 5.0 1242 2021-11-22 Text 5.0 4095 2021-11-22 Text 5.0 4095 2021-11-22 Text 5.0 4095 2021-11-22 Text 5.0 The size of a file is 2.0Gb and number of lines is 45405861. I have tried this, but none of it worked - it returns empty or same file: awk -F: '{if($4 != "") print}' awk -F '$4 != ""' awk -F , '$4 != "\"\"" {print}' Please help :( |
How to sort by the whitespace character Posted: 02 Dec 2021 10:41 AM PST I have this shell script which lists all the names of subdirectories of the current working directory. Is there any way I can sort the names so that directory with whitespaces in the name comes first and then the other ones? Here's my script: #! /bin/bash #search for files in a given directory for file in $* do ls -1p | tr '/' ' ' done Here's the output it creates : A7 Provided a7q3.log a7q4.log A7 Starters lsdir1.sh lsdir.sh Is ther a way I can create an output which would look like A7 Provided A7 Starters a7q3.log a7q4.log lsdir1.sh lsdir.sh |
Depending on multiple modules with duplicated backport includes Posted: 02 Dec 2021 09:35 AM PST I'm working on a dkms kernel module that depends on two other modules that have their own backport-includes. The header guards for libA/linux/xyz.h and libB/linxu/xyz.h are exactly the same. #ifndef _COMPAT_LINUX_XYZ_H #define _COMPAT_LINUX_XYZ_H #include_next <linux/xyz.h> Here is how the preprocessor is reading these includes: - Include libA/linux/xyz.h, then call include_next(linux/xyz.h)
- We read libB/linux/xyz.h but we skip it because the _COMPAT_LINUX_XYZ_H is already defined by libA.
- We never read original linux/xyz.h from kernel source.
- Project doesn't compile because it is missing symbol definitions from linux headers xyz.h
Possible solutions? - The most sane approach seems to be splitting my project into separate compilation units so I never include libA and liB in the same place. I am not sure if it feasible in my our project because the use of these libraries is very tightly coupled.
- I made it work by appending -include path/to/kernelsrc/linux/xyz.h to compilation commands in Kuild. This shortsighted solution made the project compile but will likely cause us many problems in the future.
I'd appreciate any suggestions. Thanks. |
fedora 24 ens33 not connected to network Posted: 02 Dec 2021 09:29 AM PST hi I cant connect my fedora VM to the internet even though i have it set to NAT in the VM settings it wont even appear as an option the the settings |
Restore executable permissios to files Posted: 02 Dec 2021 09:22 AM PST I mistakenly ran chmod -x * in my /home thinking I was in a subfolder (wrong terminal, and I'm dumb). Now I'm getting all kinds of errors from different applications. Is there a way for me to detect which files exactly were modded and revert them back? |
Why is this Curl argument needed after URL for Bash script to work? Posted: 02 Dec 2021 09:11 AM PST The script accomplishes what it's intended to; writing the curl response to a file as well as to console. Definitely not the best way to write this for sure. I'm trying to understand why the script won't work if "output.txt" is removed after $url var. It will write an empty line to file and screen. Command ./url_checker.sh url_list.txt Script #!/bin/bash file="$1" while read -r line do url="$line" RESPONSE=$(curl -Is $url output.txt | head -1) echo $RESPONSE echo $RESPONSE >> output.txt exit done < "$file" Output HTTP/1.1 200 OK I've also tried alternate methods of executing with no luck: curl -Is $url | head -1 >> output.txt curl -Is $url | head -1 | &>> output.txt curl -Is $line | head -1 #this won't output to console The working command line full command is: curl -Is https://www.google.com/ | head -1 It works fine on a terminal but within a bash script won't work unless "output.txt" is added after url var. |
Why does my dd Full Disk Copy Keep failing at 8 GB? Posted: 02 Dec 2021 09:35 AM PST I am trying to clone a 500 GB SSD to a 1TB SSD. For some reason, it keeps failing when the data being copied reaches 8GB. This is the third 1TB SSD I've tried this on and they all get stuck at the same place. I've ran the following command: dd if=/dev/sda of=/dev/sdb bs=1024k status=progress I've also tried to clone the drive using Clonezilla which fails at the same spot. I used GParted to reformat the drive and set it to a EXT4 file system but it still gets stuck at the same spot. Sda is internal and sdb is plugged in externally. The error I'm getting says: 7977443328 bytes (8.0 GB, 7.4 GB) copied, 208s, 38.4 MB/s dd: error reading '/dev/sda': Input/output error 7607+1 records in 7607+1 records out |
Trouble installing a package "E: Unable to correct problems, you have held broken packages." Posted: 02 Dec 2021 08:34 AM PST I installed some ROS components from source on a raspberry pi. I was going through and installing the required dependencies, when I ran into this: sudo apt install -o Debug::pkgProblemResolver=true -o Debug::Acquire::http=true libgpg-error-dev Reading package lists... Done Building dependency tree Reading state information... Done Starting pkgProblemResolver with broken count: 1 Starting 2 pkgProblemResolver with broken count: 1 Investigating (0) libgpg-error-dev:armhf < none -> 1.26-2 @un puN Ib > Broken libgpg-error-dev:armhf Depends on libgpg-error0:armhf < 1.35-1~bpo9+1 @ii mK > (= 1.26-2) Considering libgpg-error0:armhf 106 as a solution to libgpg-error-dev:armhf 9999 Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libgpg-error-dev : Depends: libgpg-error0 (= 1.26-2) but 1.35-1~bpo9+1 is to be installed E: Unable to correct problems, you have held broken packages. I'm not sure what's going on, nor how to resolve this. Any advice? |
pactl package in docker alpine container Posted: 02 Dec 2021 09:19 AM PST I want to pactl in a docker Alpine container. I installed pulseaudio and also tried apk add pactl . How can I install pactl under Docker Alpine container? |
How to use GNU Parallel for executing a program concurrently? Posted: 02 Dec 2021 11:42 AM PST I need to run a python script several times in parallel but I have done executing it in the background like this ipython program.py & ipython program.py & ... I want to know if this way uses one core per execution or just executes the program.py using threads. By the way, I want to explore the use of GNU Parallel but the examples that I find are about commands like "cat" of "find". How can I use GNU Parallel for executing program.py concurrently, each time in a different core? Thanks for your help. |
Why is libinput packaged as libinput10? Posted: 02 Dec 2021 08:36 AM PST I'm writing documentation for touchpad hackers at linuxtouchpad.org and I'm trying to explain which debian package has the build dependencies for libinput (i.e. is it sudo apt build-dep libinput or sudo apt build-dep libinput10 ?) Why do we even have a libinput10 ? I see evidence of an old libinput5 deb package in jessie debian release. Why did libinputX get a version bump when other libinput packages (such as libinput-bin and libinput-dev ) did not? The latest version of the libinput source library itself is 1.19.2 which doesn't seem relevant to the "5" or the "10" suffix. |
Different directory size after rsync and using du Posted: 02 Dec 2021 09:37 AM PST I migrated some special directories (not supported by common migration tools) from one Synology NAS volume (ext4) to another (btrfs). After checking if the synchronization was successful I found that sizes differ a lot. I understand that there are block size differences but du gives me wrong data size within the same volume. The total size of the whole directory is more than 1 TB so I narrowed the commands below to a smaller sub-directory. Different sizes: sudo du -sm /volume[12]/@synologydrive/@sync/repo/1/2 11418 /volume1/@synologydrive/@sync/repo/1/2 11122 /volume2/@synologydrive/@sync/repo/1/2 But for each sub-directory I get correct sizes (more or less when bytes are used) - sub-directory n is selected: sudo du -sm /volume[12]/@synologydrive/@sync/repo/1/2/n 295 /volume1/@synologydrive/@sync/repo/1/2/n 295 /volume2/@synologydrive/@sync/repo/1/2/n sudo du -sb /volume[12]/@synologydrive/@sync/repo/1/2/n 308387853 /volume1/@synologydrive/@sync/repo/1/2/n 308391693 /volume2/@synologydrive/@sync/repo/1/2/n But, I'm getting completely different sizes when * is used (i.e. even on the same volume compare command above and this one on volume2): sudo du -sm /volume[12]/@synologydrive/@sync/repo/1/2/* | grep n$ 295 /volume1/@synologydrive/@sync/repo/1/2/n 200 /volume2/@synologydrive/@sync/repo/1/2/n sudo du -sb /volume[12]/@synologydrive/@sync/repo/1/2/* | grep n$ 308387853 /volume1/@synologydrive/@sync/repo/1/2/n 209533219 /volume2/@synologydrive/@sync/repo/1/2/n I also counted sizes of all files under the n directory and I'm getting the same sizes: ls -lA /volume1/@synologydrive/@sync/repo/1/2/n | tr -s ' ' | cut -f5 -d" " | awk '{s+=$1} END {print s}' 308387597 ls -lA /volume2/@synologydrive/@sync/repo/1/2/n | tr -s ' ' | cut -f5 -d" " | awk '{s+=$1} END {print s}' 308387597 So, it seems that the directories are "rsynced" correctly (same number of files, same sizes) and tried to exclude differences between two different file systems. But du gives me significantly bigger size on new volume1 (or more exactly - significantly smaller on old volume2). Do you have any explanation for it? Notes: volume1 is new btrfs target volume (I copied data to) volume2 is old ext4 source volume (I copied data from) - Data were copied using
sudo rsync -a --progress --delete /volume2/@synologydrive /volume1 |
Using awk with multiple pipings Posted: 02 Dec 2021 10:03 AM PST The command ./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe -group tuevGroup | grep mis.merchantCtpCredential produces the following output without the header: GROUP TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG CONSUMER-ID HOST CLIENT-ID tuevGroup mis.merchantCtpCredentials 1 231 231 0 consumer-tuevGroup-2-00e2ed7d-0fdc-4303-bc06-0e8f50b1dc00 00.24.242.16/00.24.242.00 consumer-tuevGroup-2 tuevGroup mis.merchantCtpCredentials 5 182 182 0 consumer-tuevGroup-2-00e2ed7d-0fdc-4303-bc06-0e8f50b1dc00 00.24.242.16/00.24.242.00 consumer-tuevGroup-2 I want to get the total number of LAG column for all rows, so I pipe the result to awk as follows ./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe -group tuevGroup | grep mis.merchantCtpCredentials | awk '{sum += $5} END {print sum}' This however doesn't work, although If I commit the grep mis.merchantCtpCredential I get total result for all rows, unfiltered however I am wondering what am I doing wrong here, your help is highly appreciated |
grep: annotate the occurrence number Posted: 02 Dec 2021 09:27 AM PST I have a text file with a format similar to: PktType1 Header PktType1 Pay PktType1 Done PktType0 Header PktType0 Pay PktType0 Done ... What I'm trying to do is grep for all occurrences of PktType0 Done and then annotate which Nth occurrence it is along with the line number. For example: 1 42 PktType0 Done 2 65 PktType0 Done 3 75 PktType0 Done Where 42, 65 and 75 are the line numbers and 1, 2 and 3 are simply a count of the occurrences. I suppose I could write it to a file and then show the line numbers. But I was wondering if there's a tool I can pipe this to that will do the same. |
"gpg: error reading key: No public key" when updating manjaro-keyring Posted: 02 Dec 2021 08:43 AM PST I have a super weird issue which has almost been preventing me from installing/updating anything. Anytime pacman tries to update the manjaro-keyring package, I get the error in the title of this post. I have had to temporarily disable GPG checking in my pacman.conf , and I know this is not really an ideal security situation. Are there any known issues with the formatting on the GPG keys? I'm running gnupg 2.2.29-1 and I've made sure to stay on the stable branch while the issue persists. I was on unstable but force downgraded everything. Rebooted and reregistered keys many times in multiple orders. I'm totally at a loss. I've visited Manjaro's help site and every Manjaro forum page that even mentions GPG. Suggestions from there unfortunately did nothing to help. To be specific, on step 4: sudo pacman-key --populate archlinux manjaro When it tries to append manjaro.gpg keys, I get the "No public key" error twice in a row, then the rest seems to continue normally. I tried continuing anyway, but when I re-enable key checking and run sudo pacman -Syu I get the following: error: GPGME error: No data error: GPGME error: No data error: GPGME error: No data error: GPGME error: No data :: Synchronizing package databases... core 171.2 KiB 32.2 KiB/s 00:05 [#####################################################################] 100% extra 1900.0 KiB 6.27 MiB/s 00:00 [#####################################################################] 100% community 6.7 MiB 8.44 MiB/s 00:01 [#####################################################################] 100% multilib 175.7 KiB 2.86 MiB/s 00:00 [#####################################################################] 100% error: GPGME error: No data error: GPGME error: No data error: GPGME error: No data error: GPGME error: No data error: failed to synchronize all databases (invalid or corrupted database (PGP signature)) |
How to get hardware info (especially GPU) in order to use Golang on Linux Posted: 02 Dec 2021 08:39 AM PST I need to collect all GPUs' info of a Linux server (such as VRAM, clock speed, usage, model name, etc., ...) in order to use Go (AKA Golang). I tried hwinfo and lspci , it just shows limited information. Is it possible to use some package, or something, can get full information like nvidia-smi shows? |
smbclient throws "ERROR NT_STATUS_IO_TIMEOUT" Posted: 02 Dec 2021 10:18 AM PST I am trying to get a SMB connection to a HTB box with an open SMB port. But smbclient throws an "ERROR NT_STATUS_IO_TIMEOUT" error every time. I've added client min protocol = CORE client max protocol = SMB3 to my /etc/samba/smb.conf file but this hasn't helped. What can I do? |
recognize symlink from symlinked folder Posted: 02 Dec 2021 11:35 AM PST Let's say I am in console in a subfolder, that is a child (or grandchild, etc.) of a symlinked (soft) folder. From the subfolder, if I do ls -la nothing indicates all the files are inside a symlinked folder. How could I know that? Currently, I have to go to the parent folder to know that. But it means finding by test error, testing all the hierarchy of folders until arriving to the parent (linked). |
Bluetooth mouse sleeps after a few seconds idle when there is no other mouse connected Posted: 02 Dec 2021 08:27 AM PST I bought a Microsoft 3600 bluetooth mouse and never managed to get it working properly on Linux, but it works fine in other operating systems. If I stop moving the mouse for a few seconds (like 3 or 4 seconds) it "sleeps", and when I move it again the pointer won't move for the next few seconds. This makes this device completely unusable. I already searched a lot about that and found lots of answers telling to change the timeout at the /etc/bluetooth/input.conf (I didn't had that file by default tho) or create a udev rule. I already made they both and the problem persists. Looking at journalctl, I get those messages when the mouse sleeps and I attempt to move it: jul 03 19:41:46 nathan kernel: usb 1-6: new high-speed USB device number 24 using xhci_hcd jul 03 19:41:46 nathan kernel: usb 1-6: Device not responding to setup address. jul 03 19:41:47 nathan kernel: usb 1-6: Device not responding to setup address. jul 03 19:41:47 nathan kernel: usb 1-6: device not accepting address 24, error -71 jul 03 19:41:47 nathan kernel: usb usb1-port6: unable to enumerate USB device I also noticed a weird behavior: If I keep my USB gaming mouse plugged in the USB, the Bluetooth mouse does not sleeps and works fine. But if I remove the USB mouse the problem starts occurring again in the bluetooth mouse. I'm currently running on Manjaro with linux 5.7.0, but the same problem used to occur in OpenSuse too, with every single kernel version I tested (5.4.x, 5.5.x and 5.6.x)., |
How to check logrotate syntax? Posted: 02 Dec 2021 10:02 AM PST We are suspecting a typo in the /etc/logrotate.d/FOO file. How can we check it? So far I can see from: https://linux.die.net/man/8/logrotate maybe this?: logrotate -df /etc/logrotate.d/FOO 2>&1 | grep -i error |
Can't remove interface from zone with NetworkManager enabled. - Firewalld / Centos8 Posted: 02 Dec 2021 10:17 AM PST My issue is when I'm trying to remove interface from public (default) zone I get error: firewall-cmd --zone=public --remove-interface=eth0 --permanent The interface is under control of NetworkManager and already bound to the default zone. The interface is under control of NetworkManager, setting zone to default. success Public zone configuration: public (active) target: default icmp-block-inversion: no interfaces: eth0 sources: services: ports: protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules: ` When I am stopping the NetworkManager it allows me to remove it. However when I start NetworkManager back again and restart firewalld the interface eth0 is back in public zone. |
modprobe fails with "Operation not permitted" Posted: 02 Dec 2021 10:04 AM PST I am trying to modprobe wireguard as root, and it fails with: modprobe: ERROR: could not insert 'wireguard': Operation not permitted Adding verbose I get one more line: [root@localhost ben]# insmod /lib/modules/5.2.11-100.fc29.x86_64/extra/wireguard.ko.xz insmod: ERROR: could not insert module /lib/modules/5.2.11-100.fc29.x86_64/extra/wireguard.ko.xz: Operation not permitted dkms runs fine without error. I've also disabled selinux and that made no difference. I don't see anything in the journalctl logs. Looking through man pages and Google have not turned anything up. I did find this helpful line in dmesg : Lockdown: modprobe: Loading of unsigned module is restricted; see man kernel_lockdown.7 However that man page does not exist. How can I debug this? Any pointers on where to go next? |
Sybase query: save output to a file Posted: 02 Dec 2021 10:03 AM PST I´ve created the following script: #!/bin/bash isql -U databasename_dba -P password -b <<EOF! select quantity, date from name_table where numer_id="1234" go quit EOF! Running the script I got the desirable output: user@system$ ./EXECUTE_DAILY_4 But now, how can I save this result that I see in my terminal window in a file (.csv for example) Thanks in advance for your help |
Temporarily disabling/uninstalling grub in a dual-boot setup and then restore grub to the state it was at the start Posted: 02 Dec 2021 08:46 AM PST I'm using a dual-boot setup with grub 2.02-beta2 which allows me to switch between Windows 7 and arch linux on a x64 desktop machine. These are both installed on my C: drive on the same physical HDD. (A common solution was to switch in the BIOS to boot from the windows HDD, this is not possible for me) Now Microsoft released a troublesome October 2016 Security update whose installation fails upon reboot when you use a GRUB bootloader. Thus I'm trying to achieve the following: - Somehow disable the GRUB bootloader so that my PC automatically boots into windows, without losing any Linux data (one partition on C and one partition on D)
- Install all the updates, reboot a few times
- Using a Live CD or similar, restore the previous configuration I had for GRUB, without data loss
|
Install CentOS on RAID (manually) on UEFI system Posted: 02 Dec 2021 11:06 AM PST I'm struggling with the manual configuration of a RAID1 + RAID10. I'm trying the procedure on a VM (VirtualBox 5.0.14 r105127) on OSX 11.10.3. The strategy I took is: The complete set of commands I did is available here. - Install first
centos on the first disk /dev/sda . - Then migrate all the files to the raid arrays
cp -a mnt/old* mnt/new (even included the /boot/efi partition) - Chrooting into the RAID system
- Edit
/etc/fstab with the corrent mappings - Edit
/etc/default/grub adding rd.auto=1 rd.lvm=[...] rd.md.uuid=[...] with the correct values. - Rebuilding
initramfs dracut --mdadmconfig --fstab --add "mdraid" --add-drivers "raid1 raid10" - Rebuilding
grub.cfg grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg - Adding the new entries into EFI NVRAM
for i in b c d; do efibootmgr --create --disk /dev/sd$i --label "CentOS Backup - /dev/sd$i" --load "\\EFI\\centos\\grub.efi"; done - Getting Boot Failed for all the entries.
What Am I missing here? Details Few details on the current status, commands issued from the /dev/sda system lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 8G 0 disk ├─sda1 8:1 0 200M 0 part /boot/efi ├─sda2 8:2 0 500M 0 part /boot └─sda3 8:3 0 7,3G 0 part ├─centos-root 253:0 0 6,5G 0 lvm / └─centos-swap 253:1 0 820M 0 lvm [SWAP] sdb 8:16 0 8G 0 disk ├─sdb1 8:17 0 200M 0 part ├─sdb2 8:18 0 500M 0 part │ └─md125 9:125 0 500M 0 raid1 ├─sdb3 8:19 0 3,2G 0 part │ └─md126 9:126 0 3,2G 0 raid1 │ ├─vgroot-swap 253:3 0 1G 0 lvm │ └─vgroot-root 253:4 0 2,2G 0 lvm /mnt/raidsys └─sdb4 8:20 0 4,1G 0 part └─md127 9:127 0 8,2G 0 raid10 └─vghome-home 253:2 0 8,2G 0 lvm sdc 8:32 0 8G 0 disk ├─sdc1 8:33 0 200M 0 part ├─sdc2 8:34 0 500M 0 part │ └─md125 9:125 0 500M 0 raid1 ├─sdc3 8:35 0 3,2G 0 part │ └─md126 9:126 0 3,2G 0 raid1 │ ├─vgroot-swap 253:3 0 1G 0 lvm │ └─vgroot-root 253:4 0 2,2G 0 lvm /mnt/raidsys └─sdc4 8:36 0 4,1G 0 part └─md127 9:127 0 8,2G 0 raid10 └─vghome-home 253:2 0 8,2G 0 lvm sdd 8:48 0 8G 0 disk ├─sdd1 8:49 0 200M 0 part ├─sdd2 8:50 0 500M 0 part │ └─md125 9:125 0 500M 0 raid1 ├─sdd3 8:51 0 3,2G 0 part │ └─md126 9:126 0 3,2G 0 raid1 │ ├─vgroot-swap 253:3 0 1G 0 lvm │ └─vgroot-root 253:4 0 2,2G 0 lvm /mnt/raidsys └─sdd4 8:52 0 4,1G 0 part └─md127 9:127 0 8,2G 0 raid10 └─vghome-home 253:2 0 8,2G 0 lvm sr0 11:0 1 56,3M 0 rom RAID mdadm --examine --scan --verbose ARRAY /dev/md/boot level=raid1 metadata=1.0 num-devices=4 UUID=1f726cc3:387c49c3:3cee8230:f11a4640 name=localhost:boot devices=/dev/sdd2,/dev/sdc2,/dev/sdb2 ARRAY /dev/md/root level=raid1 metadata=1.2 num-devices=4 UUID=fea6baab:29711848:997387aa:295ec48f name=localhost:root devices=/dev/sdd3,/dev/sdc3,/dev/sdb3 ARRAY /dev/md/home level=raid10 metadata=1.2 num-devices=4 UUID=edf6287a:ba1236a6:2a3471d2:edac85cb name=localhost:home devices=/dev/sdd4,/dev/sdc4,/dev/sdb4 LVM vgs VG #PV #LV #SN Attr VSize VFree centos 1 2 0 wz--n- 7,31g 40,00m vghome 1 1 0 wz--n- 8,18g 0 vgroot 1 2 0 wz--n- 3,22g 0 lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert root centos -wi-ao---- 6,47g swap centos -wi-ao---- 820,00m home vghome -wi-a----- 8,18g root vgroot -wi-a----- 2,22g swap vgroot -wi-a----- 1,00g blkid /dev/block/8:1: SEC_TYPE="msdos" UUID="1E4D-DBA3" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="b5c88e63-06fa-4f20-8cb9-9bad8b5c79fc" /dev/block/253:1: UUID="b9c3c080-76d4-44e2-a0b6-3260193d6345" TYPE="swap" /dev/sr0: UUID="2016-01-19-16-46-09-00" LABEL="VBOXADDITIONS_5.0.14_105127" TYPE="iso9660" /dev/sdb1: SEC_TYPE="msdos" UUID="CEE8-7E69" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="2a458d61-6959-4ec3-a283-1c4d1f76f69d" /dev/sdb2: UUID="1f726cc3-387c-49c3-3cee-8230f11a4640" UUID_SUB="349956d0-e1e9-dcb4-1054-ab700cc64004" LABEL="localhost:boot" TYPE="linux_raid_member" PARTUUID="5cca664e-0cad-44c6-8165-d7a77745f45a" /dev/sdb3: UUID="fea6baab-2971-1848-9973-87aa295ec48f" UUID_SUB="07be5c6b-3d27-daad-85ea-a6c6e78fd22a" LABEL="localhost:root" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="ae26fa90-9493-4984-a44e-2892ef11604a" /dev/sdb4: UUID="edf6287a-ba12-36a6-2a34-71d2edac85cb" UUID_SUB="d04ed8bb-c427-ad9e-3b0f-3186cf38c17e" LABEL="localhost:home" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="a4ddae48-2c8e-427d-80ec-3c856e80c752" /dev/sdc1: SEC_TYPE="msdos" UUID="EE8B-2290" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="bd520660-8448-4bda-9a10-0f03d90468eb" /dev/sdc2: UUID="1f726cc3-387c-49c3-3cee-8230f11a4640" UUID_SUB="4ea6709b-1c30-8476-063a-147c8230fa5c" LABEL="localhost:boot" TYPE="linux_raid_member" PARTUUID="1c5f95bb-e4a3-4438-a538-824b6a85176f" /dev/sdc3: UUID="fea6baab-2971-1848-9973-87aa295ec48f" UUID_SUB="18d60a38-6306-6f0b-2aad-f5b2fe3dfba1" LABEL="localhost:root" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="1d775697-113c-4bf4-bfec-6f5768b6a0fb" /dev/sdc4: UUID="edf6287a-ba12-36a6-2a34-71d2edac85cb" UUID_SUB="7454fefb-3217-16ad-9334-f36db6ab2038" LABEL="localhost:home" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="5f0f489b-60ff-4958-a24c-ad05e9c8e840" /dev/sdd1: SEC_TYPE="msdos" UUID="EFF5-FDC4" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="a0670bb3-8dc4-4af9-b5d2-51609caf999a" /dev/sdd2: UUID="1f726cc3-387c-49c3-3cee-8230f11a4640" UUID_SUB="9508d1ed-237a-d782-ddaa-87099b90a08d" LABEL="localhost:boot" TYPE="linux_raid_member" PARTUUID="9a4abae3-0ccc-460d-9bd9-814ca391cf69" /dev/sdd3: UUID="fea6baab-2971-1848-9973-87aa295ec48f" UUID_SUB="dca1324c-f034-939d-923a-b3255d535781" LABEL="localhost:root" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="21a4d5f4-cbd3-4397-9fab-cf0e1c3e77e4" /dev/sdd4: UUID="edf6287a-ba12-36a6-2a34-71d2edac85cb" UUID_SUB="4296c7d1-620e-cfb1-1c37-220022a7f01f" LABEL="localhost:home" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="fbd7b585-bf9e-43fa-8d54-4fcb6749dfc2" /dev/md127: UUID="KV9voE-ps3q-BAD5-rKYS-ZZRX-0Edq-WMkR5G" TYPE="LVM2_member" /dev/md126: UUID="viiJV2-Uah7-DX82-oiGJ-jBDz-wCOl-TLvDK2" TYPE="LVM2_member" /dev/mapper/vghome-home: LABEL="Home" UUID="9e7437a7-1f40-48fd-a544-a70f4be0e52c" TYPE="xfs" /dev/mapper/vgroot-swap: LABEL="Swap" UUID="37cc3754-411e-4f4c-9044-e3c76d965968" TYPE="swap" /dev/mapper/vgroot-root: LABEL="Root" UUID="82ff7a16-6e1d-4c29-930d-055db267aaa8" TYPE="xfs" /dev/md125: LABEL="Boot" UUID="25fc17e0-29bb-4e5b-b1b7-06216cd7e0a1" TYPE="xfs" /etc/fstab mount /dev/vgroot/root /mnt/raidsys cat /mnt/raidsys/etc/fstab # # /etc/fstab # Created by anaconda on Sat Feb 27 23:23:36 2016 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # #/dev/mapper/centos-root / xfs defaults 0 0 #UUID=1c8085bb-a226-4435-8e6f-0953025f6f1a /boot xfs defaults 0 0 #UUID=1E4D-DBA3 /boot/efi vfat umask=0077,shortname=winnt 0 0 #/dev/mapper/centos-swap swap swap defaults 0 0 ######################## /dev/mapper/vgroot-root / xfs defaults 0 0 UUID=25fc17e0-29bb-4e5b-b1b7-06216cd7e0a1 /boot xfs 0 0 UUID=CEE8-7E69 /boot/efi vfat umask=0077,shortname=winnt 0 0 /dev/mapper/vgroot-swap swap swap defaults 0 0 /etc/default/grub cat /mnt/raidsys/etc/default/grub GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="crashkernel=auto rd.auto=1 rd.lvm.lv=vgroot/root rd.md.uuid=fea6baab:29711848:997387aa:295ec48f rd.md.uuid=1f726cc3:387c49c3:3cee8230:f11a4640 rd.lvm.lv=vgroot/swap rhgb quiet" GRUB_DISABLE_RECOVERY="true" Initramfs inspection mount /dev/md125 /mnt/raidboot lsinitrd /mnt/raidboot/initramfs-3.10.0-327.el7.x86_64.img | grep raid* | xclip -selection clipboard Image: /mnt/raidboot/initramfs-3.10.0-327.el7.x86_64.img: 19M mdraid -r-xr-xr-x 1 root root 11264 Feb 28 01:00 usr/lib64/device-mapper/libdevmapper-event-lvm2raid.so lrwxrwxrwx 1 root root 44 Feb 28 01:00 usr/lib64/libdevmapper-event-lvm2raid.so -> device-mapper/libdevmapper-event-lvm2raid.so -rwxr-xr-x 1 root root 265 Sep 12 2013 usr/lib/dracut/hooks/cleanup/99-mdraid-needshutdown.sh -rwxr-xr-x 1 root root 910 Sep 12 2013 usr/lib/dracut/hooks/pre-mount/10-mdraid-waitclean.sh -rw-r--r-- 1 root root 15037 Nov 19 23:51 usr/lib/modules/3.10.0-327.el7.x86_64/kernel/crypto/async_tx/async_raid6_recov.ko -rw-r--r-- 1 root root 26061 Nov 19 23:52 usr/lib/modules/3.10.0-327.el7.x86_64/kernel/drivers/md/raid0.ko -rw-r--r-- 1 root root 79765 Nov 19 23:52 usr/lib/modules/3.10.0-327.el7.x86_64/kernel/drivers/md/raid10.ko -rw-r--r-- 1 root root 62645 Nov 19 23:52 usr/lib/modules/3.10.0-327.el7.x86_64/kernel/drivers/md/raid1.ko -rw-r--r-- 1 root root 168581 Nov 19 23:52 usr/lib/modules/3.10.0-327.el7.x86_64/kernel/drivers/md/raid456.ko drwxr-xr-x 2 root root 0 Feb 28 01:00 usr/lib/modules/3.10.0-327.el7.x86_64/kernel/lib/raid6 -rw-r--r-- 1 root root 101965 Nov 19 23:53 usr/lib/modules/3.10.0-327.el7.x86_64/kernel/lib/raid6/raid6_pq.ko -rw-r--r-- 1 root root 2138 Nov 20 21:14 usr/lib/udev/rules.d/63-md-raid-arrays.rules -rwxr-xr-x 1 root root 708 Sep 12 2013 usr/sbin/mdraid-cleanup -rwxr-xr-x 1 root root 1074 Sep 12 2013 usr/sbin/mdraid_start grub.cfg mount /dev/sdb1 /mnt/raidboot/efi ls -al /mnt/raidboot/efi/EFI/centos totale 5792 drwxr-xr-x. 3 root root 4096 28 feb 01.00 . drwxr-xr-x. 4 root root 4096 27 feb 23.28 .. -rwxr-xr-x. 1 root root 128 7 dic 14.19 BOOT.CSV drwxr-xr-x. 2 root root 4096 28 feb 00.54 fonts -rwxr-xr-x. 1 root root 1009536 24 nov 16.49 gcdx64.efi -rwxr-xr-x. 1 root root 7038 28 feb 01.00 grub.cfg -rwxr-xr-x. 1 root root 1024 27 feb 23.34 grubenv -rwxr-xr-x. 1 root root 1009536 24 nov 16.49 grubx64.efi -rwxr-xr-x. 1 root root 1283952 7 dic 14.19 MokManager.efi -rwxr-xr-x. 1 root root 1291512 7 dic 14.19 shim-centos.efi -rwxr-xr-x. 1 root root 1296176 7 dic 14.19 shim.efi cat /mnt/raidboot/efi/EFI/centos/grub.cfg # # DO NOT EDIT THIS FILE # # It is automatically generated by grub2-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header ### set pager=1 if [ -s $prefix/grubenv ]; then load_env fi if [ "${next_entry}" ] ; then set default="${next_entry}" set next_entry= save_env next_entry set boot_once=true else set default="${saved_entry}" fi if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else menuentry_id_option="" fi export menuentry_id_option if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi } function load_video { if [ x$feature_all_video_module = xy ]; then insmod all_video else insmod efi_gop insmod efi_uga insmod ieee1275_fb insmod vbe insmod vga insmod video_bochs insmod video_cirrus fi } terminal_output console if [ x$feature_timeout_style = xy ] ; then set timeout_style=menu set timeout=5 # Fallback normal timeout code in case the timeout_style feature is # unavailable. else set timeout=5 fi ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/00_tuned ### set tuned_params="" ### END /etc/grub.d/00_tuned ### ### BEGIN /etc/grub.d/01_users ### if [ -f ${prefix}/user.cfg ]; then source ${prefix}/user.cfg if [ -n ${GRUB2_PASSWORD} ]; then set superusers="root" export superusers password_pbkdf2 root ${GRUB2_PASSWORD} fi fi ### END /etc/grub.d/01_users ### ### BEGIN /etc/grub.d/10_linux ### menuentry 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-82ff7a16-6e1d-4c29-930d-055db267aaa8' { load_video set gfxpayload=keep insmod gzio insmod part_gpt insmod part_gpt insmod part_gpt insmod diskfilter insmod mdraid1x insmod xfs set root='mduuid/1f726cc3387c49c33cee8230f11a4640' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='mduuid/1f726cc3387c49c33cee8230f11a4640' 25fc17e0-29bb-4e5b-b1b7-06216cd7e0a1 else search --no-floppy --fs-uuid --set=root 25fc17e0-29bb-4e5b-b1b7-06216cd7e0a1 fi linuxefi /vmlinuz-3.10.0-327.el7.x86_64 root=/dev/mapper/vgroot-root ro crashkernel=auto rd.auto=1 rd.lvm.lv=vgroot/root rd.md.uuid=fea6baab:29711848:997387aa:295ec48f rd.md.uuid=1f726cc3:387c49c3:3cee8230:f11a4640 rd.lvm.lv=vgroot/swap rhgb quiet initrdefi /initramfs-3.10.0-327.el7.x86_64.img } menuentry 'CentOS Linux (0-rescue-26d51bbb9d054b0a8566525e1d8f3937) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-26d51bbb9d054b0a8566525e1d8f3937-advanced-82ff7a16-6e1d-4c29-930d-055db267aaa8' { load_video insmod gzio insmod part_gpt insmod part_gpt insmod part_gpt insmod diskfilter insmod mdraid1x insmod xfs set root='mduuid/1f726cc3387c49c33cee8230f11a4640' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='mduuid/1f726cc3387c49c33cee8230f11a4640' 25fc17e0-29bb-4e5b-b1b7-06216cd7e0a1 else search --no-floppy --fs-uuid --set=root 25fc17e0-29bb-4e5b-b1b7-06216cd7e0a1 fi linuxefi /vmlinuz-0-rescue-26d51bbb9d054b0a8566525e1d8f3937 root=/dev/mapper/vgroot-root ro crashkernel=auto rd.auto=1 rd.lvm.lv=vgroot/root rd.md.uuid=fea6baab:29711848:997387aa:295ec48f rd.md.uuid=1f726cc3:387c49c3:3cee8230:f11a4640 rd.lvm.lv=vgroot/swap rhgb quiet initrdefi /initramfs-0-rescue-26d51bbb9d054b0a8566525e1d8f3937.img } if [ "x$default" = 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)' ]; then default='Advanced options for CentOS Linux>CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)'; fi; ### END /etc/grub.d/10_linux ### ### BEGIN /etc/grub.d/20_linux_xen ### ### END /etc/grub.d/20_linux_xen ### ### BEGIN /etc/grub.d/20_ppc_terminfo ### ### END /etc/grub.d/20_ppc_terminfo ### ### BEGIN /etc/grub.d/30_os-prober ### menuentry 'CentOS Linux release 7.2.1511 (Core) (on /dev/mapper/centos-root)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-3e9ce32e-8b26-4053-ad4e-1b75fda46260' { insmod part_gpt insmod xfs set root='hd0,gpt2' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 1c8085bb-a226-4435-8e6f-0953025f6f1a else search --no-floppy --fs-uuid --set=root 1c8085bb-a226-4435-8e6f-0953025f6f1a fi linux /vmlinuz-0-rescue-26d51bbb9d054b0a8566525e1d8f3937 root=/dev/dm-5 initrd /initramfs-0-rescue-26d51bbb9d054b0a8566525e1d8f3937.img } submenu 'Advanced options for CentOS Linux release 7.2.1511 (Core) (on /dev/mapper/centos-root)' $menuentry_id_option 'osprober-gnulinux-advanced-3e9ce32e-8b26-4053-ad4e-1b75fda46260' { menuentry 'CentOS Linux release 7.2.1511 (Core) (on /dev/mapper/centos-root)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-0-rescue-26d51bbb9d054b0a8566525e1d8f3937--3e9ce32e-8b26-4053-ad4e-1b75fda46260' { insmod part_gpt insmod xfs set root='hd0,gpt2' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 1c8085bb-a226-4435-8e6f-0953025f6f1a else search --no-floppy --fs-uuid --set=root 1c8085bb-a226-4435-8e6f-0953025f6f1a fi linux /vmlinuz-0-rescue-26d51bbb9d054b0a8566525e1d8f3937 root=/dev/dm-5 initrd /initramfs-0-rescue-26d51bbb9d054b0a8566525e1d8f3937.img } menuentry 'CentOS Linux release 7.2.1511 (Core) (on /dev/mapper/centos-root)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.10.0-327.el7.x86_64--3e9ce32e-8b26-4053-ad4e-1b75fda46260' { insmod part_gpt insmod xfs set root='hd0,gpt2' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 1c8085bb-a226-4435-8e6f-0953025f6f1a else search --no-floppy --fs-uuid --set=root 1c8085bb-a226-4435-8e6f-0953025f6f1a fi linux /vmlinuz-3.10.0-327.el7.x86_64 root=/dev/dm-5 initrd /initramfs-3.10.0-327.el7.x86_64.img } } ### END /etc/grub.d/30_os-prober ### ### BEGIN /etc/grub.d/40_custom ### # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. ### END /etc/grub.d/40_custom ### ### BEGIN /etc/grub.d/41_custom ### if [ -f ${config_directory}/custom.cfg ]; then source ${config_directory}/custom.cfg elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi ### END /etc/grub.d/41_custom ### EFI Boot list efibootmgr -v BootCurrent: 0001 BootOrder: 0004,0003,0000,0001,0002 Boot0000* EFI DVD/CDROM ACPI(a0341d0,0)PCI(d,0)SATA(0,0,0) Boot0001* EFI Hard Drive ACPI(a0341d0,0)PCI(d,0)SATA(1,0,0) Boot0002* EFI Internal Shell MM(b,3fc4f000,3ffbefff)FvFile(7c04a583-9e3e-4f1c-ad65-e05268d0b4d1) Boot0003* CentOS Linux HD(1,800,64000,b5c88e63-06fa-4f20-8cb9-9bad8b5c79fc)File(\EFI\centos\shim.efi) Boot0004* CentOS Raid HD(1,800,64000,2a458d61-6959-4ec3-a283-1c4d1f76f69d)File(\EFI\centos\shim.efi) |
Include subdirectory from excluded directory in a tar archive Posted: 02 Dec 2021 11:02 AM PST I have the root folder USA and sub-folders California and Texas . Texas is an excluded sub-folder but it has a specific file in it that I'd like to include in the tar backup. Let's call this file Austin . How do I do this? |
Suse: How to update a single package in SLES10 SP4 Posted: 02 Dec 2021 09:03 AM PST I am in the middle of an activity and have never worked with SLES10 SP4 In SLES11 zypper update glibc* updates all glibc packages .. but this is not working in SLES10 SP4 .. can someone tell me how to update a single package in SLES10 SP4 |
Dashes in printf Posted: 02 Dec 2021 11:24 AM PST I'm trying to use printf to format some pretty output in a bash script e.g.: ----------------------- | This is some output | ----------------------- But I've stumbled over some behavior I don't understand. $ printf "--" gives me the error: printf: usage: printf [-v var] format [arguments] and $ printf "-stuff" results in -bash: printf: -s: invalid option So apparently printf thinks I'm trying to pass some arguments while I'm not. Meanwhile, completely by accident, I've found this workaround: $ printf -- "--- this works now ----\n" gives me --- this works now ---- Can anyone explain this behavior? |
No comments:
Post a Comment