I''ve hit an interesting (not) problem. I need to remove a problematic ld.config file (due to an improper crle...) to boot my laptop. This is OI 151a, but fundamentally this is zfs, so i''m asking here. what I did after booting the live cd and su: mkdir /tmp/disk zpool import -R /tmp/disk -f rpool export shows up in there and rpool also, but in rpool there is only boot and etc. zfs list shows rpool/ROOT/openindiana as mounted on /tmp/disk and I see dump and swap, but no var. rpool/ROOT shows as legacy, so I figured, maybe mount that. mount -F zfs rpool/ROOT /mnt/rpool ls -alR /mnt/rpool shows nothing. How do I access /var on my laptop''s drive? Or as a matter of fact, everything that is in / beside export and boot? thanks, Francois
On Tue, Nov 29, 2011 at 3:01 PM, Francois Dion <francois.dion at gmail.com> wrote:> I''ve hit an interesting (not) problem. I need to remove a problematic > ld.config file (due to an improper crle...) to boot my laptop. This is > OI 151a, but fundamentally this is zfs, so i''m asking here. > > what I did after booting the live cd and su: > mkdir /tmp/disk > zpool import -R /tmp/disk -f rpool > > export shows up in there and rpool also, but in rpool there is only > boot and etc. > > zfs list shows rpool/ROOT/openindiana as mounted on /tmp/disk and I > see dump and swap, but no var. rpool/ROOT shows as legacy, so I > figured, maybe mount that. > > mount -F zfs rpool/ROOT /mnt/rpoolThat dataset (rpool/ROOT) should never have any files in it. It is just a "container" for boot environments. You can see which boot environments exist with: zfs list -r rpool/ROOT If you are running Solaris 11, the boot environment''s root dataset will show a mountpoint property value of /. Assuming it is called "solaris" you can mount it with: zfs mount -o mountpoint=/mnt/rpool rpool/ROOT/solaris If the system is running Solaris 11 (and was not updated from Solaris 11 Express), it will have a separate /var dataset. zfs mount -o mountpoint=/mnt/rpool/var rpool/ROOT/solaris/var -- Mike Gerdts http://mgerdts.blogspot.com/
It is on openindiana 151a, no separate /var as far as But I''ll have to test this on solaris11 too when I get a chance. The problem is that if I zfs mount -o mountpoint=/tmp/rescue (or whatever) rpool/ROOT/openindiana i get a cannot mount /mnt/rpool: directory is not empty. The reason for that is that I had to do a zpool import -R /mnt/rpool rpool (or wherever I mount it it doesnt matter) before I could do a zfs mount, else I dont have access to the rpool zpool for zfs to do its thing. chicken / egg situation? I miss the old fail safe boot menu... On 11/29/11, Mike Gerdts <mgerdts at gmail.com> wrote:> On Tue, Nov 29, 2011 at 3:01 PM, Francois Dion <francois.dion at gmail.com> > wrote: >> I''ve hit an interesting (not) problem. I need to remove a problematic >> ld.config file (due to an improper crle...) to boot my laptop. This is >> OI 151a, but fundamentally this is zfs, so i''m asking here. >> >> what I did after booting the live cd and su: >> mkdir /tmp/disk >> zpool import -R /tmp/disk -f rpool >> >> export shows up in there and rpool also, but in rpool there is only >> boot and etc. >> >> zfs list shows rpool/ROOT/openindiana as mounted on /tmp/disk and I >> see dump and swap, but no var. rpool/ROOT shows as legacy, so I >> figured, maybe mount that. >> >> mount -F zfs rpool/ROOT /mnt/rpool > > That dataset (rpool/ROOT) should never have any files in it. It is > just a "container" for boot environments. You can see which boot > environments exist with: > > zfs list -r rpool/ROOT > > If you are running Solaris 11, the boot environment''s root dataset > will show a mountpoint property value of /. Assuming it is called > "solaris" you can mount it with: > > zfs mount -o mountpoint=/mnt/rpool rpool/ROOT/solaris > > If the system is running Solaris 11 (and was not updated from Solaris > 11 Express), it will have a separate /var dataset. > > zfs mount -o mountpoint=/mnt/rpool/var rpool/ROOT/solaris/var > > -- > Mike Gerdts > http://mgerdts.blogspot.com/ >
On Tue, Nov 29, 2011 at 4:40 PM, Francois Dion <francois.dion at gmail.com> wrote:> It is on openindiana 151a, no separate /var as far as But I''ll have to > test this on solaris11 too when I get a chance. > > The problem is that if I > > zfs mount -o mountpoint=/tmp/rescue (or whatever) rpool/ROOT/openindiana > > i get a cannot mount /mnt/rpool: directory is not empty. > > The reason for that is that I had to do a zpool import -R /mnt/rpool > rpool (or wherever I mount it it doesnt matter) before I could do a > zfs mount, else I dont have access to the rpool zpool for zfs to do > its thing. > > chicken / egg situation? I miss the old fail safe boot menu...You can mount it pretty much anywhere: mkdir /tmp/foo zfs mount -o mountpoint=/tmp/foo ... I''m not sure when the temporary mountpoint option (-o mountpoint=...) came in. If it''s not valid syntax then: mount -F zfs rpool/ROOT/solaris /tmp/foo -- Mike Gerdts http://mgerdts.blogspot.com/
In the end what I needed to do was to set the mountpoint with: zfs set mountpoint=/tmp/rescue rpool/ROOT/openindiana it ended up mounting it in /mnt/rpool/tmp/rescue but still, it gave me the access to var/ld/... and after removing the ld.config, doing a zpool export and reboot, my desktop is back. Thanks for the pointers. "man zfs" did mention mountpoint as a valid option, not sure why it didnt work. as for mount -F zfs... it only works on legacy. On 11/29/11, Mike Gerdts <mgerdts at gmail.com> wrote:> On Tue, Nov 29, 2011 at 4:40 PM, Francois Dion <francois.dion at gmail.com> > wrote: >> It is on openindiana 151a, no separate /var as far as But I''ll have to >> test this on solaris11 too when I get a chance. >> >> The problem is that if I >> >> zfs mount -o mountpoint=/tmp/rescue (or whatever) rpool/ROOT/openindiana >> >> i get a cannot mount /mnt/rpool: directory is not empty. >> >> The reason for that is that I had to do a zpool import -R /mnt/rpool >> rpool (or wherever I mount it it doesnt matter) before I could do a >> zfs mount, else I dont have access to the rpool zpool for zfs to do >> its thing. >> >> chicken / egg situation? I miss the old fail safe boot menu... > > You can mount it pretty much anywhere: > > mkdir /tmp/foo > zfs mount -o mountpoint=/tmp/foo ... > > I''m not sure when the temporary mountpoint option (-o mountpoint=...) > came in. If it''s not valid syntax then: > > mount -F zfs rpool/ROOT/solaris /tmp/foo > > -- > Mike Gerdts > http://mgerdts.blogspot.com/ >
Hi Francois, A similar recovery process in OS11 is to just mount the BE, like this: # beadm mount s11_175 /mnt # ls /mnt/var adm cron inet logadm preserve tmp ai db info mail run tpm apache2 dhcp installadm nfs sadm user audit dt krb5 ntp samba xauth cache fm ld ocm smb yp coherence fps ldap openldap spool cores games lib opt statmon crash idmap log pkg svc # beadm umount /mnt It took me awhile to figure out the revised recovery steps without failsafe mode, but its something like this: 1. Boot single-user mode for some minor recovery, like bad root shell 2. Boot from media and import the root pool to fix boot-related issues 3. Boot from media and mount the BE to fix root password Thanks, Cindy On 11/29/11 16:12, Francois Dion wrote:> In the end what I needed to do was to set the mountpoint with: > > zfs set mountpoint=/tmp/rescue rpool/ROOT/openindiana > > it ended up mounting it in /mnt/rpool/tmp/rescue but still, it gave me > the access to var/ld/... and after removing the ld.config, doing a > zpool export and reboot, my desktop is back. > > Thanks for the pointers. "man zfs" did mention mountpoint as a valid > option, not sure why it didnt work. as for mount -F zfs... it only > works on legacy. > > On 11/29/11, Mike Gerdts<mgerdts at gmail.com> wrote: >> On Tue, Nov 29, 2011 at 4:40 PM, Francois Dion<francois.dion at gmail.com> >> wrote: >>> It is on openindiana 151a, no separate /var as far as But I''ll have to >>> test this on solaris11 too when I get a chance. >>> >>> The problem is that if I >>> >>> zfs mount -o mountpoint=/tmp/rescue (or whatever) rpool/ROOT/openindiana >>> >>> i get a cannot mount /mnt/rpool: directory is not empty. >>> >>> The reason for that is that I had to do a zpool import -R /mnt/rpool >>> rpool (or wherever I mount it it doesnt matter) before I could do a >>> zfs mount, else I dont have access to the rpool zpool for zfs to do >>> its thing. >>> >>> chicken / egg situation? I miss the old fail safe boot menu... >> >> You can mount it pretty much anywhere: >> >> mkdir /tmp/foo >> zfs mount -o mountpoint=/tmp/foo ... >> >> I''m not sure when the temporary mountpoint option (-o mountpoint=...) >> came in. If it''s not valid syntax then: >> >> mount -F zfs rpool/ROOT/solaris /tmp/foo >> >> -- >> Mike Gerdts >> http://mgerdts.blogspot.com/ >> > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss