Re: RHEL 7 problems.

Andrew Simpson <[email protected]> Wed, 8 Jun 2016 10:20:20 -0400
Newsgroups gmane.linux.redhat.kickstart.general
Message-ID <CAFzrdOwAHvuyPno_TqxK6R8-2F4gdHbEn61jV8t7xVL=xHjUzA@mail.gmail.com>
--===============0598030073544023350==
Content-Type: multipart/alternative; boundary=001a1142326c6c0a250534c50121

--001a1142326c6c0a250534c50121
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

yeah... that one bit me for almost a day lol.  It was buried in the RHEL 7
documentation somewhere.  I think if you tried to use something other than
hd:LABEL for the inst.stage2 option, you might not have to worry about it.

Andrew Simpson

On Wed, Jun 8, 2016 at 10:05 AM, C. Petro <[email protected]> wrote:

> Bravo sir. That did it.
>
>
> On Wed, Jun 8, 2016 at 6:18 AM, Andrew Simpson <[email protected]>
> wrote:
> > the  volume name in your mkisofs command (=E2=80=94V option)  must matc=
h the
> LABEL
> > value in the isolinux.cfg file exactly....  minus the x20 used for
> spaces.
> >
> > yours don't match :
> >
> > -V
> > 'Red Hat Enterprise Linux 7.2'
> >
> > hd:LABEL=3DRHEL-7.2\x20Server.x86_64
> >
> > On Jun 8, 2016 2:28 AM, "C. Petro" <[email protected]> wrote:
> >>
> >> I'm reasonably experienced in doing RHEL 5 and 6 kickstarts, but this
> >> is my first pass at building a custom install CD for RHEL 7.
> >>
> >> I'm working from the RHEL 7.2 sources (meaning not Centos). I used thi=
s:
> >>
> >>
> http://www.smorgasbork.com/2012/01/04/building-a-custom-centos-7-kickstar=
t-disc-part-1/
> >> as my "checklist" for the most part, with some of this:
> >> https://highon.coffee/blog/security-harden-centos-7/
> >>
> >> My kickstart config looks like:
> >> #version=3DRHEL7
> >>
> >> install
> >> text
> >> # System authorization information
> >> auth --enableshadow --passalgo=3Dsha512
> >>
> >> # Use CDROM installation media
> >> cdrom
> >> # Accept EULA
> >> eula --agreed
> >>
> >> services --enabled=3DNetworkManager,sshd
> >> reboot
> >>
> >> # Run the Setup Agent on first boot
> >> #firstboot --enable
> >> ignoredisk --only-use=3Dsda
> >> # Keyboard layouts
> >> keyboard --vckeymap=3Dus --xlayouts=3D'us'
> >> # System language
> >> lang en_US.UTF-8
> >> # SELinux
> >> selinux --permissive
> >> # Network information
> >> network  --bootproto=3Ddhcp --device=3Deno16777736 --onboot=3Don --ipv=
6=3Doff
> >> network  --hostname=3Ddefault-vm
> >> # Root password
> >> # Fix for deploy rootpw --iscrypted HASHGOESHERE
> >> rootpw HASHGOESHERE
> >> # System timezone
> >> timezone  --isUtc --ntpservers=3Dprime.transformers
> >> # System bootloader configuration
> >> bootloader --location=3Dmbr --boot-drive=3Dsda
> >> # Partition clearing information
> >> clearpart --all --drives=3Dsda
> >> ignoredisk --only-use=3Dsda
> >>
> >> skipx
> >>
> >> # Some local users:
> >> user --name=3D"ortep.sirhc" --is-crypted
> >>
> >>
> --password=3D"$6$VHzvqK35oIsfbcgn$pyOvmSm8Y1BnYUKaaSeggHb4a3zwm3U5FTbP9g2=
cMQccruhF6.JswWYvYlsRjgOLAyE1DfPUjUD1iAh7yzY2e1"
> >>
> >> # LVM
> >>
> >> # Disk partitioning information
> >> # part pv.18 --fstype=3D"lvmpv" --ondisk=3Dsda --size=3D8004
> >> part pv.11 --fstype=3D"lvmpv" --ondisk=3Dsda --size=3D16008
> >> part /boot --fstype=3D"ext4" --ondisk=3Dsda --size=3D1000
> >> #volgroup lg_data --pesize=3D4096 pv.18
> >> volgroup lg_os --pesize=3D4096 pv.11
> >> logvol /  --fstype=3D"xfs" --size=3D4000 --name=3Dlv_root --vgname=3Dl=
g_os
> >> logvol /home  --fstype=3D"xfs" --size=3D2000 --name=3Dlv_home --vgname=
=3Dlg_os
> >> logvol /tmp  --fstype=3D"xfs" --size=3D1000 --name=3Dlv_tmp --vgname=
=3Dlg_os
> >> logvol /var  --fstype=3D"xfs" --size=3D2000 --name=3Dlv_var --vgname=
=3Dlg_os
> >> logvol /var/tmp  --fstype=3D"xfs" --size=3D1000 --name=3Dlv_var_tmp
> >> --vgname=3Dlg_os
> >> logvol /var/log  --fstype=3D"xfs" --size=3D1500 --name=3Dlv_var_log
> >> --vgname=3Dlg_os
> >> logvol /var/log/audit  --fstype=3D"xfs" --size=3D500
> >> --name=3Dlv_var_log_audit --vgname=3Dlg_os
> >> logvol swap  --fstype=3D"swap" --size=3D1000 --name=3Dlv_swap --vgname=
=3Dlg_data
> >>
> >> %addon org_fedora_oscap
> >>   content-type =3D scap-security-guide
> >>   profile =3D pci-dss
> >> %end
> >>
> >> %packages
> >> @core
> >> vim-minimal
> >> vim-common
> >> aide
> >> ntp
> >> ntpdate
> >> openscap
> >> openscap-scanner
> >> scap-security-guides
> >> authconfig
> >> chrony
> >> firewalld
> >> grub2
> >> %end
> >>
> >>
> >>
> >> %post
> >> %end
> >>
> >>
> >> In isolinux.cfg I have:
> >>
> >> ...
> >> menu tabmsg Press Tab for full configuration options on menu items.
> >>
> >> menu separator # insert an empty line
> >> menu separator # insert an empty line
> >>
> >> label Basic KS
> >>   menu label ^Kickstart
> >>   menu default
> >>   kernel vmlinuz
> >>   append initrd=3Dinitrd.img
> >> inst.stage2=3Dhd:LABEL=3DRHEL-7.2\x20Server.x86_64
> >> inst.ks=3Dcdrom:/dev/cdrom:/ks/base_ks.cfg
> >> menu separator # insert an empty line
> >> ...
> >>
> >>
> >> grub.conf is:
> >> #debug --graphics
> >> default=3D1
> >> splashimage=3D@SPLASHPATH@
> >> timeout 60
> >> hiddenmenu
> >> title Install Red Hat Enterprise Linux 7.2
> >>         findiso
> >>         kernel @KERNELPATH@ @ROOT@
> >>         initrd @INITRDPATH@
> >> title Test this media & install Red Hat Enterprise Linux 7.2
> >>         findiso
> >>         kernel @KERNELPATH@ @ROOT@ rd.live.check quiet
> >>         initrd @INITRDPATH@
> >>
> >>
> >> Which gets displayed, and then will start Linux.
> >>
> >> I am testing on VMware Workstation 12 Player.
> >>
> >> However I get stuck at:
> >>
> >> [        23.820146] work still pending
> >>
> >> (and yes, I know the 23..... is not all that relevant)
> >>
> >> the line to generate the ISO is:
> >>  mkisofs -o custom.iso -b isolinux.bin -c boot.cat -no-emul-boot   -V
> >> 'Red Hat Enterprise Linux 7.2'   -boot-load-size 4 -boot-info-table -R
> >> -J -v -T isolinux/
> >>
> >>
> >> There used to be a way to view the virtual terminals (alt-F whatever)
> >> but apparently that's gone away.
> >>
> >> Any ideas on what I'm missing here?
> >>
> >> _______________________________________________
> >> Kickstart-list mailing list
> >> [email protected]
> >> https://www.redhat.com/mailman/listinfo/kickstart-list
> >
> >
> > _______________________________________________
> > Kickstart-list mailing list
> > [email protected]
> > https://www.redhat.com/mailman/listinfo/kickstart-list
>
> _______________________________________________
> Kickstart-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/kickstart-list
>

--001a1142326c6c0a250534c50121
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">yeah... that one bit me for almost a day lol.=C2=A0 It was=
 buried in the RHEL 7 documentation somewhere.=C2=A0 I think if you tried t=
o use something other than hd:LABEL for the inst.stage2 option, you might n=
ot have to worry about it.</div><div class=3D"gmail_extra"><br clear=3D"all=
"><div><div class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><d=
iv dir=3D"ltr">Andrew Simpson</div></div></div>
<br><div class=3D"gmail_quote">On Wed, Jun 8, 2016 at 10:05 AM, C. Petro <s=
pan dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">pe=
[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Bravo=
 sir. That did it.<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
<br>
On Wed, Jun 8, 2016 at 6:18 AM, Andrew Simpson &lt;<a href=3D"mailto:simpso=
[email protected]">[email protected]</a>&gt; wrote:<br>
&gt; the=C2=A0 volume name in your mkisofs command (=E2=80=94V option)=C2=
=A0 must match the LABEL<br>
&gt; value in the isolinux.cfg file exactly....=C2=A0 minus the x20 used fo=
r spaces.<br>
&gt;<br>
&gt; yours don&#39;t match :<br>
&gt;<br>
&gt; -V<br>
&gt; &#39;Red Hat Enterprise Linux 7.2&#39;<br>
&gt;<br>
&gt; hd:LABEL=3DRHEL-7.2\x20Server.x86_64<br>
&gt;<br>
&gt; On Jun 8, 2016 2:28 AM, &quot;C. Petro&quot; &lt;<a href=3D"mailto:pet=
[email protected]">[email protected]</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m reasonably experienced in doing RHEL 5 and 6 kickstarts, b=
ut this<br>
&gt;&gt; is my first pass at building a custom install CD for RHEL 7.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m working from the RHEL 7.2 sources (meaning not Centos). I =
used this:<br>
&gt;&gt;<br>
&gt;&gt; <a href=3D"http://www.smorgasbork.com/2012/01/04/building-a-custom=
-centos-7-kickstart-disc-part-1/" target=3D"_blank" rel=3D"noreferrer">http=
://www.smorgasbork.com/2012/01/04/building-a-custom-centos-7-kickstart-disc=
-part-1/</a><br>
&gt;&gt; as my &quot;checklist&quot; for the most part, with some of this:<=
br>
&gt;&gt; <a href=3D"https://highon.coffee/blog/security-harden-centos-7/" t=
arget=3D"_blank" rel=3D"noreferrer">https://highon.coffee/blog/security-har=
den-centos-7/</a><br>
&gt;&gt;<br>
&gt;&gt; My kickstart config looks like:<br>
&gt;&gt; #version=3DRHEL7<br>
&gt;&gt;<br>
&gt;&gt; install<br>
&gt;&gt; text<br>
&gt;&gt; # System authorization information<br>
&gt;&gt; auth --enableshadow --passalgo=3Dsha512<br>
&gt;&gt;<br>
&gt;&gt; # Use CDROM installation media<br>
&gt;&gt; cdrom<br>
&gt;&gt; # Accept EULA<br>
&gt;&gt; eula --agreed<br>
&gt;&gt;<br>
&gt;&gt; services --enabled=3DNetworkManager,sshd<br>
&gt;&gt; reboot<br>
&gt;&gt;<br>
&gt;&gt; # Run the Setup Agent on first boot<br>
&gt;&gt; #firstboot --enable<br>
&gt;&gt; ignoredisk --only-use=3Dsda<br>
&gt;&gt; # Keyboard layouts<br>
&gt;&gt; keyboard --vckeymap=3Dus --xlayouts=3D&#39;us&#39;<br>
&gt;&gt; # System language<br>
&gt;&gt; lang en_US.UTF-8<br>
&gt;&gt; # SELinux<br>
&gt;&gt; selinux --permissive<br>
&gt;&gt; # Network information<br>
&gt;&gt; network=C2=A0 --bootproto=3Ddhcp --device=3Deno16777736 --onboot=
=3Don --ipv6=3Doff<br>
&gt;&gt; network=C2=A0 --hostname=3Ddefault-vm<br>
&gt;&gt; # Root password<br>
&gt;&gt; # Fix for deploy rootpw --iscrypted HASHGOESHERE<br>
&gt;&gt; rootpw HASHGOESHERE<br>
&gt;&gt; # System timezone<br>
&gt;&gt; timezone=C2=A0 --isUtc --ntpservers=3Dprime.transformers<br>
&gt;&gt; # System bootloader configuration<br>
&gt;&gt; bootloader --location=3Dmbr --boot-drive=3Dsda<br>
&gt;&gt; # Partition clearing information<br>
&gt;&gt; clearpart --all --drives=3Dsda<br>
&gt;&gt; ignoredisk --only-use=3Dsda<br>
&gt;&gt;<br>
&gt;&gt; skipx<br>
&gt;&gt;<br>
&gt;&gt; # Some local users:<br>
&gt;&gt; user --name=3D&quot;ortep.sirhc&quot; --is-crypted<br>
&gt;&gt;<br>
&gt;&gt; --password=3D&quot;$6$VHzvqK35oIsfbcgn$pyOvmSm8Y1BnYUKaaSeggHb4a3z=
wm3U5FTbP9g2cMQccruhF6.JswWYvYlsRjgOLAyE1DfPUjUD1iAh7yzY2e1&quot;<br>
&gt;&gt;<br>
&gt;&gt; # LVM<br>
&gt;&gt;<br>
&gt;&gt; # Disk partitioning information<br>
&gt;&gt; # part pv.18 --fstype=3D&quot;lvmpv&quot; --ondisk=3Dsda --size=3D=
8004<br>
&gt;&gt; part pv.11 --fstype=3D&quot;lvmpv&quot; --ondisk=3Dsda --size=3D16=
008<br>
&gt;&gt; part /boot --fstype=3D&quot;ext4&quot; --ondisk=3Dsda --size=3D100=
0<br>
&gt;&gt; #volgroup lg_data --pesize=3D4096 pv.18<br>
&gt;&gt; volgroup lg_os --pesize=3D4096 pv.11<br>
&gt;&gt; logvol /=C2=A0 --fstype=3D&quot;xfs&quot; --size=3D4000 --name=3Dl=
v_root --vgname=3Dlg_os<br>
&gt;&gt; logvol /home=C2=A0 --fstype=3D&quot;xfs&quot; --size=3D2000 --name=
=3Dlv_home --vgname=3Dlg_os<br>
&gt;&gt; logvol /tmp=C2=A0 --fstype=3D&quot;xfs&quot; --size=3D1000 --name=
=3Dlv_tmp --vgname=3Dlg_os<br>
&gt;&gt; logvol /var=C2=A0 --fstype=3D&quot;xfs&quot; --size=3D2000 --name=
=3Dlv_var --vgname=3Dlg_os<br>
&gt;&gt; logvol /var/tmp=C2=A0 --fstype=3D&quot;xfs&quot; --size=3D1000 --n=
ame=3Dlv_var_tmp<br>
&gt;&gt; --vgname=3Dlg_os<br>
&gt;&gt; logvol /var/log=C2=A0 --fstype=3D&quot;xfs&quot; --size=3D1500 --n=
ame=3Dlv_var_log<br>
&gt;&gt; --vgname=3Dlg_os<br>
&gt;&gt; logvol /var/log/audit=C2=A0 --fstype=3D&quot;xfs&quot; --size=3D50=
0<br>
&gt;&gt; --name=3Dlv_var_log_audit --vgname=3Dlg_os<br>
&gt;&gt; logvol swap=C2=A0 --fstype=3D&quot;swap&quot; --size=3D1000 --name=
=3Dlv_swap --vgname=3Dlg_data<br>
&gt;&gt;<br>
&gt;&gt; %addon org_fedora_oscap<br>
&gt;&gt;=C2=A0 =C2=A0content-type =3D scap-security-guide<br>
&gt;&gt;=C2=A0 =C2=A0profile =3D pci-dss<br>
&gt;&gt; %end<br>
&gt;&gt;<br>
&gt;&gt; %packages<br>
&gt;&gt; @core<br>
&gt;&gt; vim-minimal<br>
&gt;&gt; vim-common<br>
&gt;&gt; aide<br>
&gt;&gt; ntp<br>
&gt;&gt; ntpdate<br>
&gt;&gt; openscap<br>
&gt;&gt; openscap-scanner<br>
&gt;&gt; scap-security-guides<br>
&gt;&gt; authconfig<br>
&gt;&gt; chrony<br>
&gt;&gt; firewalld<br>
&gt;&gt; grub2<br>
&gt;&gt; %end<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; %post<br>
&gt;&gt; %end<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; In isolinux.cfg I have:<br>
&gt;&gt;<br>
&gt;&gt; ...<br>
&gt;&gt; menu tabmsg Press Tab for full configuration options on menu items=
.<br>
&gt;&gt;<br>
&gt;&gt; menu separator # insert an empty line<br>
&gt;&gt; menu separator # insert an empty line<br>
&gt;&gt;<br>
&gt;&gt; label Basic KS<br>
&gt;&gt;=C2=A0 =C2=A0menu label ^Kickstart<br>
&gt;&gt;=C2=A0 =C2=A0menu default<br>
&gt;&gt;=C2=A0 =C2=A0kernel vmlinuz<br>
&gt;&gt;=C2=A0 =C2=A0append initrd=3Dinitrd.img<br>
&gt;&gt; inst.stage2=3Dhd:LABEL=3DRHEL-7.2\x20Server.x86_64<br>
&gt;&gt; inst.ks=3Dcdrom:/dev/cdrom:/ks/base_ks.cfg<br>
&gt;&gt; menu separator # insert an empty line<br>
&gt;&gt; ...<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; grub.conf is:<br>
&gt;&gt; #debug --graphics<br>
&gt;&gt; default=3D1<br>
&gt;&gt; splashimage=3D@SPLASHPATH@<br>
&gt;&gt; timeout 60<br>
&gt;&gt; hiddenmenu<br>
&gt;&gt; title Install Red Hat Enterprise Linux 7.2<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0findiso<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kernel @KERNELPATH@ @ROOT@<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0initrd @INITRDPATH@<br>
&gt;&gt; title Test this media &amp; install Red Hat Enterprise Linux 7.2<b=
r>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0findiso<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kernel @KERNELPATH@ @ROOT@ rd.liv=
e.check quiet<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0initrd @INITRDPATH@<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Which gets displayed, and then will start Linux.<br>
&gt;&gt;<br>
&gt;&gt; I am testing on VMware Workstation 12 Player.<br>
&gt;&gt;<br>
&gt;&gt; However I get stuck at:<br>
&gt;&gt;<br>
&gt;&gt; [=C2=A0 =C2=A0 =C2=A0 =C2=A0 23.820146] work still pending<br>
&gt;&gt;<br>
&gt;&gt; (and yes, I know the 23..... is not all that relevant)<br>
&gt;&gt;<br>
&gt;&gt; the line to generate the ISO is:<br>
&gt;&gt;=C2=A0 mkisofs -o custom.iso -b isolinux.bin -c <a href=3D"http://b=
oot.cat" target=3D"_blank" rel=3D"noreferrer">boot.cat</a> -no-emul-boot=C2=
=A0 =C2=A0-V<br>
&gt;&gt; &#39;Red Hat Enterprise Linux 7.2&#39;=C2=A0 =C2=A0-boot-load-size=
 4 -boot-info-table -R<br>
&gt;&gt; -J -v -T isolinux/<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; There used to be a way to view the virtual terminals (alt-F whatev=
er)<br>
&gt;&gt; but apparently that&#39;s gone away.<br>
&gt;&gt;<br>
&gt;&gt; Any ideas on what I&#39;m missing here?<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Kickstart-list mailing list<br>
&gt;&gt; <a href=3D"mailto:[email protected]">Kickstart-list@redhat=
.com</a><br>
&gt;&gt; <a href=3D"https://www.redhat.com/mailman/listinfo/kickstart-list"=
 target=3D"_blank" rel=3D"noreferrer">https://www.redhat.com/mailman/listin=
fo/kickstart-list</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Kickstart-list mailing list<br>
&gt; <a href=3D"mailto:[email protected]">[email protected]=
</a><br>
&gt; <a href=3D"https://www.redhat.com/mailman/listinfo/kickstart-list" tar=
get=3D"_blank" rel=3D"noreferrer">https://www.redhat.com/mailman/listinfo/k=
ickstart-list</a><br>
<br>
_______________________________________________<br>
Kickstart-list mailing list<br>
<a href=3D"mailto:[email protected]">[email protected]</a><=
br>
<a href=3D"https://www.redhat.com/mailman/listinfo/kickstart-list" target=
=3D"_blank" rel=3D"noreferrer">https://www.redhat.com/mailman/listinfo/kick=
start-list</a></div></div></blockquote></div><br></div>

--001a1142326c6c0a250534c50121--


--===============0598030073544023350==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Kickstart-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/kickstart-list
--===============0598030073544023350==--