1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

CentOS4 re-image script for 1and1, and others

Discussion in 'Plesk for Linux - 8.x and Older' started by atomicturtle, Apr 23, 2006.

  1. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    This is a call for testers for a CentOS installer specifically targetted at 1and1 systems.

    http://3es.atomicrocketturtle.com/tests/1and1-installer.sh

    This script will reimage a 1and1 server with CentOS4, replacing an existing FC2 or FC4 installation, and repartition the system with a more optimized layout. At this point in development the result will be a minimal install of CentOS4, and it does not install PSA at this time (you will need to use yum or the autoinstaller). I'm looking for general QA, and development eyeballs on the network config. Im missing something subtle on their DHCP setup, which does not configure the network settings correctly by default.

    For those of you not running on a 1and1 box, that use lilo as a boot loader:
    http://3es.atomicrocketturtle.com/tests/os-installer.sh

    and for grub users:
    http://3es.atomicrocketturtle.com/tests/grub-installer.sh

    the above scripts will also reimage a system running rh7.3 - FC5, Debian, SuSE, Ubuntu, rhel3/4 to CentOS4
     
  2. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    Version 0.1.2 has been released

    This update that should catch some exceptions on FC4 better.
     
  3. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    Updated the general Grub based installer to 0.1.1, this version corrects a kernel configuration issue.
     
  4. Redah

    Redah Guest

    0
     
    This works like a charm, I use something similiar like this... Kickstarting really blew me away with all it's possibilities...

    I've got a remote server (with no access) that I manage to re-install with FC3/4/5, it loads my custom RAID drivers remotely.. it's really cool.

    But, Art, add something like this to the end (note that I use this for Fedora installations, but you can modify it easily):

    This fetches yum config files and repos, updates the system, and then does the reboot.

    After my server gets back online, it's freshly installed and fully updated!

    (Ofcourse you could create your own distribution share with all updates, but I figure this to be too much work to keep updated)
     
  5. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    I've got creating ART repo rpms and installing PSA on the list as well. Basically I'd like to get the installer to the point where you can select what you want to create. A good example is where I used it to create a cluster at 1and1 for a very high volume website. I had 6 webserver nodes, and 2 load balancer nodes all built from the installer in quick fashion (around 10-15 minutes per box). In comparison, rekicking a box through the 1and1 CP in one case took several days.

    The down side is I can't run an update event inside of %post on a 1and1 box because there is no network access. I can push things down into a firstboot event however, which is an option Ive been looking into.
     
  6. Redah

    Redah Guest

    0
     
    Here's my ks.cfg, complete with partitioning, etc:

    As you can see I'm still someone from the 'put everything on different partitions, lock your /tmp down, etc'-generation. Any way, some tips:

    Why don't you let your script fetch your ks.cfg, and put it in /boot as well? You can then kickstart your installation with:

    You'd have to know if /boot is on sda or hda but this can be easily figured out. Then you make a nice $HD for it and voila :) Since ks.cfg gets parsed right at the beginning it doesn't matter that it's on the HD that is being wiped anyway.

    Any way, the reason for putting the ks.cfg local is that you can make your script edit the local ks.cfg file and add the network settings, as you can see in the sample above. Then your box will have network access right out of installation (but seriously, shouldn't it have network connection as soon as you give it along as parameters during your kickstart?) and you can run YUM or anything you want, e.g. fetching PSA and installing it (although I'm not sure if that will work since during installation your kind of limited in what you're allowed to do).

    Also, I always add the word 'vnc' to my kickstart line. As soon as graphical installation starts, you'll have a VNC window available at yournewserver.domain.com:1. It's always nice to be able to see what's going on ;) The only thing I wasn't able to figure out is to make whatever Yum does in the background print to the VNc window. This bugs me because I don't know what it's doing now, it just says "installing bootloader" while it's actually updating with Yum.

    The reason I had to do all this was because I have servers at Server4You in Germany. They use new SIS chipsets that FC4 can't handle when using a kernel < 2.6.14. They also use a lame FC3 image that's both outdated and packed with unneccessary stuff (I always install 'minimal', and even then rip plenty of RPMs out (ISDN, PCMCIA, bluetooth, you get the point). I think they simply chose a 'Server install' or something.

    So, I created a driverdisk with drivers, and FC4 installed fine, but when it rebooted it wouldn't reboot, because the 2.6.11 kernel simply couldn't do it. Now, I start the installation, it fetches the drivers remotely, installs, then runs yum, which updates the kernel to 2.6.16, and the machine boots as happily as it could be :)
     
  7. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    Yep, I store the ks.cfg locally in the 1and1 installer. Unfortunately/Fortunately the 1and1 network wouldn't let me do a pure network install (just try it, you'll see what I mean), so I ended up having to store the ISO locally and install everything offline. There are some added advantage to the local ISO route, as you noted with the additional driver issues on your system, you can store modules, or psa configs, that dont get overwritten when you repartition the drive (I hijack swap), and pass those right into anaconda. I may merge the 1and1/(os|grub)-installer's together in the future to allow you to choose which path to take.

    Another advantage of the network stored ks that I couldnt use because of 1and1 is that it has the ability to pass in variables to a cgi, which would allow you to control an installation from a web page. My pipe dream there was to set up a page where you could pick things like OS, PSA version, etc and then submit a custom ks for that box.

    I'm glad you found it useful, my whole intent with this was to empower folks to set up the box the way you want it. This is exactly the kind of thing I was hoping people would do with it
     
  8. Redah

    Redah Guest

    0
     
    I was actually thinking of doing the exact same thing :)

    I've been using kickstart installs for a long time (sorry, I wasn't inspired by your script, just thought it was weird you couldn't do a network install ;) I tried to learn something to the allmighty ART and failed ;)), and I was also planning on creating some sort of ServerInstaller, able to install stuff like FC or Cent...

    Might need to start thinking about that more before it shows up in an ART project and I can't get my 15 minutes of fame ;)
     
Loading...