Migrated Slack 14 installation to new drive now crontab error cant execute binary fil
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Migrated Slack 14 installation to new drive now crontab error cant execute binary fil
Hi all, I just migrated my server to a new larger SATA hard drive and have been working out the permission issues I have run into so far. I found that some permissions did not copy correctly. I fix them as I find them, /var seemed to be the worst, fortunately I have been checking permissions and ownership from my original drive and fixing things as they pop up.
However I am unable to get crontab to run to show me anything. I cant use the list, edit or user flags.
I receive the error at all attempts when trying to run as root:
crontab -u
bash: /usr/bin/crontab: cannot execute binary file
Searching on the web I get tons of information on errors when running a script from within cron but cant seem to find where the permission problem is located. Can anyone point me to where I can find where crontab should run and what permissions I need please?
Hi.
Do you have the commands getfacl and setfacl available to you on both systems ?
If you do you could try transferring permissions via a file.
On the source machine you'd run something like:
Be careful when you do this that your userids and group ids are consistent between the systems.
If you continue to have problems, I think you should run the system copy again, taking care to match the systems more correctly.
Good ways of achieving that are with tar or rsync, and if you can boot the devices externally, clonezilla is an excellent tool.
root@fs:/home/j# uname -a
Linux francis 3.2.29-smp #2 SMP Mon Sep 17 13:16:43 CDT 2012 i686 AMD FX(tm)-8300 Eight-Core Processor AuthenticAMD GNU/Linux
root@fs:/home/j#
I do have the getfacl/setfacl command and I'm checking into it now. For my situation where my initial root source disc is mounted at /sdb1 I assume it would be
getfacl -R /sdb1 > getfacl.info.from.sdb1
setfacl --restore getfacl.info.from.sdb1 (current root drive is the understood as the target?)
Thanks for the help Didier Spaier and niallb! I love reading these forums helps me learn so much more.
Cheers!
I do have the getfacl/setfacl command and I'm checking into it now. For my situation where my initial root source disc is mounted at /sdb1 I assume it would be
getfacl -R /sdb1 > getfacl.info.from.sdb1
setfacl --restore getfacl.info.from.sdb1 (current root drive is the understood as the target?)
Thanks for the help Didier Spaier and niallb! I love reading these forums helps me learn so much more.
Cheers!
That should be right from that location. Just make sure you 'cd /' before you restore and be in the sdb1 directory when you you run the getfacl.
cd /sdb1 ; getfacl -R . >getfacl.info.from.sdb1
That should give you the easiest file to work with.
If both drives are in the same box, rsync might originally have been an easier way to copy the filesystem,
but copying the facl should solve most of your problems.
Good luck!
You could copy over the working crontab binary into your /usr/bin directory, though I'd really be looking at rebuilding the whole system in light of it not transferring properly.
When you ran 'file' on crontab earlier for Didier, it would have told you then if it identified it as a 32bit or 64bit binary, but it just listed it as 'data'.
This suggests the file was corrupted in some way.
If it was a 64bit binary, the description would read more like this: /usr/bin/crontab: setgid ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26
So, as stat gives an output similar to yours, I assume that the reason this file be not considered as executable by the file utility is that it is not for your system's Arch.
Thanks for the help guys. I have copied over the working crontab file from the old backup directory and it is working correctly. Not sure why the copy failed but I used the cp -r -d I believe I did try it a few times. I was having difficulties after upgrading my 10+ motherboard/cpu with a newer setup to accept the new 1T SATA drive. I was moving from a small PATA IDE drive and it took a while to get the drives to play happily together.
As I have read perhaps using the dd command or the tar command would have been a better approach to migrate to the new drive.
Again thanks for all the help. Everything seems to be functioning and playing well together at this time but when I find things being weird it becomes an opportunity to learn more. I do this for my own fun and experience and not for any production value.
Cheers to all!
John
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.