Sunday, April 25, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Use same host's keyboard shortcuts on VM to copy/paste text

Posted: 25 Apr 2021 09:26 AM PDT

Does exist a way to make copy/paste working into a virtual machine (not between the VM and the host) using the same keyboard shortcuts used by the host machine?

In practice in macOS (host) I use cmd+C and cmd+V, respectively to copy and paste, while working with the VMs I have always used shift+ctrl+C and shift+ctrl+V for these operations. My doubt is about if it is possible to set the use of cmd+C and cmd+V to copy and paste when I am into the VM.

I had not able to do this neither using Virtualbox nor with VMware Fusion.

Is there a way to use a long running kthread without calling schedule()?

Posted: 25 Apr 2021 08:47 AM PDT

I have a problem with a kernel module of mine (see Am I making invalid assumptions with regard to my kernel module's shared memory? ) that I finally narrowed down to some kind of scheduling issue (see my above post for details on my used configuration):

It seems that I found a workaround that prevents the random system freezes that I experienced originally, by periodically calling schedule() from my long running kthread (at least the system has not frozen up again until now). The problem with this workaround is that I may not always have a sufficiently large timeslot available to make that call without compromising the timing precision of my kthread.

I would therefore prefer to find some means to make sure that the scheduler does not care at all if my kthread (which already runs alone on an isolated core) doesn't call in for a while.. (I imagine that this should be possible since system freezes where sporadic and everything runs perfectly unless some "silly scheduler related thing" has the idea to "check on my kthread" thereby probably blocking the system.. and already those checks seemed to happen randomly and far apart so surely they are not strictly important for anything anyway..)

Any suggestions?

iptables - How kill established connection except for an ip?

Posted: 25 Apr 2021 08:24 AM PDT

I've 2 iptables configuration. The second iptables replace the first at 15:00. The first iptables is:

#!/bin/bash    /usr/sbin/iptables -F  /usr/sbin/iptables -P INPUT DROP  /usr/sbin/iptables -P FORWARD DROP  /usr/sbin/iptables -P OUTPUT ACCEPT    /usr/sbin/iptables -A INPUT -i lo -j ACCEPT  /usr/sbin/iptables -A INPUT -m state --state ESTABLISHED -j ACCEPT    csa=MY_IP_TO_ALLOW    /usr/sbin/iptables -A INPUT -p tcp -m tcp -s $csa --dport 22 -m connlimit --connlimit-upto 1 -j ACCEPT  /usr/sbin/iptables -A INPUT -p tcp -m tcp -s $csa --dport 80 -m connlimit --connlimit-upto 1 -j ACCEPT  /usr/sbin/iptables -A INPUT -p tcp -m tcp -s $csa --dport 443 -m connlimit --connlimit-upto 1 -j ACCEPT  /usr/sbin/iptables -A INPUT -p tcp -s MY_SECOND_IP --dport 3306 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT  

The second iptables is: #!/bin/bash

/usr/sbin/iptables -F  /usr/sbin/iptables -P INPUT DROP  /usr/sbin/iptables -P FORWARD DROP  /usr/sbin/iptables -P OUTPUT ACCEPT    /usr/sbin/iptables -A INPUT -i lo -j ACCEPT  /usr/sbin/iptables -A INPUT -m state --state ESTABLISHED -j ACCEPT    /usr/sbin/iptables -A INPUT -p tcp -s MY_SECOND_IP  --dport 3306 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT  

When I switch from the first to the second iptables, how I'm sure that all alive connection will be killed from the ip saved in "csa"?

I'm not expert of iptables. Is this a secure way to protect from external ip? And is this the right way to block connection from ip allowed in first iptables when the second is actived?

Thank's a lot

Move window from other (inactive) desktop to current desktop

Posted: 25 Apr 2021 07:50 AM PDT

When using this to fetch window from another desktop to current desktop (which is #0), nothing happens until I focus the desktop with that window - then window immediately moves to the desktop 0.

xdotool search --name "App Name" set_desktop_for_window 0

How can be that window fetched without me focusing the other desktop?

DE: Xfce 4.16, WM: Xfwm4

how to auto run script when users chan change to specified directory?

Posted: 25 Apr 2021 06:50 AM PDT

I want to users auto a sshfs mount when they change to specified directory. alias may do the trick , but it's diffuclt to configure alias for all users with different mount requests.

What I think is something like this

cd ~/abc will auto run sshfs abc@abc.com:/home/abc  

and not only in shell , but also in nautilus or other file manage applications.

is there any way to do so ?

Renaming with wildcard

Posted: 25 Apr 2021 06:39 AM PDT

I'm trying to rename a bunch of files, using the rename command, from

Blue - This file is called Blue ok.txt  Red - This file is called Red ok.txt  Orange and Yellow - This file is called Orange and Yellow ok.txt  

... into:

Blue.txt  Red.txt  Orange and Yellow.txt  

I'm having trouble getting it to understand the wildcard in the middle. I've tried:

rename -f 's/ - This file is called* ok//gi' *.txt  

How can I run a GUI app on startup (before login)

Posted: 25 Apr 2021 06:40 AM PDT

I have a simple Electron App which just displays "Hello World" for a proof of concept. Is it possible to run the GUI application right after the system boots before a login prompt / without login? If so, how may I go about doing this?

Thanks in advance!

Restoring data from corrupt btrfs RAID 1

Posted: 25 Apr 2021 06:25 AM PDT

I had a BTRFS RAID 1 array that I was storing my data. I had accidently reformatted as an RAID 1 using MDADM, before I noticed my error unmounted everything.

Now my tree seems to be corrupted, I'm having trouble restoring any data at all.

I had used btrfs restore chunk repair, and ran for 1 day. Now I'm trying to mount it but having trouble.

$ sudo btrfs filesystem show /dev/sdd  warning, device 2 is missing  Label: none  uuid: 7715ded7-e464-41a8-8b2b-ca8ec9af95ee          Total devices 2 FS bytes used 896.00KiB          devid    1 size 3.64TiB used 2.03GiB path /dev/sdd          *** Some devices missing    $ sudo mount -o degraded -t btrfs /dev/sdd /mnt/d  mount: /mnt/d: wrong fs type, bad option, bad superblock on /dev/sdd, missing codepage or helper program, or other error.  

btrfs check init-extent-tree doesn't seem to work either.

Any other suggestions?

Problematic mint

Posted: 25 Apr 2021 09:38 AM PDT

Some time ago I made my own „OS" based on mint(Debian Based distro). About u week ago I deleted 3rd partition with Ubuntu. Before this weekend I got BSOD on windows, so I'm stuck on mint. And here is my problem with third OS: i deleted accidentally grub. The problem is yet bigger because filesystem was btrfs. I copied all files (even system)to external drive and formatted partition with mint to ext4, then I recopied system and tried with GRUBrepair. As I saw root and sudo was locked (mint doesn't have su by default), so I tried to repair by myself. Now system is stuck between: grub shell, busybox shell (initramfs error), live boot mint and „shell"with prompt for root password (i didnt setted up that YET). Is there a way to boot PC normally? Or i'm stuck on live-boot? I don't have space for installing third OS (space which stayed after deleting ubuntu was joined to windows) and my PC is yet on guarantee... (yet worse but guarantee is only for physical things, OOF)🙄

PS: bios on my pc is „aptio setup utility", there is no way to disable uefi and i can't: boot rescueCD from pendrive and/or boot pc from external HDD. I don't have external CD/DVD reader.

Thanks for answer (if any)

Here are all commands in busybox i can use : enter image description here

Actually I didn't have fsck. So, after lot of tries I found reiserfsck instead of fsck I don't know how to run for checking partitions. So, I added a picture of it : enter image description here

When I tried reiserfsck --check /dev/sda6 I got some error :

enter image description here

Passing Dig command in nmap

Posted: 25 Apr 2021 09:53 AM PDT

I have an issue to take the result of the dig command and pass it to nmap command like:

for ip in 'dig mydomain.com -t ns +short'  do nmap $ip  done  

Compare two columns of a csv file and show unmatched records only

Posted: 25 Apr 2021 09:00 AM PDT

I have a csv file in below format

1311,0008,a131,a131,7039  1311,0008,a131,a132,7039  1711,2046,a626565,a626566,7099  1711,2048,a626565,a626565,7035  

What I want is to compare column 3 and 4 only and if they do not match, print that line in a new file and if they match print that line in another file

Expected File1 output (where col 3 & 4 do not match) :

1311,0008,a131,a132,7039  1711,2046,a626565,a626566,7099  

Expected output in File2 (where col 3 & 4 match) :

1311,0008,a131,a131,7039  1711,2048,a626565,a626565,7035  

So far I have tried the comparison with multiple files only.

Moving Gigs on LVM-on-Luks from one partition to another

Posted: 25 Apr 2021 07:32 AM PDT

I need to resize LVM on LUKS on Debian to take space from home and give it to var.

└─sda5               8:5    0   931G  0 part      └─sda5_crypt     253:0    0   931G  0 crypt       ├─my-vg-root   253:1    0  23.3G  0 lvm   /      ├─my-vg-var    253:2    0   9.3G  0 lvm   /var      ├─my-vg-swap_1 253:3    0   976M  0 lvm   [SWAP]      ├─my-vg-tmp    253:4    0   1.9G  0 lvm   /tmp      └─my-vg-home   253:5    0 802.8G  0 lvm   /home  

I'm following the ResizeEncryptedPartitions tutorial:

  1. Boot the desktop, live CD. Install & configure the tools (lvm2 and cryptsetup).
  2. Reduce the (root) file system with resize2fs.
  3. Reduce the (root) (LVM) Logical Volume with lvreduce.
  4. Reduce the (LVM) Physical Volume with pvresize.
  5. Reduce the Crypt with cryptsetup.
  6. Reboot to reduce the Partition storing the crypt with fdisk.

The tutorial continues, instructing the reverse,

Detailed resizing ~ Enlarging an encrypted partition This section will be shorter, it is basically the reverse of the above.

My question. Do I need to reduce the (LVM) Physical Volume #4 and reduce the Crypt #5, if I'm giving this space over to another partition?

The tutorial gives a reason for resizing the LVM Physical Volume

Resize your (LVM) Physical Volume. The physical volume used by LVM can become "fragmented" in that the (LVM) Logical Volumes within the (LVM) Physical Volume are not always in order. There is no defragmentation tool, so if you may need to manually move the logical partitions (back up the data, delete the (LVM) Logical Volume, re-create a replacement (LVM) Logical Volume, restore data from backup).

I'm thinking of taking home down, 800g-200g and var up 9-200g, and leave 400g free to move later depending on how they both fill up.

I get the idea--delete my swap and tmp LVM partitions, then change the var size. I guess the article seems more generic, and so I'm asking here about my particular case.

Also on SE: Resize an existing LVM partition and add the space to another LVM partition

My desktop entry seem to have cached some old entries for some fields

Posted: 25 Apr 2021 06:25 AM PDT

I am writing a desktop entry for an application that doesn't come with one (let's say application A). As usual, I just copy a desktop entry that exists already (let's say the desktop entry of application B), change the filename of the copy, and replace the fields' values (so that I don't have to look up the fields' names).

I initially kept application B's icon, because that's generally the last thing I change (and I had no image yet). I also initially inverted the Comment and GenericName fields, by mistake. I tested my desktop entry with the launcher, saw that application A is correctly launched, but the generic name is wrong and the icon is the one from application B, so I changed the respective fields and... nothing? It's still the old field values? It's displaying the icon of the other application and also the wrong generic name.

I could have messed up the icon image absolute path, sure, but the new icon filename has nothing to do with application B's icon, so it's very weird. Also, I deleted the field Comment, corrected the field GenericName and the current generic name displayed in the launcher is a string that is not written at all in the desktop file (the generic name displayed in the launcher is the old value I had entered initially for the GenericName field).

I obviously logged out, and when that failed to update the fields' values, I also rebooted my computer, and still the icon is the other application's, and the generic name is incorrect. The launcher still launches application A correctly, though.

Any idea how to correct all this?

Why does "ls" take extremely long in a small directory that used to be big? How to fix this?

Posted: 25 Apr 2021 09:27 AM PDT

I'm running Arch Linux, and use ext4 filesystems.

When I run ls in a directory that is actually small now, but used to be huge. I hangs for a while, but the next time I run it, it's almost instantaneous.

I tried doing:

strace ls  

but I honestly don't know how to debug the output. I can post it if necessary, though it's more than a 100 lines long.

And, no, I'm not using any aliases.

$ type ls  ls is hashed (/usr/bin/ls)    $ df .  Filesystem     1K-blocks     Used Available Use% Mounted on  /dev/sda9      209460908 60427980 138323220  31% /home  

properly install firefox beta (fedora)

Posted: 25 Apr 2021 07:58 AM PDT

I want to install firefox desktop beta in my fedora, for that I have dl the .tar.bz2 in the official site.

I already have a firefox version installed via dnf but this is the normal version. Now I want to have both, with auto update for the beta version if possible.

I don't want to use flatpack nor snap because I want to understand how this kind of installion works (specially for activating the auto update for the beta version).

I have the normal version on ~/.mozilla/ and the beta version works well when I run the firefox file given by the .tar.bz2.

My plans is to to put the content of the .tar.bz2 into ~/.mozilla/beta/ and create a desktop file pointing to the right bin (~/.mozilla/beta/firefox).

Another question : I have two files into the .tar.bz2 which start (both) the program (firefox & firefox-bin), what is the difference between them ?

Linux tar: You may not specify more than one tar '-Acdtrux', '--delete' or '--test-label' option

Posted: 25 Apr 2021 07:58 AM PDT

I am trying to install the latest Node on my Linux system by running the following terminal command, I keep getting the following error. tar: You may not specify more than one '-Acdtrux', '--delete' or '--test-label' option Try 'tar --help' or 'tar --usage' for more information. This terminal command I copied right off a website.

tar -C /usr/local –strip-components 1 -xJf node-v12.13.1-linux-x64.tar.xz  

Has dialog's --checklist box type a possibility for horizontal srolling or \n (newline) interpretation?

Posted: 25 Apr 2021 07:17 AM PDT

I use dialog version: 1.3-20210324

Given:

LIST_ITEMS=(    "1." "A ... very ... very ... looooong ... Informationtext" "off"    "2." "A ... very ... very ... looooong ... Informationtext" "off"                              ...                                     )  dialog ... --checklist "checklistName" 0 0 0 "${LIST_ITEMS[@]}"   

Result:
A classical dialog checklist with the Informationtext not visible entirely.

Missing Goal:
I need a way to scroll horizontally or linewrap the Informationtext.

Edit 1
@Thomas Dickey mentioned to reformat the data, that is no option for me because either way i do not have enough horizontal space. So as mentioned in my missing Goal section the real question remains. Anyways, thanks for your thought Thomas! Any help is very welcome, thanks in advance!

Installing RHEL 8.3 results in "Unknown error has occurred"

Posted: 25 Apr 2021 07:55 AM PDT

I downloaded RHEL 8.3 with developer subscription. I changed BIOS configuration to AHCI after issue of not finding disc during installation, But still I have 2 issues. My touchpad isn't working during setup, I need to plug a mouse. Then in half way during installation output quotes "Unknown error has occurred" . Then I gave quit and removed the RHEL boot option from BIOS and booted into my windows 10 and cleared everything from the partition I created. My laptop configuration:

Device name LAPTOP-9CJP9P4M  Processor Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz   1.80 GHz  Installed RAM   8.00 GB (7.85 GB usable)  Device ID   4777967C-E72B-4140-86FA-5F0A1FA8A434  Product ID  00327-35854-91092-AAOEM  

System type 64-bit operating system, x64-based processor . What should I do to resolve the issue?

How can I use fail2ban with ipv6?

Posted: 25 Apr 2021 06:52 AM PDT

I have used the Fail2ban for a long time. I think this script is not able to manage the IPv6 -- or maybe it is working with IPv6?

How can I prevent IPv6 attacks with Fail2ban or do I have to search for another script?

Problem in Python (ubuntu)

Posted: 25 Apr 2021 07:50 AM PDT

When I try to install this, I get this error; what is the solution?

ubuntu@ip-xxx-xxx-xxx-xxx:~/URLuploader-With-Hotstar$ pip3 install -r requirements.txt  Traceback (most recent call last):    File "/usr/bin/pip3", line 9, in <module>      from pip import main    File "/usr/lib/python3/dist-packages/pip/__init__.py", line 14, in <module>      from pip.utils import get_installed_distributions, get_prog    File "/usr/lib/python3/dist-packages/pip/utils/__init__.py", line 23, in <module>      from pip.locations import (    File "/usr/lib/python3/dist-packages/pip/locations.py", line 9, in <module>      from distutils import sysconfig  ImportError: cannot import name 'sysconfig' from 'distutils' (/usr/lib/python3.8/distutils/__init__.py)  

Shutdown system by timeout during suspend

Posted: 25 Apr 2021 09:56 AM PDT

Currently I have settings in GNOME Power Management to setup timeout after which my system will suspend.

I want to add an additional timeout for the system to shutdown after some period of inactivity during its suspend.

So it will looks like that:

  1. Suspend after 15 minutes of inactivity.
  2. Shutdown after 12 hours of inactivity during suspend.

Reestablish wired connection after router reboots

Posted: 25 Apr 2021 06:49 AM PDT

Hardware: Raspberry Pi 2 Model B Revision 1.1(an old but capable computer on a chip)

Software: Linux pi 5.10.17-v7+ #1403 SMP Mon Feb 22 11:29:51 GMT 2021 armv7l GNU/Linux (a headless Raspbian, updated daily)

Problem: if the router to which the pi is wired is rebooted, it never again obtains an IP address unless rebooted itself. The router has DHCP enabled, serves various other clients well and even has address reservation for pi's MAC (which it honors on initial connection).

I don't have a screen attached to observe the process. What logs should I read? What is the canonical solution? I have tried raspi-config, /etc/network/interfaces and crontab to no avail.


EDIT:

I am coming to realise because of all the help by @roaima that probably this is the problem:

root@pi:~# tail /var/log/messages  Apr  8 17:03:00 pi kernel: [19266.854548] rpi_firmware_get_throttled: 7 callbacks suppressed  Apr  8 17:03:00 pi kernel: [19266.854563] Voltage normalised (0x00000000)  Apr  8 17:03:34 pi kernel: [19300.134515] Voltage normalised (0x00000000)  Apr  8 17:04:13 pi kernel: [19339.654471] Voltage normalised (0x00000000)  Apr  8 17:04:35 pi kernel: [19361.544887] [UFW BLOCK] IN=enxb827ebaa0989 OUT= MAC=01:00:5e:00:00:01:d8:07:b6:8a:5a:89:08:00:46:00:00:20:00:00:40:00:01:02:44:2d SRC=192.168.0.1 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=0 DF PROTO=2   Apr  8 17:06:40 pi kernel: [19486.644998] [UFW BLOCK] IN=enxb827ebaa0989 OUT= MAC=01:00:5e:00:00:01:d8:07:b6:8a:5a:89:08:00:46:00:00:20:00:00:40:00:01:02:44:2d SRC=192.168.0.1 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=0 DF PROTO=2   Apr  8 17:07:14 pi kernel: [19520.614323] rpi_firmware_get_throttled: 6 callbacks suppressed  Apr  8 17:08:39 pi kernel: [19605.894239] rpi_firmware_get_throttled: 6 callbacks suppressed  Apr  8 17:08:39 pi kernel: [19605.894255] Voltage normalised (0x00000000)  Apr  8 17:08:45 pi kernel: [19611.745141] [UFW BLOCK] IN=enxb827ebaa0989 OUT= MAC=01:00:5e:00:00:01:d8:07:b6:8a:5a:89:08:00:46:00:00:20:00:00:40:00:01:02:44:2d SRC=192.168.0.1 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=0 DF PROTO=  

There are a lot more of those ufw errors while the undervoltage messages have never been an issue (I use an underspecced PS).

ghost command error

Posted: 25 Apr 2021 09:49 AM PDT

I cloned it.

git clone "https://github.com/EntySec/ghost"  

Then, I installed ghost

cd ghost/  chmod +x install.sh  ./install.sh  

I wrote help for Core Commands

enter image description here

But, there's no connect command So, how can I work with ghost?

At the moment, his commands look like enter image description here

But, why mine is different? How can I go ahead without connect command

"client_loop: send disconnect: Broken pipe" for chroot sftp user, with correct password?

Posted: 25 Apr 2021 07:29 AM PDT

I am in the process of setting chroot for sftp and have used a combination of tutorials (source1, source2) and have ended up with the following configuration in /etc/ssh/sshd_config:

Match Group sftpusers        ForceCommand internal-sftp        ChrootDirectory /var/sftp/        PermitTunnel no        AllowAgentForwarding no        AllowTcpForwarding no        X11Forwarding no  

The sftp base folder is /var/sftp and the user was created as follows:

groupadd sftpusers    adduser myuser01  mkdir -p /var/sftp/myuser01  usermod -a -G sftpusers myuser01  chown myuser01:myuser01 /var/sftp/myuser01  systemctl restart sshd  

Now when I try a login I end up in the /var/sftp folder, which demonstrates login works.

Since I want users to end up in the /var/sftp/<userid> folder, I try setting the following config is sshd_config, under the Match Group line :

ChrootDirectory /var/sftp/%u  

When I do that I get an error client_loop: send disconnect: Broken pipe on a login attempt. According to the man page for ssh_config the variable should be accepted, per:

ChrootDirectory accepts the tokens %%, %h, and %u.

Any ideas?

Env:

  • OS: Ubuntu 18.04.4 LTS
  • sshd: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017

Perf permission for users other than root

Posted: 25 Apr 2021 08:28 AM PDT

I don't know why user is not able to collect perf stat for a service (nginx process which has been started by sudo). As you can see the kernel and perf versions match.

$ uname -r  4.19.125  $ which perf  /home/mahmood/bin/perf  $ /home/mahmood/bin/perf --version  perf version 4.19.125  

But when I run perf record -e cycles:u -j any,u -a -o perf.data -p 4018, I get this error

Warning:  PID/TID switch overriding SYSTEM  Error:  You may not have permission to collect stats.    Consider tweaking /proc/sys/kernel/perf_event_paranoid,  which controls use of the performance events system by  unprivileged users (without CAP_SYS_ADMIN).    The current value is -1:      -1: Allow use of (almost) all events by all users        Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK  >= 0: Disallow ftrace function tracepoint by users without CAP_SYS_ADMIN        Disallow raw tracepoint access by users without CAP_SYS_ADMIN  >= 1: Disallow CPU event access by users without CAP_SYS_ADMIN  >= 2: Disallow kernel profiling by users without CAP_SYS_ADMIN    To make this setting permanent, edit /etc/sysctl.conf too, e.g.:            kernel.perf_event_paranoid = -1  

It clearly states that the value is -1 and -1 allows collection of data by all users.

So, how can I fix that?

Linux: Changing Permissions – No space left on device

Posted: 25 Apr 2021 09:07 AM PDT

I have an external drive. When I just plug the drive into the PC, with a default /etc/fstab file, the OS just detects it and it's there in the Dolphin browser. I can select it, I can navigate to it on the command line, read/write/etc the files on it, etc.

I'm trying to mount the drive into my home directory so that Plex Media Server can access it. I've done this a million times before with this same drive no problem, on Linux.

I recently re-installed the OS and went to set up the drive, same as always. Again, this exact same configuration has worked in the past, on the same version of Linux (OpenSUSE Leap 42.1), on the same machine, with the same hard drive. I've added this entry

UUID=F474B7AA74B76DCC /home/craig/MediaDrive ntfs-3g defaults,nofail,permissions,auto 0 1  

to /etc/fstab to mount the drive in my home directory. I get it mounted to /home/craig/MediaDrive. The first weird thing is that ls -l shows

d--------- 1 root  root   12288 May 16 18:33 MediaDrive  

So then I go to set ownership and change permissions with

sudo chown -R 777 /home/craig/MediaDrive  

and I get the error:

chmod: changing permissions of 'MediaDrive': No space left on device  

The thing is, there's plenty of space left. There's over 300GB of space left. I'm pasting my df -h output below.

Filesystem      Size  Used Avail Use% Mounted on  /dev/sde1       1.9T  1.6T  316G  84% /home/craig/MediaDrive  

It doesn't seem to be an inode issue; here is the output of df -i:

Filesystem      Inodes  IUsed      IFree  IUse%  Mounted on  /dev/sde1    331060948   4846  331056102     1%  /home/craig/MediaDrive  

Again, this permissions issue only exists with the drive when I try to mount it in that location (in my home directory); otherwise when it's just at the default run/media/craig/My Passport location, it's fine. Reads, writes, etc.

How can I get my drive to mount successfully in my home directory?

Convert .264 to .mp4 using avconv

Posted: 25 Apr 2021 07:02 AM PDT

I have a video file (with no audio stream) taken from a Lorex CCTV DVR. The video file has a suffix of ".264" which I assume means its format is raw h264. I cannot play this video on certain media players including the default player on an Apple tablet. I would like to convert the file to another format that is more universally useable, for example mp4. I tried the following command at Linux terminal:

avconv -i ~/somePath/foo.264 -vcodec libx264 -f mp4 ~/somePath/foo.mp4

but the output mp4 file was basically empty, with a total size of 285 bytes. Furthermore, when I tried to play it using the Ubuntu Videos application the application returned a widow containing the error message: "An error occurred This file contains no playable streams."

file --mime-type ~/somePath/foo.264  ~/somePath/foo.264: application/octet-stream    mediainfo ~/somePath/foo.264  ...  Format:AVC; Format profile:Baseline@L2; Width:352 pixels; Height:240 pixels  ...  

Would somebody instruct me how to convert the .264 file to a .mp4?

nomodeset doesn't fix black screen on startup

Posted: 25 Apr 2021 08:04 AM PDT

I'm trying to install Linux Mint on my 2010 21.5" iMac. I managed to install it after booting from the usb drive with the nomodeset option, but I haven't been able to boot from the actual install so far. The typical recommendation I found from googling is: on the boot selector screen (I'm using rEFInd) hold Shift and select grub options, then press e to edit the boot options and add nomodeset after where it says quiet splash. However, this does not work for me - I still get a black screen when it tries to boot up.

No comments:

Post a Comment