mass producing linux

Place to discuss Fedora and/or Red Hat
Post Reply
User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Wed Jul 15, 2009 3:07 pm

can I have then call the ks.cfg file from Kickstart?
I'm not exactly sure what you meant by this. You can build your system exactly the way you want with a kickstart file? I thought you had one already built, is this true? I tell you what might be even easier for you if you do. Boot to a LiveCD on that machine, stick in a thumb drive and tar the entire system off to a thumb drive. That should be all I need. Do you have a separate boot partition or is "/" and "/boot" all on one file system? If you have a separate "/boot" tar that to thumb drive as well.

From the LiveCD boot if you have the root partition mounted under /media/sda1 and the thumb drive mounted under /media/thumb I would do this:

Code: Select all

# cd /media/sda1
# tar -cvzf /media/thumb/kiosk-root.tgz
You could either give it to me in person or if it's not huge and you have the bandwidth I could download it from you. I can recreate the server in a virtual machine from there, make the images, write the restore scripts and build a new restore CD.

byrdman
administrator
administrator
Posts: 225
Joined: Thu May 08, 2003 1:59 pm
Location: In the cloud

Post by byrdman » Wed Jul 15, 2009 3:15 pm

on another simple topic...adding packages... for example I need apache and php installed on these systems...would I yum install php while chrooted in the ext3fs filesystem?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Wed Jul 15, 2009 3:28 pm

I'm not sure we're on the same page. This system we have on CD is not the system that will go on your Kiosk. It's only purpose is to transfer the image that we create to the Kiosk. That's why I want you to create an image of the machine you currently have configured as your model Kiosk system. That image will go on the CD as a single file and be extracted onto the target system. I was stating that you could just tar that Kiosk system up and get it to me and I can build a Kiosk system in a VM to match what you have, create the image from that and include it on the CD. I can then write and test the scripts that will format the drive and extract that file onto the target machine. Again, the restore CD is only for the tools needed to do the format and the restore of the image file.

P.S. Give me a call (I emailed you my cell if you don't have it). Might be faster to discuss on the phone.

byrdman
administrator
administrator
Posts: 225
Joined: Thu May 08, 2003 1:59 pm
Location: In the cloud

Post by byrdman » Wed Jul 15, 2009 3:38 pm

I hope I did not get off track... :oops:

I have a system I built with the F10 DVD. Installed everything I thought I would need. Got the system working with apache, php, firefox, rsync, etc... to play our show. Sold it and now the boss was sold
Well, somehow the word got out and now it has to be used to replace 90 machines at a east coast client (thus the need for an auto install cd/usb stick)
I have too much on the demo pc now, so my thought was to get a system together (simple hd config like you mentioned) but had enough packages installed to start up, auto login with client_id as the user, auto start firefox in kiosk mode - pointed to http://localhost/player.html to play our show.
All the files would be received from rsync'ing back to our control server via ssh key authentication and would log in to its "home dir" which would get the necessary files.

So I have a demo machine built to run our show and be proof of concept. I do not have a PC built from a live cd/usb exactly how I want it yet...I started on the image part first to be able to wipe out another machine or install on a fresh machine with out much user input. It seems the Live CD is more for a desktop unit, and does not come with apache php on it...
does this make sense?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Wed Jul 15, 2009 3:54 pm

So you don't have a machine you can do a normal minimal build on like you envision the Kiosk being in it's final state? I would use a regular install CD for that. The only thing I was using the LiveCD for is for the tools to do the restore and to contain restore image (which would be a single file image of the model Kiosk machine). I'm heading out now, check your mail and give me a call.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Wed Jul 15, 2009 9:13 pm

Recapping on the restrictions you have on your kiosk machines where it might not be feasible to actually get a CD or USB stick booted to do the restore. We discussed the possibility of getting a Linux image onto the WinXP disk by remote controlling XP and either downloading over the network or from a USB stick that is mailed to the site, and the possibility of booting that image from the NT Boot Loader (BOOT.INI).

Moving forward with that possibility I suggested that although it may be easiest to boot a Live ISO image from BOOT.INI it might not be the optimal thing for you for a few reasons (memory usage, speed, persistence, etc). So my thought was to create an ext3 partition image, install your OS and configure it how you like on that image and figure out how to boot that image (which I assume will be sitting on top of an NTFS C: drive) from BOOT.INI. I believe that problem might be solvable by GRUB for DOS:

https://gna.org/projects/grub4dos/

http://grub4dos.sourceforge.net/wiki/in ... s_tutorial

I don't think I'll get to it tonight but I believe what I would do is build the basic disk image with QEMU using a raw disk file and an install CD. Install Fedora on the disk file and configure it how you want it for the Kiosk and then boot that image with GRUB for DOS. I don't know for 100% that this is all doable but I "think" it is and shouldn't be too hard. I'm too wiped out to work on it tonight though.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Wed Jul 15, 2009 9:39 pm

Man, I just checked out Wubi (which you mentioned on the phone) and it sounds like it does nearly exactly what I had in mind. It even appears to use GRUB for DOS on a disk image:

http://wubi-installer.org/faq.php

I'm thinking you might want to check that out. If nothing else you could use it to install Ubuntu and see how it sets everything up. If you don't want to use Ubuntu we should be able to figure out how to do the same thing with Fedora.

EDIT: I'm doing a Wubi install of Ubuntu on XP now in a VMware VM. Again, I probably won't work on it tonight so it'll be tomorrow after work before I can get back to it.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Wed Jul 15, 2009 11:10 pm

One last note. It's definitely doable with at least Ubuntu. It installs pretty much the way I envisioned it and uses GRUB for DOS. It's pretty slick actually and I was able to modify the boot.ini file from within Ubuntu so you could switch between OSs remotely just by changing the boot.ini. Probably want some fail safe way of modifying it so you don't end up with an unbootable system on a typo.

I think it should be fairly easy to make a bootable Fedora disk. I'm betting I can extract the ext3fs disk image from the Fedora live CD and add a /boot directory with all the necessary boot files (kernel, initrd, grub menu, etc) and boot that image. I'll try to see if I can get that working tomorrow night, unless you just want to work with the Ubuntu installation which is already almost where you want it. Once installed you should be able to remove many of the unnecessary packages and install whatever else you need to make it work the way you want.

Then to get your remote Kiosk machines to boot this installation all you should have to do is copy the C:\ubuntu directory structure to them, copy the boot loader to C:\ and add the entry to boot.ini, reboot and you should be up and running. Because of the size you might want to send the files out on a USB stick and copy them to the drive locally over an remote desktop.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Thu Jul 16, 2009 9:33 pm

Well, I just successfully booted a Fedora image instead of the Ubuntu image. I used the ext3fs.img as a base from the Fedora 10 Live CD. It's not quite perfect because so far I have not been able to hack a Fedora style initrd enough to get the stock Fedora kernel to boot so I am using the Ubuntu kernel and initrd which works fine. Had to copy the /lib/modules/2.6.* from the Ubuntu image to the Fedora image so the kernel has it's modules. Also had to modify the fstab slightly and create a /host mount point. Other than that it's Fedora booted under Wubi.

byrdman
administrator
administrator
Posts: 225
Joined: Thu May 08, 2003 1:59 pm
Location: In the cloud

Post by byrdman » Thu Jul 16, 2009 10:12 pm

That's awesome!!! Towards the second half of the day I got caught up doing other stuff after I uninstalled too much on the first ubuntu install. I also was not happy with the speed of the machine I was using but it seemed to play fine. Right before I left work I added another 512MB of ram for a total of 1GB, I finished the second install of Ubuntu booted into Ubuntu and left. I also had to rebuild the pre-production control server, and only had the network install of F10 so that is what took most of the afternoon. But they gave me a new Dell PE with 16 GB of RAM and dual quad core 64 bit procs....so yeah!! Overkill, I know, but we have over 1100 installations around the country and are on track for a lot more.

Tomorrow will be working with Ubuntu and seeing if that will work, but Fedora would be better, in my mind, if you get that working...

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Fri Jul 17, 2009 8:16 am

Back on the original subject of wiping the drive and restoring an image. You said that would be difficult because there is no keyboard/etc but it also sounded like they had an accessible USB port. Couldn't they plug in a USB keyboard into that port?

byrdman
administrator
administrator
Posts: 225
Joined: Thu May 08, 2003 1:59 pm
Location: In the cloud

Post by byrdman » Fri Jul 17, 2009 8:35 am

well, in most cases, no because the PCs are set up in IT closets so they would not be able to view the screen, those are mostly in the lobbys

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Fri Jul 17, 2009 9:01 am

I got ya. It's funny because we have a big screen in our lobby with a Kiosk machine running Windows. Almost every morning when I come to work I see either a blue screen or some other error message up on the screen. I just shake my head and keep walking. :)

byrdman
administrator
administrator
Posts: 225
Joined: Thu May 08, 2003 1:59 pm
Location: In the cloud

Post by byrdman » Fri Jul 17, 2009 10:03 am

if you have a show in all flash, I can show you what we do... :)

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sun Jul 19, 2009 6:39 pm

I am posting this from the Fedora 10 image booted from the XP virtual machine. I am also now using the Fedora kernel. I don't think there is an easy way to create an initrd using the mkinitrd in Fedora that will actually boot an image on an NTFS partition. After tearing apart the Wubi provided initrd I have to assume that the Wubi guys built their initrd by hand. So, I just used their initrd and replaced the kernel modules in it that belong to the Ubuntu kernel with the same modules from the Fedora kernel and it seemed to allow me to boot the Fedora kernel just fine. Now I'll see about getting the image size down.

Post Reply