Re: Install RHEL6 from tmpfs

anant garg <[email protected]> Thu, 30 Jul 2015 14:30:21 +0530
Newsgroups gmane.linux.redhat.kickstart.general
Message-ID <CAPoqOENMs-K0zivc3d5N1H1jZjVEOw7gzZ9bSyiXVQdKMz9RdA@mail.gmail.com>
>> Below are is the content of kickstart file to copy the repo to tmpfs
created out of system RAM.

>> mount -t tmpfs -o size=1g tmpfs /mnt/isodir mkdir /mnt/isomount
>> mount /dev/sda2 /mnt/isomount
>> cd /mnt/isodir
>> tar -xzvf /mnt/isomount/repo.tgz
>> umount /dev/sda2

I think Anaconda Installer's image of stage2 contains the /usr/bin/anaonda
script. which calls for the execution of pre scripts.

So I think you are using tmpfs as partition for obtaining stage2 image will
not be helpful.
Because  you are mounting tmpfs in pre scripts, which executes later. but
referring in a early section of install.
So I think you should modify the install method arguement in kickstrt file



>> 2. created the tar out of cdrom contents and kept in / dir 3. Below are
is the content of kickstart file to copy the repo to tmpfs created out of
system RAM.
>> harddrive --partition=tmpfs --dir=/mnt/isodir

modify the above as below:-

harddrive --partition=sda2  --dir=/mnt/isodir

 or generate UUID of sda2

harddrive  --partition=disk/by-uuid/UUID --dir=/mnt/isodir

Hope it helps.


On Wed, Jul 29, 2015 at 5:12 PM, Netravali, Ganesh <[email protected]>
wrote:

>  Hi
>
> Kickstart file is getting picked up from sda2 but issue is with stage 2. I
> am not able to point stage2 image to tmpfs .
>
>
>
> Thanks
>
> Ganesh
>
>
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *anant garg
> *Sent:* Wednesday, July 29, 2015 3:03 PM
> *To:* Discussion list about Kickstart
> *Subject:* Re: Install RHEL6 from tmpfs
>
>
>
> Hi,
>
>
>
> Would you let me know how your kickstart file looks like ?
>
>
>
> And also confirm that is your kickstart being picked up by installer ?
>
>
>
> i think you can access and Check the logs on tty3 .
>
>
>
>
>
>
>
>
>
>
>
> On Wed, Jul 29, 2015 at 2:49 PM, Netravali, Ganesh <
> [email protected]> wrote:
>
> Hi.
>
> Thanks for your suggestions. That didn't go well. What exactly I am trying
> is.
>
> Pre condition.
> 1. System is installed with rhel version(No specific version).
>
> Target.
> 1. Copy the RHEL customized ISO to the system disk and start the
> installation from that ISO when system boots p next time.
>
> Procedure followed.
> 1. Copy the ISO to RHEL preinstalled system.
> 2. Modified the grub.conf with below lines so that I can boot the system
> to start the installation.
>         title RedHat Install
>                 root (hd0,2)
>           kernel /boot/vmlinuz ro
> root=UUID=9684465d-8ded-43cc-8069-de5ff713dd40  ks=hd:sda2:/ks-sa.cfg
> repo=/mnt/isodir stage2=hd:sda2:/images/install.img
>                 initrd /boot/initrd.img
>   3. created the tar out of cdrom contents and kept in / dir 3. Below are
> is the content of kickstart file to copy the repo to tmpfs created out of
> system RAM.
>
> mount -t tmpfs -o size=1g tmpfs /mnt/isodir mkdir /mnt/isomount
> mount /dev/sda2 /mnt/isomount
> cd /mnt/isodir
> tar -xzvf /mnt/isomount/repo.tgz
> umount /dev/sda2
>
> This is somehow not picking up the ISO since anaconda look for ISO and
> stage 2  in sda2. Is there any way I can do the installation from tmpfs ?
>
> Thanks
> Ganesh
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:
> [email protected]] On Behalf Of Fisher, Robert L (ROB)
> Sent: Tuesday, July 21, 2015 8:06 PM
> To: Discussion list about Kickstart
> Subject: RE: Install RHEL6 from tmpfs
>
> Howdy, you might need to clear the disk before you configure it.
>
> Try adding this line:
> clearpart --initlabel --all --drives=sda
>
>
>
> Rob Fisher
> Verizon
>
>
> -----Original Message-----
> From: [email protected] [mailto:
> [email protected]] On Behalf Of Netravali, Ganesh
> Sent: Tuesday, July 21, 2015 6:35 AM
> To: [email protected]
> Subject: Install RHEL6 from tmpfs
>
> Hi
>
> I have a situation where I can access the system remotely from BMC and
> access the console and need to do the automated kickstart installation.
> Presently system is installed with RHEL6 and followed the below step for
> hard disk based installation.
>
> 1. Copied automated ks.cfg to vmlinuz, initrd.img and images dir to /
> folder from ISO.
>
> Modified the grub.conf with below lines.
>
> title RedHat Install
>         root (hd0,2)
>         kernel /boot/vmlinuz ro
> root=UUID=9684465d-8ded-43cc-8069-de5ff713dd40  ks=hd:sda2:/ks-sa.cfg
> repo=/mnt/isodir stage2=hd:sda2:/images/install.img
>         initrd /boot/initrd.img
>
>
> 2. created the tar out of cdrom contents and kept in / dir 3. Below are is
> the content of kickstart file to copy the repo to tmpfs created out of
> system RAM.
>
> harddrive --partition=tmpfs --dir=/mnt/isodir
>
>
> Preinstall section code to create the install repository
>
> mount -t tmpfs -o size=1g tmpfs /mnt/isodir mkdir /mnt/isomount mount
> /dev/sda2 /mnt/isomount cd /mnt/isodir tar -xzvf /mnt/isomount/repo.tgz
> umount /dev/sda2
>
>
> reboot the system and boot from "Redhat Install" and this triggers the
> installation. Presently I got struck in partitioning the sda. Any one tried
> this before?  Is there any suggestions or good pointers?
>
> Thanks
> Ganesh
>
>
>
>
>
>
>
> _______________________________________________
> 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
>
>
>
> _______________________________________________
> 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