Project

General

Profile

Actions

Bug #5906

open

beadm destroy fails when running from live image

Added by Dan Vatca over 8 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2015-05-04
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

When running from a live image (i.e. there is no current running boot environment), beadm will fail with "No such BE." when trying to destroy any boot environment.
Steps to reproduce:
  1. Boot from live (or installer) image
  2. zpool import rpool
  3. beadm list (will show BEs from the imported rpool)
  4. cat /rpool/boot/grub/menu.lst (the boot menu file is present)
  5. beadm destroy bename (will not be able to destroy be)

Sample session:

root@unknown:~# zpool list
no pools available
root@unknown:~# beadm list
No boot environments found on this system.
root@unknown:~# zpool import rpool
root@unknown:~# beadm list
BE              Active Mountpoint Space Policy Created
unknown-test      R      -          2.72G static 2015-04-15 06:27
unknown   -      -          38.5M static 2015-04-15 04:09
unknown-1 -      -          3.76G static 2015-04-15 04:20
root@unknown:~# cat /rpool/boot/grub/menu.lst
default 2
timeout 30
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title Example (unknown)
findroot (pool_rpool,0,a)
bootfs rpool/ROOT/unknown
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive
#---------------------END BOOTADM--------------------
# Unknown partition of type 0 found on /dev/rdsk/c2t0d0p0 partition: 1
# It maps to the GRUB device: (hd0,0) .
# Unknown partition of type 0 found on /dev/rdsk/c2t0d0p0 partition: 2
# It maps to the GRUB device: (hd0,1) .
# Unknown partition of type 0 found on /dev/rdsk/c2t0d0p0 partition: 3
# It maps to the GRUB device: (hd0,2) .
# Unknown partition of type 0 found on /dev/rdsk/c2t0d0p0 partition: 4
# It maps to the GRUB device: (hd0,3) .
title Example (unknown-1)
findroot (pool_rpool,0,a)
bootfs rpool/ROOT/unknown-1
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive
#============ End of LIBBE entry =============
title Example (unknown-test)
findroot (pool_rpool,0,a)
bootfs rpool/ROOT/unknown-test
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive
#============ End of LIBBE entry =============
root@unknown:~# beadm destroy unknown-1
Are you sure you want to destroy unknown-1?
This action cannot be undone (y/[n]): y
Unable to destroy unknown-1.
No such BE.
root@unknown:~#

No data to display

Actions

Also available in: Atom PDF