How to set up ipmitool in centos for devVm? - linux

I have to setup ipmitool on my local vm for testing and learning purposes.
I followed simple steps of mentioned in the link, https://www.hugeserver.com/blog/tutorials/how-to-ipmitool-linux/
sudo yum install ipmitool
sudo modprobe ipmi_devintf
The first command will install ipmitool and the second command will install ipmi device drivers/interfaces.
After installing these two things I should be ready to use ipmitool. But I am getting errors whenever I try to run any ipmitool command.
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
I am stuck here.
I have also tried to re-install OpenIpmi and also rebooted the system.
Please help!

If this error comes in actual machine then the following post will give you the solution.
https://serverfault.com/questions/480371/ipmitool-cant-find-dev-ipmi0-or-dev-ipmidev-0
But In virtual machine, ipmitool commands will work straight away without these drivers. I faced same issue & worked for me without installing any drivers on my VirtualBox.

Related

How can I access my WSL2 files from my natively installed Ubuntu?

I'm really new to Ubuntu and WSL.
My problem is simple: I want to access from Ubuntu which I have installed in my computer (dual boot alongside with Windows) to my WSL2 filesystem that I have in Windows. I located a file named ext4.vhdx which I suppose is my entire wsl drive, but I'm not really sure, it is in
c:\Users\USER\Appdata\Local\Packages\CanonicalGroupLimited.Ubuntu20.04o...\LocalState\
I'm currently into web development and I want to share that environment within WSL2 and Ubuntu, I noticed that using the linux fs is way faster than windows fs and it works better with things like watchers. So, is it possible?
I'm currently running Windows 10 19041 (2004), Ubuntu LTS 20.04
I've also encountered similar issues when doing this WSL Ubuntu sharing thing, and I've finally found a solution on the internet that works out perfectly.
Reference Link:
https://www.nicholasmelnick.com/2020/07/sharing-your-wsl2-environment-with-linux/
So basically these are the steps,
First of all, the WSL's "ext4.vhdx" file should be accessible inside your Ubuntu system (So you must mount your windows drive inside your linux OS)
Install libguestfs-tools package with APT
And finally just create a folder and guestmount the drive with following commands.
$ sudo mkdir -p /mnt/wsl
$ sudo guestmount -o allow_other \
--add /mnt/c/Users/username/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/ext4.vhdx \
-i /mnt/wsl
And done! Hope this would solve your problem. :)

Can not log in Elementary after install ubuntu 18.04 (dual boot)

I am new to Ubuntu 18.04. It has been a long time that I have not updated anything new on my current OS which is Loki (interestingly, besides Loki does not allow ppl to upgrade Juno).
For some reasons, I have to install another Linux OS on my machine, which is ubuntu 18.04 - the minimal installation. Although everything works perfectly to Ubuntu, it makes me cannot log in to my main OS.
Description of an issue: After selecting a boot of elementary, I log in my account on a log-in page of Elementary. It does not show anything else and move back to the log-in. Another try with a guest account (with no password), still the same problem.
Because most of my data and work in Elementary, I have to find a way to solve this problem. Is there anyone here giving me a hand? Thank you very much.
I ran into same problem once.
Login into tty mode by Ctrl+Shift+F1,and enter:
sudo dpkg --configure -a
sudo apt-get install ecryptfs-utils
sudo reboot
And I was able to login
Trying tty mode by Ctrl+Shift+F1, I was able to log-in in a terminal. Turn out that the Ubuntu has used almost the left memory to load an OS. By removing some files by the command rm -rf [filename] to release around 2GB, I was able to have everything back. It was freaking for a while. Phewww...

When “vagrant up” it says “It appears your machine doesn't support NFS” (Debian jessie)

Issue
when vagrant up it says "It appears your machine doesn't support NFS"
Setups
Debian GNU/Linux 8 (jessie)
Vagrant 1:2.0.0
Virtualbox 5.1.30 r118389
Detail
After using apt-get to update and upgrade the system, I basically followed the instruction from the Mediawiki page, since I wanted to install Mathoid to render LaTeX equations locally for mediawiki page.
However, when I vagrant up it echos the following:
It appears your machine doesn't support NFS, or there is not an
adapter to enable NFS on this machine for Vagrant. Please verify
that `nfsd` is installed on your machine, and try again. If you're
on Windows, NFS isn't supported. If the problem persists, please
contact Vagrant support.
I checked if nfsd is correctly working on the host, and it says it's enabled.
# /etc/init.d/nfs-kernel-server status
nfs-kernel-server.service - LSB: Kernel NFS server support
Loaded: loaded (/etc/init.d/nfs-kernel-server)
Active: active (running) since Sun 2017-10-15 07:56:32 -02; 2 weeks 0 days ago
CGroup: /system.slice/nfs-kernel-server.service
??1277 /usr/sbin/rpc.mountd --manage-gids
I also tried google, and did not find a solution that fits my problem and I couldn't find any hint to resolve this. For instance, I tried to install the package
sudo apt-get install nfs-common
But it has been already installed.
Thank you in advance.
The command mentioned below works for linux mint 18.3:
sudo apt-get install nfs-common nfs-kernel-server
For Windows users seeing that error, run the following command to add support for NFS for Vagrant:
vagrant plugin install vagrant-winnfsd
The GitHub repo for this plugin is found here.
Also, to see the currently installed Vagrant plugins run this:
vagrant plugin list
Can be fixed by adding any exports to /etc/exports.
by :
modprobe nfs
modprobe nfsd
then running vagrant, which will add /etc/exports, then reloading
kernel-server and restarting vagrant.
issue http://jb-blog.readthedocs.io/en/latest/posts/0021-vagrant-nfs-problems.html
instead of installed NFS cos really no supported :
Try just removing type: nfs from the vagrant_synced_folders
More : https://www.vagrantup.com/docs/synced-folders/nfs.html

Using manual STAF commands on Linux

I've recently started working with STAF and couldn't get 2 machines to communicate with each other. One of those machines is a Linux ec2-instance on AWS and can't be pinged.
I was planning on pinging STAF from one virtual machine to another to see if the company firewall could be the cause of this but I can't seem to use commands on linux (like "staf local ping ping" on windows for example). When I try to run STAFProc with gdb (in /usr/local/staf/bin) I get the following error.
(gdb) run
Starting program: /usr/local/staf/bin/STAFProc
/bin/bash: /usr/local/staf/bin/STAFProc: No such file or directory
(The STAFProc file is there though. Does gdb work from another directory?)
I'm not exactly experienced with STAF, AWS or even Linux so any help to get me started with debugging would be greatly appreciated.
Though it is a bit long since the question is asked and the op seem to figure it out already, I might still post my solution as well.
There is a possibility that it is caused by trying to open a 32bit binary on a 64bit device.
If you are working on Debian based os, try
sudo apt-get install lib32stdc++6

Install Virtualbox in WSL Windows 10

I need to have access to Virtualbox from within the WSL, I have tried to sudo apt-get install virtualbox but I end up with the following error:
WARNING: The character device /dev/vboxdrv does not exist.
Please install the virtualbox-dkms package and the appropriate
headers, most likely linux-headers-3.4.0+.
You will not be able to start VMs until this problem is fixed.
4.3.36_Ubuntur105129
Vagrant is now capable of detecting that it is running on WSL.
How to configure Windows and WSL to enable this feature is described on Vagrant website
They claim it's an advanced feature but the configuration seems quite straightforward.
Unfortunately, that will not work (at least for now), as explained here: https://github.com/Microsoft/BashOnWindows/issues/549

Resources