Trouble mounting root as executable!?

Trouble mounting root as executable!?

Post by Alan » Fri, 13 Nov 1998 04:00:00



Path: cnn.Princeton.EDU!usenet
Lines: 23


NNTP-Posting-Host: alanho.student.princeton.edu
X-Newsreader: Gnus v5.5/Emacs 20.2
Xref: cnn.Princeton.EDU comp.os.linux.setup:219838

I'm having a problem executing programs from a mounted partition. In
particular, when I boot the computer (PC/linux) from a rescue disk and mount
the partition:  

/> mount -t ext2 -o exec /dev/hda2 /mnt

and then try to run a program from the mounted partition, for example:

/> /mnt/sbin/lilo -r /mnt
sh: /mnt/sbin/lilo: No such file or directory

The file seems un-executable! And yet the file exists:

/> ls /mnt/sbin/lilo
/mnt/sbin/lilo

It appears I'm not able to execute _any_ program from the mounted
partition. Why not? Isn't the -o exec flag in the mount command supposed to
allow execution?

Thanks,
Alan

 
 
 

Trouble mounting root as executable!?

Post by Dave Schen » Mon, 16 Nov 1998 04:00:00


:
: Path: cnn.Princeton.EDU!usenet
: Lines: 23


: NNTP-Posting-Host: alanho.student.princeton.edu
: X-Newsreader: Gnus v5.5/Emacs 20.2
: Xref: cnn.Princeton.EDU comp.os.linux.setup:219838
:
: I'm having a problem executing programs from a mounted partition. In
: particular, when I boot the computer (PC/linux) from a rescue disk and mount
: the partition:  
:
: /> mount -t ext2 -o exec /dev/hda2 /mnt
:
: and then try to run a program from the mounted partition, for example:
:
: /> /mnt/sbin/lilo -r /mnt
: sh: /mnt/sbin/lilo: No such file or directory
:
: The file seems un-executable! And yet the file exists:
:
: /> ls /mnt/sbin/lilo
: /mnt/sbin/lilo
:
: It appears I'm not able to execute _any_ program from the mounted
: partition. Why not? Isn't the -o exec flag in the mount command supposed to
: allow execution?
:
: Thanks,
: Alan
:

It is indeed executing, or attempting to; but lilo is a dynamic binary,
not static. So it can't find its required libraries. (Which are now in
/mnt/lib, probably, as opposed to /lib.) You could try running ldd on lilo
to see what it requires, and symlink or copy them into /lib (or /usr/lib,
as the case may be.)

--Dave
--

Getting my valid email address is a two step process.
First, delete spamtrap.  Second, replace newsuser with shodan.

 
 
 

1. remote mounted /usr/dt does not give root executable permission

I have remote-mounted the /usr partition of a server to set up a
dataless client. The mount is read-only. Unfortunately, several files
in /usr/dt will not execute under root if their permissions are
-r-xr--r--. They will run as root only if I use... -r-xr-xr-x.

Is there a better way around this. I don't really want to make dtlogin
executable by anyone.

Regards,
Victor

2. SUSE6.0 @ Pcmcia modem

3. Root is mounted -- how how you mount root to another drive?

4. Changing NE2000 defult irq for installation

5. mount error: mount only root can mount /dev/cdrom on cdrom

6. [I need some nice tutorial for the IEEE1394 device driver]

7. how to unlock my mounted partition?

8. Trouble with /etc/rc.d/rc.sysinit root mount

9. Trouble creating zdisk, "unable to mount root"

10. Trouble mounting NFS root filesystem

11. trouble, root mounted read-only

12. trouble mounting ext2 as root