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 » Tue Jul 14, 2009 11:36 am

Oh yes, you definitely want it to come up to a menu. I'm just saying once an option to restore the system is selected that it wouldn't require any more than an "Are you sure?" prompt after that.

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

Post by byrdman » Tue Jul 14, 2009 12:00 pm

I am getting a 'genisoimage: Uh oh, I cant find the boot catalog directory 'Kiosk-Restore/isolinux/' I am doing as root, but the directory structure might be slightly different then yours. I even put in the full path which is /home/me/iso/Kiosk-Restore/isolinux/boot.cat after the ' -c ' part of the mkisofs command...hmm.

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 » Tue Jul 14, 2009 12:07 pm

Oh, all of my instructions were using "/iso" as the directory everything was built from. You don't want to put full paths in those options. Only the last parameter should be full path to the root of the directory structure, the rest should be relative to that. Everywhere you see /iso you should change it to your path or create a /iso symbolic link temporarily to your directory:

Code: Select all

# ln -s /home/me/iso /iso
Otherwise that last command should be:

Code: Select all

[root@linux iso]# mkisofs -o Kiosk-Restore.iso \
      -J -r -hide-rr-moved -hide-joliet-trans-tbl -V Kiosk-Restore \
      -b isolinux/isolinux.bin -c isolinux/boot.cat \
      -no-emul-boot -boot-load-size 4 -boot-info-table \
      /home/me/iso/Kiosk-Restore

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

Post by byrdman » Tue Jul 14, 2009 12:45 pm

the symbolic link did it...now on to the fun part! :) thanks A LOT!!

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 » Tue Jul 14, 2009 1:20 pm

Good news. I just wrote that image to a 1GB USB stick and it boots perfectly:

http://fedoraproject.org/wiki/FedoraLiveCD/USBHowTo

I did it on my F11 laptop and just ran the command from the link above:

Code: Select all

$ su -c "livecd-iso-to-disk /dev/sr0 /dev/sdb1"
I didn't have the ISO image on my laptop but I did happen to burn the ISO to CD and brought it with me which is why I use "/dev/sr0" instead of the ISO image name. /dev/sdb1 is obviously the path to my pen drive partition.

If you needed to go with a bigger image (for thumb drive) I think all we would have to do is create a larger ext3 file system image and copy what is on the existing ext3fs to it and then squashfs it and create the ISO like in the previous instructions.

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

Post by byrdman » Tue Jul 14, 2009 1:37 pm

Sweet!, I have both a USB and a CD that boots to the custom image you created. --One small note on the above instructions...forgot to chmod kiosk or 'cp -a' when I copied it so now every boot, the kiosk file is not executable :(
Oh well, just make another iso! yeah, easy part!

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 » Tue Jul 14, 2009 1:40 pm

So I guess you never saw the little menu stub I put in if it's not executing huh? Yeah, set it executable an recreate the ISO and I'll update my instructions for anyone else that might use them. I never actually went over the procedures to make sure it all worked after I typed them up. I guess I got pretty close. :)

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 » Tue Jul 14, 2009 2:41 pm


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 » Tue Jul 14, 2009 10:09 pm

I updated the "kiosk" service script and added a "kiosk-restore.py" in ext3fs/usr/local/bin. It's an example of one of those pretty blue console menus with 3 options (restore, reboot, console login). Nothing is yet destructive, just the beginning.

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

Post by byrdman » Tue Jul 14, 2009 10:44 pm

I just got another test system rebuilt and up and running, that I may just have to use as my desktop from now on...especially since I had a bear of a time getting the ATI to recognize two monitors and span the desktop. But now that I am reset back to square 1, I can start over and try and get a directory structure set up so if I need to rebuild the iso, all the files are there, I would just have to 're-mkisofs'
And I got two more windows machines waiting to be baptised!! :)
Oh yeah...{BLAH} to the AL.

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 6:06 am

Just let me know if you need me to do any more on this. I'm going with the assumption that you have it from here.

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

Post by byrdman » Wed Jul 15, 2009 12:55 pm

The second build of the image proved successful...thank you. But discussions with my boss led to the discussion that we do want this to be automatically done, without any, or minimal input. So if you could help a brother out, and the menu that pops up, can that have a timer that does option 1 (Install/Restore Kiosk) after 60 or 120 seconds? If there is not response from the menu, then we want it to start the install/restore process. I am looking at the kiosk-menu.py and not sure how to add another line - a disclaimer that this CD is destructive and will format, erase, etc in (# of Seconds)
also, the 'if x==1: now does a 'os.system() so what would be the call to start the format process and to install the live cd?
Sorry to ask this of you but we are almost there and I am stuck at editing the menu and what to do once the timer or number 1 is pressed...

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 1:22 pm

To be honest I'm not a Python programmer and that was just a sample pretty text menu using a Python library and there really isn't a need for much more than that (other than the timer thing you want). I would write a shell script (bash) that I would stick in that os call that would perform all the format tasks and restore your disk image.

You already have a machine set up the way you want right? How are the existing partitions laid out and what file system type are you using? I would suggest using one file system (non LVM) and one swap partition (no separate /boot partition). Once you get the machine set up exactly like you want it I would shrink the file system and partition down to minimal size then dd the root partition off into an image file.

I would be more than happy to do the whole thing for you but I tell you what would be easiest for me is if you could loan me a machine that you have all set up the way you want. I would shrink the partition down and create the images on an external usb disk and then I could use that machine to test the CD/thumb drive on. I should be able to whip it out in an evening pretty easily.

To be honest with you if I do it exactly like your boss wants (60 second destruction) I would probably get rid of the menu altogether and change the boot countdown (at 5 seconds the way I have it now) to like 60 seconds and say "Wiping Hard Drive in 60 seconds....". I would really really really recommend against this though. I would make them have to at least acknowledge that they want to erase the disk and then make everything else automatically happen. Too easy to stick a disk in and forget it's in there and turn the computer on and walk away to get your morning coffee while it's booting only to come back to find your computer is now a Kiosk. :)

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 1:41 pm

Hey, how about making the boot menu the actual confirmation? I'll take off the automatic countdown completely and have it come up to boot menu directly where you have one option "Restore Kiosk (erases hard drive)". It will also come up as soon as the boot. It can't get much easier (and it's safer).

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

Post by byrdman » Wed Jul 15, 2009 2:26 pm

That will work...can I have then call the ks.cfg file from Kickstart? I think that has my HD setup earlier in this thread if you wanna peek at how I plan to set up...
I would be more than happy to give you a pc to test but right now they are falling out of service completely and spare parts are hard to come by...I am down to the one I am on now, which has the image mounted for modifications, and one other surviving windows machine waiting to get restored. The other ones I had set aside have bad HD's or powersupplies, and one motherboard seems fried...if I get one together, I can get it to you via a 'I buy you lunch' meeting...

Post Reply