[OpenIndiana-discuss] livecd zpool import -fR /a xpool but no files

Harry Putnam reader at newsguy.com
Sun Nov 28 15:20:33 UTC 2010


Calum Mackay <calum.mackay at cdmnet.org> writes:

> On 27/11/10 22:14, Calum Mackay wrote:
>> If not, I got it to work here, something like this:
>
> Mind you, the above may not be wise: if you import your real rpool
> into the livecd, that may end up leaving the rpool in a state where it
> won't look right to the "real" environment... [i.e. previously used on
> a different system]
>
> So I'd test it on a disposable system before you do it for real...

Thanks.

This is a test system, and installed from the very livecd I'm hoping
to rescue it with.

Oh, your formula did work here too.  I was leaving out the final
`mount' and still expecting to see files.... gack.

>	zpool import -f -R /a rpool newrpool

>	zfs set mountpoint=/b newrpool/ROOT/openindiana

>	zfs mount newrpool/ROOT/openindiana

Yup, that formula works.

Although I will add that apparently A zpool seen by livecd is
apparently labeled xpool by default.

  Using live-cd build 147: `zpool import'

Will report seeing `xpool' with some long ID number.

If your warnings about changing files and later having the rpool give
problems when booted under the `real' environment are true then it
seems a bit weird that one can find so many references to rescuing a
system with the live-cd.

  `Can the live-cd actually be used in that way safely?'

That is something I'd really like to know... if you cannot change
anything for fear of later having troubles, how is a rescue to be done?

In this case, the system to be rescued was recently installed from
that very live-cd, so maybe that would lesson the likelyhood of
problems? 

Thanks for you input... I will know shortly, I hope, what the outcome is.

-----     --------     -----      --=--      -----     -------     -----
What follows is a report of troubles apparently arising from importing
rpool, just as you warned.  A sorry tail of woe   .....

No real harm has been done since it is a test system, only a fair bit
of time lost.
-----     --------     -----      --=--      -----     -------     -----

Well it was not good.

(Preface with saying this is a virutal system running thru vbox, host
is windows 7)

I wanted to edit out something I had added to /etc/profile that I
suspect caused the OS not to work properly.

I suspected it was from my edit in /etc/profile which was the last
thing I remembered doing that changed any files.

After initial install from live-cd b 147 and after setting up the home
directories of user and root, I noticed that opening an xterm always
opened in / (root) instead of $HOME for $USER.

I checked that the $HOME envo variable was known... when a fresh xterm
was opened and it was,  echo $HOME showed the expected output.

I could not figure out why then, the xterms always were in `/' when
opened.  Perhaps `/home' was not mounted... but it was I could see:
and navigate to /export/home/myuser

I edited /etc/profile to tell any logging in user to cd to $HOME but also
added an echo, hoping it would show in the opened xterm so I'd know
that /etc/profile was getting read.

Something like:

  echo "/etc/profile was read"
  cd $HOME

in /etc/profile.

And it seemed to work so far as causing a fresh xterm to open on $HOME
rather than `/'.

All hunky dory until I rebooted.  I don't recall now what happened
exactly but it would not boot.

So naturally I figured my edit in /etc/profile was the problem.  I
suspected having output from /etc/profile was upsetting something.

-----     --------     -----      --=--      -----     -------     -----

I rebooted with livecd , imported and mounted what had been rpool with
the forumula posted in this thread, edited etc/profile and rebooted.

Now I get only a grub prompt... no OS login.

OK, I thought OOOPS I probably should have exported the renamed rpool
back out as rpool.

OK, rebooted with livecd, imported what was now seen as `newpool' and
exported it as rpool.... rebooted.

Still I only get to a grub prompt.  No OS login.

I've forgotten the incantations for grub to get booted but anyway what
has happened?  How to understand what is going on?

In fact is there a path to resuce by using the livecd at all, or have
I just left out important steps?






More information about the OpenIndiana-discuss mailing list