Skip to main content

Posts

Installing MS Windows 10 into a Virtual Drive in VirtualBox

In 2018, I used VirtualBox to upgrade a hard drive to be used in my Tivo. It worked great and shortly after that, I used the same technique to install Windows XP on a solid-state drive (SSD) for use in another machine and then Mageia on another drive destined for anoter machine. I found myself in need of the same proceedure and pulled up my old page and found that Oracle had updated the command involved. The one on my old page,  $ VBoxManage internalcommands createrawvmdk -filename  /path/to/source_sdk.vmdk -rawdisk /dev/sdk has been superseded by: $ VBoxManage createmedium disk --filename=VirtualBox VMs/Tiny10-Install/Tiny10.vmdk --variant=RawDisk --format=VMDK --property RawDrive=/dev/sdd This change allows some nice new features that might be useful to me in the future, but it did take me a while to figure things out, especially since the solutions offered to the problems I encountered were mostly for Debian-based distros (and many were ancient posts) and had no real appli...

Fixing Read-Only USB Drives

  I recently purchased some inexpensive 4GB USB drives from Amazon and right away, I ran into problems. Mageia Linux essentially mandates that you use their utility, IsoDumper, to write ISO images to USB drives. A nice feature is that if any space is left on the drive, it can format it in one of several different formats compatible with whatever OS the ISO is. For example, I installed the FreeDOS ISO and formatted the remainder of the drive as a FAT partition, perfect for including some DOS apps. However, if the ISO image is installed and is corrupted, the drive becomes "read only" and can't be overwritten on a second attempt with IsoDumper. Unfortunately, because the USB's partition table seems borked, you can't just use: $ sudo dd if=/dev/zero of=/dev/sdX bs=4096 count=1 to zero out the partition table because it returns the error message that /dev/sdX is "read-only". I had an unused drive , so I imaged it with: $ sudo dd if=/dev/sdX of=4MB_USB.img Yo...

Killing the CAPS LOCK Key Revisited from May 21, 2017

 For over a decade, I have been interested in disabling the damn CAPS LOCK key. I frequently press it accidentally and it is a continuing aggravation. Trying several methods, I found one that works and thought I would update the post and try to get the formatting correct. CAPS LOCK KILLED SUCCESS!! I stumbled upon the file /etc/default/keyboard . It reads: # KEYBOARD CONFIGURATION FILE # Consult the keyboard(5) manual page. XKBMODEL=pc105 XKBLAYOUT=us XKBVARIANT= XKBOPTIONS= BACKSPACE=guess Consulting the man page for keyboard reveals the following interesting information: KEYBOARD(5)              Console-setup User's Manual     NAME keyboard - keyboard configuration file DESCRIPTION        The  keyboard file describes the properties of the keyboard. It is read by setupcon(1) in order to configure the keyboard on the  console.   In Debian  systems  the  default  keyboard la...

Zorin OS -- MS WIndows Killer?

   There have been several Linux distro releases in the past that claim to offer a MS Windows-like experience to woo new users to Linux, such as Corel Linux ,  Xandros Desktop , and Linspire/Lindows . These failed mostly because the commercial companies attempted to modify Linux enough to lock the users into their own walled garden. Interestingly, all these distros were based on Debian. A successful Debian-based distro is Canonical's Ubuntu . It doesn't attempt to strong-arm users into its walled garden, but does offer a few special things and a rich user and support environment. It's popularity is well-earned and spurred by its marketing. Zorin OS 18 is the latest entry into the fray and is a Ubuntu-based distribution , many calls it a "fork" since the UI is customized to mimic MS Windows. They do offer a free download ISO , so I attempted to install that in a VirtualBox VM. It hung up on my first attempt; problems with some LibreOffice packages, so I opted to N...

Rayhunter

  Rayhunter is a project for detecting IMSI catchers, also known as cell-site simulators or stingrays . Why the Electronic Frontier Foundation   established the project  is explained at the site.  Is this useful for the average person? Not really, but it was fun for me. The device used initially is the Orbic Speed (RC400L), a small Internet hotspot. I found one on eBay for just $15 including shipping. Other devices have been added to the supported device list .  Installation is pretty straightforward. Download the installer that matches your computer, connect the device to your computer with a USB cable and launch the installer per the instructions. A successful installation will show a green bar across the top of the screen and the presence of "stingrays" when you drive around will display yellow dots, orange dashes, or a solid red line . The device will log the data which you may share with the EFF. How do you manage the device? There is a web UI at...

List ports in use and the applications using them

 This program is part of the net-tools RPM package. # netstat -lntup -l = only services which are listening on some port -n = show port number, don't try to resolve the service name -t = tcp ports -u = udp ports -p = name of the program Since net-tools is deprecated, you can use the ss command instead of netstat if netstat is not present on your machine: # ss -lntup This should work similarly and is already installed on Mageia. RESOURCES https://superuser.com/questions/529830/get-a-list-of-open-ports-in-linux

X2X For Mageia

  X2X  allows the keyboard, mouse, and clipboard on one X display to be used to control another X display. Mageia does not provide an RPM package for X2X , but openSUSE does for both x86_64 and i586 . The RPM packages install on Mageia with no issues. Ubuntu also provides packages for their distro. To install from the OpenSUSE ftp site: # urpmi f tp://ftp.icm.edu.pl/vol/rzm6/pbone/ftp5.gwdg.de/pub/opensuse/repositories/openSUSE:/Backports:/SLE-15-SP1/standard/x86_64/x2x-1.30_beta-bp151.3.1.x86_64.rpm You will get the following warning that can be ignored: warning: /var/cache/urpmi/partial/x2x-1.30_beta-bp151.3.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 65176565: NOKEY The following package has bad signature: /var/cache/urpmi/partial/x2x-1.30_beta-bp151.3.1.x86_64.rpm: Invalid signature (NOT OK (no key): /var/cache/urpmi/partial/x2x-1.30_beta-bp151.3.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 65176565: NOKEY) Do you want to continue installation ? (y/N) n ...

Use dd For Everything

 This handy HOWTO for the dd command is usually found at  http://www.linuxquestions.org/linux/answers/Applications_GUI_Multimedia/How_To_Do_Eveything_With_DD , but is currently unavailable.  It's very hand, so here's a link from the Internet Archive . A great use of dd is to rescue an old floppy disk or a CD. Normally, writing null to the first two sectors of a floppy renders the floppy totally unusable. It cannot even be formatted after that. Thanks to the image of the new, unused floppy, floppy.image, you can write the first two sectors back properly. Rescue an unreadable floppy. ddrescue if=/dev/fd0 of=/home/sam/rescue.image bs=1440k conv=notrunc,noerror with a new floppy in the drive dd if=/home/sam/rescue.image of=/dev/fd0 bs=512 skip=2 seek=2 conv=notrunc,noerror Now the new floppy should be readable This method works similarly well with damaged CD's and DVD's. However, you must mount the resulting .iso image as a loop device and copy all the data that way. RESOUR...

Recursively Change File Permissions Example

 The most common scenario is to recursively change the website file’s permissions to 644 and directory permissions to 755 . Using the numeric method: find /var/www/html -type d -exec chmod 755 {} \; find /var/www/html -type f -exec chmod 644 {} \; Using the symbolic method: find /var/www/html -type d -exec chmod u=rwx,go=rx {} \; find /var/www/html -type f -exec chmod u=rw,go=r {} \; The find command searches for files or directories under /var/www/html and passes each found file or directory to the chmod command to set the permissions. When using find with the -exec option, the chmod command is run for each found entry. Use the xargs command to speed up the operation by passing multiple entries at once: find /var/www/html -type d -print0 | xargs -0 chmod 755  find /var/www/html -type f -print0 | xargs -0 chmod 644 SOURCE :  https://linuxize.com/post/chmod-recursive/

Adding Tainted and Nonfree Repos to DNF for Mageia9

  Distros change and evolve over time and Mageia is no exception with the transition from urpmi to DNF for package management. We install many packages from the tainted and nonfree repositories, but DNF does not install these repositories by default, so they must be installed manually. Fortunately, the Mageia Wiki tells us how to do that. As root : # dnf config-manager --set-enabled mageia-x86_64-nonfree updates-x86_64-nonfree # dnf config-manager --set-enabled mageia-x86_64-tainted updates-x86_64-tainted # dnf config-manager --set-enabled mageia-i586 updates-i586 # dnf config-manager --set-enabled mageia-i586-nonfree updates-i586-nonfree # dnf config-manager --set-enabled mageia-i586-tainted updates-i586-tainted The Mageia Wiki page lists some useful DNF commands if you are unfamiliar with DNF .

Mageia 9 and the Big Sleep

  Recently doing fresh installs of Mageia 9 on a few machines, I noticed that they would frequently go into sleep mode. This is annoying. While sleep/suspend is useful, if not necessary, for laptops, it is most unwelcome behavior for desktops and servers. Some of the best Linux documentation is found at ArchWiki, and this instance was no exception. It seems that each sleep state can be disabled via an entry in  /etc/systemd/sleep.conf.d/disable-sleep.conf . That directory and file did not exist on any of my machines, so I created them and entered the following in  disable-sleep.conf : ##  https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate #Disable_sleep_Completely [Sleep] AllowSuspend=no AllowHibernation=no AllowHybridSleep=no AllowSuspendThenHibernate=no Problem solved! I also remove  xscreensaver with # rpm -evh --nodeps xscreensaver xscreensaver-common xscreensave-base RESOURCES man page for systemd.sleep.conf(5)

Mageia 9 and Software Defined Radio (SRD) using Gqrx Software

  Software Defined Radio (SRD) is a radio receiver where minimal hardware is used and most of the signal processing is done by a computer. The benefits are extremely wide frequency coverage with multiple modes of communication at very low cost. I purchased the NESDR SMArt RTL-SDR v5 from Amazon for US$44. It's a USB dongle that ships with a USB extension cable and three small antennas.  No software is provided but the application Gqrx is provided with Mageia 9. It does require some manual configuration for use with Mageia.  Although UBUNTU-focused, the Gqrx HOWTO is a useful starting point. To install on Mageia 9: 1. Install gqrx and gnuradio: $ sudo urpmi gqrx gnuradio 2. Create the group plugdev $ sudo groupadd  plugdev 3. Add your user to the group plugdev . 4. Blacklist the default drivers  by creating the  file  /etc/modprobe.d/blacklist-dvb.conf and edit it to include the following: blacklist dvb_usb_rtl28xxu 5. Install the driver we wa...

Linux Hardware Database

  While cleaning out some old papers, I came across a brief email from lhdadmin@datapower.com congratulating me on registering at the Linux Hardware Database. The email was dated July 4, 1999. Upon checking, the LHD is still active and anonymous reports of your  computer hardware can be accomplished by installing the hw-probe script and running it as root, $ sudo urpmi hw-probe $ sudo -E hw-probe -all -upload This will generate the report and transmit the info to the LHD. Very simple. Very cool. For all the potential options, open  /usr/bin/hw-probe  in a text editor. RESOURCES Linux Hardware Database

Use POSTFIX with GMAIL and Mageia Linux

  In an earlier blog post, I described how to use mail with Mageia Linux to send system messages to your Google Mail account . At the time, sendmail was the default MTA (mail transfer agent) of choice and was overkill for what was needed for a simple messaging of security status ( from msec ). It still works. By Mageia 8, postfix became the default  MTA, so it seems it would be easier to configure postfix to use the Google Mail smtp relay server. Postfix and all necessary dependencies are installed by Mageia by default. Mageia builds their RPM of postfix with specific options, which are: Smtpd multiline greeting: --%{with_TXT multiline}  Virtual Delivery Agent: --%{with_TXT VDA}  Munge bare CR: --%{with_TXT barecr}  TLS support: --%{with_TXT tls}  IPV6 support: --%{with_TXT ipv6}  CDB support: --%{with_TXT cdb}  Chroot by default: --%{with_TXT chroot} If you need other options for some other purpose, you can rebuild the source RPM (which is beyon...

Win4Lin appwrapper for Windows 9x/2000/XP on the Linux OS

  Win4Lin is a discontinued non-free application for Linux which allowed users to run a copy of Windows 9x, Windows 2000 or Windows XP applications on their Linux desktop. It is based on MERGE, developed circa 1985 by  Locus Computing Corporation to run DOS applications on UNIX operating systems. Locus eventually gained licensing access to the MS Windows source code. A significant benefit for MERGE is that is runs on the native UNIX filesystem, considered more stable and faster than the Microsoft FAT and VFAT filesystems. The Merge technology was owned by several companies (including IBM and SCO), but was finally discontinued in 2010, likely due to improvements in VMWare and VirtualBox as well as incompatibilities with subsequent version of MS Windows. While MERGE/Win4lin ran the complete MS Windows 9x/2000/XP OS, many users in actuality only used it for one application, so  giving individual users access to the full Windows OS could be problematic. To this end, appwrap...

VritualBox to the Rescue for Dual-Booting Linux and MS Windows

 VirtualBox came in handy in the past when a larger hard drive was added to a Series2 TiVo . Once again, it came in handy when installing Windows 10 on a drive already installed in a computer tower alongside Mageia9 and a few additional drives. There used to be a Win7 installation on /dev/sdb , but it crashed. MS Windows is notoriously known for assuming it is the only OS belonging on a machine and not playing well with  others. When Win7 was originally installed on this machine, it was installed on the only drive in the machine, then moved to /dev/sdb and Linux installed on /dev/sda . Of course, all the other drives could have been disconnected and Windows10 installed, but what's the fun in that? The above referenced TiVo procedure provided the inspiration. In modern versions of VirtualBox, it is possible to install the guest OS to a physical drive. The physical drive in this case is /dev/sdb , so the process is as follows: $ cd ~/VirtualBox\ VMs Create the .vmdk file that ...

Adding Older Versions of Mageia to Your Repos

 The Mageia Wiki for URPMI contains useful information in the section titled  Copying CD or a DVD to a home directory and using the copy in urpmi . Before starting, download the appropriate Magia DVD. Since we are not using the kernel or any system files from these earlier distros, it's not necessary to also obtain all the updates. Here are the download links for Mageia7 x86_64 / i586 and Mageia8 x86_x64 / i586 . Method #1 - Mageia Wiki Method First, make directories for each release and each architecture you will be using directory somewhere convenient. Mageia suggests placing them under /home/uid/repo/ . Then, copy the   x86_64/media and/or i586/media directories from the DVD there. For each directory, you will need to create the hdlist that urpmi requires, change to that directory and run: $ sudo genhdlist2 Then add the media you just installed with: $ sudo urpmi.addmedia --distrib NameOfMedia file://home/uid/repo Now, it's as simple as using urpmi to install t...

Add Extra Repos for Mageia

  It is possible to add non-Mageia repos to the URPMI system for Mageia. I add the BDK repos as well as the Google-Chrome repo as follows: $ sudo urpmi.addmedia BDK-Free-x86_64 http://ftp.blogdrake.net/mageia/mageia9/free/x86_64 $ sudo urpmi.addmedia BDK-Free-noarch http://ftp.blogdrake.net/mageia/mageia9/free/noarch $ sudo urpmi.addmedia BDK-NonFree-x86_64 http://ftp.blogdrake.net/mageia/mageia9/non-free/x86_64 $ sudo  urpmi.addmedia --update google-chrome http://dl.google.com/linux/chrome/rpm/stable/$(uname -m | sed -e "s/i.86/i386/") Add Google Signing Key $ sudo rpm --import https://dl-ssl.google.com/linux/linux_signing_key.pub RESOURCES Mageia Forum - Add Google Apps Mageia Linux Online Repos $ sudo urpmi.addmedia --distrib https://repository.mageialinux-online.org/8/x86_64 Mageia Greek Community https://mageia-gr.org/rpm/

DOSBox-X for Mageia Linux

DOSBox-X is a DOS emulator that provides the most flexibility possible for  DOS emulator as it can not only run the DOS games that DOSBox can run, but the Win3.1, Win9X and WinME operating systems.  DOSBox-X is available for Mageia8 in a flatpak repository , something new to Mageia, so we'll cover the installation of DOSBox-X via this method, then move on to configuring a working DOSBox-X installation. 1. Install flatpak using urpmi. $ sudo urpmi flatpak On the test system, this installed about 26MB of additional applications. Install the flatpak repositories. $ sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo Locate the DOSBox-X file in the repo using the search function. $ flatpak search dosbox-x Which returns, in part, Name             Application ID                         Version DOSBox-X       com.dosbox_x.DO...

Web Proxy for Mageia Linux - Privoxy

From the homepage , "Privoxy is a non-caching web proxy with advanced filtering capabilities for enhancing privacy, modifying web page data and HTTP headers, controlling access, and removing ads and other obnoxious Internet junk. Privoxy has a flexible configuration and can be customized to suit individual needs and tastes."  The typical use is to  block ads. While ad blocking extensions are available for modern browsers, ad blocking can be useful for devices that don't have ad-blocking software available. Privoxy can also manage cookies. I have a standalone Mageia8 installation that I use for various things and thought that I would install Privoxy on it to see what I could do with that. Using ssh to access the machine and urpmi to install privoxy, $ ssh 192.168 .1.2XX Once logged in, $ sudo urpmi privoxy Privoxy needs no special configuration out of the box, so to enable the service, $ sudo systemctl enable privoxy.service and to start privoxy, $ sudo systemctl start pri...