Minn. Stat. § 589.04
A petition for a writ of habeas corpus must contain information set forth in paragraphs (a) to (e):
(e) If the confinement or restraint is under warrant, order, or process, the petitioner shall attach a copy of the document authorizing the confinement or restraint to the petition. The petitioner shall also attach copies of all papers which are attached to or accompany the warrant, order, or process to the petition. If the confinement results from conviction of a crime and sentence, the petitioner shall include a transcript of the proceedings taken at the time of arraignment and sentence in the court which imposed the sentence. If the petitioner is unable to attach the documents required by this paragraph, the petitioner shall state the reasons for not doing so. Documentation is not required when:
(f) If the imprisonment is alleged to be illegal, the petition shall state in what the illegality consists.
If the imprisonment which is claimed to be illegal is under a district court judgment or sentence, the judge before whom the petition is pending may examine the official files and records of the court issuing the warrant of commitment, including any official transcript of the proceedings taken at the time of the arraignment and sentence. A judge before whom a petition is pending may take judicial notice of official records or transcripts to determine the sufficiency of the petition or the propriety of issuing the writ of habeas corpus.