Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Wednesday, September 20, 2023

Setup Tumbleweed as physical host for VirtualBox

I decide to try Tumbleweed on the same old FX-8320 host.  Installation is similar to LEAP 15.4.  For GUI option, I choose Generic Desktop instead of XFCE Desktop.  XFCE is running quite smoothly in LEAP 15.4.  I decide to try Generic Desktop this time since it is only a physical host.  

Follow the same link below, I try to install driver version G05 for my old GT630 (does not work with LEAP 15.4).  

SDB:NVIDIA drivers - openSUSE Wiki 

Reboot the host and it suggests to install the previous version G04.  Follow the wiki link above and install G04.   




 
Below are my software pick for the host.  
File Manager: PCmanFM
Terminal: termit
Text Editor: Leafpad
Graphics: Pinta (take and edit basic screenshot)
GRsync: sync my USB drive for backup.  

USB wireless 8812bu adapter is discovered correctly.  No driver installation is required.  

Only issue is NetworkManager icon is not available for Generic Desktop.  First I install wicked and other tools.  It works fine but I decide to try to get NetworkManager working.  Then I remove wicked and not sure why, there is no networking at all.  So, I rollback the system to the point before wicked is installed.  

Once NetworkManager-Connection-Editor is installed, I have the simple GUI to manage my network connection.  If your connection does not change much, wicked is just fine. 

Then install VirtualBox.  Reference link is How to install Virtualbox on OpenSUSE Tumbleweed & Leap - Linux Shout (how2shout.com.


sudo zypper install virtualbox

I find out 7.0.10 is installed.  

Once completed, add the user account to group vboxusers

sudo gpasswd -a userID vboxusers

Then, logoff and log back in.

Open VirtualBox.  If you are asked to enable USB passthrough, just click Enable.  












Download the VirtualBox extension pack from VirtualBox site.  Same as before, it does not work with GUI installation.  I install it thru CLI (see command below)

VBoxManage extpack install extpack_7.0.10

I decide to go with KVM/QEMU this time.  Will create a separate post for that. 






Thursday, June 15, 2023

Install Open VM Tools on Linux VM

Depending on the distro of Linux, I have tough time to install VM Tools on some of them.  The only other option is to install open vmtools.  

Follow VMware instructions to install the open vmtools.

If GUI is required on the VM and assume it is Debian distro, install open-vm-tools-desktop.  

sudo apt-get install open-vm-tools-desktop

Otherwise open-vm-tools will be sufficient.

sudo apt-get install open-vm-tools  

Sunday, January 29, 2023

Securely eraseing disk and file

 I used Hiren's Boot Disc and DBAN boot disc to erase my HDD securely most of the time.  I did use dd command but found out there were few other useful commands recommended in this link.  

The first one mentioned in the article is quite useful.  It will overwrite the disk five times and add a final overwrite with zero to hide shredding.

 # shred -n 5 -vz /dev/hda

The command below will use shred and /dev/urandom as the source of random data.
 
shred -v --random-source=/dev/urandom -n1 /dev/sda
 
Another option is to install scrubbing program like scrub in Unix.  You can use it to erase a single file with algorithm.  
scrub -p nnsa|dod|bsi|old|fastold|gutmann|random|random2 fileNameHere
 
Or you can even use it to erase disk with dod standard.  
scrub -p dod /dev/sda
 
*** WARNING: Please test the commands before running it on your data.  Commands mentioned in this article will delete the data permanently.  *** 
  

Thursday, January 26, 2023

Installing VMware Workstation Pro in OpenSuSE LEAP 15.4

Now system is up and running fine.  Next is to install VMware Workstation Pro.  Basically, it is my OpenSUSE LEAP 15.4 is my host. 

Make sure system is up to date and install the required packages.  Download the binary and copy it to a tmp folder.  Then add the execute permission to the bundle. 

sudo zypper update
sudo zypper install kernel-source kernel-devel gcc

Download the binary and copy it to a tmp folder.  Then add the execute permission to the bundle.   Run the installation after. 

sudo chmod +x VMware-Workstation-Full-16.2.4-20089737.x86_64.bundle
sudo ./VMware-Workstation-Full-16.2.4-20089737.x86_64.bundle

Reboot.  Then I receive the errors below one by one.  


 


  












Do some researches and follow instructions in this video.  

First get the VMware version
vmware -v

Then, download the patches needed to build the VMware host modules against the recent kernel.  You may need to rebuild it if VMware does not start after update.   See https://github.com/mkubecek/vmware-host-modules

wget https://github.com/mkubecek/vmware-host-modules/archive/workstation-16.2.4.tar.gz
tar -xvzf workstation-16.2.4.tar.gz
cd vmware-host-modules-workstation-16.2.4/
tar -cf vmmon.tar vmmon-only
tar -cf vmnet.tar vmnet-only
sudo cp -v vmmon.tar vmnet.tar /usr/lib/vmware/modules/source
sudo vmware-modconfig --console --install-all

I setup a script to start vmware every time the host boots up.  

/etc/init.d/vmware start

I found out none of the USB devices list under Removable devices of the VM.  So, I suspect the vmware-usbarbitrator is not started up auto.  Add the following line to the start up script.  Now, I can see the USB device.

/usr/bin/vmware-usbarbitrator start 

One issue I found and other ppl complain in other Linux distro too.  If you try to copy from VM and paste on the Linux host, you will get error below.

There seems to be no solution to it.  However, if you check your /home/user/.cache/vmware/drag_and_drop/ directory, you will actually find the file there.  



OpenSUSE LEAP 15.4 as physical host

There are still some issue with USB3 for Debian / Ubuntu on my old Gigabyte GA970A-D3P.  I decide to rebuild that with OpenSUSE LEAP 15.4.  I don't need a lot of power.  So, AMD CPU FX8320 I got back in 2013 is good enough.  I follow the link below.  It is self-explanatory.  

https://doc.opensuse.org/documentation/leap/startup/html/book-startup/art-opensuse-installquick.html

For NIC, I just set it up for IPv4.  Enable firewall and disable ssh.  Keep SecureBoot to test Windows 11 as VM in the future.  I don't like the GNOME desktop and it looks like a table to me.  So, I select Xfce instead.  Since it is a physical host, I remove tools I don't need like SAMBA (if need to share files, I will use USB drives instead), Thunderbird, Transmission and Pidgin.  So, I remove them. 

Installation runs fine.  nouveau is used for the NVIDIA GT630 and Realtek 8812BU WiFi adapter is not working.  

So, I decide to use NVIDIA driver instead of nouveau driver.  After installing G05 driver, the resolution drops to 640 x 480.  Exactly as what's described in this post below.

https://forums.opensuse.org/t/leap-15-2-nvidia-driver-does-not-work/141453

I decide to go with G04, and everything works as expected.  I don't follow the instructions found in https://en.opensuse.org/SDB:NVIDIA_drivers

Instead, I go to https://opensuse-guide.org/3d.php and install the GeForce 400 series drivers.  The 1 click option will add NVIDIA repository.  Once installation completed, reboot and open NVIDIA X server settings to confirm installation is successful.
 

 

 

 

 

 



For 8812bu adapter, since mine is USB, I run lsusb to confirm the model number. 






Then, follow instructions in https://github.com/morrownr/88x2bu-20210702  If driver fails after system update, please follow instructions in the link to fix it.   I copy the steps from the link. 

1) confirm system is up-to-date by running
sudo zypper update
Then, reboot after update completes.

2) Install required packages
sudo zypper install -t pattern devel_kernel dkms

3) Create a directory to hold the downloaded drivers and move to the newly created directory
mkdir -p ~/src
cd ~/src

4) Download the driver
git clone https://github.com/morrownr/88x2bu-20210702.git
 
5) Move to the newly created driver directory
cd ~/src/88x2bu-20210702
 
6) Run the installation script but it complains about missing iw package.  So, install iw package first then run the script.  
 
 
 
sudo zypper install iw
sudo ./install-driver.sh

7) Reboot

There is a warning about kernel update.  If you decide to upgrade to a new version of kernel such as 5.15 to 5.19, you need to remove the driver you have installed and install the newest available before installing the new kernel. Use the following commands in the driver directory:

$ sudo ./remove-driver.sh
$ git pull
$ sudo ./install-driver.sh

For the 8812BU WiFI, I see another similar link https://www.fastoe.com/blog/install-rtl8812bu-usb-wifi-dongle-on-linux with driver build and installation steps. 

smartmon tool is installed during the SUSE installation.  So, I just need to run the smartctl -a /dev/sdX to look for any disk errors.  Or install gsmartcontrol if you want a GUI.

I have an USB drive to store my documents and pictures.  On the safe side, I have a 2nd USB drive as a backup of backup.  To sync them up, Grsync is used.  

When I open the yast2 firewall, I do not see the wireless adapter listed.  So, I wonder if it is protected by firewall.  Going thru the documentation, firewalld replaced SuSEfirewall2 in SUSE 15.  I run the command below to confirm the wireless adapter is assigned to the public zone.  
firewall-cmd --get-zone-of-interface=wlan0


Wednesday, September 29, 2021

Connect USB to VirtualBox guest

To connect USB device to guest in VirtualBox.  First is to install Oracle VM extension pack.  I download it from VirtualBox site.  Follow instructions to try to install thru GUI with host running Bodhi 6.0 but it gives me some weird error msg.  So, I try command below instead and it works fine.  

VBoxManage extpack install

After successful installation, I can see option to select USB 2.0 and USB 3.0 in VirtualBox.  

However, it is still not discovering my USB devices.  I check /var/log/dmesg to confirm the USB devices are discovered correctly.  Then I add bodhi to vboxusers group.    

usermod -aG vboxusers bodhi

reboot the host and now, I can see the USB devices.  



Saturday, September 25, 2021

Bodhi Linux as Virtual Box host

I have a desktop with AMD-FX8320 and 32G of memory for a long time to do testing. Because older version of VMware Workstation no longer supported in Windows 10, I decide to install Linux on the desktop. Besides, VMware Workstation only support 1 NAT. I would like to setup more than one NAT. So, I decide to go with Bodhi Linux 6. Installation is quite straight forward. 

All my old hardware are detected including equipment below. 
NetGear WIN111v2 USB wireless adapter (driver is Atheros AR9710 + AR9101) 
NVIDIA GeForce GT630 (driver is version 390) Latest one from vendor is version 470. 

Only problem is motherboard. It is a GIGABYTE GA-970A-D3P v1. I cannot get the USB 3.0 ports working. This seems to be an issue with Debian and Ubuntu, and there are lots of posts in forum without solution. I test different favour of Linux, and only RHEL family can discover them fine. 

However, I decide to stick with Bodhi because it is lightweight. Then just follow the Bodhi website for instructions to install Virtual Box. 

sudo apt-get install virtualbox 
sudo apt-get install virtualbox-guest-additions-iso 

Import couple of old VMware images for XP and W2K. First boot up then uninstall VMtools. Reboot and install the VB guest integration software. Everything works fine. Besides, I install xfburn. That's basically all I need on the physical host. 

Rest of the stuffs will be run in VM. From the Bodhi website, to update the OS, just run the command below. 

sudo apt update && sudo apt dist-upgrade

===================================================================
After doing more search on Google, I do find a solution to enable the USB 3.0 ports.  The link below shows the solution for the same issue with GA-970A-DS3 motherboard.  I apply it and now the USB 3.0 ports are up.  

Basically, first step is to update /etc/default/grub.  
Look for the line
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Add "amd_iommu=on iommu=pt" to the end of it so now the line now looks like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amd_iommu=on iommu=pt"

Then update grub:
sudo update-grub

Hit Del to goto the BIOS and confirm the settings as below.

IOMMU: enabled 
XHCI handoff: enabled
EHCI handoff: disabled
USB Legacy support: enabled

OS type: Windows 8 
CSM support: enabled (Compatibility Support Module) 
Boot Mode Selection: Legacy (I set this one up since the disk is only 2TB).  

(Updated on 9/23)

====================================================================
For the Bodhi host, I ran the following commands to install graphics card for GeForce GT630 and other tools I need on the host.  Most of the time, I run the test and have my desktop in VM.

sudo apt-get install xfburn epdfview gdebi file-roller nvidia-driver-390

There is a new driver (version 470) released recently.  Not sure if it is tested yet and I believe it is not available in repository yet.  

Built in NIC works fine.  Only issue with h/w is WiFi (NetGear WN111v2).  Performance is not very good.  I will try to connect to a different router and see.  

For VirtualBox, couple of performance issue was discovered.  
1) Windows 2000 takes a few min to boot up.  
2) For immutable disk, the more changes I have, the longer it takes to start up on the next power on.  I create a snapshot and it helps a bit.  However, there is still delay on power up.  Not a big deal.....just go out and grab a cup of coffee.  5 min later, I will see the login screen.   

(Updated on 9/25)

==================================================================

Google and it seems the Ubuntu driver for NetGear WN111v2 does not work well with video and heavy download.  Connection is choppy.  It is ar9170 driver and seems to be an old bug that was never fixed.  I use ethernet instead.    

(Update 3/7/2022)

Monday, December 5, 2011

Install language support in CentOS 5

I have trouble reading Chinese in my CentOS 5 VM.  I search google and find this link http://www.cyberciti.biz/faq/linux-install-language-support/

I ran the command
yum install "@Chinese Support"

Now, I have no trouble reading Chinese with Firefox.

Thursday, November 17, 2011

Unzip 7zip file in Centos

Download a VMware appliance recently and copy it to my notebook for web browsing.  However, I am not sure how to extract it.  Search in Google and find the following steps (thegeekstuff).

Install p7zip package as shown below.
Install p7zip to unzip *.7z files on CentOS
# yum install p7zip

Uncompressing a *.7z 7zip files in Linux using 7za
$ 7za e myfiles.7z

7-Zip (A) 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30
p7zip Version 9.04 (locale=C,Utf16=off,HugeFiles=on,1 CPU)

Processing archive: ../../myfiles.7z

Extracting myfiles/test1
Extracting myfiles/test2
Extracting myfiles/test
Extracting myfiles

Everything is Ok

Folders: 1
Files: 3
Size: 7880
Compressed: 404
7za – command name
e – specifies the 7z to be extracted
myfiles.7z – is the file that is to be extracted



Creating a 7zip compression file in Linux
$ 7za a myfiles.7z myfiles/

7-Zip (A) 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30
p7zip Version 9.04 (locale=C,Utf16=off,HugeFiles=on,1 CPU)
Scanning

Creating archive myfiles.7z

Compressing myfiles/test1
Compressing myfiles/test2

Everything is Ok

Monday, June 27, 2011

NTFS read/write in Linux

I have a USB drive formated as NTFS and need to mount it to my CentOS laptop.  To enable read and write in NTFS, you can download NTFS-3g from http://www.tuxera.com/community/ntfs-3g-download/.  The instruction to configure it is on http://linuxconfig.org/How_to_mount_partition_with_ntfs_file_system_and_read_write_access

You can also use older version for CentOS and save you time by installing the rpm.  Run the following command
yum list fuse-ntfs-3g
yum update fuse-ntfs-3g

Once completed, run rpm -qa | grep "ntfs" to confirm the installation of rpm.  Now, you can read and write on your NTFS formatted USB drive.

Tuesday, May 24, 2011

What CentOS Linux kernel available?

I try to upgrade the kernel for my CentOS 5.4. I try to run yum upgrade kernel-smp and return no result. Eventually, find out this is changed in CentOS 5. There is no more kernel-smp. The following info is found in CentOS wiki page. So I run

"yum upgrade kernel" for my 64 bits dual processor laptop.

CentOS 5 provides the following kernel packages:

kernel: Contains the 'normal' kernel. This kernel includes support for both UP and SMP machines.

kernel-PAE (x86-only): Contains a kernel with support for 64GB of memory on x86 systems through Physical Address Extensions (PAE). Only x86 CPUs that support PAE can run this kernel. This kernel is provided because x86 systems can't address more than 4GB of memory without PAE extensions.

kernel-xen: Contains a Linux kernel that runs on the Xen hypervisor, for both privileged (dom0) and unprivileged (domU) domains. The Xen kernel is compiled with PAE support.

Reference page: http://wiki.centos.org/FAQ/CentOS5

Friday, May 13, 2011

Flash player on 64 bits kernel of CentOS

Reinstall my laptop again with CentOS 5.4 64 bits. This time, I can't play youtube on my Opera browser. Uninstall Flash 32 bits. Then go to http://labs.adobe.com/downloads/flashplayer10_square.html to download the 64 bits flash plugin for Linux. Copy it libflashplayer.so to /usr/lib/opera/plugins. Restart browser and confirm the plugin path include /usr/lib/opera/plugins.

Saturday, February 20, 2010

rdesktop

I am happy with my lenovo running CentOS 5.4. However, I have trouble running remote desktop to my Windows server at work. So, I install rdesktop-1.6.0-3 and it works perfectly fine.