
413 P.2d 451 (1966)
Dale J. BURGE, Petitioner-Appellant,
v.
The STATE of Idaho, Defendant-Respondent.
No. 9762.
Supreme Court of Idaho.
April 19, 1966.
*452 Louis H. Cosho, court appointed, Boise, for appellant.
Allan G. Shepard, Atty. Gen., and William D. Collins, Asst. Atty. Gen., Boise, for respondent.
SPEAR, Justice.
Appellant, Dale J. Burge, a prisoner at the Idaho State Penitentiary, filed a petition for writ of habeas corpus. The petition was denied without hearing by the trial court, and from that order petitioner appealed.
Burge personally prepared his petition and notice of appeal, setting forth the facts and arguments of law he thought applied. On appeal he is represented by counsel who submitted a brief on his behalf. The grounds for the petition are threefold, and consist of, (1) cruel and unusual punishment, (2) illegal search and seizure, and (3) duress. Appellant contends that the court erred in not granting the writ on all or one of the three grounds alleged and that in any event it should have been granted when all are considered together.
First, petitioner, it is claimed, was subjected to cruel and unusual punishment in that while imprisoned at the Idaho State Penitentiary he was deprived of water, either for drinking or for washing purposes, for a period of more than twelve hours; that he was twice denied medicine or proper treatment when suffering physically, and that after 4 o'clock p. m. he was unable to obtain medicine or treatment; that he was furnished shoes that fit improperly and are without arch supports which are necessary for him; that he has been denied such basic necessities as proper bedding, mattresses, sheets, pillowcases, and was, in fact, furnished only dirty wool blankets, and that as a result thereof he suffers backaches, leg aches, and other incidental discomfort; that he was allowed to shave only once every two weeks; that he and other prisoners were subjected to loud and incessant noise from two loudspeakers which had been turned on to a very high volume, such noise lasting from 4:15 o'clock p. m. until 8 o'clock p. m., on August 16, 1965, and resultant therefrom he suffered unendurable nervous and emotional stress and was unable to hear properly for approximately two hours; and that although he is twenty-one years of age he has been denied the use of tobacco.
Appellant concedes, through his court appointed attorney, that the supervision and maintenance of prisons is a function of the executive branch of the government, and that in the State of Idaho the State Board of Corrections is the body which has been expressly granted the control, Idaho Constitution, Art. X, Sec. 5; I.C. § 20-209; and that the courts do not have jurisdiction to supervise matters of *453 ordinary prison discipline. Idaho Constitution, Art. II, Sec. 1. Appellant contends, however, that when the facts alleged go beyond mere prison discipline, a writ of habeas corpus can be granted, for the courts will protect prisoners from cruel and unusual punishments. Idaho Constitution, Art. I, Sec. 6; Mahaffey v. State, 87 Idaho 228, 392 P.2d 279. Since the punishment was not a part of the sentence, Burge could not have appealed and was left remediless unless habeas corpus would issue. (There is no claim that the sentence imposed amounted to cruel and unusual punishment.)
In his petition appellant admits that he was in maximum security and in his oral argument before the court appellant's counsel advised the court that Burge had been in maximum security because of an attempted escape. Under these conditions we are constrained to the view that the conditions about which petitioner complained are well within the bounds of proper disciplinary measures taken by the prison authorities against a recalcitrant prisoner. The lower court was correct in concluding that the petition did not allege sufficient facts to constitute cruel and inhuman punishment, protection from which is afforded by the provisions of the Idaho Constitution.
The second ground for the writ is based upon alleged unlawful arrest and illegal search and seizure. Unlawful arrest cannot be successfully raised by habeas corpus by a defendant in Idaho even in the trial court. In re Moyer, 12 Idaho 250, 85 P. 897, 12 L.R.A.,N.S., 227, aff'd 203 U.S. 221, 27 S.Ct. 121, 51 L.Ed. 160; Ex Parte Olsen, 74 Idaho 400, 263 P.2d 388; State v. Stewart, 87 Idaho 210, 392 P.2d 180. Once the court has jurisdiction, it is immaterial how it was obtained. Obviously it cannot be raised by habeas corpus in this court. Concerning the alleged illegal search and seizure, petitioner should have raised this question either by motion to suppress the evidence prior to trial, or by standing trial and raising proper objection to the introduction of any evidence obtained by such illegal search and seizure. To adverse rulings in the trial court petitioner could have appealed. Instead petitioner entered a plea of guilty without raising the question in any manner in the trial court. In any event habeas corpus cannot be resorted to as a substitute for an appeal. Mahaffey v. State, 87 Idaho 233, 392 P.2d 423; Stokes v. State, 90 Idaho ___, 411 P.2d 392.
The third ground relied upon by petitioner is that he was subjected by the authorities to duress and coercion causing him to involuntarily, and contrary to his will, plead guilty to the charge upon which plea he was sentenced, committed, and is now imprisoned. In his petition appellant contends he was told that if he did not plead guilty but was subsequently found guilty he would be charged under the habitual criminal act; and, moreover, certain of his friends would be arrested and prosecuted on charges which were ill-founded if he did not plead guilty. He alleges these threats were instituted by the prosecuting attorney but admits they were conveyed to him by some other person who had no official status or connection with the court or with law enforcement agencies. He also alleges that the attorney representing him at the trial or hearing in the trial court advised him the above-mentioned threats would likely be carried out. The lower tribunal which originally heard and denied petitioner's writ of habeas corpus pointed out that petitioner was represented by an attorney in the proceeding before the trial court wherein the plea of guilty was entered and held it must be presumed that the attorney advised petitioner of his constitutional rights and did not permit petitioner to waive any objections which could validly have been made at the time of his arrest, plea of guilty, and sentencing. The trial court made no error in so holding.
Where the petitioner has been represented by counsel in the original proceeding, he must make a much stronger showing than the facts here alleged to warrant granting a writ of habeas corpus. The reasoning adopted by the supreme court of Kansas in Hartman v. Edmondson, 178 Kan. *454 164, 283 P.2d 397 (1955), is sound and applicable here. The court there held:
"The second and final material claim advanced by petitioner, that he was threatened, coerced, mistreated and intimidated by prosecuting officials, is supported only by his own uncorroborated statements to that effect. Moreover the record discloses his plea of guilty was entered at the time when he had been fully advised by the court as to his rights and was represented by counsel, with whom he had previously been given every opportunity to confer and advise. * * * This court has long been committed to the rule that the unsupported and uncorroborated statements of the petitioner in a habeas corpus proceeding do not sustain the burden of proof or justify the granting of a writ where  as here  the judgment rendered is regular on its face and hence entitled to a presumption of regularity and validity."
It must be presumed, unless there is an affirmative showing to the contrary in addition to the uncorroborated allegations of the petitioner, that counsel has consulted with his client and has in good faith advised him of his rights. State ex rel. Alm v. Tahash, 261 Minn. 242, 111 N.W.2d 458 (1961); Dexter v. Crouse, 192 Kan. 151, 386 P.2d 263 (1963); Jones v. State, 142 Mont. 619, 386 P.2d 74 (1963).
The lower tribunal committed no error and the order denying the petition is affirmed.
McFADDEN, C. J., and McQUADE, TAYLOR and SMITH, JJ., concur.
