WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TinyCore with Symantec Ghost using PXE  (Read 29247 times)

Offline funguy

  • Newbie
  • *
  • Posts: 29
TinyCore with Symantec Ghost using PXE
« on: February 20, 2012, 01:57:28 PM »
I spent a lot of time reading posts so I figured I would write this easy tutorial. ENJOY! :-)

Howto put ghost on TinyCore and use with PXE"

1) Download the latest "TinyCore" from http://distro.ibiblio.org/tinycorelinux/downloads.html
   *TinyCore-current.iso
2) Copy other files to your usb  (example f:\build\)
   a. Browse to C:\Program Files\Symantec\Ghost
   b. Copy the following files: gdisk, ghconfig, ghost, ghregedit, omnifs
   c. Get this script http://forum.tinycorelinux.net/index.php?action=dlattach;topic=12300.0;attach=3242 too
   d. Use the attached icon (dimensions=48x48)
   e. Now is a good time to run ghost32.exe to create an "GHOST.INI"
3) Mount the TinyCore-current.iso
(oracle vm with at least 256mb ram and no hdd will do)
   a. just press <enter> at the tinycore boot prompt
4)  Copy the files from your usb to /tmp
   a.  mount the usb to the oracle vm by right clicking the usb plug
   b.  mount the usb inside your tinycore vm os using the Mount icon on the wbar (example: sda1)
   c.  sudo cp -R /mnt/sda1/build/* /tmp
   d.  cd /tmp
   e.  sudo ./cr_tc-initrd.sh
5) sudo mkdir /tmp/newinit
6) sudo mv ./tinycore_4.3.gz /tmp/newinit
7) cd /tmp/newinit
8) zcat tinycore_4.3.gz | sudo cpio -idum
9) copy the ghost files:
   sudo cp /tmp/g* /tmp/newinit/usr/local/bin
   sudo cp /mnt/sda1/build/GHOST.INI /tmp/newinit/usr/local/bin
   sudo cp /tmp/omni* /tmp/newinit/usr/local/bin
10) sudo vi /tmp/newinit/usr/local/bin/ghost.sh
   #tcl ghost run
   cd /usr/local/bin
   sudo nohup ./ghost
11) sudo cp /mnt/sda1/build/ghost.png /tmp/newinit/usr/local/share/pixmaps
12) sudo vi /tmp/newinit/usr/local/share/applications/ghost.desktop
   [Desktop Entry]
   Name=Ghost
   Exec=ghost.sh
   Icon=ghost
   X-FullPathIcon=/usr/local/share/pixmaps/ghost.png
   Type=Application
   Categories=System;
13) mkdir /tmp/newinit/home/tc/.X.d
14) sudo cp /tmp/newinit/usr/local/bin/ghost.sh /tmp/newinit/home/tc/.X.d
15) sudo chmod 755 /tmp/newinit/usr/local/bin/ghost.sh
16) sudo chmod 755 /tmp/newinit/home/tc/.X.d/ghost.sh
17) sudo chown tc:staff /tmp/newinit/home/tc/.X.d/ghost.sh
18) sudo rm /tmp/newinit/tinycore_4.3.gz
19) cd /tmp/newinit
20) sudo find . | sudo cpio -odum -H newc \ | gzip > ../core.gz
21) sudo cp ../core.gz /mnt/sda1
   *sda1 is the usb
22) unmount the usb from tinycore and kill the vm
23) using magiciso edit TinyCore-current.iso
24) delete the "cde" folder
25) drag the core.gz from your usb into the boot folder of iso and replace the old one
26) drag \boot\isolinux\isolinux.cfg to desktop and edit it with "editpad lite" as shown:
   display boot.msg
   default tc

   label tc
   kernel /boot/vmlinuz
   append initrd=/boot/core.gz quiet cde nozswap

   implicit 0
   prompt 0
   timeout 0
   F1 boot.msg
   F2 f2
   F3 f3
   F4 f4
27) drag the revised isolinux.cfg back into magiciso and replace original file
28) save the new iso
29) test the new iso in vm
30) Now take the cd to your pxe server
31) copy d:\boot\core.gz and d:\boot\vmlinuz to c:\tftpboot\tinycore\
32) use "editpad lite" to add this "c:\tftpboot\pxelinux.cfg\default" on your PXE server
   DEFAULT      vesamenu.c32
   PROMPT       0
   NOESCAPE     0
   ALLOWOPTIONS 0
   # Timeout in units of 1/10 s
   TIMEOUT 60
   MENU MARGIN 10
   MENU ROWS 16
   MENU TABMSGROW 21
   MENU TIMEOUTROW 26
   MENU COLOR BORDER 30;44      #20ffffff #00000000 #ffffffff
   MENU COLOR SCROLLBAR 30;44   #20ffffff #00000000 none
   MENU COLOR TITLE 0       #ffffffff #00000000 none
   MENU COLOR SEL   30;47      #40000000 #20ffffff
   MENU BACKGROUND menu.jpg
   MENU TITLE PXE Menu

   LABEL Boot from Harddisk
    LOCALBOOT 0
   Type 0x80

   label Tinycore with ghost
   kernel tinycore/vmlinuz
   append initrd=tinycore/core.gz cde nozswap

NOTES:
nozswap is a required option for ghost
I am using the 3com boot services that come with ghost and pointing to pxelinux.0 using bootptab editor.
My DHCP options per scope are:
003 Router = server ip or real router (required for ghost linux multicast)
006 DNS Server = server ip
060 PXEClient

*still need to figure out how to add more mass storage drivers....
« Last Edit: February 22, 2012, 06:52:53 PM by funguy »

Offline funguy

  • Newbie
  • *
  • Posts: 29
Re: TinyCore with Symantec Ghost using PXE
« Reply #1 on: February 24, 2012, 08:01:31 PM »
The above tutorial works on most systems.  TinyCore-current.iso needs raid/scsi added using ezremaster though as I found out. http://forum.tinycorelinux.net/index.php/topic,12624.0.html
I recommend people do that first  to create the ezremaster.iso and then start the process of adding ghost. 8) ;) :)

Offline tweetyhack

  • Newbie
  • *
  • Posts: 42
Re: TinyCore with Symantec Ghost using PXE
« Reply #2 on: March 02, 2012, 09:47:29 PM »
Sorry, I couldn't follow. Are you booting TCE over PXE and then running Ghost? I'm not sure how you run Ghost from a linux environment unless you have some dos emulation or wine. I used to boot into Ghost from a Win98 DOS image over PXE.

Offline funguy

  • Newbie
  • *
  • Posts: 29
Re: TinyCore with Symantec Ghost using PXE
« Reply #3 on: March 05, 2012, 11:54:44 AM »
In the end, I am booting tinycore linux using pxe which launches ghost (linux app).  Using my steps I embedded ghost and basic TCL extensions into the core.gz file.  Ghost 11.5.1 (ghost solution suite 2.5.1) has real linux executables, notice the files with no extension in your "c:\program files\symantec\ghost" folder, so nothing extra is needed to run it from the linux environment.  I also once used to use the dos boot pxe version you are talking about, but got tired of it.  Let me illustrate it for you:  Your clients --> server using pxelinux menu --> vmlinux  --> core.gz (containing ghost)--> tinycore desktop-->ghost

If you want to see what ghost looks like in linux right now. Just boot from the tinycore.iso cd instead and run the app from usb.  Then if you like it use my tutorial to put ghost inside tinycore so you don't have to request any files/extensions from your server.

Offline PTR73

  • Newbie
  • *
  • Posts: 4
Re: TinyCore with Symantec Ghost using PXE
« Reply #4 on: March 07, 2012, 10:32:30 AM »
Funguy,

is it possible to auto load an own menu, page with deployment choices like Ghost etc?

For instance, i would like to kick out WinPE for deploying my systems :-)

Your guide helped me/us a lot with the ghost part.
But the most important trick would be adding (eg HTA support) a linux variant of (g)imagex..

WinPE boots very slow, even on internal network. (made it down to 140MB, but still loading slow)
So this would be very nice as a replacement for deploying os..

do you have ideas?

regards,
PTR73

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: TinyCore with Symantec Ghost using PXE
« Reply #5 on: March 07, 2012, 10:56:36 AM »
putting my 2 cents in here... ;-)

if I understand you correctly you want to have an OS, which PXE boots and deploys some images and you'd like to have some GUI on that OS to make it some kind of shiny and usable, is that correct?

there are of course millions possibilities, but I don't know of a HTA interpreter (long time since, isn't it? ;) an easy adaption to reuse this HTA code could be to load apache2, apache2-mod-php5 and a small web browser in your deploy OS, start the web server, start the web browser on the OS with your application and replace your HTA specific code with php code, as it is able to manipulate your system as well. including core.gz this could be possible in about 20 MB, depending on the effort you put into the optimization.

smaller are of course "native" system GUIs like static Qt, gtk2/glade, fltk but you would have to compile those and program in C/C++.
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline PTR73

  • Newbie
  • *
  • Posts: 4
Re: TinyCore with Symantec Ghost using PXE
« Reply #6 on: March 07, 2012, 11:26:36 AM »
that's indeed wat i meant  :D

But maybe letting the HTA part go makes life easier.

So only addition of a linux variant of gimagex, which i can't find anywhere.  :-\





Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: TinyCore with Symantec Ghost using PXE
« Reply #7 on: March 07, 2012, 11:33:07 AM »
As far as I know HTA uses ActiveX controls and thus probably Win32 API calls, which are to the day only available in Windows OS'. It's not a choice to not provide any HTA interpreter for Linux, it's technically not possible (unless someone puts work into transfering Win32 API calls to Linux, which I doubt will ever happen). However I might stand corrected here...
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline PTR73

  • Newbie
  • *
  • Posts: 4
Re: TinyCore with Symantec Ghost using PXE
« Reply #8 on: March 07, 2012, 12:03:42 PM »
yess clear to me..

thanx.

Offline funguy

  • Newbie
  • *
  • Posts: 29
Re: TinyCore with Symantec Ghost using PXE
« Reply #9 on: March 07, 2012, 02:16:41 PM »
I agree with gutmensch.
gimagex would have to stay on winPE.  I used win7pe loading from network as well and load times were slow (5 minutes on mine). Sorry.

Offline tweetyhack

  • Newbie
  • *
  • Posts: 42
Re: TinyCore with Symantec Ghost using PXE
« Reply #10 on: March 08, 2012, 04:43:32 PM »
WHAT!! I didn't know there was a linux version of ghost!! You just blew my mind! Haha.

At our shop, we've moved away from ghost to MS's imaging tools. Always good to have multiple tools though. Thanks!

Offline tweetyhack

  • Newbie
  • *
  • Posts: 42
Re: TinyCore with Symantec Ghost using PXE
« Reply #11 on: March 08, 2012, 04:48:37 PM »
@PTR73 I thought you can generate a menu in the PXE configuration. I can't remember now. I know for sure I was able to create a menu in DOS.

Try these, nothing fancy but should work.
http://www.linuxjournal.com/magazine/pxe-magic-flexible-network-booting-menus
http://www.syslinux.org/wiki/index.php/PXELINUX#Custom_Menu_Example_with_sub-menus

Offline PTR73

  • Newbie
  • *
  • Posts: 4
Re: TinyCore with Symantec Ghost using PXE
« Reply #12 on: March 09, 2012, 11:10:12 AM »
thanks Tweety, but the dos like menu style is familiar to me  8)
I even can manage to chainload a windows installation from there..
But this is not what i want. Beside running from pixie/tftp, i also want it to run directly from usb. (using the coretousb tool for our technician)

---

Ghost multicasting works also very smooth and fast with this solutions Funguy. thanks..

For wim files, i think we can use wine to run gimagex? and then install on the local system drives.
Only part i think of is about the 64bit part... hmmm were running on tinycore. Guess is that this is 32bit/x86 right.
This part is very new to me.
If we manage this part. then it is bye bye WinPE for deploying.  ::)

for now, the solutions brought by Funguy gave me aplause at my office. 10 sec. loading and deploying in multicasting way also from a windows host (server) through tftp or pixie boot.


I think i will manage the wine part to get gimagex/imagex running. but very curious how to handle 64bit installations...  ???

anyone?


Offline funguy

  • Newbie
  • *
  • Posts: 29
Re: TinyCore with Symantec Ghost using PXE
« Reply #13 on: July 27, 2012, 03:09:19 PM »
Easier way:
Scripted way to put ghost on TinyCore and use with PXE with most Proliant support added

1) Download the latest release candidate from http://www.tinycorelinux.net
   *http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/TinyCore-current.iso

2) Copy ghost files to your usb build folder (example f:\build\)
   a. Browse to C:\Program Files\Symantec\Ghost
   b. Copy the following files: gdisk, ghconfig, ghost, ghregedit, and omnifs to f:\build

3) Copy ghost.png icon (dimensions=48x48) to f:\build folder on your usb   

4) Copy add_ghost_and_create_pxe_core.sh to the root of your usb
   (Example: f:\add_ghost_and_create_pxe_core.sh)   

5) Mount the TinyCore-current.iso
(oracle vm with at least 256mb ram and no hdd will do)
   a. just press <enter> at the tinycore boot prompt

6)  Run "add_ghost_and_create_pxe_core.sh"
        a.  mount the usb to the oracle vm by right clicking the usb plug
        b.  mount the usb inside your tinycore vm os using the Mount icon on the wbar (example: sda1)
        c.  Open a terminal using the icon on the wbar
        d.  cd /mnt/sda1
        e.  ./add_ghost_and_create_pxe_core.sh
        f.  close editor window when it pops open
        g.  wait until script finishes

7) sudo cp /tmp/ezremaster/ezremaster.iso /mnt/sda1
   *sda1 is the usb
8) unmount the usb from tinycore and kill the vm
9) test the new iso in vm
10) Now take the cd to your pxe server
11) copy d:\boot\core.gz and d:\boot\vmlinuz to c:\tftpboot\tinycore\
12) use "editpad lite" to add this "c:\tftpboot\pxelinux.cfg\default" on your PXE server
   DEFAULT      vesamenu.c32
   PROMPT       0
   NOESCAPE     0
   ALLOWOPTIONS 0
   # Timeout in units of 1/10 s
   TIMEOUT 60
   MENU MARGIN 10
   MENU ROWS 16
   MENU TABMSGROW 21
   MENU TIMEOUTROW 26
   MENU COLOR BORDER 30;44      #20ffffff #00000000 #ffffffff
   MENU COLOR SCROLLBAR 30;44   #20ffffff #00000000 none
   MENU COLOR TITLE 0       #ffffffff #00000000 none
   MENU COLOR SEL   30;47      #40000000 #20ffffff
   MENU BACKGROUND menu.jpg
   MENU TITLE PXE Menu

   LABEL Boot from Harddisk
    LOCALBOOT 0
   Type 0x80

   label Tinycore with ghost
   kernel tinycore/vmlinuz
   append initrd=tinycore/core.gz cde nozswap

*****OLD POST: Get fixed new script from Jan 3rd, 2013 post*********
« Last Edit: January 03, 2013, 11:55:57 AM by funguy »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: TinyCore with Symantec Ghost using PXE
« Reply #14 on: July 27, 2012, 04:53:22 PM »
Not sure if I entirely understood right, but if this is a concept which requires:

A: a running windows OS in order to create a core remaster
B: a virtual linux machine with 256MB RAM
C: a second running windows OS with a pxe server
... and all that just to be able to run the linux version of ghost...

then I really don't get the point.

P.S.: Upper are my own assumptions just based on syntax of paths, as requirements
do not appear to be explicitely mentioned anywhere.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)