[zfs-discuss] opensolaris 2008.05 boot recovery

2008-05-20 Thread Thomas Maier-Komor
Hi,

I've run into an issue with a test machine that I'm happy to encounter
with this machine, because it is no real trouble. But I'd like to know
the solution for this issue in case I run into it again...

I've installed OpenSolaris 2008.05 on an USB disk on a laptop. After
installing I've modified /etc/passwd from hand: I've added another entry
for the same uid with a different login name and home directory, so that
I can login with a local and an NFS import home directory. Unfortunately
I forgot to update /etc/shadow accordingly, so I ended up, being unable
to login at all, because root is a profile and the newly added account
was before the original account with the same uid. So no login possible
anymore.

Normally, such a situation is not a problem. So I did what I usually
would do and booted from the CD. OK, now I zpool imported rpool,
modified /etc/passwd, and /etc/shadow, exported the pool, and rebooted.

BANG! Now the machine doesn't boot anymore, because during this process
it somehow lost the ramdisk image.

Now my question is: How to I reinstall the boot procedure to the laptop
from the install CD?

I've tried using bootadm with -R and the like but couldn't make any
progress...

Any ideas? Any hint would be highly appreciated...

TIA,
Thomas
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] opensolaris 2008.05 boot recovery

2008-05-20 Thread Rob Logan
  would do and booted from the CD. OK, now I zpool imported rpool,
  modified [], exported the pool, and rebooted.

the oops part is the exported the pool as a reboot after editing
would have worked as expected so rpool wasn't marked as exported

so boot from the cdrom again, zpool import rpool
mount -F zfs rpool/root /mnt
fix /mnt/etc/shadow as before, but then
cp /etc/zfs/zpool.cache /mnt/etc/zfs
/usr/sbin/bootadm update-archive -R /mnt
reboot

Rob

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss