Fedora after dd reinstall - backup

I made a Fedora backup, then used Windows 7 for some time and tried to install Fedora back using dd command (under live cd), but now, it loads with black screen and says to look to journal: journalctl.
There are errors: fsck failed with error code 8; Failed to mount /sysroot and so on.
The commands I used:
sudo dd if=/dev/sda bs=1M conv=noerror | gzip > OS.gz
sudo dd if=OS.gz bs=1M conv=noerror | gunzip > /dev/sda
sudo partprobe /dev/sdaY
sudo tune2fs -U random /dev/sdaY
What do I need to do to reinstall Fedora using existing backup?

Related

vi/nvim file on a remote machine

I'm trying to use nvim (or vim) to edit a file on a remote machine from my Ubuntu 20.04 host like this:
$ nvim scp://developer#devvm//home/developer/junk
From what I understand remote editing is handled by the netrw plugin.
I installed nvim my Ubuntu machine via snap because the apt-get version is very old.
When I start nvim, the netrw plugin is not loaded. The only reference to it that I found was in /snap/nvim/2789/usr/share/nvim/runtime/ and its subdirectories so I added that directory to the 'set runtimepath' command in my ~/.config/nvim/init.vim file. After that, ':help netrw' works but when I try the remote edit it just says:
:!scp -q 'developer#devvm:/home/developer/junk' '/tmp/nvim.developer/gqbnmh/1'
shell returned 1
and I don't see the file contents.
I also tried to put the set runtimepath in my ~/.vimrc instead and run /usr/bin/vi but then I get all kinds of "command is not available in this version" errors.
$ which nvim
/snap/bin/nvim
$ nvim -version | head -1
NVIM v0.8.2
$ which vi
/usr/bin/vi
$ vi --version | head -1
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jan 11 2023 23:54:11)
Any help is appreciated.

CentOS 8 stream

dnf --enablerepo=centos-openstack-wallaby -y upgrade
CentOS-8 - Ceph Nautilus 63 B/s | 38 B 00:00
Error: Failed to download metadata for repo 'centos-ceph-nautilus': Cannot prepare internal mirrorlist: No URLs in mirrorlist
If you need to update your CentOS 8 Stream, you need to change the mirrors to vault.centos.org
Step 1: Go to the /etc/yum.repos.d/ directory
# cd /etc/yum.repos.d/
Step 2: Run the below commands
# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
Now run your dnf command.

why lxc command gives me permission denied error?

I have some problem in executing command lxc. when i try without sudo i get the error:
$ lxc storage list
Error: Get http://unix.socket/1.0: dial unix /var/snap/lxd/common/lxd/unix.socket: connect: permission denied
when i try with sudo i get:
$ sudo lxc storage list
sudo: lxc: command not found
i don't understand the problem about permission and i cannot solve this type of issue. Any suggestion is appreciated
INFO: i'm runnign Debian 10 buster on a virtual machine, i installed lxd and lxc by:
$ sudo snap install lxd
$ sudo apt install lxc
modified PATH with:
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin:/snap/bin:/var/lib/snapd/snap/bin:/snap/bin/lxc:/snap/bin/lxd
i added my account to sudoers:
moro ALL=(ALL)ALL
if i run
$ su-
root#debian:~# lxc storage list
+---------+-------------+--------+--------------------------------------------+---------+
| NAME | DESCRIPTION | DRIVER | SOURCE | USED BY |
+---------+-------------+--------+--------------------------------------------+---------+
| default | | btrfs | /var/snap/lxd/common/lxd/disks/default.img | 14 |
+---------+-------------+--------+--------------------------------------------+---------+
As far as my understanding goes, lxc uses the lxc group, in which your $USER has to be. Thus everything should work as expected if you add your user to the lxc group, e.g. via
sudo adduser $USER lxd
This is mentioned without an example on the lxd page getting started under access control and with an example in this
nice tutorial for Ubuntu 16.04, which should be applicable to many other debian based OS.

Can't open lib '/usr/local/lib/libmsodbcsql.17.dylib'

I am trying to get mssql working on my OSX machine. However, it keeps giving me error:
$ sqlcmd -S 0.0.0.0,1401 -U SA -P P#55w0rd -i database-setup/sql/initialize.sql
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Can't open lib '/usr/local/lib/libmsodbcsql.17.dylib' : file not found.
Although, I am pretty sure, my file is in that location:
$ ls -la /usr/local/lib/libmsodbcsql.17.dylib
lrwxr-xr-x 1 localadmin admin 64 7 4 16:38 /usr/local/lib/libmsodbcsql.17.dylib -> /usr/local/Cellar/msodbcsql17/17.1.0.1/lib/libmsodbcsql.17.dylib
$ ls -la /usr/local/Cellar/msodbcsql17/17.1.0.1/lib/libmsodbcsql.17.dylib
-r--r--r-- 1 localadmin admin 2539360 7 4 15:34 /usr/local/Cellar/msodbcsql17/17.1.0.1/lib/libmsodbcsql.17.dylib
I know this question has been asked multiple times but none of the available solutions have worked for me.
Things I have tried:
https://github.com/Microsoft/homebrew-mssql-release/issues/7
https://github.com/Microsoft/homebrew-mssql-release/issues/3
I fixed my problem by:
$ brew uninstall msodbcsql17 mssql-tools
and then:
$ brew install msodbcsql17 mssql-tools
For me this solved it:
brew install microsoft/mssql-release/msodbcsql17

OpenfireHome - Home not found

I have xmpp server (openfire_3.9.3) that is running on my ubuntu Ubuntu 14.04.1 LTS.
I have installed openfire by following given steps
1. $ sudo tar -zxvf openfire_x_x_x.tar.gz
2. $ sudo mv openfire /opt
then I moved to openfire bin directory to start openfire as
$ cd /opt/openfire/bin
$ sudo ./openfire start
then during setup through admin console always I am getting the given error
Home not found. Define system property "openfireHome" or create and add the openfire_init.xml file to the classpath
where I need to set openfireHome ? or how can i fixed it out ?
Well it seems your user account might have permissions issue. Can't you keep openfire in your home and try to run it from there and share results?
For me, it's a permissions issue.
I'm using server(Openfire 4.7.0, build e020f58) on my local computer (macOS Monterey 12.1 (21C52)).
My SOLUTION is:
sudo chmod -R 777 /usr/local/openfire