[OpenIndiana-discuss] Edit file in /etc/ from InstallCD
Jim Klimov
jimklimov at cos.ru
Tue Aug 13 22:45:28 UTC 2013
On 2013-08-14 00:30, Harry Putnam wrote:
>
> Harry wrote:
>>> Anyway, what do I have to do to get to those files in /etc now that
>>> the OS will not boot?
>
> Lucas Van Tol <catseyev9 at hotmail.com> replied:
>
>> Can you
>> zpool import -R /realroot rpool
>> to import the rpool under /realroot ? You might also have to mount
>> the filesystems after that , or create the directory before hand.
>
> Thanks for the input.
> I guess you are talking about having booted from install media?
>
> Before I do irreparable damage:
> Is "realroot" supposed to be a disc name like: c4d0 with the solaris
> partition s0, like c4d0s0?
No, this is an "alternate root" - a path prepended to all automatically
mounted datasets from rpool, so that they do not conflict with paths
that already exist on your system (from LiveCD). Disk names should not
be needed as ZFS should find the pools (at least, on those HBAs/disk
controllers for which the Live media has drivers).
When the pool is imported, you can try "zfs mount -a" to mount all of
the datasets marked for auto-mounting. It is possible, however, that
your rootfs dataset would not mount because the mount-point for it is
not empty.
In this case you can "zpool export rpool" and reimport it without auto
mounting, and then mount the rootfs into the alternate root, and then
other datasets if you need them:
# zpool import -N -R /realroot rpool
# zfs list -r rpool/ROOT
...
rpool/ROOT/oi_151a7
...
# zpool get bootfs rpool
NAME PROPERTY VALUE SOURCE
rpool bootfs rpool/ROOT/oi_151a7 local
If this is your rootfs which you want (or maybe you want an alternate
BE instead), mount what you need:
# zfs mount rpool/ROOT/oi_151a7
or if it is marked "legacy" and has no path in "mountpoint" attribute:
# mount -F zfs rpool/ROOT/oi_151a7 /realroot
HTH,
//Jim
More information about the OpenIndiana-discuss
mailing list