Saturday, August 28, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


How to synchronizing /etc/hosts files across multiple linux machines

Posted: 28 Aug 2021 10:53 AM PDT

I have 20 linux servers that use /etc/hosts files to see and talk with each other. I'm adding servers to this pool of servers.

It is required to do host resolution via the /etc/hosts files. DNS or NIS are not alternatives.

Aside from manually editing each of the 20+ /etc/hosts files every time I add a server or editing one /etc/hosts file on one server then scp'ing it to all the other servers, is there anyway to edit the /etc/hosts on one server and "push" it onto the other servers that need the new /etc/hosts file?

How can I set the initrd img in a custom grub boot entry?

Posted: 28 Aug 2021 10:17 AM PDT

I am trying to write a script that creates a custom boot entry for grub. The boot entry should be the same as the default boot entry but with a different initrd. I tried looking at Grub's simple configuration, but there is no way to set the initrd using it.

How do I make Network manager jump to higher priority network

Posted: 28 Aug 2021 09:21 AM PDT

Bassicly I have 2 networks "a" & "b". Network "a" has autoconnect priority of 5 and "b" a priority of 10. And autoconnect enabled on both.

Network "b" is a mobile hotspot so it's not always on. When the device boots it finds network "a". I find that it won't switch to network "b" automatically if it has an active connection to "a" already.

Is there a way to make network manager drop an active connection to Network "a" and connect to network "b" automatically if it's available?

This is a headless Raspberry PI running Ubuntu Server.

Howto log multiple sftpd server's activity which user's chrooted home is on shared NFS?

Posted: 28 Aug 2021 08:11 AM PDT

I have an Ubuntu server with sftpd running where /var/data/chroot/ is an NFS mount from a remote central NFS server, and each sftpd user's chroot home is /var/data/chroot/<username>/ and every user has a log device /var/data/chroot/<username>/dev/log which I read in successfully with syslog-ng:

source s_chroot_<username>    { unix-stream("/var/data/chroot/<username>/dev/log" optional(yes) ); };  destination d_sftp_<username> { file("/var/log/sftp/<username>.log"); };  

Now I have a second sftpd server in parallel, with the same user database and also mounts /var/data/chroot/ via NFS, and has the same syslog-ng config, so every user can login on the one server or on the other. This is for high availability. This works so far.

What is not working now is the sftpd logging: The sftp user's log is only available on one sftp server exclusively, and that is the one where syslog-ng was started least, because as I understand it takes the exclusive unix socket file lock for each user's /dev/log.

So, if a user logs in on the first server, where syslog-ng was started least, the user's sftp activity is logged on the first server. But if the user logs in on the second server, it's sftp activity is not logged, neither on the second nor on the first server.

If the syslog-ng is then restarted on the second server, the sftp user's activity is exclusively logged only on the second server and only for logins on the second server.

How can I get the sftp user's activity be logged on each sftp server, when a user logs in to that server, while the user's home is shared on both servers via NFS?

Converting user to systemd-homed user: sudo is not recognized

Posted: 28 Aug 2021 08:04 AM PDT

I have converted an existing user to systemd-homed following this article. I have added the converted user to the wheel group using the "member-of=wheel" as described in the homectl manual.

The group appears in the .identity file of the converted user. However, trying to execute a command as sudo does not work (keeps telling me that my password is wrong).

I have checked the members of the wheel group as well using "getent" and the user does not appear, which, if I am not mistaken, was expected since the systemd-homed user is removed from the usual system databases (/etc/passwd).

I have checked the /etc/pam.d/sudo file. Here is the content of the file

#%PAM-1.0    auth required pam_env.so  auth sufficient pam_fprintd.so  auth sufficient pam_unix.so try_first_pass likeauth nullok  auth required pam_deny.so  auth            include         system-auth  account         include         system-auth  session         include         system-auth  

Removing the line "auth required pam_deny.so" solves the issue.

However, I do not necessarily feel confident enough to perform the above change. What is going on here? What are the consequences of removing the above line from /etc/pam.d/sudo? Why does this solve my problem?

I would highly appreciate your help. Thank you very much in advance.

System information

Linux Manjaro 21.1.1 with Gnome 40.4.0 (according to /usr/share/gnome/gnome-version.xml)

My nsswitch.conf file looks as follows

# Name Service Switch configuration file.  # See nsswitch.conf(5) for details.    passwd: files mymachines systemd  group: files [SUCCESS=merge] mymachines systemd  shadow: files systemd    publickey: files    hosts: files mymachines mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns   mdns4 myhostname  networks: files    protocols: files  services: files  ethers: files  rpc: files    netgroup: files  

What is the value for the sof driver module?

Posted: 28 Aug 2021 07:44 AM PDT

I want to put the sof driver in initramfs on debian 11 distro kernel as described [here][1] I want to add the "value" of the module in /etc/initramfs-tools/modules. I am using Intel Baytrail Sound so I need to apply a driver change because the old sst driver isn't supporting pipewire nicely. I want to apply [Changes/SofDefaultForIntelLpe][2] which would normaly be for fedora.

I have tried using kernel arguments linux /boot/vmlinuz-5.10.0-8-686-pae quiet snd_intel_dspcfg.dsp_driver=3 as mentioned but it doesnt seem to load the driver

SO what value do I need to put in /etc/initramfs-tools/modules. [1]: https://askubuntu.com/questions/676707/how-to-load-a-module-in-initrd [2]: https://fedoraproject.org/w/index.php?title=Changes/SofDefaultForIntelLpe

Ubuntu desktop (gnome) running as a background process

Posted: 28 Aug 2021 07:19 AM PDT

I've got this instance of Ubuntu server where after booting up gdm start a session automatically and the desktop graphical interface runs offline as a background process i.e not on the standard output (screen). The system has anydesk installed and so I can access the desktop environment without a problem through it. I am looking for a way to bring back the desktop environment to show up on the screen. I have checked the current target and it is at graphical.target

enter image description here

Split ultrawide monitor in 3 virtuals screens

Posted: 28 Aug 2021 06:52 AM PDT

For my work, I try to split my new ultrawide monitor in 3 virtual screens on Ubuntu (I don't want to use tile tools as gTile). My first test using "xrandr" was OK when I selected "xorg" driver. But my monitor twinkle excessively to make me sick. So I selected "NVidia" driver and no twinkle. Good. But now I cant' split my monitor using "xrandr".

Some informations:

  • Ubuntu 20.04
  • Monitor: Samsung Odyssey G9
  • Refresh rate: 240
  • Resolution: 5120x1440
  • Port used: Display Port 2
  • Graphic card: Nvidia GeForce GTX 1070

Command to split:

xrandr --setmonitor VDP-L 1706/0x1440/1+0+0 DP-2;xrandr --setmonitor VDP-M 1706/0x1440/1+1706+0 none;xrandr --setmonitor VDP-R 1708/0x1440/1+3412+0 none  

It's seems that "xrandr" doesn't work with proprietary drivers.

Thank's for you help.

How to ssh from windows to linux?

Posted: 28 Aug 2021 08:22 AM PDT

I want to ssh from windows 10 to linux. I installed OpenSSH server and client. When a I tried to ssh to my own pc, it work. Port 22 is opened. i tried without firewall. But when i tried to linux I get connection timed out.

ssh: connect to host 192.168.xxx.x port 22: Connection timed out   

Copy files from multiple directories and paste it into multiple directories

Posted: 28 Aug 2021 06:38 AM PDT

I have a directory " /data/archive

In this directory there are 8 different subdirectories.

eg : /data/archive/a  /data/archive/b and so on  

Files under these subdirectories have date appended to their names so I'm copying files only for the date I need.

Currently what I'm doing is this :

cd a  scp *20210826* user@server:/data/20210826_inputfiles/a  cd b  scp *20210826* user@server:/data/20210826_inputfiles/b  

Is it possible to code it in a way that I don't have to move through each directory one by one ?

Any help on this would be very helpful.

Thanks in advance!

What would happen if dd receives same input file as output file

Posted: 28 Aug 2021 08:27 AM PDT

Let's say I accidentally ran sudo dd if=/dev/sda of=/dev/sda instead of sudo dd if=/dev/sda of=/dev/sdb

And I didn't want to wait for the 500gb operation to complete to find out if I broke my system.

Does anyone know what the outcome would be so I can either wait in peace for it to complete or just interrupt it and start with a fresh install so long?

Edit: Here is the resulting output

$ time sudo dd if=/dev/sda of=/dev/sda bs=64K conv=sync,noerror status=progress  512001769472 bytes (512 GB, 477 GiB) copied, 9084 s, 56.4 MB/s  dd: error writing '/dev/sda': No space left on device  7814181+1 records in  7814181+0 records out  512110190592 bytes (512 GB, 477 GiB) copied, 9088.72 s, 56.3 MB/s    real    151m28.774s  user    0m28.459s  sys 5m33.146s  

Reason for text/plain pattern "*,v" in shared-mime-info?

Posted: 28 Aug 2021 07:49 AM PDT

The freedesktop.org media type database shared-mime-info has a filename pattern *,v associated with MIME type text/plain, and I can't figure out why… if only because ",v" and "*,v" are basically useless as search terms!

The 2008 commit that added the pattern doesn't explain it, though the test case does point to a bug on RedHat's Bugzilla. There, someone had "RCS files" with filenames ending in ,v, and the bug was that they were being recognised as audio files. Without further context, I can only guess that "RCS files" refers to Revision Control System, rather than radar cross-section data or Autodesk ReCap scan files…

Why did this one user's weird experience lead to a change in shared-mime-info for everyone? Was it a widespread problem, perhaps because RCS was known to generate files with that ending? Why was adding it to shared-mime-info an appropriate response† to the bug, rather than (say) finding out why these random files were being treated as audio?


† I say "response", not "fix", because it's not clear to me that it did fix the user's problem. The bug was closed because it ceased to occur in later versions of the software, which isn't explicitly credited to the change in shared-mime-info.

Debug a .zshrc that causes exit 1

Posted: 28 Aug 2021 08:01 AM PDT

I have a very long ~/.zshrc and on zsh starts up, it emits and exit 1, but zsh works fine.

I tried to find what's inside the .zshrc that causes the exit 1 by running zsh -x &> zsh-debug and as expected, there wasn't a line that contains exit 1 in the zsh-debug file. I didn't find anything interesting in that file either.

How to I find the bug in my ~/.zshrc that causes exit 1s?

Update:

My .zshrc sources myfile, and when myfile is sourced, I get exit 1.

Screenshot (the path after system/ is redacted: enter image description here

Determine the emplacement of a shared library dependence at compile time

Posted: 28 Aug 2021 06:30 AM PDT

Is it possible to tell at compile time a binary to be built the paths where a given library is going to be found at runtime? For example, when I link against a shared library in a non-standard location, when I want to run the resulting binary, I have to add the path to that shared library to LD_LIBRARY_PATH, and I want to know whether there exists an option that spares that step and lets the binary know the location of the shared library at run time.

Ubuntu 14.04, GCC.

merge two columns

Posted: 28 Aug 2021 09:49 AM PDT

I am trying to merge two columns into one column. My dataset look like this:

RSID1 RSID2  rs7475652 rs7475652  rs7475652 rs7918643  rs7475652 rs3125034  rs7475652 rs3750730  rs7475652 rs883728  rs7475652 rs4881500  rs7475652 rs3853288  rs7475652 rs4881504  rs7475652 rs2242271  rs7475652 rs7099607  rs7475652 rs10904597  rs7475652 rs3207775  

As you can see there is some repeat values. I want to first combine column 2 with column 1, then I am planning to use uniq command to remove any duplicates. I want to combine both the columns and then remove the duplicate.

Here is the first part of the expected output for this example:

rs7475652  rs7475652  rs7475652  rs7918643  rs7475652  rs3125034  rs7475652  rs3750730  rs7475652  rs883728   

iptables time rule doen't work on ubuntu 20.04

Posted: 28 Aug 2021 10:47 AM PDT

This is my rule:

iptables -A INPUT -m mac --mac-source 40:e2:30:f4:00:04 -m time --timestart 18:00:00 --timestop 23:59:59 --weekdays Mon,Tue,Wed,Thu,Fri -j ACCEPT  iptables -A INPUT -m mac --mac-source 40:e2:30:f4:00:04 -j DROP  

Works in ubuntu 14:04 (i don't know in 16.04) but not in 18.04/20.04 (iptables v1.8.4). any help?

PD: Here author says that this is because iptables does not read the system time but UTC. I tried the rule and it doesn't work either

iptables -A INPUT -m mac --mac-source 40:e2:30:f4:00:04 --match time --weekdays Mon,Tue,Wed,Thu,Fri --timestart $(date -u -d @$(date "+%s" -d "18:00") +%H:%M) --timestop $(date -u -d @$(date "+%s" -d "23:00") +%H:%M) -j ACCEPT  iptables -A INPUT -m mac --mac-source 40:e2:30:f4:00:04 -j DROP  

PD: I have used the --kerneltz (HERE explanation) parameter which supposedly uses the kernel timezone, instead of UTC, but neither (and using --kerneltz is highly discouraged)

my pc hour:

timedatectl status                 Local time: sáb 2021-08-28 12:42:49 -05             Universal time: sáb 2021-08-28 17:42:49 UTC                   RTC time: sáb 2021-08-28 17:42:48                      Time zone: America/Bogota (-05, -0500)  System clock synchronized: yes                                        NTP service: active                                 RTC in local TZ: no    date --utc   sáb 28 ago 2021 17:44:23 UTC    

I would appreciate if the solution was not to set the UTC time on my computer, because this can affect other applications

How to remove empty lines at the end of a file using awk?

Posted: 28 Aug 2021 10:46 AM PDT

I would like to remove all empty lines that are ONLY located at the end of the file using awk

I was able to successfully find a way to delete all of the empty lines at the top only with the following command:

awk '/^$/ && a!=1 {a=0} !/^$/ {a=1} a==1 {print}' file.txt    

However, I didn't know how to reverse it so I could remove the bottom lines instead. I know I could just use the command above and pipe it with tac, but I prefer a direct approach using awk command only (if possible).

Backup of VM using "virsh snapshot-create-as" works once. Fails second time

Posted: 28 Aug 2021 07:18 AM PDT

I'm running Ubuntu 20.04 with QEMU 4.2.1 and am trying to setup backups using these instructions: https://libvirt.org/kbase/live_full_disk_backup.html (older libvirt instructions, as Ubuntu 20 has older libvirt).

The backup method works once, but fails when run a second time. This may be related to the instructions using a VM that has the VM disk as a .raw file, but I'm using a .qcow2. At this point have several VMs, so I'd rather not convert to .raw.

When I run:

$ virsh snapshot-create-as --domain vm1 overlay1 \      --diskspec vda,file=/var/lib/libvirt/images/overlay1.qcow2 \      --disk-only  virsh blockcommit vm1 vda --active --verbose --pivot   

Everything works, no errors. If I don't remove the "overlay1.qcow2" file and run the command again, I get this error:

error: unsupported configuration: external snapshot file for disk vda already exists and is not a block device: /var/lib/libvirt/images/overlay1.qcow2   

If I remove the file before running it again (as suggested by the instructions):

error: operation failed: domain moment overlay1 already exists   

Did some digging and ran the snapshot-list:

$ virsh snapshot-list --tree vm1  overlay1   

Tried removing the snapshot:

virsh snapshot-delete vm1 overlay1  error: Failed to delete snapshot overlay1  error: unsupported configuration: deletion of 1 external disk snapshots not supported yet  

Not sure where to go from here.
Do I have to use .raw images? . . If so, why?

Thanks.

Synology ipkg nano - line numbers are wrong, and sometimes appear on the wrong side of the file

Posted: 28 Aug 2021 07:31 AM PDT

update

I submitted a bug report and the conclusion is that the nano version that's available through ipkg is 3 years outdated, and has been incorrectly modified or a dependency is broken.

Unfortunately the community-made package managers are either abandoned (ipkg) or incompatible (opkg). I suspect I'll run into similar problems if I keep trying to use the Synology for development so I'll try a different platform - but I'll leave this question up.

original

When I open any file in nano and line numbers are enabled, the line numbers are completely wrong, and appear on the wrong side!

This happens with any file. Here's one example:

nano with wrong line numbers

The actual file seems correct:

actual file contents

➜  ngnix-proxy-manager cat -A docker-compose.yml  version: "3"$  services:$    app:$      image: 'jc21/nginx-proxy-manager:latest'$      restart: unless-stopped$      ports:$        # Public HTTP Port:$        - '80:80'$        # Public HTTPS Port:$        - '443:443'$        # Admin Web Port:$        - '81:81'$        # Add any other Stream port you want to expose$        # - '21:21' # FTP$      environment:$        # These are the settings to access your db$        DB_MYSQL_HOST: "db"$        DB_MYSQL_PORT: 3306$        DB_MYSQL_USER: "npm"$        DB_MYSQL_PASSWORD: "npm"$        DB_MYSQL_NAME: "npm"$        # If you would rather use Sqlite uncomment this$        # and remove all DB_MYSQL_* lines above$        # DB_SQLITE_FILE: "/data/database.sqlite"$        # Uncomment this if IPv6 is not enabled on your host$        # DISABLE_IPV6: 'true'$      volumes:$        - ./data:/data$        - ./letsencrypt:/etc/letsencrypt$      depends_on:$        - db$    db:$      image: 'jc21/mariadb-aria:latest'$      restart: unless-stopped$      environment:$        MYSQL_ROOT_PASSWORD: 'npm'$        MYSQL_DATABASE: 'npm'$        MYSQL_USER: 'npm'$        MYSQL_PASSWORD: 'npm'$      volumes:$        - ./data/mysql:/var/lib/mysql$  ➜  ngnix-proxy-manager od -c docker-compose.yml  0000000   v   e   r   s   i   o   n   :       "   3   "  \n   s   e   r  0000020   v   i   c   e   s   :  \n           a   p   p   :  \n  0000040           i   m   a   g   e   :       '   j   c   2   1   /   n  0000060   g   i   n   x   -   p   r   o   x   y   -   m   a   n   a   g  0000100   e   r   :   l   a   t   e   s   t   '  \n                   r  0000120   e   s   t   a   r   t   :       u   n   l   e   s   s   -   s  0000140   t   o   p   p   e   d  \n                   p   o   r   t   s  0000160   :  \n                           #       P   u   b   l   i   c  0000200       H   T   T   P       P   o   r   t   :  \n  0000220           -       '   8   0   :   8   0   '  \n  0000240           #       P   u   b   l   i   c       H   T   T   P   S  0000260       P   o   r   t   :  \n                           -       '  0000300   4   4   3   :   4   4   3   '  \n                           #  0000320       A   d   m   i   n       W   e   b       P   o   r   t   :  0000340  \n                           -       '   8   1   :   8   1   '  0000360  \n                           #       A   d   d       a   n   y  0000400       o   t   h   e   r       S   t   r   e   a   m       p   o  0000420   r   t       y   o   u       w   a   n   t       t   o       e  0000440   x   p   o   s   e  \n                           #       -  0000460   '   2   1   :   2   1   '       #       F   T   P  \n  0000500           e   n   v   i   r   o   n   m   e   n   t   :  \n  0000520                       #       T   h   e   s   e       a   r   e  0000540       t   h   e       s   e   t   t   i   n   g   s       t   o  0000560       a   c   c   e   s   s       y   o   u   r       d   b  \n  0000600                           D   B   _   M   Y   S   Q   L   _   H  0000620   O   S   T   :       "   d   b   "  \n  0000640   D   B   _   M   Y   S   Q   L   _   P   O   R   T   :       3  0000660   3   0   6  \n                           D   B   _   M   Y   S  0000700   Q   L   _   U   S   E   R   :       "   n   p   m   "  \n  0000720                       D   B   _   M   Y   S   Q   L   _   P   A  0000740   S   S   W   O   R   D   :       "   n   p   m   "  \n  0000760                   D   B   _   M   Y   S   Q   L   _   N   A   M  0001000   E   :       "   n   p   m   "  \n                           #  0001020       I   f       y   o   u       w   o   u   l   d       r   a  0001040   t   h   e   r       u   s   e       S   q   l   i   t   e  0001060   u   n   c   o   m   m   e   n   t       t   h   i   s  \n  0001100                       #       a   n   d       r   e   m   o   v  0001120   e       a   l   l       D   B   _   M   Y   S   Q   L   _   *  0001140       l   i   n   e   s       a   b   o   v   e  \n  0001160               #       D   B   _   S   Q   L   I   T   E   _   F  0001200   I   L   E   :       "   /   d   a   t   a   /   d   a   t   a  0001220   b   a   s   e   .   s   q   l   i   t   e   "  \n  0001240               #       U   n   c   o   m   m   e   n   t       t  0001260   h   i   s       i   f       I   P   v   6       i   s       n  0001300   o   t       e   n   a   b   l   e   d       o   n       y   o  0001320   u   r       h   o   s   t  \n                           #  0001340   D   I   S   A   B   L   E   _   I   P   V   6   :       '   t  0001360   r   u   e   '  \n                   v   o   l   u   m   e   s  0001400   :  \n                           -       .   /   d   a   t   a  0001420   :   /   d   a   t   a  \n                           -       .  0001440   /   l   e   t   s   e   n   c   r   y   p   t   :   /   e   t  0001460   c   /   l   e   t   s   e   n   c   r   y   p   t  \n  0001500           d   e   p   e   n   d   s   _   o   n   :  \n  0001520                   -       d   b  \n           d   b   :  \n  0001540               i   m   a   g   e   :       '   j   c   2   1   /  0001560   m   a   r   i   a   d   b   -   a   r   i   a   :   l   a   t  0001600   e   s   t   '  \n                   r   e   s   t   a   r   t  0001620   :       u   n   l   e   s   s   -   s   t   o   p   p   e   d  0001640  \n                   e   n   v   i   r   o   n   m   e   n   t  0001660   :  \n                           M   Y   S   Q   L   _   R   O  0001700   O   T   _   P   A   S   S   W   O   R   D   :       '   n   p  0001720   m   '  \n                           M   Y   S   Q   L   _   D  0001740   A   T   A   B   A   S   E   :       '   n   p   m   '  \n  0001760                       M   Y   S   Q   L   _   U   S   E   R   :  0002000       '   n   p   m   '  \n                           M   Y   S  0002020   Q   L   _   P   A   S   S   W   O   R   D   :       '   n   p  0002040   m   '  \n                   v   o   l   u   m   e   s   :  \n  0002060                           -       .   /   d   a   t   a   /   m  0002100   y   s   q   l   :   /   v   a   r   /   l   i   b   /   m   y  0002120   s   q   l  \n  0002124  

Versions:

  • Synology DSM 6.2.4-25556
  • GNU nano, version 3.1

I've tried different combinations of shells and clients - the same problem occurs:

  • GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
  • zsh 5.2 (x86_64-buildroot-linux-gnu)
  • ohmyzsh - latest master
  • OS X Terminal
  • Windows Terminal 1.9.1942.0, with profile Powershell 7.1.3

I've tried reinstalling sudo /opt/bin/ipkg install nano --force-reinstall

nano correctly reads the nanorc file

> more $XDG_CONFIG_HOME/nano/nanorc  set linenumbers  

Once I even got a crash:

> nano docker-compose.yml.save  Sorry! Nano crashed!  Code: 11.  Please report a bug.  

The line number changes when I edit the content of a line: https://gfycat.com/unripeoblongafricanhornbill

  1. 211 - line-number-changes-0
  2. 225 - line-number-changes-1
  3. 239 - line-number-changes-2

When line numbers are disabled, nano works correctly. Here I've commented out the setting, and re-opened nanorc:

no-line-numbers-and-correct

Updated to DSM 7

I updated my Synology to DSM 7 and tried using nano again. Again, without set linenumbers, the output is garbled. Also, I get some nice error messages:

Badness: tried to display a line on row -1851878901 -- please report a bug

enter image description here

The row number changes a few times as the file is loaded, before I get this error:

Further warnings were suppressed

enter image description here

Rsync hangs forevers when I try to run it in cygwin

Posted: 28 Aug 2021 06:20 AM PDT

I am trying to run rsync command to copy diff of files. I am using cygwin as I am on windows OS, Rsync goes in hang state when I try to run it, this is what the screen looks like

$ rsync -avh data/pharma.mp4 rohit@192.168.100.6:  rohit@192.168.100.6's password: abc123  

I am able to run ssh from cygwin. Also, A thing to notice is that, the password shows in the screen, unlike in ssh, when the password in hidden.

Also when I do ctrl+c to exit from rsync, I get the following output

$ abc123  -bash: abc123: command not found  

What is the default password for a Linux Mint live usb

Posted: 28 Aug 2021 09:09 AM PDT

Im sure some else has had this problem before, but I can't seem to find a proper answer. What is the default password for a linux mint live usb?

Most of the other answers say that my install would be corrupt if it is asking me; however, I need to know because I am trying to ssh into it.

How to check if If i2c-hid and hid-rmi are not used for touchpad?

Posted: 28 Aug 2021 09:05 AM PDT

I'm seeing the following warning in dmesg:

[    2.631179] psmouse serio2: synaptics: Your touchpad (PNP: SYN1218 PNP0f13) says it can support a different bus. If i2c-hid and hid-rmi are not used, you might want to try setting psmouse.synaptics_intertouch to 1 and report this to linux-input@vger.kernel.org.  ...  [    2.819449] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio2/input/input10  

The touchpad works, but I feel that it is not working as well as it used to. I'm on Gentoo with a custom configured kernel. I've recently switched to other distros and came back to Gentoo and reconfigured the kernel from the ground up. I don't believe I did something out of the ordinary with regards to the input devices, so this might be a bug as suggested in dmesg.

$ uname -r  5.1.4-gentoo    $ grep -E 'INPUT|I2C_HID|HID_RMI' .config  CONFIG_RFKILL_INPUT=y  CONFIG_INPUT=y  CONFIG_INPUT_LEDS=m  CONFIG_INPUT_FF_MEMLESS=y  CONFIG_INPUT_POLLDEV=y  CONFIG_INPUT_SPARSEKMAP=m  # CONFIG_INPUT_MATRIXKMAP is not set  # CONFIG_INPUT_MOUSEDEV is not set  # CONFIG_INPUT_JOYDEV is not set  CONFIG_INPUT_EVDEV=y  # CONFIG_INPUT_EVBUG is not set  CONFIG_INPUT_KEYBOARD=y  CONFIG_INPUT_MOUSE=y  CONFIG_INPUT_JOYSTICK=y  CONFIG_INPUT_TABLET=y  CONFIG_INPUT_TOUCHSCREEN=y  CONFIG_INPUT_MISC=y  # CONFIG_INPUT_AD714X is not set  # CONFIG_INPUT_BMA150 is not set  # CONFIG_INPUT_E3X0_BUTTON is not set  # CONFIG_INPUT_MSM_VIBRATOR is not set  # CONFIG_INPUT_PCSPKR is not set  # CONFIG_INPUT_MMA8450 is not set  # CONFIG_INPUT_APANEL is not set  # CONFIG_INPUT_ATLAS_BTNS is not set  # CONFIG_INPUT_ATI_REMOTE2 is not set  # CONFIG_INPUT_KEYSPAN_REMOTE is not set  # CONFIG_INPUT_KXTJ9 is not set  # CONFIG_INPUT_POWERMATE is not set  # CONFIG_INPUT_YEALINK is not set  # CONFIG_INPUT_CM109 is not set  # CONFIG_INPUT_UINPUT is not set  # CONFIG_INPUT_PCF8574 is not set  # CONFIG_INPUT_ADXL34X is not set  # CONFIG_INPUT_IMS_PCU is not set  # CONFIG_INPUT_CMA3000 is not set  # CONFIG_INPUT_IDEAPAD_SLIDEBAR is not set  # CONFIG_INPUT_DRV2665_HAPTICS is not set  # CONFIG_INPUT_DRV2667_HAPTICS is not set  CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y  CONFIG_USB_PWC_INPUT_EVDEV=y  CONFIG_SND_JACK_INPUT_DEV=y  # CONFIG_SND_HDA_INPUT_BEEP is not set  CONFIG_HID_RMI=y  CONFIG_I2C_HID=y  

If i2c-hid and hid-rmi are not used

My question: how do I check if those are not used?

you might want to try setting psmouse.synaptics_intertouch to 1

$ sudo sysctl -a | grep "psmouse.synaptics_intertouch"  

Returns nothing, so nothing to set there.

Simple swaybar example

Posted: 28 Aug 2021 10:30 AM PDT

I'd like to have a simple, calm status bar for Sway which I use with Arch Linux.

The configurations I found so far use a separate program like waybar or i3status. While they look great, I'd like to keep it simple and use status_command mentioned in man sway-bar directly.

Preferably, this status bar would work equally well with i3 which should be possible since Sway aims to have its configuration be compatible with i3.

usb: device descriptor read/64, error -110

Posted: 28 Aug 2021 10:02 AM PDT

after this series of error in kernel

usb 2-1.5: reset full-speed USB device number 3 using ehci-pci
usb 2-1.5: device descriptor read/64, error -110
usb 2-1.5: USB disconnect, device number 3

this process (sadc of sysstat) or lsusb etc hang and stuck in D state forever

root 2543 0.0 0.0 9812 1204 ? D /usr/lib64/sa/sadc -F -L -S ALL 1 1 -
root 100998 0.0 0.0 22328 2116 ? D lsusb
root 84710 0.0 0.0 5476 636 ? D modprobe -r usbhid usbcore usb_common

Q: is it possible to release it without a reboot?

fyi the usb is related to this virtual keyboard and mouse

usb 2-1.5: new full-speed USB device number 3 using ehci-pci
usb 2-1.5: New USB device found, idVendor=046b, idProduct=ff10
usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1.5: Product: Virtual Keyboard and Mouse
usb 2-1.5: Manufacturer: American Megatrends Inc.
usb 2-1.5: SerialNumber: serial usbcore: registered new interface driver usbhid usbhid: USB HID core driver

input: American Megatrends Inc. Virtual Keyboard and Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.0/input/input0
hid-generic 0003:046B:FF10.0001: input,hidraw0: USB HID v1.10 Keyboard [American Megatrends Inc. Virtual Keyboard and Mouse] on usb-0000:00:1d.0-1.5/input0

input: American Megatrends Inc. Virtual Keyboard and Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.1/input/input1
hid-generic 0003:046B:FF10.0002: input,hidraw1: USB HID v1.10 Mouse [American Megatrends Inc. Virtual Keyboard and Mouse] on usb-0000:00:1d.0-1.5/input1

SMTP Error (530) 5.7.0 Must issue a STARTTLS command first

Posted: 28 Aug 2021 06:04 AM PDT

I am trying to use port 587 in roundcubemail running in the same machine as my mail server, and I am always receiving this error:

SMTP Error (530): Failed to set sender "X" (5.7.0 Must issue a STARTTLS command first).  

I have already changed,

smtpd_tls_security_level=encrypt  

to

smtpd_tls_security_level=may  

and nothing happens, and I have already 'submission' uncommented. Those was the solutions that I have found to solve this problem, but till now no result here.

Main.cf: http://pastebin.com/aEtC0AJt

Master.cf: http://pastebin.com/023uu2T8

System specs: 1. PHP Version 5.6.25 2. Postfix 3. MacOS 10.12

I don't know if it is related, but I cannot login through IMAP port 993.

I am only able to use ports 25 and 143 without SSL.

I cannot send mails internally, all mails pass through my ISP mail server, where my email domain is.

Does fwknop play nice with ufw?

Posted: 28 Aug 2021 10:24 AM PDT

The tutorial for fwknop says to block ports with an iptables script.

I don't want to use iptables since it's too confusing, I'd rather use ufw. But it seems like ufw does some complicated stuff, so I'm not sure if fwknop needs to be separately configured for this.

If I open/close my ports with ufw, will fwknop still work as if I had closed them with iptables?

airmon-ng start wlan0 problems

Posted: 28 Aug 2021 07:03 AM PDT

I was trying to aircrack-ng, but the problem everytime I

airmon-ng start wlan0  

prism0 shows up not mon0. What to do?

root@kali:~# airmon-ng start wlan0  PHY Interface Driver Chipset  phy0 wlan0 wl Broadcom Corporation BCM43142 802.11b/g/n (rev 01)      (experimental wl monitor mode vif enabled for [phy0]wlan0 on [phy0]prism0)  

VERR_ACCESS_DENIED when trying to add a raw disk to virtual box

Posted: 28 Aug 2021 07:15 AM PDT

I created a virtualbox raw disk pointing to a functioning, booting USB drive with a small linux distro on it.

sudo ./VBoxManage internalcommands createrawvmdk -filename ~/VirtualBox\ VMs/MyTinyLinux/rawdiskonusb.vmdk -rawdisk /dev/disk2 -partitions 2  

When I try to add it to a virtualbox VM, I get this error:

Failed to open the disk image file ~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk.    Permission problem accessing the file for the medium '~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk' (VERR_ACCESS_DENIED).    Result Code: VBOX_E_FILE_ERROR (0x80BB0004)  Component: MediumWrap  Interface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}  Callee: IVirtualBox {0169423f-46b4-cde9-91af-1e9d5b6cd945}  Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)  

I saw that the raw disk vmdk file was owned by root. I chown'ed it to my own user.

Still get the same error. I suspect it would work if I ran virtualbox as root, but I really do not want to do that. Is there anyway to make this work?

tmux exits immediately after starting

Posted: 28 Aug 2021 08:57 AM PDT

I'm trying to start with tmux but am failing to even run it. Immediately after starting it exits, similar to this question.

It happens both without a .tmux.conf, and (following some examples) with this .tmux.conf:

set -g default-shell /usr/bin/zsh  set -g status on  set -g history-limit 10000000  set -g prefix C-t  set -g status-bg green  setw -g window-status-current-bg cyan  setw -g window-status-current-attr bold    set -g status-right '#7H | %F %s'    bind-key C-t last-window    setw -g monitor-activity on  set -g visual-activity on  

Adding new-session in the beginning of the .tmux.conf, as suggested some places doesn't help, and this happens when I use tmux new $SHELL also (again suggested to solve this somewhere).

I am using:

  • tmux 1.9a
  • Ubuntu 14.04
  • zsh 5.0.2

My tmux-server.log file shows this after tmux -v:

server started, pid 19654  socket path /tmp/tmux-1000/default  new client 7  loading /home/alon/.tmux.conf  /home/alon/.tmux.conf: new-session  /home/alon/.tmux.conf: set -g default-shell /usr/bin/zsh  /home/alon/.tmux.conf: set -g status on  /home/alon/.tmux.conf: set -g history-limit 10000000  /home/alon/.tmux.conf: set -g prefix C-t  /home/alon/.tmux.conf: set -g status-bg green  /home/alon/.tmux.conf: setw -g window-status-current-bg cyan  /home/alon/.tmux.conf: setw -g window-status-current-attr bold  /home/alon/.tmux.conf:   /home/alon/.tmux.conf: set -g status-right '#7H | %F %s'  /home/alon/.tmux.conf:   /home/alon/.tmux.conf: bind-key C-t last-window  /home/alon/.tmux.conf:   /home/alon/.tmux.conf: setw -g monitor-activity on  /home/alon/.tmux.conf: set -g visual-activity on  cmdq 0x7f75d1784b50: new-session (client -1)  spawn: /usr/bin/zsh --   session 0 created  cmdq 0x7f75d1784b50: set-option -g default-shell /usr/bin/zsh (client -1)  cmdq 0x7f75d1784b50: set-option -g status on (client -1)  cmdq 0x7f75d1784b50: set-option -g history-limit 10000000 (client -1)  cmdq 0x7f75d1784b50: set-option -g prefix C-t (client -1)  cmdq 0x7f75d1784b50: set-option -g status-bg green (client -1)  cmdq 0x7f75d1784b50: set-window-option -g window-status-current-bg cyan (client -1)  cmdq 0x7f75d1784b50: set-window-option -g window-status-current-attr bold (client -1)  cmdq 0x7f75d1784b50: set-option -g status-right "#7H | %F %s" (client -1)  cmdq 0x7f75d1784b50: bind-key C-t last-window (client -1)  cmdq 0x7f75d1784b50: set-window-option -g monitor-activity on (client -1)  cmdq 0x7f75d1784b50: set-option -g visual-activity on (client -1)  got 100 from client 7  got 101 from client 7  got 102 from client 7  got 103 from client 7  got 104 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 105 from client 7  got 106 from client 7  got 200 from client 7  cmdq 0x7f75d176b260: new-session (client 7)  new term: xterm  xterm override: XT   xterm override: Ms ]52;%p1%s;%p2%s  xterm override: Cs ]12;%p1%s  xterm override: Cr ]112  xterm override: Ss [%p1%d q  xterm override: Se [2 q  new key Oo: 0x1021 (KP/)  new key Oj: 0x1022 (KP*)  new key Om: 0x1023 (KP-)  new key Ow: 0x1024 (KP7)  new key Ox: 0x1025 (KP8)  new key Oy: 0x1026 (KP9)  new key Ok: 0x1027 (KP+)  new key Ot: 0x1028 (KP4)  new key Ou: 0x1029 (KP5)  new key Ov: 0x102a (KP6)  new key Oq: 0x102b (KP1)  new key Or: 0x102c (KP2)  new key Os: 0x102d (KP3)  new key OM: 0x102e (KPEnter)  new key Op: 0x102f (KP0)  new key On: 0x1030 (KP.)  new key OA: 0x101d (Up)  new key OB: 0x101e (Down)  new key OC: 0x1020 (Right)  new key OD: 0x101f (Left)  new key [A: 0x101d (Up)  new key [B: 0x101e (Down)  new key [C: 0x1020 (Right)  new key [D: 0x101f (Left)  new key OH: 0x1018 (Home)  new key OF: 0x1019 (End)  new key [H: 0x1018 (Home)  new key [F: 0x1019 (End)  new key Oa: 0x501d (C-Up)  new key Ob: 0x501e (C-Down)  new key Oc: 0x5020 (C-Right)  new key Od: 0x501f (C-Left)  new key [a: 0x901d (S-Up)  new key [b: 0x901e (S-Down)  new key [c: 0x9020 (S-Right)  new key [d: 0x901f (S-Left)  new key [11^: 0x5002 (C-F1)  new key [12^: 0x5003 (C-F2)  new key [13^: 0x5004 (C-F3)  new key [14^: 0x5005 (C-F4)  new key [15^: 0x5006 (C-F5)  new key [17^: 0x5007 (C-F6)  new key [18^: 0x5008 (C-F7)  new key [19^: 0x5009 (C-F8)  new key [20^: 0x500a (C-F9)  new key [21^: 0x500b (C-F10)  new key [23^: 0x500c (C-F11)  new key [24^: 0x500d (C-F12)  new key [25^: 0x500e (C-F13)  new key [26^: 0x500f (C-F14)  new key [28^: 0x5010 (C-F15)  new key [29^: 0x5011 (C-F16)  new key [31^: 0x5012 (C-F17)  new key [32^: 0x5013 (C-F18)  new key [33^: 0x5014 (C-F19)  new key [34^: 0x5015 (C-F20)  new key [2^: 0x5016 (C-IC)  new key [3^: 0x5017 (C-DC)  new key [7^: 0x5018 (C-Home)  new key [8^: 0x5019 (C-End)  new key [6^: 0x501a (C-NPage)  new key [5^: 0x501b (C-PPage)  new key [11$: 0x9002 (S-F1)  new key [12$: 0x9003 (S-F2)  new key [13$: 0x9004 (S-F3)  new key [14$: 0x9005 (S-F4)  new key [15$: 0x9006 (S-F5)  new key [17$: 0x9007 (S-F6)  new key [18$: 0x9008 (S-F7)  new key [19$: 0x9009 (S-F8)  new key [20$: 0x900a (S-F9)  new key [21$: 0x900b (S-F10)  new key [23$: 0x900c (S-F11)  new key [24$: 0x900d (S-F12)  new key [25$: 0x900e (S-F13)  new key [26$: 0x900f (S-F14)  new key [28$: 0x9010 (S-F15)  new key [29$: 0x9011 (S-F16)  new key [31$: 0x9012 (S-F17)  new key [32$: 0x9013 (S-F18)  new key [33$: 0x9014 (S-F19)  new key [34$: 0x9015 (S-F20)  new key [2$: 0x9016 (S-IC)  new key [3$: 0x9017 (S-DC)  new key [7$: 0x9018 (S-Home)  new key [8$: 0x9019 (S-End)  new key [6$: 0x901a (S-NPage)  new key [5$: 0x901b (S-PPage)  new key [11@: 0xd002 (C-S-F1)  new key [12@: 0xd003 (C-S-F2)  new key [13@: 0xd004 (C-S-F3)  new key [14@: 0xd005 (C-S-F4)  new key [15@: 0xd006 (C-S-F5)  new key [17@: 0xd007 (C-S-F6)  new key [18@: 0xd008 (C-S-F7)  new key [19@: 0xd009 (C-S-F8)  new key [20@: 0xd00a (C-S-F9)  new key [21@: 0xd00b (C-S-F10)  new key [23@: 0xd00c (C-S-F11)  new key [24@: 0xd00d (C-S-F12)  new key [25@: 0xd00e (C-S-F13)  new key [26@: 0xd00f (C-S-F14)  new key [28@: 0xd010 (C-S-F15)  new key [29@: 0xd011 (C-S-F16)  new key [31@: 0xd012 (C-S-F17)  new key [32@: 0xd013 (C-S-F18)  new key [33@: 0xd014 (C-S-F19)  new key [34@: 0xd015 (C-S-F20)  new key [2@: 0xd016 (C-S-IC)  new key [3@: 0xd017 (C-S-DC)  new key [7@: 0xd018 (C-S-Home)  new key [8@: 0xd019 (C-S-End)  new key [6@: 0xd01a (C-S-NPage)  new key [5@: 0xd01b (C-S-PPage)  new key [I: 0x1031 ((null))  new key [O: 0x1032 ((null))  new key OP: 0x1002 (F1)  new key OQ: 0x1003 (F2)  new key OR: 0x1004 (F3)  new key OS: 0x1005 (F4)  new key [15~: 0x1006 (F5)  new key [17~: 0x1007 (F6)  new key [18~: 0x1008 (F7)  new key [19~: 0x1009 (F8)  new key [20~: 0x100a (F9)  new key [21~: 0x100b (F10)  new key [23~: 0x100c (F11)  new key [24~: 0x100d (F12)  new key [1;2P: 0x100e (F13)  new key [1;2Q: 0x100f (F14)  new key [1;2R: 0x1010 (F15)  new key [1;2S: 0x1011 (F16)  new key [15;2~: 0x1012 (F17)  new key [17;2~: 0x1013 (F18)  new key [18;2~: 0x1014 (F19)  new key [19;2~: 0x1015 (F20)  new key [2~: 0x1016 (IC)  new key [3~: 0x1017 (DC)  replacing key OH: 0x1018 (Home)  replacing key OF: 0x1019 (End)  new key [6~: 0x101a (NPage)  new key [5~: 0x101b (PPage)  new key [Z: 0x101c (BTab)  replacing key OA: 0x101d (Up)  replacing key OB: 0x101e (Down)  replacing key OD: 0x101f (Left)  replacing key OC: 0x1020 (Right)  new key [3;2~: 0x9017 (S-DC)  new key [3;3~: 0x3017 (M-DC)  new key [3;4~: 0xb017 (M-S-DC)  new key [3;5~: 0x5017 (C-DC)  new key [3;6~: 0xd017 (C-S-DC)  new key [3;7~: 0x7017 (C-M-DC)  new key [1;2B: 0x901e (S-Down)  new key [1;3B: 0x301e (M-Down)  new key [1;4B: 0xb01e (M-S-Down)  new key [1;5B: 0x501e (C-Down)  new key [1;6B: 0xd01e (C-S-Down)  new key [1;7B: 0x701e (C-M-Down)  new key [1;2F: 0x9019 (S-End)  new key [1;3F: 0x3019 (M-End)  new key [1;4F: 0xb019 (M-S-End)  new key [1;5F: 0x5019 (C-End)  new key [1;6F: 0xd019 (C-S-End)  new key [1;7F: 0x7019 (C-M-End)  new key [1;2H: 0x9018 (S-Home)  new key [1;3H: 0x3018 (M-Home)  new key [1;4H: 0xb018 (M-S-Home)  new key [1;5H: 0x5018 (C-Home)  new key [1;6H: 0xd018 (C-S-Home)  new key [1;7H: 0x7018 (C-M-Home)  new key [2;2~: 0x9016 (S-IC)  new key [2;3~: 0x3016 (M-IC)  new key [2;4~: 0xb016 (M-S-IC)  new key [2;5~: 0x5016 (C-IC)  new key [2;6~: 0xd016 (C-S-IC)  new key [2;7~: 0x7016 (C-M-IC)  new key [1;2D: 0x901f (S-Left)  new key [1;3D: 0x301f (M-Left)  new key [1;4D: 0xb01f (M-S-Left)  new key [1;5D: 0x501f (C-Left)  new key [1;6D: 0xd01f (C-S-Left)  new key [1;7D: 0x701f (C-M-Left)  new key [6;2~: 0x901a (S-NPage)  new key [6;3~: 0x301a (M-NPage)  new key [6;4~: 0xb01a (M-S-NPage)  new key [6;5~: 0x501a (C-NPage)  new key [6;6~: 0xd01a (C-S-NPage)  new key [6;7~: 0x701a (C-M-NPage)  new key [5;2~: 0x901b (S-PPage)  new key [5;3~: 0x301b (M-PPage)  new key [5;4~: 0xb01b (M-S-PPage)  new key [5;5~: 0x501b (C-PPage)  new key [5;6~: 0xd01b (C-S-PPage)  new key [5;7~: 0x701b (C-M-PPage)  new key [1;2C: 0x9020 (S-Right)  new key [1;3C: 0x3020 (M-Right)  new key [1;4C: 0xb020 (M-S-Right)  new key [1;5C: 0x5020 (C-Right)  new key [1;6C: 0xd020 (C-S-Right)  new key [1;7C: 0x7020 (C-M-Right)  new key [1;2A: 0x901d (S-Up)  new key [1;3A: 0x301d (M-Up)  new key [1;4A: 0xb01d (M-S-Up)  new key [1;5A: 0x501d (C-Up)  new key [1;6A: 0xd01d (C-S-Up)  new key [1;7A: 0x701d (C-M-Up)  spawn: /usr/bin/zsh --   session 1 created  writing 207 to client 7  got 208 from client 7  keys are 9 ([?62;9;c)  received service class 62  complete key [?62;9;c 0xfff  session 0 destroyed  session 1 destroyed  writing 203 to client 7  got 205 from client 7  writing 204 to client 7  lost client 7  

UPDATE: Here are the results from running strace tmux:

execve("/usr/bin/tmux", ["tmux"], [/* 103 vars */]) = 0 brk(0)          = 0x7f86ea097000 access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f86e817b000 access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=117788, ...}) = 0 mmap(NULL, 117788, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f86e815e000 close(3)                 = 0 access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libutil.so.1", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\17\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=10680, ...}) = 0 mmap(NULL, 2105624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f86e7d58000 mprotect(0x7f86e7d5a000, 2093056, PROT_NONE) = 0 mmap(0x7f86e7f59000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f86e7f59000 close(3)                                = 0 access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\303\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=167096, ...}) = 0 mmap(NULL, 2264288, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f86e7b2f000 mprotect(0x7f86e7b54000, 2093056, PROT_NONE) = 0 mmap(0x7f86e7d53000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x24000) = 0x7f86e7d53000 close(3)                                = 0 access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory) open("/usr/lib/x86_64-linux-gnu/libevent-2.0.so.5", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\236\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=276880, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f86e815d000 mmap(NULL, 2373864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f86e78eb000 mprotect(0x7f86e792d000, 2097152, PROT_NONE) = 0 mmap(0x7f86e7b2d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x42000) = 0x7f86e7b2d000 close(3)                                = 0 access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libresolv.so.2", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320:\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=101240, ...}) = 0 mmap(NULL, 2206376, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f86e76d0000 mprotect(0x7f86e76e7000, 2097152, PROT_NONE) = 0 mmap(0x7f86e78e7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f86e78e7000 mmap(0x7f86e78e9000, 6824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f86e78e9000 close(3)   = 0 access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\37\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1845024, ...}) = 0 mmap(NULL, 3953344, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f86e730a000 mprotect(0x7f86e74c5000, 2097152, PROT_NONE) = 0 mmap(0x7f86e76c5000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bb000) = 0x7f86e76c5000 mmap(0x7f86e76cb000, 17088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f86e76cb000 close(3)   = 0 access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0po\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=141574, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f86e815c000 mmap(NULL, 2217264, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f86e70ec000 mprotect(0x7f86e7105000, 2093056, PROT_NONE) = 0 mmap(0x7f86e7304000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7f86e7304000 mmap(0x7f86e7306000, 13616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f86e7306000 close(3)                                = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f86e815b000 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f86e8159000 arch_prctl(ARCH_SET_FS, 0x7f86e8159740) = 0 mprotect(0x7f86e76c5000, 16384, PROT_READ) = 0 mprotect(0x7f86e7304000, 4096, PROT_READ) = 0 mprotect(0x7f86e78e7000, 4096, PROT_READ) = 0 mprotect(0x7f86e7b2d000, 4096, PROT_READ) = 0 mprotect(0x7f86e7d53000, 16384, PROT_READ) = 0 mprotect(0x7f86e7f59000, 4096, PROT_READ) = 0 mprotect(0x7f86e83ea000, 36864, PROT_READ) = 0 mprotect(0x7f86e817d000, 4096, PROT_READ) = 0 munmap(0x7f86e815e000, 117788)          = 0 set_tid_address(0x7f86e8159a10)         = 13671 set_robust_list(0x7f86e8159a20, 24)     = 0 futex(0x7fffc947f210, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7f86e8159740)  = -1 EAGAIN (Resource temporarily unavailable) rt_sigaction(SIGRTMIN, {0x7f86e70f29f0, [], SA_RESTORER|SA_SIGINFO, 0x7f86e70fc340}, NULL, 8)  = 0 rt_sigaction(SIGRT_1, {0x7f86e70f2a80, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f86e70fc340}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 brk(0)                                   = 0x7f86ea097000 brk(0x7f86ea0b8000)                     = 0x7f86ea0b8000 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=4427728, ...}) = 0 mmap(NULL, 4427728, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f86e6cb3000 close(3)                                = 0 getcwd("/tmp", 4096)                    = 5 access("/usr/bin/zsh", X_OK)            = 0 access("/home/alon/.tmux.conf", R_OK)   = 0 getuid()                                = 1000 mkdir("/tmp/user/1000/tmux-1000", 0700) = -1 EEXIST (File exists) lstat("/tmp/user/1000/tmux-1000", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=126976, ...}) = 0 lstat("/tmp/user", {st_mode=S_IFDIR|0711, st_size=4096, ...}) = 0 lstat("/tmp/user/1000", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 lstat("/tmp/user/1000/tmux-1000", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 getuid()                                = 1000 geteuid()                               = 1000 getgid()                 = 1000 getegid()                               = 1000 getuid()                                = 1000 geteuid()                               = 1000 getgid()                                = 1000 getegid()                               = 1000 socketpair(PF_LOCAL, SOCK_STREAM, 0, [3, 4]) = 0 fcntl(3, F_GETFD)      = 0 fcntl(3, F_SETFD, FD_CLOEXEC)           = 0 fcntl(4, F_GETFD)                       = 0 fcntl(4, F_SETFD, FD_CLOEXEC)           = 0 fcntl(3, F_GETFL)                       = 0x2 (flags O_RDWR) fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK)    = 0 fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR) fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0 getuid()                             = 1000 geteuid()                               = 1000 getgid()                                = 1000 getegid()                               = 1000 socket(PF_LOCAL, SOCK_STREAM, 0)        = 5 connect(5, {sa_family=AF_LOCAL, sun_path="/tmp/user/1000/tmux-1000/default"}, 34) = -1 ECONNREFUSED (Connection refused) close(5)                                = 0 open("/tmp/user/1000/tmux-1000/default.lock", O_WRONLY|O_CREAT, 0600)  = 5 fcntl(5, F_SETLK, {type=F_WRLCK, whence=SEEK_CUR, start=0, len=0}) = 0 unlink("/tmp/user/1000/tmux-1000/default") = 0 socketpair(PF_LOCAL, SOCK_STREAM, 0, [6, 7]) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f86e8159a10) = 13672 close(7)                           = 0 close(5)                                = 0 fcntl(6, F_GETFL)                       = 0x2 (flags O_RDWR) fcntl(6, F_SETFL, O_RDWR|O_NONBLOCK)    = 0  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13672, si_status=0, si_utime=0, si_stime=0} --- fcntl(0, F_GETFL)              = 0x8002 (flags O_RDWR|O_LARGEFILE) fcntl(0, F_SETFL, O_RDWR|O_NONBLOCK|O_LARGEFILE) = 0 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER|SA_RESTART, 0x7f86e7340c30}, NULL, 8) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER|SA_RESTART, 0x7f86e7340c30}, NULL, 8) = 0 rt_sigaction(SIGUSR2, {SIG_IGN, [], SA_RESTORER|SA_RESTART, 0x7f86e7340c30}, NULL, 8) = 0 rt_sigaction(SIGTSTP, {SIG_IGN, [], SA_RESTORER|SA_RESTART, 0x7f86e7340c30}, NULL, 8) = 0 rt_sigaction(SIGHUP, {0x7f86e790c770, ~[RTMIN RT_1], SA_RESTORER|SA_RESTART, 0x7f86e7340c30}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGCHLD, {0x7f86e790c770, ~[RTMIN RT_1], SA_RESTORER|SA_RESTART, 0x7f86e7340c30}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGCONT, {0x7f86e790c770, ~[RTMIN RT_1], SA_RESTORER|SA_RESTART, 0x7f86e7340c30}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGTERM, {0x7f86e790c770, ~[RTMIN RT_1], SA_RESTORER|SA_RESTART, 0x7f86e7340c30}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGUSR1, {0x7f86e790c770, ~[RTMIN RT_1], SA_RESTORER|SA_RESTART, 0x7f86e7340c30}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGWINCH, {0x7f86e790c770, ~[RTMIN RT_1], SA_RESTORER|SA_RESTART, 0x7f86e7340c30}, {SIG_DFL, [], 0}, 8) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 16), ...}) = 0 readlink("/proc/self/fd/0", "/dev/pts/16", 4095) = 11 stat("/dev/pts/16", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 16), ...}) = 0 open(".", O_RDONLY)                     = 5 dup(0)            = 7 poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN|POLLOUT}], 2, 4294967295) = 1 ([{fd=6, revents=POLLOUT}]) sendmsg(6, {msg_name(0)=NULL, msg_iov(4)=[{"d\0\0\0\24\0\0\0\10\0\0\0\377\377\377\377\0\0\1\0", 20}, {"e\0\0\0\26\0\0\0\10\0\0\0\377\377\377\377xterm\0", 22}, {"f\0\0\0\34\0\0\0\10\0\0\0\377\377\377\377/dev/pts/16\0", 28}, {"g\0\0\0\20\0\1\0\10\0\0\0\377\377\377\377", 16}], msg_controllen=24, {cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, {5}}, msg_flags=0}, 0) = 86 close(5)                                = 0 poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN|POLLOUT}], 2, 4294967295) = 1 ([{fd=6, revents=POLLOUT}]) sendmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"h\0\0\0\20\0\1\0\10\0\0\0\377\377\377\377", 16}], msg_controllen=24, {cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, {7}}, msg_flags=0}, 0) = 16 close(7)              = 0 poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN|POLLOUT}], 2, 4294967295) = 1 ([{fd=6, revents=POLLOUT}]) sendmsg(6, {msg_name(0)=NULL, msg_iov(106)=[{"i\0\0\0\37\0\0\0\10\0\0\0\377\377\377\377XDG_SEAT=seat0\0", 31}, {"i\0\0\0\"\0\0\0\10\0\0\0\377\377\377\377XDG_SESSION_ID=c"..., 34}, {"i\0\0\0.\0\0\0\10\0\0\0\377\377\377\377LC_IDENTIFICATIO"..., 46}, {"i\0\0\0r\0\0\0\10\0\0\0\377\377\377\377SESSION_MANAGER="..., 114}, {"i\0\0\0003\0\0\0\10\0\0\0\377\377\377\377GIO_LAUNCHED_DES"..., 51}, {"i\0\0\0\33\0\0\0\10\0\0\0\377\377\377\377DISPLAY=:0\0", 27}, {"i\0\0\0&\0\0\0\10\0\0\0\377\377\377\377TMPDIR=/tmp/user"..., 38}, {"i\0\0\0\31\0\0\0\10\0\0\0\377\377\377\377JOB=dbus\0", 25}, {"i\0\0\0D\0\0\0\10\0\0\0\377\377\377\377GNOME_KEYRING_CO"..., 68}, {"i\0\0\0<\0\0\0\10\0\0\0\377\377\377\377GNOME_DESKTOP_SE"..., 60}, {"i\0\0\0C\0\0\0\10\0\0\0\377\377\377\377DEFAULTS_PATH=/u"..., 67}, {"i\0\0\0001\0\0\0\10\0\0\0\377\377\377\377QT_QPA_PLATFORMT"..., 49}, {"i\0\0\0\35\0\0\0\10\0\0\0\377\377\377\377LOGNAME=alon\0", 29}, {"i\0\0\0%\0\0\0\10\0\0\0\377\377\377\377TEXTDOMAIN=im-co"..., 37}, {"i\0\0\0\32\0\0\0\10\0\0\0\377\377\377\377INSTANCE=\0", 26}, {"i\0\0\0$\0\0\0\10\0\0\0\377\377\377\377LC_TIME=en_US.UT"..., 36}, {"i\0\0\0#\0\0\0\10\0\0\0\377\377\377\377SHELL=/usr/bin/z"..., 35}, {"i\0\0\0!\0\0\0\10\0\0\0\377\377\377\377PAPERSIZE=letter"..., 33}, {"i\0\0\0\200\1\0\0\10\0\0\0\377\377\377\377PATH=/home/alon/"..., 384}, {"i\0\0\0'\0\0\0\10\0\0\0\377\377\377\377LC_NUMERIC=en_US"..., 39}, {"i\0\0\0%\0\0\0\10\0\0\0\377\377\377\377LC_PAPER=en_US.U"..., 37}, {"i\0\0\0\"\0\0\0\10\0\0\0\377\377\377\377IM_CONFIG_PHASE="..., 34}, {"i\0\0\0%\0\0\0\10\0\0\0\377\377\377\377WEBIDE_JDK=/opt/"..., 37}, {"i\0\0\0$\0\0\0\10\0\0\0\377\377\377\377XMODIFIERS=@im=n"..., 36}, {"i\0\0\0\"\0\0\0\10\0\0\0\377\377\377\377QT4_IM_MODULE=xi"..., 34}, {"i\0\0\0J\0\0\0\10\0\0\0\377\377\377\377XDG_SESSION_PATH"..., 74}, {"i\0\0\0\37\0\0\0\10\0\0\0\377\377\377\377SESSION=ubuntu\0", 31}, {"i\0\0\0001\0\0\0\10\0\0\0\377\377\377\377TEXTDOMAINDIR=/u"..., 49}, {"i\0\0\0@\0\0\0\10\0\0\0\377\377\377\377SSH_AUTH_SOCK=/r"..., 64}, {"i\0\0\0002\0\0\0\10\0\0\0\377\377\377\377XAUTHORITY=/home"..., 50}, {"i\0\0\0'\0\0\0\10\0\0\0\377\377\377\377XDG_MENU_PREFIX="..., 39}, {"i\0\0\0\"\0\0\0\10\0\0\0\377\377\377\377GDMSESSION=ubunt"..., 34}, ...], msg_controllen=0, msg_flags=0}, 0) = 5415 poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}], 2, 4294967295) = 1 ([{fd=6, revents=POLLIN}]) recvmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"\314\0\0\0\20\0\0\0\10\0\0\0\377\377\377\377", 65535}], msg_controllen=0, msg_flags=0}, 0) = 16 poll([{fd=4, events=POLLIN}], 1, 0)     = 0 (Timeout) fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 16), ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f86e817a000 write(1, "[exited]\n", 9[exited] )               = 9 getppid()                               = 13668 fcntl(0, F_GETFL)       = 0x8002 (flags O_RDWR|O_LARGEFILE) fcntl(0, F_SETFL, O_RDWR|O_LARGEFILE)   = 0 exit_group(0)                           = ?  +++ exited with 0 +++  

Linux Mint: How to enable cryptswap with custom password?

Posted: 28 Aug 2021 08:03 AM PDT

When you want to use hibernation and you care for security, you'd like to have the swap encrypted. But not with the random password, chosen for you at startup, but with a fixed one, supplied by you at the boot time, so the hibernated state would be available for resuming upon next boot.

There was a cool way to do this, that worked up until Mint 15: How to: get the whole system encrypted

This doesn't work anymore on Petra. Can anyone help me with working it out? The main culprit, the /usr/share/initramfs-tools/scripts/local-top script didn't change, so I guess it has something to do with the kernel. It looks like the recent kernel just ignores all the scirpt, or at least the part that asks for a password for swap.

Oh, and I was able to get the password prompt, when I accidentally booted the Mint 16 with the kernel from Mint 15.

See also a related question:

How to ask for a password to mount crypted swap at boot time on Linux Mint 16 with initramfs-tools?


Some debug info

After opening the swap device with sudo cryptsetup luksOpen /dev/sda5 cryptswap:

sudo lsblk -o name,uuid

NAME                  UUID  sda                     ├─sda1                F251-38C0  ├─sda2                c66b8e51-dd1b-4d92-8605-a3ba7df6af83  ├─sda3                77af32db-038d-4c10-b302-039634cf943a  ├─sda4                7a3cde35-ab80-4618-ad76-7aa064d55f56  ├─sda5                fc068dd2-759c-4779-b521-c73cc5499e86  │ └─cryptswap (dm-1)  964eafeb-c88b-49c8-8b5e-6f8395e040b4  ├─sda6                926fa7cc-6f97-4672-85a7-a1ed8f5bd842  ├─sda7                804b9c88-907b-43d9-b23f-964c32ecc2ac  └─sda8                ce2cd926-133f-4e20-86f8-45bc4844271c    └─adama-docs (dm-0) 61a32b98-3b65-4af6-81ff-da090cae039f  sr0                

cat /etc/crypttab

#cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256  swap UUID=fc068dd2-759c-4779-b521-c73cc5499e86  none luks  

cat /etc/fstab

UUID=926fa7cc-6f97-4672-85a7-a1ed8f5bd842   /   btrfs   defaults,subvol=@,compress,autodefrag   0   1  # /boot was on /dev/sda2 during installation  UUID=c66b8e51-dd1b-4d92-8605-a3ba7df6af83   /boot   ext3    defaults    0   2  # /boot/efi was on /dev/sda1 during installation  UUID=F251-38C0  /boot/efi   vfat    defaults    0   1  # /home was on /dev/sda6 during installation  UUID=926fa7cc-6f97-4672-85a7-a1ed8f5bd842   /home   btrfs   defaults,subvol=@home   0   2  # /mnt/ext4 was on /dev/sda7 during installation  UUID=804b9c88-907b-43d9-b23f-964c32ecc2ac   /mnt/ext4   ext4    defaults    0   0  # swap was on /dev/sda5 during installation  UUID=964eafeb-c88b-49c8-8b5e-6f8395e040b4 none            swap    sw              0       0  

/etc/initramfs-tools/conf.d/resume

RESUME=/dev/disk/by-uuid/964eafeb-c88b-49c8-8b5e-6f8395e040b4  

update:

When I setup everything like above, the system does display the familiar password prompt. It doesn't do that every time, and if it does, it is a fraction of second before the login screen (Linux Mint uses mdm for login). I guess there is racing condition; the mounting of swap is done parallel with the system booting; I expect the system to wait booting until the swap is mounted, and do it as early as possible. Otherwise how could it resume the hibernated state?

There is a similar question for Ubuntu: https://askubuntu.com/questions/396136/encrypted-home-partition-encrypted-swap-working-hibernate It seems, that it worked for someone if he encrypted the root as well.

No comments:

Post a Comment