• Centos 7 not mounting /etc/fstab partitions


    If you are doing a custom deployment and image, make sure that when you rsync'd or tar'd that you didn't mess up the symlnk of /etc/mtab to /proc/self/mounts ln --force -s /proc/self/mounts /etc/mtab Will fix this........
  • ecryptfs How To Backup / Migrate Linux Mint Ubuntu Debian system ecryptfs properly and restore access


    In this scenario, let's say you want to clone your OS at the filesystem level and the source system (the system you want to clone from) is in use. Doing a blind rsync / is a big problem because it uses twice as much space for no reason. The reason for this is that with ecryptfs you have a /home/.ecryptfs directory which has the actual encrypted versions of your files and folders. However your home directory (eg. /home/someuser) is mounted. Doing the blind rsync will ca........
  • How To Tell Which Repository a Package Comes From Debian Mint Ubuntu


    Just use apt-cache policy to find the repo of a package: apt-cache policy lxd lxd: Installed: 3.0.3-0ubuntu1~18.04.2 Candidate: 3.0.3-0ubuntu1~18.04.2 Version table: *** 3.0.3-0ubuntu1~18.04.2 500 500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages &nb........
  • Convert and install to LUKS Encrypted Drive Ubuntu 18.04 19.10 Linux Mint and Debian Based Linux


    The reason for doing this is that the installer doesn't seem to work properly for LUKS and the server installer doesn't even support LUKS anymore. When you use the GUI install on Desktop for LUKS it won't boot and will just hang after you enter your password. So the only reliable way is to do it ourselves. 1.) Make a default minimal install of Ubuntu 2.) Have a secondary disk on the server or VM. 3.)........
  • CentOS 8 how to convert to a bootable mdadm RAID software array


    The cool thing here is that we only need 1 drive to make a RAID 10 or RAID 1 array, we just tell the Linux mdadm utility that the other drive is "missing" and we can then add our original drive to the array after booting into our new RAID array. Step#1 Install tools we need yum -y install mdadm rsync Step #2 Create your partitions on the drive that will be our RAID array Here I assume it is /dev........
  • systemd management using systemctl and journalctl to check systemd logs


    systemd is like the service manager for your Centos and other modern Linux distributions (including Debian/Mint/Ubuntu) allows you to enable services, stop them, restart them, check their status and even reboot your system. The key commands or arguments you will use with systemctl are the following: Unit Commands: list-units [PATTERN...] List loaded units &nbs........
  • rsync specify alternate port non-standard port than 22


    It is not obvious but the rsync --help rsync --help|grep port --port=PORT specify double-colon alternate port number --port does not do anything at all actually for some strange reason it still uses 22 You have to specify a manual ssh command to make it work: -e 'ssh -........
  • Migrate Centos 7 from Single HDD to mdadm RAID 10 array:


    Done on Centos 7.3 very important as clearly based on older guides it was a lot easier and more simpler! Hint do not use grub2-install! If you have trouble booting after this check this CentOS mdadm RAID booting/fixing guide. One huge caveat if you are an oldschool user or sysadmin who has avoided UEFIbooting The nor........
  • rsync run as root sudo without password


    This is a common issue, what if a issue shouldn't have root but you want to use that user to make a full backup of a system? They of course need root access. You can actually just give them passwordless sudo access to rsync in /etc/sudoers: sudo vi /etc/sudoers yourusername ALL = NOPASSWD: /usr/bin/rsync Here is how you would execute rsync: The key thing for the remote host is to........
  • ecryptfs errors


    ecryptfs-mount-private Enter your login passphrase: Inserted auth tok with sig [ee16d84] "into the user session keyring mount: No such file or directory" [ 156.118113] ecryptfs_mount: kern_path() failed [ 156.118431] Reading sb failed; rc = [-2] [ 164.233055] traps: mate-notificati[3472] trap int3 ip:7f43d7002c13 sp:7fff162c6600 error:0 [ 166.017061] ecryptfs_mount: kern_path() failed........
  • Migrating from Linux Mint 17.2 mdadm RAID array to a new one (because I upgraded to larger drives).


    1.) Replicate the number of partitions in your new drives. gdisk /dev/sda gdisk /dev/sdb I created 3 partitions of the same same size. partition #1: +1G (/boot) partition #2: +60G (swap) partition #3: rest of it (/) #note if you are using GPT/gdisk you need to create separate a partition at least 1MB in size (in my case I would a 4th partition and mark it type ef02).........
  • SELinux targeted policy relabel is required


    You may get this after a long time of not rebooting but especially if you have rsync'd a / partition or deployed an image to another VPS or computer, you will often have this issue. The good thing it usually just takes a reboot. Here is more info from Centos........
  • 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........
  • Centos cannot login by console or ssh session closed immediately


    In my case I could login with the initial install but I rsync'd everything over while preserving ownership and permissions to another RAID partition and booted from that.was fine before. The problem is that you are kicked out the second you login and the problem was SELINUX for some reason (perhaps it noticed something strange when it was moved to the new partition) login: pam_unix(login:session): session opened for user root by LOGIN(uid=0) login: ROOT LOG........
  • rsync backup entire system properly


    rsync -Phaz --exclude=/dev/* --exclude=/sys/* --exclude=/proc/* --exclude=/mnt/md126 / /mnt/md126........
  • sudo: sorry, you must have a tty to run sudo solution


    ./rsync.sh sudo: sorry, you must have a tty to run sudo rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.7] Solution edit /etc/sudoers #Defaults requiretty........
  • Android how to copy rsync binary to main system for use in shell/ssh


    Install rsync4randroid and in the shell/ssh do this: ln -s /data/data/eu.kowalczuk.rsync4android/files/rsync /system/xbin/rsync........
  • pxe-32 tftp open timeout


    pxe-32 tftp open timeout The solution was to enable tftp in xinetd with "chkconfig tftp on". See the troubleshooting below: chkconfig --list NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off acpid 0:off&n........
  • EXT4-fs error (device md20): ext4_add_entry: bad entry in directory #2552670:


    Jun 12 10:30:53 kernel: [724514.291670] EXT4-fs error (device md20): ext4_add_entry: bad entry in directory #2552670: rec_len % 4 != 0 - offset=216, inode=2553603, rec_len=94, name_len=84 Jun 12 10:30:53 kernel: [724514.292400] EXT4-fs error (device md20): ext4_add_entry: bad entry in directory #2552670: rec_len % 4 != 0 - offset=216, inode=2553603, rec_len=94, name_len=84 This happened when an unprivileged user was backing up a Windows filesystem, once they ha........
  • Howto Copy/Backup/Restore All Firefox Settings/Preferences/Addons/Bookmarks to another computer/desktop


    I've used rsync again for this because I found it very simple, I've only excluded the Cache directory since it's not necessary and could be several GB in size. rsync -Phaz --exclude=Cache/* user@remotehost.com:/home/user/.mozilla/firefox/profile.default/* /home/user/.mozilla/firefox/ec1n9opl.default/ This is a great way once again to get going how you were on the old/remote computer fairly quickly. It even restores all of your history in........
  • Thunderbird How-To Copy/Backup/Restore Accounts and Settings to Another Computer


    The best way is to use rsync, I've set it up so it doesn't copy unnecessary files, or at least ones I'm sure aren't needed. Here is the rsync command Iused (adapt to your specific Thunderbird profile location): rsync -hazv user@remotehost.com:/home/user/.thunderbird/sbrer.default/* /home/user/.thunderbird/4nyb0.default/ --exclude=global* --exclude=Cache --exclude=ImapMail --exclude=Mail This is a great way to get your e-mail accounts going on a new c........
  • 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........
  • diff: memory exhausted


    I don't have a solution other than to use rsync, I used diff on about 1.7TB of data which includes hundreds of thousands if not millions of small files to ensure nothing was missing or corrupt. diff didn't even get past the first large directory without spitting that error out. Keep in mind I used "diff -r" because that means recursive, otherwise it wouldn't compare all files and subdirectories and would be a false way of doing it.........
  • rsync and cp doesn't/won't include .hidden files


    I was shocked that options like preserve and archive made no difference! This is a big deal and will catch people off guard. Rsync include hidden files Solution: You need to use something like: rsync -Pha /source/dir/. /dest/dir *Notice the "." at the end of the source directory. cp -a still ignores them too, the solution is the same: cp -a /source/directory/. /destination........
  • Ubuntu 9.04 Crash


    CPU/Kernel/MB/RAID problem? Jan 5 12:45:05 testbox kernel: [653298.890004] BUG: soft lockup - CPU#0 stuck for 61s! [hal-acl-tool:4168] Jan 5 12:45:05 testbox kernel: [653298.890005] Modules linked in: vmnet vmci vmmon binfmt_misc drbd video output input_polldev ocfs2_stackglue ocfs2_dlmfs ocfs2_dlm ocfs2_nodemanager configfs k8temp hwmon_vid lp snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi........
  • Cygwin and crontab backups via ssh/scp/rsync


    Install the "Editors" and "Net" groups that will give you rsync, ssh, ssh-keygen and cron. The trickiest thing that I keep forgetting about each time is you have to run "cron-config" which adds the cron service to Windows, and without doing that obviously no cron jobs will be run thus making automatic backups impossible. Warning about rsync/cygwin and using the -a archive switch. It's a good thing I caught this because it doesn't work ri........
  • rsync preserve attributes, permissions/ownership and times without being root non-root user


    One of the purposes of rsync is to backup whole filesystems and archive them but how can you do that properly and restore things to normal if all permissions and ownerships are not preserved from your root filesystem? It's not desirable to have everything running as root, especially not just for an rsync. The Easy rsync preserve permission solution for non-root users sudo is the answer and all you have to do is edit /etc/sudoers At the end o........
  • mdadm won't boot due to fsck error


    Nov 29 20:17:58 ubuntu kernel: [ 1157.180789] md: md1 stopped. Nov 29 20:17:58 ubuntu kernel: [ 1157.180829] md0: unknown partition table filesystem not responding/reading properly with du or rsync (this needed an fsck). [ 2571.489217] EXT3-fs error (device md2): ext3_lookup: deleted inode referenced: 35923106 [ 2571.942299] EXT3-fs error (device md2): ext3_lookup: deleted inode referenced: 35923110 [ 2571.9568........
  • Ubuntu 10.04/GRUB2 mdadm won't boot


    Moving to RAID was a pain. What you have to do is the following from an existing install: Install mdadm Create your mdadm RAID 1 array on your spare hard drive. Start it with the missing disk. rsync the entire contents of your current / to the md partition. Here's a good way of doing it: rsync -Pha --exclude=/proc/* --exclude=/sys/* --exclude=/mnt/* /. /mnt/md2........
  • rsync skipping non-regular file


    skipping non-regular file "mnt/lib/udev/devices/console" skipping non-regular file "mnt/lib/udev/devices/kmem" skipping non-regular file "mnt/lib/udev/devices/loop0" skipping non-regular file "mnt/lib/udev/devices/null" skipping non-regular file "mnt/lib/udev/devices/ppp" skipping non-regular file "mnt/lib/udev/devices/net/tu Solution for skipping non-regular file You need the -D........
  • rsync halted froze Out of memory: kill process 7559 (rsync) score 635 or a child Killed process 7559 (rsync)


    Out of memory: kill process 7559 (rsync) score 635 or a child Killed process 7559 (rsync) I was surprised to see this in my dmesg whenmy rsync backup suddenly stalled/stopped. This system has 3 gigs of RAM and lots of free memory so I don't understand what is happening. rsync invoked oom-killer: gfp_mask=0x200d2, order=0, oomkilladj=0 Pid: 7600, comm: rsync Not tainted 2.6.24.2 #83 [] oom_kill_pr........
  • rsync my favorite/best/optimal default switches and options


    Not sure what rsync switches/options to use? rsync -PDrphogtl The short version would be: rsync -Pha I think these are really common sense options to use and probaby should be the default. Explanation of rsync switches P = display the progress D = hybrid of --specials and --devices so all special and device files will be copied as well. r = recursive (otherwise rsync won't copy files deeper than........
  • rsync ERROR: sdb2/backup.r18 failed verification -- update retained.


    ERROR: sdb2/backup.r18 failed verification -- update retained. This happened when Iwas rsyncing a dying hard drive, a lot of people seem to report this as an error with rsync itself but I don't think rsync is the issue at all. I know the source hard drive was bad, it was having all kinds of timeout, seek, hardware ECC recovered and reset errors. The only time something else could be the problem is if the data is being corrupted in transit, perhaps through........
  • Linux EXT3 16GB-17GB maximum filesize issue solved/how to fix


    I have no idea why but mkfs.ext3 defaults to a patheticlly small blocksize of 1024 bytes/1KB (kilobyte). That means the maximum filesize is ONLY 16GB! With 2KB/2048 bytes you get a 256 GB maximum filesize, and with 4KB/4096 bytes you get 2TB! I finally noticed/paid attention to this after realizing that with rsync and scp that no file larger than 17GB could be transferred. I then realized it must be a file size limit on the partition. Here is what tune2fs tol........
  • tar gzip: stdout: File too large - Error Size Limit on Large file > 17GB


    The folder I was trying to archive is about 72GB, but much like rsync at about 17GB it chokes because of the filesize. What's with so many common and essential Linux tools having such limitations? I guess it is likely that the authors never wrote their code with the idea that files would be so large but it's still very annoying. It's important to stay on top of these limitations on production servers because I didn't realize what happened until I checked the file with "........
  • Rsync Timeout/Stall On Large files bigger than 16GB/Cannot Transfer large files with rysnc


    The last transfer I was able to do was 16.77GB according to rsync's output and it worked fine. 16.77G 100% 10.66MB/s 0:25:00 (xfer#17484, to-check=234753/256249) But on a file over 17GB (gigs) it stalls. Trust me, it really is stalled, it's been about 8 hours with no progression from that point for some reason. 17.24G 54% 10.65MB/s 0:22:07........
  • Picking an FTPD (vsftpd) Server in Linux Centos/Debian


    I decided on using yum to help me decide even though I normaly use proftpd I decided to see what else I could find. yum search ftp Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * rpmforge: ftp-stud.fht-esslingen.de * base: mirrors.netdna.com * updates: updates.interworx.info * addons: yum.singlehop.com * extras: mirrors.netdna.com rpmforge........
  • 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........
  • rsync bash script


    rsync bash script [code:1:722d8a25c1]#!/bin/bash # config --------------------------------- # two methods # from = receive data from another server # to = send data to another server rsync_method=from rsync_ip='192.168.5.18' local_dir='/home/backupguy/backups' remote_dir='/home/backup' free_space_bin='/home/backups/freediskspace.sh' # config end ------------------------------ if [ '$rsync_me........
  • Latest Articles

  • 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
  • qemu-system-x86_64: Initialization of device ide-hd failed: Failed to get