Unable to delete boot environment
I installed SXDE207 into a vmware VM on my laptop. I then upgraded it to 907 using live upgrade:
bash-3.00# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
sxde207 yes no no yes -
sxde907 yes yes yes no -
bash-3.00# I now want to upgrade to 108, but I cannot delete 207:
bash-3.00# ludelete sxde207
The boot environment <sxde207> contains the GRUB menu.
Attempting to relocate the GRUB menu.
ERROR: No suitable candidate slice for GRUB menu on boot disk: </dev/rdsk/c0d0p0>
INFORMATION: You will need to create a new Live Upgrade boot environment on the boot disk to find a new candidate for the GRUB menu.
ERROR: Cannot relocate the GRUB menu in boot environment <sxde207>.
ERROR: Cannot delete boot environment <sxde207>.
Unable to delete boot environment.
bash-3.00# Any idea how to fix this? I cannot just create a new boot environment on disk 0. lucreate throws an error when I try that.
Mark
got same error, trying to delete same solaris update5 version lu partition:
# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
solenv1 yes no no yes -
solenv2 yes yes yes no -
# ludelete solenv1
The boot environment <solenv1> contains the GRUB menu.
Attempting to relocate the GRUB menu.
/usr/sbin/ludelete: lulib_relocate_grub_slice: not found
ERROR: Cannot relocate the GRUB menu in boot environment <solenv1>.
ERROR: Cannot delete boot environment <solenv1>.
Unable to delete boot environment.
Similar Messages
-
Can't delete boot environment --arrghh!
Here's what I'm running:
Solaris 10 10/08 s10s_u6wos_07b SPARC
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 27 October 2008
This install is the default install of Solaris 10 from Sun. I needed diff. partitions so created a flar, then 'reinstalled' using the flar and created desired partition sizes. I don't remember creating any boot environments before doing this but I show to have two:
# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
be0 yes yes yes no -
be3 yes no no yes -
I want to delete be3 but cannot. I got this error first:
# ludelete -f be3
WARNING: Boot environment <be3> has one or more file systems mounted at </var>.
ERROR: The mount point </var> is not a valid ABE mount point (no /etc directory found).
ERROR: The mount point </var> provided by the <-m> option is not a valid ABE mount point.
Usage: lurootspec [-l error_log] [-o outfile] [-m mntpt]
ERROR: Cannot determine root specification for BE <be3>.
Unable to delete boot environment.
However, /var/ is listed in /etc/vstab as mounting to:
/dev/dsk/c1t0d0s3 ufs 12587630592 /var
So I tried to unmount be3:
# luumount -f be3
ERROR: umount: /var/run busy
ERROR: cannot unmount </var/run>
ERROR: failed to unmount </var/run>
ERROR: cannot fully unmount boot environment - <1>: file systems remain mounted
Then I tried to delete again and got slightly different error:
ludelete be3
ERROR: The mount point </.alt.tmp.b-Js.mnt> is not a valid ABE mount point (no /etc directory found).
ERROR: The mount point </.alt.tmp.b-Js.mnt> provided by the <-m> option is not a valid ABE mount point.
Usage: lurootspec [-l error_log] [-o outfile] [-m mntpt]
ERROR: Cannot determine root specification for BE <be3>.
Unable to delete boot environment.
Any idea on what I'm doing wrong? I'm still new when it comes to boot env's. Any help would be great.
Note: I tried leaving be3 alone and create a new env but it seems to want to use be3 for source, even when I use the -s parameter.
Thanks in advance.Ok problem solved -- found a write-up by Bob Netherton that walked through how to fix it. Thanks Bob! :)
Here's the link for anyone with the same problem.
http://blogs.sun.com/bobn/entry/getting_rid_of_pesky_live -
BOBJ is unable to delete file from OFRS
System Info:
Business Objects Enterprise XI3.1 SP3 FP3.2
Windows 2003 Server Enterprise Edition SP3
Oracle 10.2
Java 1.6.0_20
APACHE Tomcat 5.5.20
2 clustered servers
FRS located on SAN Disk Drive connected to primary server (Winchester1)
We use WebIntelligence exclusivly.
We are receiving the following error in our event log on our clustered server:
Source: BusinessObjects_CMS
Category: General
Type: Warning
Event ID: 33018
Computer: Winchester2
Unable to delete file from the file repository. Make sure a File Repository Server is running and registered and enabled. Details : Failed to connect to the File Repository Server output. Make sure the server is up and running.
We have verified the FRS is running and we are able to connect to it from our clustered server (Winchester2). The security settings are set to full control for the admin group and the users have Read/Write access to the file store folders. The errors are filling up our event logs and causing issues with the servers. this appears to be happening each morning and the file it is trying to delete is an .xls file.
We have a ticket open with SAP Support but they are just as baffled as we are and keep sending us from one group to another and tell us they need to look at it on thier end and they will get back to us.
Has anyone had this happen on their system?Hi Richard, did you ever get this issue resolved? We are having a similar issue on XI R3 SP4 using NAS/CIFS shares for our File Stores. We see this issue mainly after our servers are patched and a full environment restart is initiated. Like you, our event logs fill up with so many error messages I cannot pinpoint exactly when the issue starts happening.
Any help would be much appreciated. -
Need Best Practice for creating BE in ZFS boot environment with zones
Good Afternoon -
I have a Sparc system with ZFS Root File System and Zones. I need to create a BE for whenever we do patching or upgrades to the O/S. I have run into issues when testing booting off of the newBE where the zones did not show up. I tried to go back to the original BE by running the luactivate on it and received errors. I did a fresh install of the O/S from cdrom on a ZFS filesystem. Next ran the following commands to create the zones, and then create the BE, then activate it and boot off of it. Please tell me if there are any steps left out or if the sequence was incorrect.
# zfs create o canmount=noauto rpool/ROOT/S10be/zones
# zfs mount rpool/ROOT/S10be/zones
# zfs create o canmount=noauto rpool/ROOT/s10be/zones/z1
# zfs create o canmount=noauto rpool/ROOT/s10be/zones/z2
# zfs mount rpool/ROOT/s10be/zones/z1
# zfs mount rpool/ROOT/s10be/zones/z2
# chmod 700 /zones/z1
# chmod 700 /zones/z2
# zonecfg z z1
Myzone: No such zone configured
Use create to begin configuring a new zone
Zonecfg:myzone> create
Zonecfg:myzone> set zonepath=/zones/z1
Zonecfg:myzone> verify
Zonecfg:myzone> commit
Zonecfg:myzone>exit
# zonecfg z z2
Myzone: No such zone configured
Use create to begin configuring a new zone
Zonecfg:myzone> create
Zonecfg:myzone> set zonepath=/zones/z2
Zonecfg:myzone> verify
Zonecfg:myzone> commit
Zonecfg:myzone>exit
# zoneadm z z1 install
# zoneadm z z2 install
# zlogin C e 9. z1
# zlogin C e 9. z2
Output from zoneadm list -v:
# zoneadm list -v
ID NAME STATUS PATH BRAND IP
0 global running / native shared
2 z1 running /zones/z1 native shared
4 z2 running /zones/z2 native shared
Now for the BE create:
# lucreate n newBE
# zfs list
rpool/ROOT/newBE 349K 56.7G 5.48G /.alt.tmp.b-vEe.mnt <--showed this same type mount for all f/s
# zfs inherit -r mountpoint rpool/ROOT/newBE
# zfs set mountpoint=/ rpool/ROOT/newBE
# zfs inherit -r mountpoint rpool/ROOT/newBE/var
# zfs set mountpoint=/var rpool/ROOT/newBE/var
# zfs inherit -r mountpoint rpool/ROOT/newBE/zones
# zfs set mountpoint=/zones rpool/ROOT/newBE/zones
and did it for the zones too.
When ran the luactivate newBE - it came up with errors, so again changed the mountpoints. Then rebooted.
Once it came up ran the luactivate newBE again and it completed successfully. Ran the lustatus and got:
# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
s10s_u8wos_08a yes yes no no -
newBE yes no yes no -
Ran init 0
ok boot -L
picked item two which was newBE
then boot.
Came up - but df showed no zones, zfs list showed no zones and when cd into /zones nothing there.
Please help!
thanks julieThe issue here is that lucreate add's an entry to the vfstab in newBE for the zfs filesystems of the zones. You need to lumount newBE /mnt then edit /mnt/etc/vfstab and remove the entries for any zfs filesystems. Then if you luumount it you can continue. It's my understanding that this has been reported to Sun, and, the fix is in the next release of Solaris.
-
Lucreate - Cannot make file systems for boot environment
Hello!
I'm trying to use LiveUpgrade to upgrade one "my" Sparc servers from Solaris 10 U5 to Solaris 10 U6. To do that, I first installed the patches listed on [Infodoc 72099|http://sunsolve.sun.com/search/document.do?assetkey=1-9-72099-1] and then installed SUNWlucfg, SUNWlur and SUNWluufrom the S10U6 sparc DVD iso. I then did:
--($ ~)-- time sudo env LC_ALL=C LANG=C PATH=/usr/bin:/bin:/sbin:/usr/sbin:$PATH lucreate -n S10U6_20081207 -m /:/dev/md/dsk/d200:ufs
Discovering physical storage devices
Discovering logical storage devices
Cross referencing storage devices with boot environment configurations
Determining types of file systems supported
Validating file system requests
Preparing logical storage devices
Preparing physical storage devices
Configuring physical storage devices
Configuring logical storage devices
Analyzing system configuration.
Comparing source boot environment <d100> file systems with the file
system(s) you specified for the new boot environment. Determining which
file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Searching /dev for possible boot environment filesystem devices
Updating system configuration files.
The device </dev/dsk/c1t1d0s0> is not a root device for any boot environment; cannot get BE ID.
Creating configuration for boot environment <S10U6_20081207>.
Source boot environment is <d100>.
Creating boot environment <S10U6_20081207>.
Creating file systems on boot environment <S10U6_20081207>.
Creating <ufs> file system for </> in zone <global> on </dev/md/dsk/d200>.
Mounting file systems for boot environment <S10U6_20081207>.
Calculating required sizes of file systems for boot environment <S10U6_20081207>.
ERROR: Cannot make file systems for boot environment <S10U6_20081207>.So the problem is:
ERROR: Cannot make file systems for boot environment <S10U6_20081207>.
Well - why's that?
I can do a "newfs /dev/md/dsk/d200" just fine.
When I try to remove the incomplete S10U6_20081207 BE, I get yet another error :(
/bin/nawk: can't open file /etc/lu/ICF.2
Quellcodezeilennummer 1
Boot environment <S10U6_20081207> deleted.I get this error consistently (I ran the lucreate many times now).
lucreate used to work fine, "once upon a time", when I brought the system from S10U4 to S10U5.
Would anyone maybe have an idea about what's broken there?
--($ ~)-- LC_ALL=C metastat
d200: Mirror
Submirror 0: d20
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 31458321 blocks (15 GB)
d20: Submirror of d200
State: Okay
Size: 31458321 blocks (15 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s0 0 No Okay Yes
d100: Mirror
Submirror 0: d10
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 31458321 blocks (15 GB)
d10: Submirror of d100
State: Okay
Size: 31458321 blocks (15 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s0 0 No Okay Yes
d201: Mirror
Submirror 0: d21
State: Okay
Submirror 1: d11
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 2097414 blocks (1.0 GB)
d21: Submirror of d201
State: Okay
Size: 2097414 blocks (1.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s1 0 No Okay Yes
d11: Submirror of d201
State: Okay
Size: 2097414 blocks (1.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s1 0 No Okay Yes
hsp001: is empty
Device Relocation Information:
Device Reloc Device ID
c1t1d0 Yes id1,sd@THITACHI_DK32EJ-36NC_____434N5641
c1t0d0 Yes id1,sd@SSEAGATE_ST336607LSUN36G_3JA659W600007412LQFN
--($ ~)-- /bin/df -k | grep md
/dev/md/dsk/d100 15490539 10772770 4562864 71% /Thanks,
MichaelHello.
(sys01)root# devfsadm -Cv
(sys01)root# To be on the safe side, I even rebooted after having run devfsadm.
--($ ~)-- sudo env LC_ALL=C LANG=C lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
d100 yes yes yes no -
--($ ~)-- sudo env LC_ALL=C LANG=C lufslist d100
boot environment name: d100
This boot environment is currently active.
This boot environment will be active on next system boot.
Filesystem fstype device size Mounted on Mount Options
/dev/md/dsk/d100 ufs 16106660352 / logging
/dev/md/dsk/d201 swap 1073875968 - -In the rebooted system, I re-did the original lucreate:
<code>--($ ~)-- time sudo env LC_ALL=C LANG=C PATH=/usr/bin:/bin:/sbin:/usr/sbin:$PATH lucreate -n S10U6_20081207 -m /:/dev/md/dsk/d200:ufs</code>
Copying.
*{color:#ff0000}Excellent! It now works!{color}*
Thanks a lot,
Michael -
Unable to connect to environment after migrating Security from BPC 7.5 to BPC 10.1
Hi Experts,
We are working on BPC 7.5 to BPC 10.1 NW migration and after migrating the environment, we are unable to connect to environment.
While trying to access, we are getting the following error:
After taking a backup of the necessary environment in BPC 7.5 NW we are carrying out the 2 steps in the BPC 10.1 NW box:
Step 1 : Tcode UJBR - Restore the environment in BPC 10.1
Results: This is working fine.
Step 2: Program UJT_MIGRATE_75_TO_101 - Running the migration utility in BPC 10.1 to make the objects compatible with BPC.
2.1 Execute without Security Mapping
Results:
This is working fine. We are able to connect to the Environment and access the dimensions and models.
2.2 Execute with only Security Mapping
Results:
After this step, we are not able to access the environments and are getting the Logon error.
cannot get model "" in environment "xxxxxx" from Admin module
The logon attempt failed; contact your administrator.
If you have any options to resolve this error, it would be great.
Else, we will have to re-build the entire security design manually.
Regards,
Sushant PradhanHi Andy,
Thanks for your response. Yes, my id has SAP_ALL authorization.
Still unable to access the environment after migrating security.
To make things less complicated, we went back to BPC 7.5 NW - deleted all unwanted user ids, we kept only 3 user ids. Then, we took backup of application set and restored it in BPC 10.1.
We created a mapping file of those 3 user ids in BPC 10.1 as NW user ids and executed the Migration utility. Again we have same error.
Regards,
Sushant Pradhan. -
Unable to delete the Redolog of Thread 2 in RAC
Hi,
Oracle 10gR2 ( 10.2.0.4), Rac Environment, Instance name orcl1, orcl2
Recently the orcl2 got crashed so we rebuilt the machine and orcl2 node and added the node again back to cluster
There was a failed attempt in DBCA (Addition instance part) where the redolog05 & 06 got created in ASM.
We created instance orcl02 as thread 3 instead of thread 2 and successfully added the node to cluster.
The redolog of thread 2 (redo05, redo06) created due to the failed DBCA add instance activity in unable to delete from the v$log entries.
GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB)
1 1 +ORCLDG3/orcl/redo01.log YES ACTIVE 50
2 1 +ORCLDG3/orcl/redo02.log NO CURRENT 50
5 2 +ORCLDG3/orcl/redo05.log YES UNUSED 50
6 2 +ORCLDG3/orcl/redo06.log NO CURRENT 50
8 3 +ORCLDG3/orcl/redo08.log NO CURRENT 50
9 3 +ORCLDG3/orcl/redo09.log YES INACTIVE 50
When i tried to disable the thread 2 i am getting the below errors, as the redo log 05, 06 are not physically present in the ASM
SQL> alter database disable thread 2;
alter database disable thread 2
ERROR at line 1:
ORA-00313: open failed for members of log group 6 of thread 2
ORA-00312: online log 6 thread 2: '+ORCLDG3/orcl/redo06.log'
ORA-17503: ksfdopn:2 Failed to open file +ORCLDG3/orcl/redo06.log
ORA-15173: entry 'redo06.log' does not exist in directory 'orcl'
Please help in removing the Thread 2 redo log files as this warning are getting written in the alert log every second and fills the mount point.
RegardsThe method suggested in the thread is not working, please find the below errors,
SQL> alter database clear logfile group 5;
SQL> alter database clear logfile group 6;
alter database clear logfile group 6
ERROR at line 1:
ORA-00350: log 6 of instance orcl2 (thread 2) needs to be archived
ORA-00312: online log 6 thread 2: '+orclDG3/orcl/redo06.log'
SQL> alter database drop logfile group 5;
alter database drop logfile group 5
ERROR at line 1:
ORA-01567: dropping log 5 would leave less than 2 log files for instance orcl2 (thread 2)
ORA-00312: online log 5 thread 2: '+orclDG3/orcl/redo05.log'
SQL> alter database drop logfile group 6;
alter database drop logfile group 6
ERROR at line 1:
ORA-01623: log 6 is current log for instance orcl2 (thread 2) - cannot drop
ORA-00312: online log 6 thread 2: '+orclDG3/orcl/redo06.log'
SQL> alter database disable thread 2;
alter database disable thread 2
ERROR at line 1:
ORA-00313: open failed for members of log group 6 of thread 2
ORA-00312: online log 6 thread 2: '+orclDG3/orcl/redo06.log'
ORA-17503: ksfdopn:2 Failed to open file +orclDG3/orcl/redo06.log
ORA-15173: entry 'redo06.log' does not exist in directory 'orcl'
Any ideas, -
Can't sign out of iCloud on Yosemite. Mail was unable to delete 'email'.
I have a MacBook Pro running Yosemite 10.10.1 and I'm trying to log out of my iCloud account, but it won't let me. The error message I keep getting says,
"Mail was unable to delete 'email'. Relaunch Mail then sign out of iCloud again." I get the same message if I try to delete the account from Internet Accounts.
I've tried adding the email account in, but it says it's already there. I've deleted the com.apple.mail folder rebooted and tried and still the same thing.
The supervisor and engineers at Apple phone support have yet to find a solution for this other than wiping my system clean and starting fresh. That's definitely not my preference.
Any help would be much appreciated!
Thanks,
StacyI had the same issue. I rebooted to safe mode by holding the shift key at boot up. From there I went to System Preferences, iCloud, and I was able to finally sign out.
Hope this works for you. -
Unable to delete file from trash because it's "in use" not locked.
I'm unable to delete a file from trash. I keep getting the following message: "The operation can’t be completed because the item is in use." I've confirmed the file isn't locked and I've tried renaming it but still no luck. I'm running OSX 10.8.4. Any thoughts?
Check the 'More Like This' discussions on the right hand column. I suspect you may find the answer there.
Ciao. -
Unable to delete applet.....
Hi all,
I am unable to delete one applet which I have loaded in the card.
There are 2 applets, one is purse and other is loyalty. And am using shareable interface in which loyalty is the server and purse is the client. I can delete the purse applet but i can't delete the loyalty from the card.
Here is my code : There are in all 3 codes, one is purse, second is loyalty code and third is the shareable interface code. Can some one look at the code and tell me what's wrong in this programs.
package com.gemplus.examples.loyalty;
import javacard.framework.*;
import visa.openplatform.*;
public class Loyalty extends javacard.framework.Applet implements TestInterface
static byte points ;
protected Loyalty(byte[] buffer, short offset, byte length)
// data offset is used for application specific parameter.
// initialization with default offset (AID offset).
short dataOffset = offset;
if(length > 9) {
// Install parameter detail. Compliant with OP 2.0.1.
// | size | content
// |------|---------------------------
// | 1 | [AID_Length]
// | 5-16 | [AID_Bytes]
// | 1 | [Privilege_Length]
// | 1-n | [Privilege_Bytes] (normally 1Byte)
// | 1 | [Application_Proprietary_Length]
// | 0-m | [Application_Proprietary_Bytes]
// shift to privilege offset
dataOffset += (short)(1 + buffer[offset]);
// finally shift to Application specific offset
dataOffset += (short)(1 + buffer[dataOffset]);
// checks wrong data length
if(buffer[dataOffset] != 4)
// return received proprietary data length in the reason
ISOException.throwIt((short)(ISO7816.SW_WRONG_LENGTH + offset + length - dataOffset));
// go to proprietary data
dataOffset++;
// points = 0;
// register this instance
register(buffer, (short)(offset + 1), (byte)buffer[offset]);
* Method installing the applet.
* @param bArray the array constaining installation parameters
* @param bOffset the starting offset in bArray
* @param bLength the length in bytes of the data parameter in bArray
public static void install(byte[] bArray, short bOffset, byte bLength) throws ISOException
/* applet instance creation */
new Loyalty (bArray, bOffset, (byte)bLength);
* Select method returning true if applet selection is supported.
* @return boolean status of selection.
public boolean select()
/* return status of selection */
return true;
* Deselect method.
public void deselect()
return;
public void process(APDU apdu) throws ISOException
// check valid Applet state
if(OPSystem.getCardContentState() == OPSystem.APPLET_BLOCKED)
ISOException.throwIt(ISO7816.SW_COMMAND_NOT_ALLOWED);
apdu.setIncomingAndReceive();
byte[] apduBuffer = apdu.getBuffer();
// writes the balance into the APDU buffer after the APDU command part
creditPoints((byte)0x00);
apduBuffer[5] = (byte)(points >> 8) ;
apduBuffer[6] = (byte)points ;
// sends the APDU response
// switches to output mode
apdu.setOutgoing() ;
// 2 bytes to return
apdu.setOutgoingLength((short)2) ;
// offset and length of bytes to return in the APDU buffer
apdu.sendBytes((short)5, (short)2) ;
public void creditPoints(byte pTobeCredited)
points += pTobeCredited;
public Shareable getShareableInterfaceObject(AID client, byte param){
if(param != (byte)0x00)
return null;
return (this);
second code is :
package com.gemplus.examples.oppurse;
* Imported packages
import javacard.framework.*;
import visa.openplatform.*;
import com.gemplus.examples.loyalty.*;
public class OPPurse extends javacard.framework.Applet
// the APDU constants for all the commands.
private final static byte INS_GET_BALANCE = (byte)0x30 ;
private final static byte INS_DEBIT = (byte)0x31 ;
private final static byte INS_CREDIT = (byte)0x32 ;
private final static byte INS_VERIFY_PIN = (byte)0x33 ;
private final static byte INS_SET_NAME = (byte)0x34 ;
private final static byte INS_GET_NAME = (byte)0x35 ;
// the OP/VOP specific instruction set for mutual authentication
private final static byte CLA_INIT_UPDATE = (byte)0x80 ;
private final static byte INS_INIT_UPDATE = (byte)0x50 ;
private final static byte CLA_EXTERNAL_AUTHENTICATE = (byte)0x84 ;
private final static byte INS_EXTERNAL_AUTHENTICATE = (byte)0x82 ;
// the PIN validity flag
private boolean validPIN = false;
// SW bytes for PIN Failed condition
// the last nibble is replaced with the number of remaining tries
private final static short SW_PIN_FAILED = (short)0x63C0;
private final static short SW_FAILED_TO_OBTAIN_SIO = (short)0x63D0;
private final static short SW_LOYALTY_APP_NOT_EXIST = (short)0x63E0;
// the illegal amount value for the exceptions.
private final static short ILLEGAL_AMOUNT = 1;
// the maximum balance in this purse.
private static final short maximumBalance = 10000;
// the current balance in this purse.
private static short balance;
/* byte[] loyaltyAID = new byte[]{ (byte)0xA0,(byte)0x00,(byte)0x00,(byte)0x00,
(byte)0x19,(byte)0xFF,(byte)0x00,(byte)0x00,
(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
(byte)0x00,(byte)0x00,(byte)0x02,(byte)0x02};*/
/* Security part of declarations */
// the Security Object necessary to credit the purse
private ProviderSecurityDomain securityObject = null;
// the security channel number
byte secureChannel = (byte)0xFF;
// the authentication status
private boolean authenticationDone = false;
// the secure channel status
private boolean channelOpened = false;
private byte[] nameBuffer = new byte[6];
* Only this class's install method should create the applet object.
protected OPPurse(byte[] buffer, short offset, byte length)
// data offset is used for application specific parameter.
// initialization with default offset (AID offset).
short dataOffset = offset;
if(length > 9) {
// Install parameter detail. Compliant with OP 2.0.1.
// | size | content
// |------|---------------------------
// | 1 | [AID_Length]
// | 5-16 | [AID_Bytes]
// | 1 | [Privilege_Length]
// | 1-n | [Privilege_Bytes] (normally 1Byte)
// | 1 | [Application_Proprietary_Length]
// | 0-m | [Application_Proprietary_Bytes]
// shift to privilege offset
dataOffset += (short)( 1 + buffer[offset]);
// finally shift to Application specific offset
dataOffset += (short)( 1 + buffer[dataOffset]);
// checks wrong data length
if(buffer[dataOffset] != 2)
// return received proprietary data length in the reason
ISOException.throwIt((short)(ISO7816.SW_WRONG_LENGTH + offset + length - dataOffset));
// go to proprietary data
dataOffset++;
} else {
// Install parameter compliant with OP 2.0.
if(length != 2)
ISOException.throwIt((short)(ISO7816.SW_WRONG_LENGTH + length));
// retreive the balance value from the APDU buffer
short value = (short)(((buffer[(short)(dataOffset + 1)]) & 0xFF)
| ((buffer[dataOffset] & 0xFF) << 8));
// checks initial balance value
if(value > maximumBalance)
ISOException.throwIt(ISO7816.SW_DATA_INVALID);
// initializes the balance with the APDU buffer contents
balance = value;
// register this instance as an installed Applet
register();
// ask the system for the Security Object associated to the Applet
securityObject = OPSystem.getSecurityDomain();
// applet is personalized and its state can change
OPSystem.setCardContentState(OPSystem.APPLET_PERSONALIZED);
// build the new ATR historical bytes
byte[] newATRHistory = new byte[]
// put "OPPurse" in historical bytes.
(byte)0x4F, (byte)0x50, (byte)0x50, (byte)0x75, (byte)0x72, (byte)0x73, (byte)0x65
// !!! ACTIVATED IF INSTALL PRIVILEGE IS "Default Selected" (0x04). !!!
// change the default ATR to a personalized's one
OPSystem.setATRHistBytes(newATRHistory, (short)0, (byte)newATRHistory.length);
* Method installing the applet.
* @param installparam the array constaining installation parameters
* @param offset the starting offset in installparam
* @param length the length in bytes of the data parameter in installparam
public static void install(byte[] installparam, short offset, byte length )
throws ISOException
// applet instance creation with the initial balance
new OPPurse(installparam, offset, length );
* Select method returning true if applet selection is supported.
* @return boolean status of selection.
public boolean select()
validPIN = false;
// reset security if used.
// In case of reset deselect is not called
reset_security();
// return status of selection
return true;
* Deselect method.
public void deselect()
// reset security if used.
reset_security();
return;
* Method processing an incoming APDU.
* @see APDU
* @param apdu the incoming APDU
* @exception ISOException with the response bytes defined by ISO 7816-4
public void process(APDU apdu) throws ISOException
// get the APDU buffer
// the APDU data is available in 'apduBuffer'
byte[] apduBuffer = apdu.getBuffer();
// the "try" is mandatory because the debit method
// can throw a javacard.framework.UserException
try
switch(apduBuffer[ISO7816.OFFSET_INS])
case INS_VERIFY_PIN :
verifyPIN(apdu);
break ;
case INS_GET_BALANCE :
getBalance(apdu) ;
break ;
case INS_DEBIT :
debit(apdu) ;
break ;
case INS_SET_NAME :
setName(apdu);
break;
case INS_GET_NAME :
getName(apdu);
break ;
case INS_CREDIT :
credit(apdu) ;
break ;
case INS_INIT_UPDATE :
if(apduBuffer[ISO7816.OFFSET_CLA] == CLA_INIT_UPDATE)
// call initialize/update security method
init_update(apdu) ;
else
// wrong CLA received
ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
break ;
case INS_EXTERNAL_AUTHENTICATE :
if(apduBuffer[ISO7816.OFFSET_CLA] == CLA_EXTERNAL_AUTHENTICATE)
// call external/authenticate security method
external_authenticate(apdu) ;
else
// wrong CLA received
ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
break ;
case ISO7816.INS_SELECT :
break ;
default :
// The INS code is not supported by the dispatcher
ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED) ;
break ;
} // end of the switch
} // end of the try
catch(UserException e)
// translates the UserException in an ISOException.
if(e.getReason() == ILLEGAL_AMOUNT)
throw new ISOException ( ISO7816.SW_DATA_INVALID ) ;
//- P R I V A T E M E T H O D S -
* Handles Verify Pin APDU.
* @param apdu APDU object
private void verifyPIN(APDU apdu)
// get APDU data
apdu.setIncomingAndReceive();
// get APDU buffer
byte[] apduBuffer = apdu.getBuffer();
// check that the PIN is not blocked
if(OPSystem.getTriesRemaining() == 0)
OPSystem.setCardContentState(OPSystem.APPLET_BLOCKED);
// Pin format for OP specification
// |type(2),length|nible(1),nible(2)|nible(3),nible(4)|...|nible(n-1),nible(n)|
// get Pin length
byte length = (byte)(apduBuffer[ISO7816.OFFSET_LC] & 0x0F);
// pad the PIN ASCII value
for(byte i=length; i<0x0E; i++)
// only low nibble of padding is used
apduBuffer[ISO7816.OFFSET_CDATA + i] = 0x3F;
// fill header TAG
apduBuffer[0] = (byte)((0x02 << 4) | length);
// parse ASCII Pin code
for(byte i=0; i<0x0E; i++)
// fill bytes with ASCII Pin nibbles
if((i & 0x01) == 0)
// high nibble
apduBuffer[(i >> 1)+1] = (byte)((apduBuffer[ISO7816.OFFSET_CDATA + i] & 0x0F) << 4);
else
// low nibble
apduBuffer[(i >> 1)+1] |= (byte)(apduBuffer[ISO7816.OFFSET_CDATA + i] & 0x0F);
// verify the received PIN
// !!! WARNING PIN HAS TO BE INITIALIZED BEFORE USE !!!
if(OPSystem.verifyPin(apdu, (byte)0))
// set PIN validity flag
validPIN = true;
// if applet state is BLOCKED then restore previous state (PERSONALIZED)
if(OPSystem.getCardContentState() == OPSystem.APPLET_BLOCKED)
OPSystem.setCardContentState(OPSystem.APPLET_PERSONALIZED);
return;
// the last nibble of returned code is the number of remaining tries
ISOException.throwIt((short)(SW_PIN_FAILED + OPSystem.getTriesRemaining()));
* Performs the "getBalance" operation on this counter.
* @param apdu The APDU to process.
private void getBalance( APDU apdu )
// check valid Applet state
if(OPSystem.getCardContentState() == OPSystem.APPLET_BLOCKED)
ISOException.throwIt(ISO7816.SW_COMMAND_NOT_ALLOWED);
// get the APDU buffer
byte[] apduBuffer = apdu.getBuffer();
// writes the balance into the APDU buffer after the APDU command part
apduBuffer[5] = (byte)(balance >> 8) ;
apduBuffer[6] = (byte)balance ;
// sends the APDU response
// switches to output mode
apdu.setOutgoing() ;
// 2 bytes to return
apdu.setOutgoingLength((short)2) ;
// offset and length of bytes to return in the APDU buffer
apdu.sendBytes((short)5, (short)2) ;
private void setName(APDU apdu)
// check valid Applet state
if(OPSystem.getCardContentState() == OPSystem.APPLET_BLOCKED)
ISOException.throwIt(ISO7816.SW_COMMAND_NOT_ALLOWED);
// the operation is allowed only if master pin is validated
if(!validPIN)
ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
byte[] apduBuffer = apdu.getBuffer();
apdu.setIncomingAndReceive();
for(short i=0,k=5;i<6;i++,k++)
nameBuffer[i] = apduBuffer[k];
}//end of setName
private void getName(APDU apdu)
// check valid Applet state
if(OPSystem.getCardContentState() == OPSystem.APPLET_BLOCKED)
ISOException.throwIt(ISO7816.SW_COMMAND_NOT_ALLOWED);
byte[] apduBuffer = apdu.getBuffer();
for(short i=5, k=0;i<11;i++,k++)
apduBuffer=nameBuffer[k];
apdu.setOutgoing();
apdu.setOutgoingLength((short)6);
apdu.sendBytes((short)5,(short)6);
}//end of storeName
* Performs the "debit" operation on this counter.
* @param apdu The APDU to process.
* @exception ISOException If the APDU is invalid.
* @exception UserException If the amount to debit is invalid.
private void debit(APDU apdu) throws ISOException, UserException
// check valid Applet state
if(OPSystem.getCardContentState() == OPSystem.APPLET_BLOCKED)
ISOException.throwIt(ISO7816.SW_COMMAND_NOT_ALLOWED);
// the operation is allowed only if master pin is validated
if(!validPIN)
ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
// get the APDU buffer
byte[] apduBuffer = apdu.getBuffer();
// Gets the length of bytes to recieved from the terminal and receives them
// If does not receive 4 bytes throws an ISO.SW_WRONG_LENGTH exception
if(apduBuffer[4] != 2 || apdu.setIncomingAndReceive() != 2)
ISOException.throwIt(ISO7816.SW_WRONG_LENGTH) ;
// Reads the debit amount from the APDU buffer
// Starts at offset 5 in the APDU buffer since the 5 first bytes
// are used by the APDU command part
short amount = (short)(((apduBuffer[6]) & (short)0x000000FF)
| ((apduBuffer[5] << 8 ) & (short)0x0000FF00));
// tests if the debit is valid
if((balance >= amount) && (amount > 0))
// does the debit operation
balance -= amount ;
// writes the new balance into the APDU buffer
// (writes after the debit amount in the APDU buffer)
apduBuffer[7] = (byte)(balance >> 8) ;
apduBuffer[8] = (byte)balance ;
// sends the APDU response
apdu.setOutgoing() ; // Switches to output mode
apdu.setOutgoingLength((short)2) ; // 2 bytes to return
// offset and length of bytes to return in the APDU buffer
apdu.sendBytes((short)7, (short)2) ;
/*short points = 10;
AID loyaltyID = JCSystem.lookupAID(loyaltyAID, (short)0, (byte)loyaltyAID.length);
if(loyaltyID == null)
ISOException.throwIt((short)(SW_LOYALTY_APP_NOT_EXIST));
TestInterface sio = (TestInterface)(JCSystem.getAppletShareableInterfaceObject(loyaltyID, (byte)0x00));
if(sio == null)
ISOException.throwIt((short)(SW_FAILED_TO_OBTAIN_SIO));
sio.creditPoints(points);*/
else
// throw a UserException with illegal amount as reason
throw new UserException(ILLEGAL_AMOUNT) ;
/* byte points = (byte)0x0A;
//short points = 10;
AID loyaltyID = JCSystem.lookupAID(loyaltyAID, (short)0, (byte)loyaltyAID.length);
if(loyaltyID == null)
ISOException.throwIt((short)(SW_LOYALTY_APP_NOT_EXIST));
TestInterface sio = (TestInterface)JCSystem.getAppletShareableInterfaceObject(loyaltyID, (byte)0x00);
if(sio == null)
ISOException.throwIt((short)(SW_FAILED_TO_OBTAIN_SIO));
sio.creditPoints(points);*/
* Performs the "credit" operation on this counter. The operation is allowed only
* if master pin is validated
* @param apdu The APDU to process.
* @exception ISOException If the APDU is invalid or if the amount to credit
* is invalid.
private void credit(APDU apdu) throws ISOException
// check valid Applet state
if(OPSystem.getCardContentState() == OPSystem.APPLET_BLOCKED)
ISOException.throwIt(ISO7816.SW_COMMAND_NOT_ALLOWED);
// the operation is allowed only if master pin is validated and authentication is done
if (!validPIN || !authenticationDone)
ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
// get the APDU buffer
byte[] apduBuffer = apdu.getBuffer();
// gets the length of bytes to recieved from the terminal and receives them
// if does not receive 2 bytes throws an ISO.SW_WRONG_LENGTH exception
if(apduBuffer[4] != 2 || apdu.setIncomingAndReceive() != 2)
throw new ISOException(ISO7816.SW_WRONG_LENGTH) ;
// reads the credit amount from the APDU buffer
// starts at offset 5 in the APDU buffer since the 5 first bytes
// are used by the APDU command part
short amount = (short)(((apduBuffer[6]) & (short)0x000000FF)
| ((apduBuffer[5] << 8) & (short)0x0000FF00));
// tests if the credit is valid
if(((short)(balance + amount) > maximumBalance) || (amount <= (short)0))
throw new ISOException(ISO7816.SW_DATA_INVALID) ;
else
// does the credit operation
balance += amount ;
* Performs the "init_update" security operation.
* @param apdu The APDU to process.
private void init_update( APDU apdu )
// receives data
apdu.setIncomingAndReceive();
// checks for existing active secure channel
if(channelOpened)
// close the openned security channel
try
securityObject.closeSecureChannel(secureChannel);
catch(CardRuntimeException cre2)
// channel number is invalid. this case is ignored
// set the channel flag to close
channelOpened = false;
try
// open a new security channel
secureChannel = securityObject.openSecureChannel(apdu);
// set the channel flag to open
channelOpened = true;
// get expected length
short expected = apdu.setOutgoing();
// send authentication result
// expected length forced to 0x1C
apdu.setOutgoingLength((byte)0x1C);
apdu.sendBytes(ISO7816.OFFSET_CDATA, (byte)0x1c);
catch(CardRuntimeException cre)
// no available channel or APDU is invalid
ISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);
* Performs the "external_authenticate" security operation.
* @param apdu The APDU to process.
private void external_authenticate( APDU apdu )
// receives data
apdu.setIncomingAndReceive();
// checks for existing active secure channel
if(channelOpened)
try
// try to authenticate the client
securityObject.verifyExternalAuthenticate(secureChannel, apdu);
// authentication succeed
authenticationDone = true;
catch(CardRuntimeException cre)
// authentication fails
// set authentication flag to fails
authenticationDone = false;
// close the openned security channel
try {
securityObject.closeSecureChannel(secureChannel);
} catch(CardRuntimeException cre2) {
// channel number is invalid. this case is ignored
// set the channel flag to close
channelOpened = false;
// send authentication result
ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
// send authentication result
ISOException.throwIt(ISO7816.SW_NO_ERROR);
else
ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
* The "reset_security" method close an opened secure channel if exist.
* @return void.
public void reset_security()
// close the secure channel if openned.
if(secureChannel != (byte)0xFF)
try
// close the openned security channel
securityObject.closeSecureChannel(secureChannel);
catch(CardRuntimeException cre2)
// channel number is invalid. this case is ignored
// reset security parameters
secureChannel = (byte)0xFF;
channelOpened = false;
authenticationDone = false;
return;
and the 3rd code is:
package com.gemplus.examples.loyalty;
import javacard.framework.Shareable;
public interface TestInterface extends Shareable
// public void creditPoints(byte points) ;
public void creditPoints(byte points) ;
Thanks in advance......Thanks. I know they are not the same thing. A package cannot be deleted if it contains one or more applets.
I tried to delete by typing in the applet AID first, but it just doesn't work. And of course it doesn't work for package AID.
Both the package and applet AID are generated in JBuilder, which looks like this, package AID(6D 79 70 61 63 6B 61 67 31),
applet AID(6D 79 70 61 63 30 30 30 31),
instance AID(6D 79 70 61 63 30 30 30 31)
I've tried those three AIDs, it's not working.
Thanks. -
Unable to delete Address Book File
I am unable to delete nor copy over an Address Book file that I have on an external HD connected via Airport Extreme. When I connect the HD directly to my Macbook Pro, I am able to delete the file - but not via Airport Extreme. When I attempt to delete the file, I get a message from Trash as follows: The operation cannot be completed because the item "Metadata" is in use. Same message when I attempt to replace the file with a new file. In other words, I am unable to use AE to transfer my Address Book file to my external HD, unless I change the name of the file. What is going on here?
Hello Bob.
You may be having a problem with some Firefox add-on that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?
Whenever you have a problem with Firefox, whatever it is, you should make sure it's not coming from one of your installed add-ons, be it an extension, a theme or a plugin. To do that easily and cleanly, run Firefox in [http://support.mozilla.com/en-US/kb/Safe+Mode safe mode] and select ''Disable all add-ons''. If the problem disappears, you know it's from an add-on. Disable them all in normal mode, and enable them one at a time until you find the source of the problem. See [http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes this article] for information about troubleshooting extensions and theme. You can troubleshoot plugins the same way.
If you want support for one of your add-ons, you'll need to contact its author. -
I'm unable to delete a a file from the filesystem.
String fileName = "dummy.xml"
boolean delete = (new File(fileName)).delete();It's not deleting this file from the filesystem.Can anything else delete that file? Is the fileopen?
I don't know what you mean by can anything else
delete the file.I mean can you delete the file from the command line, a window, whatever. Is it just Java's delete that is having this problem or is it the file system?
No this is not opened/or use.How do you know?
DO I have to specify a path for this. Certainly. How else would Java know which file to delete?
If yes, please read on ........
the path where this xml file resides could by
anywhere in the file system. If it is how do I access
it since there is no specific location (it is left to
the user's choise to save the file anywhere he
wants)Keep the user's choice. -
I am unable to delete the last backup from icloud, i checked my all device setting but it still say "cannot delete icloud this time because it is in use,"Please tell me what should i do
It still didn't work...
Within this commonfiles\apple folder, there is only one folder, labeled "Internet Services." Within this folder, there are 6 folders, labeled:
APLZOD.resources
BookmarkDAV_client.resources
CoreDAV.resources
iCloud.resources
iCloudServices.resources
ShellStreams.resources
Within all but CoreDAV and BookmarkDAV_client, there are multiple different folders, all labeled starting with a two letter (acronym I believe, for different languages) then .lproj (for example, a folder is labeled "ar.lproj".
In each of the folders of APLZOD.resources, there is a file labeled "APLZODlocalized.dll."
In all of the folders containing the multiple .lproj folders, there are likewise "name"localized.dll files contained.
In the BookmarkDAV_client and Core DAV folders, they each contain only one file, "Info.plist"
I attempted to delete all of these files, and still, the FileAssassin could not delete them. I unlocked one of them for instance, and I tried to delete the file myself (thru windows explorer and just clicking delete), and I still had the same issue of coming eventually to the window requesting me to "try again" to have permission.
What can I do?? I'd like to avoid Unlocker, but if it really is a reliable and SAFE program, and someone knows a SAFE place to download it from, I'd appreciate it very much so!!
thanks!! -
Windows Server 2012 R2 RDS: RDS Users are unable to delete files from their desktop
Hello,
We are working with Windows Server 2012 R2 RDS. We also implemented User Profile Disks. This is all working fine without problems. The only issue I have is that normal users are unable to delete files from their desktop. They are getting a message:
you'll need administrator permission to delete this file, with the prompt for administrator access.
They can edit, copy, rename, cut and paste files. But they cannot delete a file from their desktop.
I checked the security permissions of the files on the desktop (for example a normal self-created PDF file) and the users are owner and have "Full Control" over the files.
I checked the file permissions and took a look under "Advanced", selecting the specific domain user and checked the "Advanced Permissions" and the user has the "Delete" option checked. So he should be able to delete the
file.
I am guessing this is UPD related issue, or something in GPO. But I already unlinked the GPO objects, that I felt could be the source of this problem, but without results.
Could someone give me a hint on where to look? It's kinda annoying to users, that they can't delete their own files.Hello Bria,
What you should check first, is the NTFS permissions on the User Profile Disk to begin with. See if the user has full control over the items that are in the UPD.
Also check the GPO's that are enabled for the user and computer account. You can check that by running: gpresult /h <path>\gpresult.html
There are two GPO settings that could prevent the user from deleting his/her own items:
User
Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Explorer\
Hide these specified drives in My Computer
Prevent access to specified drives in My
Computer
There might be other GPO settings, that block deleting items on the UPD, but can't think of any out of my head.
I can only think NTFS and GPO settings that might prevent the user from deleting items. In my case it was a GPO setting, that I didn't suspect. -
Unable to delete songs from my iPad 2
Last night for the first time ever I had problems updating iOs (version 7.0.4) on my iPad 2. I kept getting one of several messages, for example, saying: iTunes has detected an iPad in recovery mode. You must restore this iPad before it can be used with iTunes. I went through the update three times before it finally worked.
Then I found that I had every song that I had ever purchased cluttering up -- and filling up -- my iPad. Although in the past I was able to delete either a single song or an entire album, I am now UNABLE TO DELETE ANY SONG.
I have the iTunes setting on Manual update and have attempted to completely disconnect the disgusting iCloud feature. However, it appears that iCloud is NOT disconnected.
I happily use the iPad 2 ONLY for a very few uses on a daily basis. I wish to control ALL my music from my iMac.
I've been with Apple since 1984, but I'm seriously thinking of ditching this iPad 2 for a Samsung product.
Any assistance will be appreciated.Somehow I got 12 songs on my ipad mini that I could not remove.
I stumbled across a solution. Plug in the ipad and UN-check "sync music" to remove all but the remaining unwanted song. Find the song in your itunes library and right click these unwanted songs and RE-ADD it directly to the ipad.
The ipad should automatically re-check "sync music" and show one song being synced. Now manually UN-check the sync music box again and the warning will come up "are you sure...existing songs...removed". Select remove and click the "apply" button in itunes. Once the changes are applied, you should see the song remove itself from your ipad.
Good luck!
Maybe you are looking for
-
Installation Options for iMovie HD on Snow Leopard system with iLife '09
Greetings and thank-you for contributing suggestions on what is a well worn subject. I have read many of the posts existing on this topic and am trying to nip some details. I have a late 2006 iMac that came with Tiger and iMovie HD which is now at ve
-
Something went wrong PLEASE HELP ME!!!!!!
Yesterday my ipod 30 gig video was working great then today and came and it says when i connect my ipod to my computer it says it itunes that the ipod is corrupted and i need to either re - connect it or restore it so i tried both and then when it wa
-
Time stamp in text conversation? Long convo not updating with time stamp!!
I need my time stamp on each text! Three hours pasted and no time stamp update in text convo!!'??? <Edited by Host>
-
I have a rather specific need. I believe that scripting might lead me to a solution. I need to be able to take an Illustrator file, have the file divided vertically, starting at the lowest point on the page, every 75 mm, then export as a DXF each pa
-
HT1430 I've lost FaceTime on my iPad how do I get it back
I had FaceTime on my iPad 2 but I can't find it, how do I retrieve it