Before you can file a motion under §2255, you must be in custody under federal law. A 2254 petition must be filed in the federal district court that has jurisdiction over the county where the conviction occurred.It provides an expeditious remedy for correcting erroneous sentences without resort to habeas corpus. The court must rule on a petition for writ of habeas corpus within 60 days after the petition is filed. This is a California form and can be use in USDC Southern Federal. • Read the entire form before answering any questions. (d) An appeal may be taken to the court of appeals from the order entered on the motion as from a final judgment on application for a writ of habeas corpus. Petitioner, a California state inmate, has filed a petition for writ of habeas corpus challenging his conviction and sentence in state court. Therefore, the appropriate procedure would be to file a motion pursuant to § 2255 and not a habeas petition pursuant to § 2241.