Charles Rodney Lovett, a federal prisoner, appeals the district court’s dismissal without prejudice of his pro se petition for writ of habeas corpus, pursuant to 28 U.S.C. § 2241. The district court did not err in dismissing Lovett’s petition without prejudice because Lovett failed to meet his burden of showing that a 28 U.S.C. § 2255 motion was an ineffective remedy. Accordingly, we AFFIRM.
I. BACKGROUND
In February 2006, Lovett pled guilty to possession of a firearm by a convicted felon, in violation of 18 U.S.C. §§ 922(g)(1) and 924(e). The district court sentenced him to 180 months of imprisonment, followed by 60 months of supervised release. Lovett did not appeal.
In April 2009, the district court docketed Lovett’s instant pro se motion, entitled “Verified Petition for Writ of Habeas Corpus Filed Pursuant to the 1940th Edition of 28 U.S.C. § 451 Et Seq.” Rl-1 In his petition, Lovett argued that 18 U.S.C. § 3231, 28 U.S.C. § 2241, and 28 U.S.C. § 2255 were unconstitutional because they were not properly enacted. Id. at 4-15, 17-25. Accordingly, he claimed that his conviction and incarceration were illegal and unconstitutional because the district court never had jurisdiction over him. Id. at 17. He also claimed that, because the district court did not have subject-matter jurisdiction pursuant to § 2241 or § 2255, he had the right to raise his habeas corpus petition under 28 U.S.C. § 451. Id. Lovett also challenged the constitutionality of his conviction, arguing that 18 U.S.C. §§ 922(g) and 924 did not apply to him because, as he had never registered the *76firearm he possessed, and that he had not consented to be subject to federal firearms restrictions. Id. at 25-27. Lovett further claimed that 18 U.S.C. § 922(g) was unconstitutional because it was not within Congress’s authority under the Commerce Clause. Id. at 28-30. Finally, Lovett argued that the government and the district court committed fraud by indicting and convicting him under unconstitutional statutes, and thus his indictment and conviction were null and void. Id. at 31-37. He sought to have his convictions vacated and to be released from prison immediately. Id. at 38.
The district court dismissed Lovett’s petition without prejudice, (1) construing it as a petition filed pursuant to 28 U.S.C. § 2241; but (2) finding that Lovett was challenging the validity of his sentence rather than the means of its execution; and (3) noting that the primary means of collaterally attacking a federal conviction and sentence was through a motion pursuant to 28 U.S.C. § 2255. Rl-3. Lovett filed this appeal. Rl-5.
II. DISCUSSION
Lovett first reargues the merits of his original petition. Lovett points out that since jurisdictional claims cannot be waived, forfeited, time barred, or procedurally defaulted, the district court had the obligation to address the merits of his jurisdictional claims. He argues that, pursuant to Clisby v. Jones, 960 F.2d 925 (11th Cir.1992), and the Due Process Clause, the district court was obligated to address all the claims raised in his habeas petition regardless of whether habeas relief was granted or denied.
“When reviewing the district court’s denial of a habeas petition, we review questions of law and mixed questions of law and fact de novo, and findings of fact for clear error.” Nyland v. Moore, 216 F.3d 1264, 1266 (11th Cir.2000) (per curiam). Ordinarily, a defendant may only pursue a collateral attack on the validity of his federal conviction or sentence pursuant to a motion filed under 28 U.S.C. § 2255. See Sawyer v. Holder, 326 F.3d 1363, 1365 (11th Cir.2003). However, on rare occasions, it is possible for federal prisoners to attack their convictions and sentences through § 2241 if the petitioner establishes that the remedy under § 2255 is inadequate or ineffective. 28 U.S.C. § 2255(e); McGhee v. Hanberry, 604 F.2d 9, 10 (5th Cir.1979). “The burden of coming forward with evidence affirmatively showing the inadequacy or ineffectiveness of the § 2255 remedy rests with the petitioner.” McGhee, 604 F.2d at 10. We have articulated a three-prong test to determine whether § 2255 is inadequate or ineffective to test the legality of a prisoner’s detention. According to that test, a prisoner must show
1) that [the] claim is based upon a retroactively applicable Supreme Court decision; 2) the holding of that Supreme Court decision establishes the petitioner was convicted for a nonexistent offense; and, 3) circuit law squarely foreclosed such a claim at the time it otherwise should have been raised in the petitioner’s trial, appeal, or first § 2255 motion.
Wofford v. Scott, 177 F.3d 1236, 1244 (11th Cir.1999).
Federal courts may recharacterize a pro se litigant’s motion “in order to avoid an unnecessary dismissal, to avoid inappropriately stringent application of formal labeling requirements, or to create a better correspondence between the substance of a pro se motion’s claim and its underlying legal basis.” See Castro v. United States, 540 U.S. 375, 381-82, 124 S.Ct. 786, 791-92, 157 L.Ed.2d 778 (2003) (internal citations omitted). However, when a district court recharacterizes a motion as a first *77§ 2255 motion, it must “provide the litigant an opportunity to withdraw the motion or to amend it so that it contains all the § 2255 claims he believes he has.” Id. at 383, 124 S.Ct. at 792.
In Clisby, we expressed concern over the number of habeas cases we were forced to remand for consideration of issues the district court did not resolve and instructed district courts to resolve all claims presented in a habeas petition, regardless of whether they granted or denied relief. Clisby, 960 F.2d at 935-36; see also Rhode v. United States, 583 F.3d 1289, 1291 (11th Cir.2009) (per curiam) (holding that Clisby applies to federal prisoners). Clisby was not decided in the context of a petition that was dismissed without examination of the merits but in the context of a petition where the merits were addressed, but the district court failed to discuss all the issues presented. Clisby, 960 F.2d at 936.
As initial matters, first, Lovett’s argument that due process and Clisby require the district court to address all of his claims fails because the district court did not address any of Lovett’s claims but instead dismissed his motion because it should have been filed pursuant to § 2255. R1-3; Clisby, 960 F.2d at 935-36. Second, the government’s claim that the district court did not err because, if it had recharacterized Lovett’s motion as a § 2255 it would have been time-barred, is not relevant because, regardless of whether a § 2255 motion is timely, when a district court recharacterizes a motion as a first § 2255, it first is required to give the defendant certain warnings and the opportunity to add claims and arguments, including those applicable to the timeliness of a § 2255 motion. See Castro, 540 U.S. at 383, 124 S.Ct. at 792.
In the instant case, the district court exercised its discretion to recharac-terize Lovett’s petition for habeas corpus, purported to be filed pursuant to 28 U.S.C. § 451, as a 28 U.S.C. § 2241 petition. See Castro, 540 U.S. at 381, 124 S.Ct at 791. The district court then did not err in dismissing Lovett’s petition without prejudice because Lovett did not meet the burden of showing that § 2255 was an ineffective remedy as he did not allege that his claims were based on a retroactively applicable Supreme Court decision, that a Supreme Court decision made his offense nonexistent, and that circuit law formerly foreclosed his claims. See Wofford, 177 F.3d at 1244; McGhee, 604 F.2d at 10.
III. CONCLUSION
Because Lovett failed to satisfy his burden of demonstrating that a motion pursuant to 28 U.S.C. § 2255 would be an ineffective remedy, the district court did not err in dismissing his petition for 28 U.S.C. § 2241 relief. Accordingly, we AFFIRM.