Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Redhat / Fedora Linux Help > /mnt/sysimage/bin/bash: cannot execute file
 Redhat / Fedora Linux Help   Help and discussion related to Redhat and Fedora Linux.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 10-15-2008   #1 (permalink)
Just Joined!
 
Join Date: Oct 2008
Posts: 1
/mnt/sysimage/bin/bash: cannot execute file

I am virtualizing some machines from Dell 2950s running RHEL5 to ESX 3 using my own script running on Kanotix (a Knoppix 64-bit variant).

I have a script that builds and copies the data, but I need to rebuild the kernel due to device changes.

chroot /mnt/sysimage/root/mkinitrd fails. It is an edited copy of mkinitrd. In attempting to debug this problem, I find that chroot /mnt/sysimage fails also.

I do the following:
vgscan --mknodes
vgchange -ay
lvscan
mkdir /mnt/sysimage
mount /dev/VG00/LVroot /mnt/sysimage
mkdir /mnt/sysimage
mount /dev/VG00/LVroot /mnt/sysimage
mount -o remount,dev,exec,data=ordered /dev/VG00/LVroot /mnt/sysimage
mount -o exec,data=ordered /dev/sda1 /mnt/sysimage/boot
mount -o exec,data=ordered /dev/VG00/LVtmp /mnt/sysimage/tmp
mount -o exec,data=ordered /dev/VG00/LVusr /mnt/sysimage/usr
mount -o exec,data=ordered /dev/VG00/LVvar /mnt/sysimage/var
mount -o exec,data=ordered /dev/VG00/LVopt /mnt/sysimage/opt
mount -o exec,data=ordered /dev/VG00/LVoradata /mnt/sysimage/oradata
mount --bind /proc /mnt/sysimage/proc
mount --bind /sys /mnt/sysimage/sys
mount --bind /dev /mnt/sysimage/dev
mount --bind /dev/pts /mnt/sysimage/dev/pts

and then
chroot /mnt/sysimage

this gives
chroot: cannot run command `/bin/bash': Exec format error

also
/mnt/sysimage/bin/bash gives the message
chroot: cannot run command `/bin/bash': Exec format error

uname -a on the real machine gives
Linux hart-a725.ccci.org 2.6.9-67.0.7.ELsmp #1 SMP Wed Feb 27 04:47:23 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

uname -a on the Kanotix guest gives
Linux Kanotix 2.6.24-3-kanotix #1 SMP Mon Dec 31 17:27:37 UTC 2007 i686 GNU/Linux

file /mnt/sysimage/bin/bash gives
/mnt/sysimage/bin/bash: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), for GNU/Linux 2.4.0, stripped

and for reference,
file /bin/bash gives
/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), for GNU/Linux 2.4.1, stripped

the pertinent section of mount shows
/dev/mapper/VG00-LVroot on /mnt/sysimage type ext3 (rw,data=ordered)
/dev/sda1 on /mnt/sysimage/boot type ext3 (rw,data=ordered)
/dev/mapper/VG00-LVtmp on /mnt/sysimage/tmp type ext3 (rw,data=ordered)
/dev/mapper/VG00-LVusr on /mnt/sysimage/usr type ext3 (rw,data=ordered)
/dev/mapper/VG00-LVvar on /mnt/sysimage/var type ext3 (rw,data=ordered)
/dev/mapper/VG00-LVopt on /mnt/sysimage/opt type ext3 (rw,data=ordered)
/dev/mapper/VG00-LVoradata on /mnt/sysimage/oradata type ext3 (rw,data=ordered)
/proc on /mnt/sysimage/proc type none (rw,bind)
/sys on /mnt/sysimage/sys type none (rw,bind)
/dev on /mnt/sysimage/dev type none (rw,bind)
/dev/pts on /mnt/sysimage/dev/pts type none (rw,bind)

ls -al /mnt/sysimage/bin/bash gives
-rwxr-xr-x 1 root root 772880 2007-07-20 06:39 /mnt/sysimage/bin/bash



I have tried all kinds of things to get this to work. I've used a couple of other Knoppix64- and Knoppix-type distros. I've done all kinds of Google searches. Somehow I'm guessing these just won't run the bash off of the target sysem due to architecture differences.

Any suggestions?
ccrusader is offline  

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Free Network Mapping Tool for Microsoft® Office Visio® Professional 2007 Users
Don't map your network by hand – let LANsurveyor Express for Microsoft Visio Professional 2007 automatically create network diagrams for you.
subscribe
Free eBook:"Vulnerability Management for Dummies"
Get all the Facts and See How to Implement a Successful Vulnerability Management Program.
subscribe
Google vs The World: The Battle of the Message Security Vendors
With such a powerful name behind it, Google Message Security stands out in a sea of products that do exactly the same thing - or so they say.
subscribe

Safe, Secure Backup


All times are GMT. The time now is 10:01 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2