[ug-bosug] Mounting a Solaris partition
Pavan T C
Pavan.Chandrashekar at Sun.COM
Mon Jun 5 21:57:07 PDT 2006
Sriram Narayanan wrote:
> Hi all:
>
> My friend Sandeep (whom I've CC'd on this mail, and who'll be joining
> BoSUG soon) has a problem. At his office, they have an x86 box
> containing Sun One, and the person who'd configured the root password
> has left. He needs to reset that password (and I can vouch for him,
> he's a sysadmin I've known for years :) ).
>
> Here's what I told him.
> 1. Download Belenix
> 2. Use fdisk to find the root partition.
> fdisk -l /dev/rdsk/c0d0p0
There is no "fdisk -l" in solaris. You just have to do fdisk <raw device>.
AFAIK, Belenix would already have mounted the solaris partition (I'm not
sure about the mount point, though). You can check the system log, or
just use "mount" to see the mounted partitions.
> Mostly the partition would be /dev/rdsk/c0d0s2
> 3. Mount the partition at /mnt/s2
> mount /dev/rdsk/c0d0s2 /mnt/s2
/dev/rdsk/cNdNs2 is the device node that represents the entire solaris
partition (even though the nomenclature has 's' in it, which stands for
slice. Actually, it *is* a slice which spans the entire partition) You
would not find a filesystem on this straight away. You would need to
figure out which of the slices in this partition has the root file
system and then mount *that* slice as ufs.
To verify, try fstyp /dev/rdsk/c0d0s2, and see if you get a sensible output.
So, one of the cNdNs[1,3,4,5,6,7] would be the potential root slices.
Once you have mounted the root slice, you can try the different ways
mentioned in the thread to change the root password.
Pavan
> 4. Edit /mnt/s2/etc/shadow and knock off the entry for root
> 5. Reboot the box off the hard disk, and log on as root without having
> to enter any password.
>
> Questions:
> 1. Are the instructions given above correct ?
> 2. Does he need to provide an argument to the mount command for the
> file system type ?
>
> -- Sriram
> _______________________________________________
> ug-bosug mailing list
> List-Unsubscribe: mailto:ug-bosug-unsubscribe at opensolaris.org
> List-Owner: mailto:ug-bosug-owner at opensolaris.org
> List-Archives: http://www.opensolaris.org/jive/forum.jspa?forumID=54
More information about the ug-bosug
mailing list