Continuing tale of the Powerserver 320H

From: Pete Turnbull <pete_at_dunnington.u-net.com>
Date: Fri Nov 23 15:28:55 2001

On Nov 23, 14:44, Carlos Murillo wrote:

> #ls
> ls: not found
> #vi
> vi: not found

I'm no AIX expert, and I've not used it in years. I think 3.2 uses shared
libraries, and vi probably needs something in a library that's not mounted
(or not in the right place) when running the limited maintenance shell.
 I'm surprised ls doesn't work, though. The shell should support ls, dd,
backup, restore, chown, mkfs, mknod, mount, and things like that. And of
course, our editor of choice: ed.

> #cat /etc/mnttab

Have a look in /etc/filesystems and see what it thinks it should mount for
"mount all". I think AIX actually deletes /etc/mnttab as part of the
normal startup, and does a "touch /etc/mnttab" to leave an empty file.

> #getrootfs
> usage: /usr/sbin/getrootfs [-f] diskname
> -f disregard status of hd5
> Available disks: location:
> hdisk0 00-01-00-00
>
> #getrootfs -f hdisk0
> Importing Volume Group...
> rootvg
> /dev/rhd4 (/): ** Unmounted cleanly - Check supressed
> /dev/rhd2 (/usr): ** Unmounted cleanly - Check supressed
> /usr/sbin/getrootfs: mount: not found
> checking all mounts and the existance of df
> /usr/sbin/getrootfs: mount: not found
> /usr is not mounted
>
> #ls
> ls: not found
> #mount
> mount: not found
> #umount
> Usage: umount [-sf] {-a|-n Node|-t
Type|all|allr|Device|File|directory|File
> System}
> #
>
> Further investigation revealed that if I "umount /usr", then there is
> some mount executable in the ram disk. Ok, so I make /usr1, copy all
> the stuff in the ramdisk /usr to /usr1 (also in ramdisk) and run
> getrootfs again. Still no luck mounting /usr . So, using the tools
> that I copied into /usr1 I mount /dev/hd4 in /mymnt/hd4 and /dev/hd2
> in /mymnt/hd2 ; further investigation reveals that there indeed exist
> directories /mymnt/hd2/bin, /mymnt/hd2/lib, /mymnt/hd4/etc and so
> on; I seem to have mounted / and /usr from the HD correctly.
> I still cannot use any executables in the HD, though:
>
> #/mymnt/hd2/bin/ls
> killed
>
> typing
> # cat /mymnt/hd4/etc/passwd
>
> reveals that AIX seems to have shadow passwords but I can't find any
> of the usual files (master* etc) .

Possibly in /etc/security/passwd, /etc/security/group, and so on. Don't
believe AIX is UNIX. It's not.

> # passwd
> cannot execute

Probably the executable isn't in your PATH. If you have the filesystems
mounted (BTW, why "mymnt" not just "mnt"? That's what mnt is for) you can
add the relevant directories

PATH=/mymnt/hd2/bin:$PATH

but it might be better (if you just have two partitions on the hard drive)
to mount hd2 directly on /mnt, and then mount hd4 on /mnt/usr. At least
then things will be in the correct places relative to each other. There
isn't a directory called "/root", is there?

You could try the "users" command, though I expect it only works on a
normal system (ie not from the maintenacne shell, which is sort of a mini
system, like the miniroot or standalone shell in IRIX and Solaris). If you
can edit /etc/passwd with ed, you can probably remove the password field
from root's entry, leaving a null field (no password).

-- 
Pete						Peter Turnbull
						Network Manager
						University of York
Received on Fri Nov 23 2001 - 15:28:55 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:34:12 BST