• Debian Ubuntu 10/11/12 Linux how to get tftpd-hpa server setup tutorial


    apt install tftpd-hpa #change TFTP_ADDRESS to by setting address to 192.168.1.1:69 or the IP you need, otherwise it will listen on all IPs and interfaces which could be a security risk. # edit /etc/default/tftpd-hpa TFTP_USERNAME="tftp" TFTP_DIRECTORY="/srv/tftp" TFTP_ADDRESS="192.168.1.1:69" TFTP_OPTIONS="--secure"........
  • Proxmox How To Rename Node Hostname Fix Solution


    Proxmox's documentation shows the following here. Which mainly just says change /etc/hosts and /etc/hostname with your new hostname. Here's what happens if you only do that: If you just do the above, you will find you have an inaccessible original hostname that contains those VMs and you cannot........
  • apache2 httpd apache server will not start [pid 22449:tid 139972160445760] AH00052: child pid 23248 exit signal Aborted (6) solution Mint Debian Ubuntu Redhat


    If you get this error, it is often because you have configured Apache with modules that weren't actually installed. Eg. you try to load the PHPmodule but didn't actually install the apache2 php module, so the server can't start. In general, this error can often be caused by issues with problematic modules and/or Apache being configured for modules that have not actually be installed (eg. libapache2-mod-php) is missing. The above results in this less than obv........
  • PXE-E23 Error BOOTx64.EFI GRUB booting is 0 bytes tftp pxe dhcp solution NBP filesize is 0 Bytes


    Be very careful about what filename you specify in dhcpd.conf if you get an error like this: NBP filesize is 0 Bytes PXE-E23:Client received TFTP error from server. If you specify "BOOTx64.efi" then the file had better not be called "BOOTx64.EFI" as it is case sensitive. It's really a case of th........
  • Debian Ubuntu apt install stop daemon questions/accept the default action without prompting


    This can be a real pain when automating things and you do an apt install and some packages ask a lot of questions. Make sure you set this variable when running: DEBIAN_FRONTEND=noninteractive Remember as well that if chrooting you will want to run like this: DEBIAN_FRONTEND=noninteractive apt install -y yourpackagename ........
  • Linux How to Check Which NIC is Onboard eth0 or eth1 Ubuntu Centos Debian Mint


    So say you happen to have 2 NICs of the exact same chipset, they will generally show up as the same name, with possibly a different revision in lspci. Normally this is not an issue if you have a server with 4 NICs, generally the eth0 to eth3 appears from left to the right (or right to left on some vendors) so it doesn't take much figuring out. Generally if you have different chipsets for different NICs, it should be easy to know which one is eth0 or the first NIC in the OS.........
  • Stop ls in Linux Debian Mint CentOS Ubuntu from applying quotes around filenames and directory names


    Later versions of ls try to be helpful and smart to prevent errors in dealing with files with spaces that were tradtionally a pain. However if you need the raw/real filenames, this can break scripts or if you are pasting into a csv etc.... How do you make ls not add the quotes? Add the capital "-N" switch ls -N You could also add an alias to make it more permanent Do this to add it to ~/........
  • grub blank screen how to manually boot kernel and initrd Linux Ubuntu Debian Centos won't boot solution


    You probably didn't do an "update-grub" and grub no longer has any proper menu entries, but before you can fix it let's try to get grub booting anyway. If you get this lovely black grub screen here's how you can get things booting. In my case I have a gpt partition with partition 1 and 2. Partion 1 is just my EFI / ESPand partion 2 /dev/sda2 is my root which includes /boot. You will have to adjust this if you had a separate /boot partition.........
  • GlusterFS HowTo Tutorial For Distributed Storage in Docker, Kubernetes, LXC, KVM, Proxmox


    This can be used on almost anything, since Gluster is a userspace tool, based on FUSE. This means that all Gluster appears as to any application is just a directory. Applications don't need specific support for Gluster, so long as you can tell the application to use a certain directory for storage. One application can be for redundant and scaled storage, including for within Docker and Kubernetes, LXC, Proxmox, OpenStack, etc or just your image/web/video files or even da........
  • Docker Tutorial HowTo Install Docker, Use and Create Docker Container Images Clustering Swarm Mode Monitoring Service Hosting Provider


    The Best Docker Tutorial for Beginners We quickly explain the basic Docker concepts and show you how to do the most common tasks from starting your first container, to making custom images, a Docker Swarm Cluster Tutorial, docker compose and Docker buildfiles.........
  • How To Create OpenVPN Server for Secure Remote Corporate Access in Linux Debian/Mint/Ubuntu with client public key authentication


    Why choose OpenVPN instead of a firewall appliance? OpenVPN can be a reliable and easy replacement for traditional hardware or just be an additional tool that your company uses so that the firewall can focus on its job rather than acting as a VPNappliance at the same time. When comparing OpenVPN with traditional firewal........
  • Package wget is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source. E: Package 'wget' has no installation candidate. Solution


    These types of errors are normally caused by misconfiguration of your /etc/apt/sources.list. In this example on Debian 10, if you didn't complete the install correctly, you will have no repos enabled and only rely on CDROM. "Package wget is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source. E: Package 'wget' ha........
  • Ansible Tutorial - Playbook How To Install From Scratch and Deploy LAMP + Wordpress on Remote Server


    1. Let's work from an environment where we can install Ansible on. If you are using an older version of Linux based on Mint 18 or Ubuntu 16, you may want to get the PPA and get the latest version of Ansible that way: sudo apt install gpg sudo add-apt-repository ppa:ansible/ansible sudo apt update........
  • Cisco Switch Howto Reset Password


    This was done on a 2900 but applies to all the switches of the same era. Step 1 - Power Cycle and enter recovery mode If you have physical access you can power cycle and hold the mode button down for 15 seconds. After that the SYS light will flash on the switch and you will see the following screenshot. If you don't have physical access (eg. it is a datacenter swich over console only) then power cycle and hit "Ctrl+Pause/B........
  • ksnapshot missing in Ubuntu and Linux Mint Solution


    It has been renamed to kde-spectacle so you install it like so: sudo apt install kde-spectacle You'll find it in your start menu listed as "Take Screenshot"........
  • Cisco Router Password Reset Howto Guide Solution Cannot Login /Unknown Enable Password 2600, 2800, 2900, 3900


    It is common that you may get access to undocumented equipment and need to reset the password. This applies to many Cisco routers whether 2600, 2900, 3900 etc... Cisco's Guide says to hit Ctrl +Pause/Break but if it doesn't work on some devices causing people to say "cisco password reset pause break does not work", you can see Cisco's alternative key combinations here:........
  • EFI PXE grub2 Howto guide for Linux EFI PXE Booting on Debian, Mint, Ubuntu, RHEL


    Just a quick note and warning is that if you are testing to see if EFIPXE booting works on a VM, MAKE SURE it actually works. For example Iinitially tested using my Distro's QEMU 2.5+dfsg-5ubuntu10.46 and ovmf BIOS firmware (OVMF supports EFI). However, I found on old versions of QEMU (like 2.5), EFIbooting with GRUB NEVER works so it may appear that you have made a mistake when everything is fine when you boot a physi........
  • Debian, Mint Ubuntu how to remove package and associated config files


    If you want to start fresh a lot of people falsely assume that an apt remove and then reinstall or apt --reinstall install package will start you off fresh. To be sure and remove all associated config files do the below with the example of ssh server (don't remove it though if you actually use it!) The key below is using the --purge flag or apt-get purge proftpd (eg sudo apt --purge remove packagename) apt purge proftpd; apt install proftpd........
  • How To Get Started on Ubuntu with gpt-2 OpenAI Text Prediction


    apt install software-properties-common add-apt-repository ppa:deadsnakes/ppa apt update apt install python3-pip apt install python3.7 curl gnupg python3.7-dev git ln -s /usr/bin/python3.7 /usr/bin/python3 pip3 install numpy keras_preprocessing curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel........
  • Linux Console Login Screen TTY Change Message


    This is all controlled by /etc/issue You can basically enter anything in there that you like, but there are preset variables that are mentioned at the end of the page that discuss this. Some examples of /etc/issue: Centos 7: S Kernel r on an m Ubuntu 16.04: Ubuntu 16.04.6 LTS n l You can also insert any of t........
  • MySQL Cheatsheet Guide and Tutorial


    Create Database: create database yourdbname; Show All Databases: show databases; Change Database: use mysql; Drop / Delete a MySQL Database: drop database nameofyourdatabase;........
  • Wordpress overwrites and wipes out custom htaccess rules and changes soluton


    cat .htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php [L] I keep reading there is a "# BEGIN WordPress" and a "# END WordPress" in the wordpress htaccess above but there is clearly not. Even more strange is that my permissions are just 444 (read only). so i changed it........
  • Linux Mint How To Set Desktop Background Image From Bash Prompt CLI


    The way of doing it in mint is different than gnome and ubuntu. gsettings set org.mate.background picture-filename /path/to/file.jpg *If you try to use the gnome way it will NOT work with Linux Mint: gsettings set org.gnome.desktop.background picture-uri /some/pic.jpg........
  • Cisco CUCM Unified Communication Manager Howto Guide and Tutorials


    Install Issues: How to Make CUCM iso /modify to work on non-VMWare machines like QEMU/Xen/OpenStack If you get kernel panic errors in VBOX usually disabling Nested Paging will fix the issue (thanks to Mark). ks_pre.sh error is caused by having the wrong VDX pattern (change it do sd per guide link above) and/or the wrong VMSpecs (Cisco req........
  • Windows Server 2012, 2016, 2019 How To Install and Missing Disabled Telnet Client


    By default telnet is not enabled or installed on the latest Windows servers so you'll get an error saying: telnet is not recognized as an internal or external command dism /online /Enable-Feature /FeatureName:TelnetClient ........
  • Proxmox Breaks Storage/LVM Backing If Killing QEMU-IMG


    I tried to stop a qemu-img copy or clone and it broke everything. It was fine to "stop" it from the GUI but a process still persisted so I killed the relevant qemu-img and the kernel went crazy. It also may not have helped that I tried to lvremove a different volume (an unused disk). But either way it breaks LVM (you cannot even run lvdisplay) so a reboot is necessary. Jan 17 06:45:21 testserver kernel: [ 5680.439337] systemd-udevd D 0&nbs........
  • genisoimage errors with long filenames and deep directory structures


    You'll have to violate the iso9660 standards but it is necessary if you want to preserve your filesystem and filenames and shouldn't be an issue as long as you are using a modern OS like Linux. genisoimage -o Backup-Myfiles.iso -r -J -joliet-long /some/path/ You will get errors like below (even enabling joliet-long didn't help) genisoimage: Error: /some/filename.pdf have the same Joliet name Joliet tree sort failed. The -joliet-lo........
  • HP DL385 G7 Linux BIOS Update Flash


    wget https://downloads.linux.hpe.com/repo/spp/rhel/6/x86_64/current/CP017004.scexe --2018-08-16 05:11:16-- https://downloads.linux.hpe.com/repo/spp/rhel/6/x86_64/current/CP017004.scexe Resolving downloads.linux.hpe.com (downloads.linux.hpe.com)... 15.249.152.85 Connecting to downloads.linux.hpe.com (downloads.linux.hpe.com)|15.249.152.85|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1525561 (1.5........
  • VMWare vSphere 6.7 Errors Solution 503 Service Unavailable (Failed to connect to endpoint:


    503 Service Unavailable (Failed to connect to endpoint: [N7Vmacore4Http20NamedPipeServiceSpecE:0x00005556ba09c070] _serverNamespace = / action = Allow _pipeName =/var/run/vmware/vpxd-webserver-pipe) 503 Service Unavailable (Failed to connect to endpoint: [N7Vmacore4Http16LocalServiceSpecE:0x00007fd26000b240] _serverNamespace = /ui action = Allow _port = 5090) Errors like the above are usually because there is an issue with your vSphere or more commonly it i........
  • VMWare ESXi 6.7 SSH/PowerShell CLI Commands


    [root@localhost:~] BootModuleConfig.sh echo host-ind nfcd........
  • Linux How To Rename Files


    To remove all spaces from all files in the current directory linux rename remove spaces rename "s/ //g" * how to replace part of the text with another (it is almost like using sed): rename s/"Screenshot at 2019-04-22 "/"AC97-Windows-InstallSolution"/g * The first part "Screenshot at 2019-04-22" is what we're looking for The........
  • How To Turn Any .iso file into a bootable USB drive


    This works for almost all ISO's Ifind (at least Linux based): sudo dd if=CentOS-6.9-x86_64-minimal.iso of=/dev/sdg bs=20M 20+1 records in 20+1 records out 427819008 bytes (428 MB) copied, 118.233 s, 3.6 MB/s Of course change the .iso filename above and the /dev/sdg to your desired USB drive!........
  • M2Crypto.SSL.Checker.WrongHost: Peer certificate subjectAltName does not match host, expected fedora-archive.ip-connect.vn.ua, got DNS:mirror.ip-connect.vn.ua


    You are using Centos 5 which is deprecated so nothing in yum will work until you follow this post to use the vault: http://realtechtalk.com/Centos_59_Working_Vault_Repo_file-1921-articles yum update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * epel: fedora-archive.ip-connect.vn.ua Traceback........
  • Linux Mint/Ubuntu/Debian apt how to downgrade a package


    First of all check to see which version if any you have available for a downgrade: apt-cache showpkg packagename Downgrade/Install old package: apt-get install package=version Example apt-cache showpkg caja Package: caja Versions: 1.10.3-1+rafaela (/var/lib/apt/lists/packages.linuxmint.com_dists_rafaela_import_binary-amd64_Packages) (/var/........
  • Ubuntu Linux Mint How To Exclude Stop Package from being Upgraded or Installed


    In Debian/Ubuntu this is called "holding". To hold/exclude a package from being installed or upgraded: sudo apt-mark hold packagename To allow the upgrade/installation unhold: sudo apt-mark unhold packagename........
  • Text Editors - Top Linux Ubuntu/Debian/Mint Options


    1.) gedit/pluma both very good the only thing I wish is that there was an autosave for unsaved documents! The only other competitor which is similar but I prefer less is kwrite (although I think kwrite may have proper autosave) pluma seems to be a renamed gedit yet gedit is still installable on Linux Mint) ........
  • Centos 7 Migration Guide from Centos 6


    Centos 7 is no cakewalk, there are many fundamental features and basic utilities that are missing or even completely renamed or different! Another shocking thing is to check your NIC it is set by default to not turn on when booting! And by the way there is no more standard eth0 the NIC convention is now "enp0s3" vi /etc/sysconfig/network-scripts/ifcfg-enp0s3........
  • mdadm and lvm how to completely disable and remove vg/pv/lv


    In short the solution is just to use vgremove for the actual /dev/mapper device: vgremove /dev/mapper/backups-backuplv box mnt # mdadm --manage /dev/md8 --stop mdadm: Cannot get exclusive access to /dev/md8:Perhaps a running process, mounted filesystem or active volume group? box mnt # lv lvchange lvconvert lvcreate l........
  • Check Linux Ubuntu/Debian/Mint Version from Command Line


    To check the version of Ubuntu just use the lsb_release command as shown below and you will be able to see the exact Ubuntu version you have installed. lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04 LTS Release: 14.04 Codename: trusty........
  • Debian Ubuntu Mint Samba Share config file location


    /var/lib/samba/usershares But note that it is just simple file sharing if you need directory mask, create mask etc... you still need to edit the smb.conf file to create your share. Here is an example file: comment= usershare_acl=S-1-1-0:R,S-1-22-1-1000:F guest_ok=y sharename=BabyPhotos........
  • Debian Linux Ubuntu Mint connect to pptp from terminal bash shell


    apt-get install pptp-linux echo "yourvpnusername * yourpasspass *" >> /etc/ppp/chap-secrets vi /etc/ppp/peers/provpnaccounts.com enter (ignore the lines): ============ pty "pptp server.provpnaccounts.com --nolaunchpppd" name testuser #remotename PPTP require-mppe-128 file /etc/ppp/options.pptp ==========........
  • linux bash mass rename tool Centos/Debian/Ubuntu


    Say you have a bunch of files like this: file-01.jpg file-02.jpg ............... What if you want to mass rename them? the rename tool can work just like sed For Debian based distros: Note "file" is what we search for and "newname" is what we replace it with, so substitute according to your requirements. rename s/file/newname/ name-file-*.jpg For R........
  • Centos 6 how to guide convert LVM non-RAID into mdadm 1/10 RAID array live without reinstalling


    Here is the scenario you or a client have a remote machine that was installed as a standard/default minimal Centos 6.x machine on a single disk with LVM for whatever reason. Often many people do not know how to install it to a RAID array so it is common to have this problem and why reinstall if you don't need to? In some cases on a remote system you can't easily reinstall without physical or KVM access. So in this case you add a second physical or disk or already ha........
  • rm how to delete a file with -- 2 leading dashes


    rm -- --filename Ironically if the solution is two leading dashes as shown above but this applies for other stubborn file names.........
  • bash string substitution


    so in this case we have files named like this: track01.cdda.wav.mp3 track06.cdda.wav.mp3 track11.cdda.wav.mp3 track02.cdda.wav.mp3 track07.cdda.wav.mp3 track12.cdda.wav.mp3 track03.cdda.wav.mp3 track08.cdda.wav.mp3 track13.cdda.wav.mp3 track04.cdda.wav.mp3 track09.cdda.wav.mp3 track05.cdda.wav.mp3 track10.cdda.wav.mp3 but we want to rename them so they are like "05.........
  • Howto Convert Xen Image to KVM


    #count=10000 makes an image of 10000MB make sure your image is at least the same as your existing dd if=/dev/zero of=yourimage.img bs=1M count=10000 # losetup -fv newimage.raw # fdisk -cu /dev/loop0 # kpartx -a /dev/loop0 # dd if= of=/dev/mapper/loop0p1 # e2fsck -f /dev/mapper/loop0p1 # resize2fs /dev/mapper/loop0p1 # a lot of guides tell you to edit /etc/fst........
  • bash Linux basename and directory name, get the actual directory and file


    Example: basename /var/log/messages messages As shown above the "basename" utility gives you the end filename separately. dirname /var/log/messages /var/log As shown above the "dirname" utlity gives you just the utility even if you pass it a specific file. The above two utilities are very helpful in Bash scripting when working with files and directories co........
  • Linux create htaccess file with username and password


    htpasswd -b -c filename username "password" -b = take the password that we specify in the command (don't prompt for it) -c = create the filename username=username password=password (I use quotes because it breaks if you use special characters)........
  • Dell Perci 6/i Firmware Upgrade Guide Tutorial


    One thing to remember is that you need MegaCli to do the flashing. You also need the correct file,I tried at least 2 different Perc 6 firmwares from Dell that kept getting rejected as corrupt by MegaCli(they were really the wrong version). I have an external PCI-E Dell 6 Perc/I butI chose images from the 'Integrated" on motherboard version as it was allI could find. They are different, and below is my first time finding success.........
  • LSI MegaRAID Adventures, Guide and HowTo


    LSi Megaraid At first it was configured as a RAID 0, then I deleted the Virtual Disk Group. I thought both drives would be shown and detected in Linux as sda and sdb but it actually shows nothing. To make them work you have to hit Ctrl+R before the system boots (when prompted) and create a Virtual Disk Group. In my case I created each one as RAID 0 (with a single drive only) as I just wanted JBOD but there is no such option or default in these Dell Pe........
  • yum update error


    yum update error Traceback (most recent call last): File "/usr/bin/yum", line 29, in ? yummain.user_main(sys.argv[1:], exit_code=True) File "/usr/share/yum-cli/yummain.py", line 229, in user_main errcode = main(args) File "/usr/share/yum-cli/yummain.py", line 145, in main (result, resultmsgs) = base.buildTransaction() &nbs........
  • bash how to read a single line or filenames with spaces solution


    This happens all the time, you are reading from a textfile which has spaces eg: datainfo 00 datainfo 11 If you do loop on it like this: for info in `cat $file`; do echo "info=$info" done It will treat datainfo and 00 as two separate lines: info=datainfo info=00 Obviously that's not what we want and there are many weird solutions in bash bu........
  • MySQL Show Print List of Field Names only without other data or attributes


    SELECT column_name FROM information_schema.columns W........
  • Directadmin Log File Locations


    This is a handy link and list of all the relevant Directadmin log files and related servers. http://help.directadmin.com/item.php?id=11 DirectAdmin: /var/log/directadmin/error.log /var/log/directadmin/errortaskq.log /var/log/directadmin/system.log /var/log/directadmin/security.log Apache:........
  • How to install GRUB to the MBR of a disk image.


    cat | grub --device-map=/dev/null Now pay close to the attention of the beginning. Type: "device (hd0) VPS.img" this is telling what hd0 will be to GRUB and we're telling it the disk image file "VPS.img" in the current directory is hd0, you can specify alternate paths and image names of course. GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-li........
  • Setup PXE Boot using Centos and dhcpd, tftp and syslinux


    This is something I often setup for clients because it's very helpful for people in datacenters, this allows custom OS installs on demand, you can customize it more by using kickstart etc.. but here's a base I use before customizing more: This little script below will install everything you need to get booting by PXE Linux. It also assumes you set a local IP (be sure not to overwrite your existing IP) on eth0:0 (note the :0) as 192.168.1.10 and it........
  • Directadmin Enable SSL


    It's really silly how DA doesn't enable SSL by default but is otherwise a stable, fast and secure control panel. Here's a copy and paste way of enabling SSL for Directadmin in just a few seconds: *setup SSL openssl req -x509 -newkey rsa:1024 -keyout /usr/local/directadmin/conf/cakey.pem -out /usr/local/directadmin/conf/cacert.pem -days 9999 -nodes That creates the public certificate and private key pair in the location Directadmin expects to fi........
  • File /etc/vz/conf/ve-vps.basic.conf-sample not found: No such file or directory - Openvz Error solution


    Stuff like this always happens/breaks after a vzctl update, whether it's new parameters being added or required etc.. File /etc/vz/conf/ve-vps.basic.conf-sample not found: No such file or directory Fix the value of CONFIGFILE in /etc/vz/vz.conf Creation of container private area failed Warning: distribution not specified in CT config, using defaults from /etc/vz/dists/default WARNING: /etc/vz/conf/4400.conf not found: No such file or directory........
  • gocr - free Linux OCR (Optical Character Recognition) conversion tool


    gocr works great and it's simple, just invoke it like so: gocr filename.png The output will be printed to the screen. My only complaint/concern is that even with standard terminal output (not scanned) from a printscreen, gocr does make mistakes by inserting extra spaces where they don't belong, mistaking letters for numbers etc.. but it's definitely enough to be readable and figure out what you're looking at. I haven't tested yet with scanned input........
  • Linux Kernel Panic Messages - Symptoms of bad RAM module/stick


    These were caused by a bad stick of Corsair RAM [] free_hot_cold_page+0xfc/0x150 [] __pagevec_free+0x14/0x1a [] release_pages+0x127/0x12f [] __pagevec_release+0x15/0x1d [] __invalid_mapping_pages+0x120/0x156 [........
  • Linux Out of Memory OOM Object Killer Solution "Out of memory: kill process 1955 (sshd) score 81 or a child"


    I had a system running a 128MB live CD image with 2.8 gigs of available RAM and the OOM kernel killer went crazy when using dd for more than 8 minutes and kept killing everything. I've read that this is due to a low-memory issue and paging in the kernel and 32-bit systems with lots of RAM. I even enabled swapspace on my LiveCD and the issue happened 25 minutes into dd rather than 8 minutes, so what gives? Also no swap space was ever used! cat /proc/s........
  • How To Test If Your Hard Drive Is Good/Signs of dying hard drive


    I like dd, although it only reads it, usually a read test of the entire disk will uncover if your hard drive is bad in some parts. This is a good thing to do at least once a month, a lot of times bizarre program behavior, laginess and crashing/unnmounting problems etc.. are due to a failing disc and SMART won't know it or indicate a problem: We must also remember there's never a guarantee, I've found that ever since we moved to larger and more platters per drive with 1TB drives........
  • GRUB Solution to error "Error 6: Mismatched or corrupt version of stage1/stage2"


    GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.] grub> root (hd1,0) Filesystem type is ext2fs, partition type 0xfd grub> setup........
  • How to recover from dead DRBD partition/hard drive in two simple commands


    This assumes that you've at least created the correct partition for your DRBD already. Notice that I am "diskless", that's because either your DRBD partition doesn't exist/has been renamed (eg. sdb becomes sda when sdb dies and you reboot) or because that drive is really actually dead/gone. *If you need to permanently change the partition/device for your resource be sure to edit /etc/drbd.conf on both hosts and reload the config. (replace r0 with........
  • Linux High IOWAIT updatedb can't be killed and crash with mdadm


    high IO wait 424 root 39 19 1900 848 552 D 0.0 0.0 0:00.91 updatedb root 424 0.0 0.0 1900 848 ? DN Mar11 0:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventp........
  • updatedb/mdadm caused a kernel panic?


    Jan 16 04:02:03 centosbox syslogd 1.4.1: restart. Jan 16 04:07:34 centosbox kernel: INFO: task updatedb:20771 blocked for more than 300 seconds. Jan 16 04:07:34 centosbox kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. Jan 16 04:07:34 centosbox kernel: updatedb D F78BE050 6476 20771 20766&n........
  • bash script count unique/dupllicate lines in a file


    For many reasons you may be dealing with a standard text file and you want to know if there are any duplicate lines: Here's how you do it: cat filename|uniq -c The "uniq -c" program counts how many time each line occurs.........
  • Nautilus/GNOME File Manager handy list of extensions


    nautilus-gksu - privilege granting extension for nautilus using gksu nautilus-sendto - integrates Evolution and Pidgin into the Nautilus file manager nautilus-share - Nautilus extension to share folder using Samba nautilus-actions - nautilus extension to configure programs to launch nautilus-bzr - Bazaar (bzr) integration for nautilus nautilus-cd-burner - CD Burning front-end for Nautilus nautilus-clamscan - Antivirus scanning for Nautilus n........
  • mencoder Linux CLI video editing how to encode video file into xvid and split by time into multiple parts


    Mencoder is great, you can throw anything at it, including video files from your camera and have it encode into xvid or almost any other format. In my case I took 640x480 video from my Canon and reduced the size by 1/3 with the options below (there are many other options that you can read about in the manual but I like to keep it simple). Mencoder Encode mencoder -ovc xvid -oac mp3lame -xvidencopts fixed_quant=4 -o ........
  • mdadm "auto-read-only" Linux Software RAID solution


    If you have the "(auto-read-only)" beside an arrayI have no idea why that happens but it is easy to fix. Just run "mdadm --readwrite /dev/md1" (rename md0 to the device with the problem and it will begin to resync. md1 : active (auto-read-only) raid1 sdb2[0] sda2[1] 19534976 blocks [2/2] [UU] resync=PENDING ........
  • MySQL Recover/Reset Lost/Forgotten root Password


    One note is to secure MySQL, I don't know for sure but I believe you could login to MySQL remotely with no password during this operation (I'm not sure, maybe it doesn't accept blank passwords but I firewall MySQL port anyway and recommend you do the same). First edit /etc/my.cf Under the [mysqld] field add the following line somewhere: skip-grant-tables Now restart mysql: service mysql restart or on Debian sty........
  • Choose Which GCC Version to compile with via CC environment variable.


    It's very common to have multiple GCC versions for different reasons, as annoying as it is. Some newer/older programs only compile properly or at all on specific versions. You can export the following variable CC: export CC=gcc-4.1 Replace gcc-4.1 with the filename of the gcc you want eg. gcc-99........
  • mdadm Linux Software RAID auto-detect and assemble RAID Array


    mdadm --assemble --scan mdadm: /dev/md/diaghost05102010:2 has been started with 2 drives. mdadm: /dev/md/diaghost05102010:1 has been started with 2 drives. mdadm: /dev/md/diaghost05102010:0 has been started with 2 drives. -bash-3.1# cat /proc/mdstat Personalities : [linear] [raid0] [raid1] [raid6] [raid5] [raid4] [multipath] md125 : active raid1 sda1[0] sdb1[1] 14658185 blocks super 1.2........
  • OpenVZ backup container to a single file while it's running using "vzdump"


    Proxmox has made this free utility to backup running OpenVZ containers. It's a great program which is actually just a PERL script but gets the job done. This program is not 100% required because all it really does is cp -a from your container's path as far as I know but it is still good to have uniformity to how you backup your containers. For RPM distros such as Centos/RHEL/Fedora etc.. download and install this: wget http://www.proxmox.com/cms_proxm........
  • PHP cannot access /usr/bin/openssl


    PHP cannot access /usr/bin/opensslI have verified the username that runs the process is able to access /usr/bin/openssl and it does exist but the PHP script is saying it doesn't exist: [code:1:1fd0f3abbe] if (!file_exists($OPENSSL)) { //echo "ERROR: OPENSSL $OPENSSL not foundn"; }[/code:1:1fd0f3abbe] I don't get itI can clearly see the contents of /usr/bin by using the PHP system fu........
  • MySQL Server 3.23 won't start after switching from 4.1


    MySQL Server 3.23 won't start after switching from 4.1I was using a 4.1 alpha version of mysql-server and some how version 3.23 of the client and 4.1 of the client were also both installed! So I forced uninstalled everything because after trying and trying even though MySQL server was using the short 16byte password authentication I got some other errors. After trying with the ports and having it fail because I had existing database data I force installe........
  • Tar & Encrypt in the same command!


    Tar & Encrypt in the same command![code:1:f2c600dbb6]tar -cz --file=tarfile.tar `gpg -e -r email@address file.name`[/code:1:f2c600dbb6] Notice the back ticks in the place where the filename would normally be. This will let us encrypt and tar any files/directories!........
  • Create Table with structure of another existing table


    Create Table with structure of another existing tableOk, this has many valid uses such as if you need to create backups or the ability to undo changes, you would want to create new tables with the same structure as another. Here is how you do it. [i:7ed9581493] Also remember Indexes such as PRIMARY KEYS [b:7ed9581493]will not be preserved[/b:7ed9581493] so you will have to readd them manually.[/i:7ed9581493] [code:1:7ed9581493]CREATE TABLE NewName AS SEL........
  • ADD PRIMARY KEY to Table


    ADD PRIMARY KEY to TableHere is an example of readding a PRIMARY KEY with an AUTO_INCREMENT field: [b:40986c2a8b]First make the field NOT NULL[/b:40986c2a8b] [code:1:40986c2a8b] ALTER TABLE tableName MODIFY FieldNAME INT(18) NOT NULL; [/code:1:40986c2a8b] [b:40986c2a8b]Create The Primary Key[/b:40986c2a8b] [code:1:40986c2a8b]ALTER TABLE tableName ADD CONSTRAINT PRIMARY KEY(FieldName);[/code:1:40986c2a8b........
  • Create/Enable SSL Certificates for Apache on Linux/Unix Systems eg. Redhat,Centos,Debian


    Shortcut/Easiest Way To Create A Self-Signed Key: openssl req -new -x509 -nodes -days 1530 -out server.crt -keyout server.key Using the above, you instantly create a self-signed certificate valid for 1530 days and you can simply skip to step #5.) below. If You Need a Real SSLCertificate (eg. Equifax/Openssl) then you need to create a CSR request (you'll need to follow Steps 1.) and 2.) in order to create the CSR. You then upload the CSR Certi........
  • GRUB "Error 2: Bad file or directory type" 0.97 won


    You can see the problem below, GRUB recognizes my hard drive and sees the partitions but cannot access them. This is from the GRUB boot disc I'm using. What happened is that I had some power issues causing this system's power to be interrupted several times and basically an on/off on/off situation. The system won't boot, I just get a flashing cursor and no message or error from GRUB. Obviously the problem is that my MBR seems corrupt or some other issue. My........
  • Linux Bash Shell Cannot/Can't View File That Starts With - Dash ?


    Iwas getting really annoyed with this, I used full quotes around the filename and vi, cat, less all thought I was trying to pass the dash in the filename as an argument. I didn't realize that all you have to do is just put a dash dash "--"in front. Here's an example:cat -- "-etc-glusterfs-glusterfsd.vol.log" Without the -- you get: cat: invalid option -- c Try `cat --help' for more information. Ih........
  • MySQL Restoring And Dumping/Backing UP MySQL Data/Tables/Databases


    Backing MySQL Databases Backing Up/Dumping All Mysql Databases To A Single File mysqldump --all-databases -u admin -p > allmysqldatabases.sql The "-all-databases" clause is pretty obvious isn't it? It means that it will backup all databases. The "-u admin" means login using the user "admin", if you h........
  • Viewing and Connecting to an SMB Samba Share on Windows/Linux/Unix


    This will give you the basic info needed to browse and connect to Samba shares from the command line. From the GUI of Gnome or KDE etc, it is pretty standard and straight forward. However, I've found very little guides on how to do it from the command line and if you're like me, a nerd who prefers command line for its simplicity and for remote use, this is the way to go. First get a list of all the Samba/SMB shares on the target. smbclient -L hostname........
  • Writing/Burning a data CD-R/DVD-R or DVD+RW in Unix/Linux


    There's a lot of outdated information and confusion for system administrator's out there. One annoying task for many an Administrator has been backing up data in Linux. You don't need any GUI tools such as K3B or GnomeBaker. Both are excellent tools but for veteran command line users working remotely, using the keyboard is a great and possibly automated way to save yourself pain and hassle. At a later date we'll cover how scripting can automatically backup certain........
  • Latest Articles

  • Cloned VM/Server/Computer in Linux won't boot and goes to initramfs busybox Solution
  • How To Add Windows 7 8 10 11 to GRUB Boot List Dual Booting
  • How to configure OpenDKIM on Linux with Postfix and setup bind zonefile
  • Debian Ubuntu 10/11/12 Linux how to get tftpd-hpa server setup tutorial
  • efibootmgr: option requires an argument -- 'd' efibootmgr version 15 grub-install.real: error: efibootmgr failed to register the boot entry: Operation not permitted.
  • Apache Error Won't start SSL Cert Issue Solution Unable to configure verify locations for client authentication SSL Library Error: 151441510 error:0906D066:PEM routines:PEM_read_bio:bad end line SSL Library Error: 185090057 error:0B084009:x509 certif
  • Linux Debian Mint Ubuntu Bridge br0 gets random IP
  • redis requirements
  • How to kill a docker swarm
  • docker swarm silly issues
  • isc-dhcp-server dhcpd how to get longer lease
  • nvidia cannot resume from sleep Comm: nvidia-sleep.sh Tainted: Linux Ubuntu Mint Debian
  • zfs and LUKS how to recover in Linux
  • [error] (28)No space left on device: Cannot create SSLMutex Apache Solution Linux CentOS Ubuntu Debian Mint
  • Save money on bandwidth by disabling reflective rpc queries in Linux CentOS RHEL Ubuntu Debian
  • How to access a disk with bad superblock Linux Ubuntu Debian Redhat CentOS ext3 ext4
  • ImageMagick error convert solution - convert-im6.q16: cache resources exhausted
  • PTY allocation request failed on channel 0 solution
  • docker error not supported as upperdir failed to start daemon: error initializing graphdriver: driver not supported
  • Migrated Linux Ubuntu Mint not starting services due to broken /var/run and dbus - Failed to connect to bus: No such file or directory solution