
| This forum is proudly powered by Scientific Linux 6 | SL website Download SL Help Search Members |
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
| Pages: (2) 1 2 ( Go to first unread post ) | ![]() ![]() ![]() |
| ericl42 |
Posted: Mar 21 2012, 08:04 PM
|
|||||
|
SLF Rookie ![]() Group: Members Posts: 18 Member No.: 1393 Joined: 21-March 12 |
Hello,
I'm trying to use Revisor to create a customized version of SL but I've ran into some issues. I've tried both using the GUI version and CLI version. Below is my CLI text.
Even though this is a custom kickstart script, I am having the same issues with the stock ones as well. This is what I get once I start the imaging process.
I've tried this on SL6.1 and SL6.2 with little luck. I've gotten a few ISOs to be created but they never used the kickstart script like I wanted and since my fresh install, I'm getting the errors above. I've tried various methods such as disabling SELinux, copying the RHEL5-buildinstall to RHEL6-buildinstall, etc but haven't had any luck. Also, if there is another product that would be better suited for creating custom spins that would work as well. I used bootcdwrite on Debian and it worked very well as far as getting a system up and running and then being able to copy that running system into a bootable ISO. Any help would be greatly appreciated. |
|||||
| AndrewSerk |
Posted: Mar 21 2012, 08:20 PM
|
|
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 524 Member No.: 54 Joined: 14-April 11 |
Hi ericl42 and welcome to SLF,
You would be better off using livecd-creator (livecd-tools package) rather than revisor for versions 6x. Just svn the .ks files (info in the below link) and edit the .ks as you see fit. Here is a link for a how to for building a Scientific Linux livecd: http://www.livecd.ethz.ch/build.html Hope this helps, |
|
| log69 |
Posted: Mar 22 2012, 10:01 AM
|
|||||
![]() SLF Member ![]() ![]() ![]() Group: Members Posts: 98 Member No.: 1325 Joined: 24-February 12 |
Thanks Andrew, I needed the same info. (A note to myself:)
my kickstart file:
program to run:
|
|||||
| log69 |
Posted: Mar 22 2012, 11:19 AM
|
|
![]() SLF Member ![]() ![]() ![]() Group: Members Posts: 98 Member No.: 1325 Joined: 24-February 12 |
I created a 64 bit Live CD, but also I noticed that it just boots fine on one of my 32 bit capable machine too. Does it contain both 32 and 64 bit kernels and userland by default on the Live media?
(nevermind, made a mistake ) |
|
| AndrewSerk |
Posted: Mar 22 2012, 12:10 PM
|
|||
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 524 Member No.: 54 Joined: 14-April 11 |
Hi log69,
Glad you found the info of some use. Just for future reference, if you want to create a 32 bit livecd from a 64 bit machine use "setarch i686" infront of the livecd-creator command:
Hope this helps and have fun |
|||
| ericl42 |
Posted: Mar 23 2012, 07:45 PM
|
|
|
SLF Rookie ![]() Group: Members Posts: 18 Member No.: 1393 Joined: 21-March 12 |
Thank you very much for that information. I'm definitely on the right track now of actually being able to make some ISOs and not run into a ton of errors. Now I just have to fine tune a few things such as:
1. I don't want it to boot into a live cd, I want it to go directly into a HD install. 2. I want to already have the root password configured and add some non admin accounts. 3. I wan to limit the options they have on the install screen and have it very generic so I can define everything in the kickstart script. 4. I would like to figure out how to upload some images or files to the ISO for custom backgrounds and what not. I know I can wget some files and run post scripts but I'm afraid the install may not always have internet connectivity. I'm also currently running into a few issues where the new ISO will start to boot and it freezes after the blue and gray bar goes all the way from left to right at the bottom of the screen and says Scientific Linux 6.2. It won't go past this screen. Not sure if I have a package that is missing or what. |
|
| AndrewSerk |
Posted: Mar 25 2012, 01:20 PM
|
|||||||||||||
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 524 Member No.: 54 Joined: 14-April 11 |
Hi ericl42,
I will try to help, but there is much I still have to learn about modifying a live img.
That sounds like a job for sed in the post section. Question 1 could be achieved by adding "liveintst" to the kernel line for gui install and "textinst" for text install, but for question 3, I am not exacly sure what the sed command would look like, but will look into it some more.
You can add the root password to the .ks file like:
or for a encrypted password:
and for the added users you could use "adduser" in the post section.
The easyiest way I have found to achieve such a thing is to create a local repo with any files I want to include in the iso. I then create a local.ks for the local repo and add "%include local.ks" to the .ks I am building with.
If you remove the "rhgb" and "quiet" from the kernel line you should be able to see where the boot progress stops. That should give a better idea of what the issue is and you can post back here any info you discover and hopefully I or someone will be able to help. Hope this helps, This post has been edited by AndrewSerk: Mar 25 2012, 02:17 PM |
|||||||||||||
| ericl42 |
Posted: Mar 26 2012, 03:15 PM
|
|||||||
|
SLF Rookie ![]() Group: Members Posts: 18 Member No.: 1393 Joined: 21-March 12 |
Thanks again for your quick response. I really really appreciate it. I tried creating another image and I do see 1 error during the creation process.
When this tries to boot, it goes through a lot of the services starting up with an green OK beside them until it gets to starting atd. After it says OK starting atd, I Have the following.
Below is my kickstart script. I've been modifying a lot of random sections trying to get it to work.
|
|||||||
| AndrewSerk |
Posted: Mar 27 2012, 04:07 AM
|
|||||||
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 524 Member No.: 54 Joined: 14-April 11 |
I spent a little time on this tonight and have made "some" progress. For some reason that alludes me so far the passwords for test_account and test_account2 don't get set and liveinst seems to have no affect.
But at least it boots now.Thought I would post what I have so far. I edited your ks and saved it as test.ks and created a ugly.ks:
Thanks to SiliconSlick for his above ks that I modified slightly.
|
|||||||
| ericl42 |
Posted: Mar 27 2012, 02:30 PM
|
|||
|
SLF Rookie ![]() Group: Members Posts: 18 Member No.: 1393 Joined: 21-March 12 |
Thanks for your post. I also did a lot of tweaking yesterday before reading this and I got mine booting a lot better. Here is my new ks script.
Like you said, adding users doesn't seem to work so I made a 1 liner to deal with that in the post boot script and it works very well. At this point in time I have to do the following. 1. Start taking our some unneeded packages to make it as small as possible and still boot. 2. Try to make the system instantly boot up to an install screen instead of having to cancel the system config and then run /usr/bin/liveinst (going to try adding this to the postinstall section as you mentioned above) 3. Once it starts installing, I need to take out a few of the sections that I have already predefined so no one can modify them. (yet again, going to try the sed options you stated above) I really appreciate your help in all of this. I have never dealt with kickstart scripts before and they are very fun/annoying to work with! |
|||
| AndrewSerk |
Posted: Mar 27 2012, 05:48 PM
|
|||||||||
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 524 Member No.: 54 Joined: 14-April 11 |
Glad to try to help,
A few more edits. Now it boots to text install I am sure you wil still have to remove some clutter and straighten up a bit but should be getting close
Hope this helps,
EDIT: Kickstart files for livecd/dvds are a lot more difficult and involved than a ks for the install dvd. For a simple way to make a install ks for a install media check out "system-config-kickstart" package. This post has been edited by AndrewSerk: Mar 27 2012, 05:58 PM |
|||||||||
| ericl42 |
Posted: Mar 27 2012, 07:51 PM
|
|||
|
SLF Rookie ![]() Group: Members Posts: 18 Member No.: 1393 Joined: 21-March 12 |
Getting closer! Here are the issues I'm currently trying to figure out/make better. But with this setup, It's ~450 MB ISO image and 1.4 gig install image.
1. How to add "Install" option on the initial boot menu. 2. After the install is done, you hit the reboot button and the image doesn't reboot. It just gives you a command prompt and you have to type in reboot. 3. The firewall section isn't working. I'm specifying ports to open up but they are not showing open once I install to the HD. 4. I am trying to remove various packages and all of them are showing up as installed. Not sure why they are still there.
Also, what is your second section of "code" for. The post --nochroot and for rhgbfile section. I'm confused about that. |
|||
| AndrewSerk |
Posted: Mar 27 2012, 09:07 PM
|
|||||||||
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 524 Member No.: 54 Joined: 14-April 11 |
That is what I was doing with the ugly.ks by adding "textinst" to the kernel line . That and removing rhgb and quiet from the kernel line. It works but is not that pretty> ' bootloader --append="textinst" or "liveinst" ' placed above the repo lines would be prettier (if that works, I just read about that)
Check the logs before you type in reboot and see if any error is logged that might give us a clue as to the issue.
I am not exacly sure how to make those setting tranfer to a HD install but would guess it has something to do with $LIVE_ROOT/ vs. $INSTALL_ROOT as in what was in the rpm that provides the files. I will see what I can find on the subject.
You are using "-" to remove them? like: -curl and putting that to the end of %packages and they are still installed? If so, then might be a dep issue. This post has been edited by AndrewSerk: Mar 27 2012, 09:11 PM |
|||||||||
| AndrewSerk |
Posted: Mar 28 2012, 03:47 AM
|
|||||
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 524 Member No.: 54 Joined: 14-April 11 |
The bootloader directive does work for appending things to the kernel line here. If you append textinst it boots to a text install and if you append liveinst it boots to a gui install. I put the directive above the repo line:
So no real need for that ugly.ks. Hope this helps, |
|||||
| ericl42 |
Posted: Mar 28 2012, 01:41 PM
|
|
|
SLF Rookie ![]() Group: Members Posts: 18 Member No.: 1393 Joined: 21-March 12 |
Unfortunately adding "liveint" or "textinst" doesn't do anything when I add it to the bootloader option. I see that it appends it to the description like it's suppose to, but it still doesn't boot directly into the install. You still have to type in the username root and then run liveinst to get it working. So I'll have to look into that. I also found out that the firewall settings don't take affect on the live CD either.
I looked at the commands that the normal SL62 CD has for the "install" section and these are the arguments they call. I'll try that later today. vmlinz0 initrd=initrd0.img root=live:CDLABEL=SL62-i386-LiveCD rootfstype=auto ro liveimg liveinst noswap rd_NO_LUKS rd_NO_MD rd_NO_DM * |
|
| AndrewSerk |
Posted: Mar 29 2012, 01:13 AM
|
|
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 524 Member No.: 54 Joined: 14-April 11 |
There are some differences between the last kickstart I posted and the last you posted. The biggest diff. probably is I included sl62-live-base( %include sl62-live-base.ks ). I bet that has something to do with the bootloader directives not working.
Haven't had any time to research how to preserve the firewall settings for a install yet. Hope to have some time tomorrow night or Friday. |
|
| ericl42 |
Posted: Apr 6 2012, 08:29 PM
|
|||
|
SLF Rookie ![]() Group: Members Posts: 18 Member No.: 1393 Joined: 21-March 12 |
Started working on this again today and I'm definitely getting a lot closer. I've given up on dealing with the firewall on the main section and tried to configure it via echoing the /etc/sysconfig/iptables file and by running the /sbin/iptables commands but none of them seem to work. So I'm not sure what's going on with that. I also still can't get it to prompt me for the network configuration like I'd like it to. But it's definitely getting there! One major question I had is the difference between the chroot vs nochroot. From what I've read, chroot is for the actual file system that is being copied to the hard drive and the nochroot is if you start copying to and from the live cd to the hard drive. That doesn't sound right to me though but seems to be the case in a lot of postscript examples I"ve seen. Here is my currently postscript
|
|||
| AndrewSerk |
Posted: Apr 7 2012, 07:39 PM
|
|||||
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 524 Member No.: 54 Joined: 14-April 11 |
Hi ericl42,
Glad you have made progress. ![]() From the observations that I have made the difference between the chroot and --nochroot is: The chroot environment isolates the livecd build environment form the host that is building the livecd. The --nochroot environment allows you to copy from the build host environment to the livecd build enviroment. As example of --nochroot: I use this to "untar" the mplayer codes that are stored in the same folder as the ks (build host environment) to the livecd (livecd build environment)
I did a little testing on the persistent changes to iptables and found that if I add to "/etc/rc.d/init.d/livesys-late" the changes are persistent after a install. There is probably a better way to do this like build a rpm that modifies iptables after the iptables file is created, Here is a snippet of how I added to /etc/rc.d/init.d/livesys-late:
If you use this method you should add a chmod for iptables between EOF_iptables and EOF_lateinitscript. Hope this helps This post has been edited by AndrewSerk: Apr 14 2012, 06:53 AM |
|||||
| ericl42 |
Posted: Apr 11 2012, 03:25 PM
|
|||
|
SLF Rookie ![]() Group: Members Posts: 18 Member No.: 1393 Joined: 21-March 12 |
Latest kickstart script and outstanding issues. I hope if nothing else the kickstart script below will help some other people get past a few initial hurdles I had.
1. When the boot menu starts and I select "install" or "install (text mode)", it never goes directly to the install. It goes to a command prompt where I have to type in root and the run "liveinst". 2. When the install starts, I want to remove some of the options. Ex. - I am defining the time zone, language, etc in the kickstart script so I don't want anyone to be able to modify that. 3. It's not prompting me for the network information. I don't want to run firstboot, I just want it to ask me for the network during the intial setup. I've tried various things in the kickstart script such as "asknet", "network --query", and none seem to work. 4. The iptables setup doesn't work. I've tried adding "iptables --ssh --http --port:514" at the top of the kickstart script, I've tried echoing commands into /etc/sysconfig/iptables, I've tried rewriting the file completely, and none of it seems to work.
|
|||
| AndrewSerk |
Posted: Apr 11 2012, 04:08 PM
|
|||
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 524 Member No.: 54 Joined: 14-April 11 |
I suspect this missing snippet from the live-base.ks is the issue with liveinst / textinst not working, there maybe more from live-base.ks that is necessary for the functions you want.:
Snippet from sl62-live-base.ks
You should go through the sl62-live-base.ks and "rebuild" it removing the things you don't want and adding what you might need. Then save and %include it. This post has been edited by AndrewSerk: Apr 11 2012, 04:18 PM |
|||
| ericl42 |
Posted: Apr 13 2012, 08:22 PM
|
|
|
SLF Rookie ![]() Group: Members Posts: 18 Member No.: 1393 Joined: 21-March 12 |
I ended up using the following include files:
%include sl62-livecd-gnome.ks %include sl62-live-base.ks With this I have a full fledged gui for the end user to install easier and the boot install scripts work fine. Right now I'm working on tweaking the boot menu a little more but I think that has been 100% resolved. The major issues I have now are: 1. Iptables does not want to work correctly for me!!!! I tried your script but it didn't work. I also tried creating an iptables.script with a lot of commands in it and invoking that and it didn't work either. I may have to just create the script and then have it run in /etc/rc.local at boot or cron it so it'll run. Not sure, but it is very frustrating for something that should work with the kickstart "firewall --" options. 2. It still isn't prompting me for network configuration during boot and it's not working once I start the machine. I hope this is just a virual box problem. I'll try to burn it to a CD later and see if a physical machine works. 3. I'm going to create a locked down version of gnome so they can run some custom scripts. So I'm going to have to create some desktop items so that users can run them. 4. I need to make it where the users can't modify a few options during the boot install process such as root password, time zone, etc. I want those to stay as a default that I set. |
|
| AndrewSerk |
Posted: Apr 13 2012, 11:17 PM
|
|||||||||||||
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 524 Member No.: 54 Joined: 14-April 11 |
Glad you are still making progress.
Looks like the script was missing a restart of iptables! sorry for that! snippet
The script for iptables 2nd line should also read:
I'll post back on the other stuff just as soon as I get my AAA server up again. EDIT: OK got my AAA server up and working again.
Have you tried "asknetwork" in your .ks?
Most of the Gnome settings can be manipulated by command line with "gconftool-2" but I don't have much experience with it. I will post how I have added things to the desktop in my next post.(my info is on a different machine than I am posting from now)
Not sure how to go about that but will see what I can find on the subject. This post has been edited by AndrewSerk: Apr 14 2012, 06:52 AM |
|||||||||||||
| AndrewSerk |
Posted: Apr 16 2012, 02:48 PM
|
|||
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 524 Member No.: 54 Joined: 14-April 11 |
I believe you can set the time zone/location through gconftool-2 and make the changes to gnome so that no one can change the changes by editing through the gconftool-2 and the /etc/gconf/gconf.xml.mandatory file. If you want the changes to be persistent for a install I would try to add the gconftool-2 commands to /etc/rc.d/init.d/livesys-late . If you just want the commands to work for the live session and not the install add the lines to /etc/rc.d/init.d/livesys . I have never tried this before for a livecd but for other things you don't want the user to be able to change you might want to set "sticky bits" on the files/settings. I have not been able to find my info on adding to the desktop of a livecd but will continue the search and post the info when I find it. |
|||
| ericl42 |
Posted: Apr 17 2012, 04:15 PM
|
|||
|
SLF Rookie ![]() Group: Members Posts: 18 Member No.: 1393 Joined: 21-March 12 |
Here is my latest kickstart script. The install works perfectly, minus the autostep stuff not working correctly. From what I read, if you set various options such as keyboard, timezone, and root password, autostep will skip those during the install process and not let the user pick them, but that isn't happening. I'll have to figure out whats going on with that because I don't want those to be modified at all. But on the bright side, I have been able to modify a lot of the application menu items to lock that down. Then I'll probably create a /bin/rbash profile for them as well to lock down the terminal. I was even able to add some items to the Application menu for support, since for some reason I couldn't put them directly on the user's desktop. It is probably due to some race condition on when it's created. So if I can get the network up and working correctly (may be a VM issue) and have the boot process auto step through with minimal user interaction, I think I'll almost be there. Yet again, I really appreciate all of the help you've been. It's definitely been a learning process.
P.S. - Just checked and the iptables rules are still not working!! Arg! Edit - I started doing some more reading and they acted like I needed to copy my ks.cfg file to $LIVE_ROOT and then during the boot menu do something like ks=cd:/ks.cfg to make the install unattended. Because apparently now it doesn't now about the kickstart script.
|
|||
| AndrewSerk |
Posted: Apr 17 2012, 08:11 PM
|
|||||
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 524 Member No.: 54 Joined: 14-April 11 |
Hi ericl42,
You are learning at a incredible rate and doing a great job especially for your first time working with kickstarts! I went through some of my .ks trying to see if I can figure out why the network script is not working for you and found a few things that may be the issue. I have been appending "ipv6.disable=1" to the kernel line and have "/sbin/chkconfig ip6tables off" in my %post section. I have also been adding "chmod 600 /etc/sysconfig/iptables" in livesys-late. If you are using ipv6 maybe you need to set /etc/sysconfig/ip6tables instead or also? I remembered how I have put files to the Desktop in the past. I copy the file from within the %post --nochroot section with something like ( I use the adobe.ks as a example of the file to put on the Desktop):
and add another copy in /etc/rc.d/init.d/livesys-late from the %post section to copy it from the $INSTALL_ROOT to the Desktop:
I will look into how to pass "autostep" on to anaconda for a live install and post my findings. Hope this helps, |
|||||
Pages: (2) 1 2 |
![]() ![]() ![]() |