Tiny Core Linux

General TC => General TC Talk => Topic started by: funguy on February 20, 2012, 10:57:28 AM

Title: TinyCore with Symantec Ghost using PXE
Post by: funguy on February 20, 2012, 10:57:28 AM
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 (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 (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....
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: funguy on February 24, 2012, 05: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 (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) ;) :)
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: tweetyhack on March 02, 2012, 06: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.
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: funguy on March 05, 2012, 08: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.
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: PTR73 on March 07, 2012, 07: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
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: gutmensch on March 07, 2012, 07: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++.
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: PTR73 on March 07, 2012, 08: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.  :-\




Title: Re: TinyCore with Symantec Ghost using PXE
Post by: gutmensch on March 07, 2012, 08: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...
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: PTR73 on March 07, 2012, 09:03:42 AM
yess clear to me..

thanx.
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: funguy on March 07, 2012, 11:16:41 AM
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.
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: tweetyhack on March 08, 2012, 01: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!
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: tweetyhack on March 08, 2012, 01: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
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: PTR73 on March 09, 2012, 08: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?

Title: Re: TinyCore with Symantec Ghost using PXE
Post by: funguy on July 27, 2012, 12: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*********
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: tinypoodle on July 27, 2012, 01: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.
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: funguy on July 27, 2012, 04:45:18 PM
>>A: a running windows OS in order to create a core remaster
  The ghost linux files are also on the GSS 2.5 installation cd (/mnt/sr0/Linux/LinuxTools.tgz)

>>B: a virtual linux machine with 256MB RAM
  I just wanted to save a few cds during the remaster..anyone can burn the original tinycore cd and boot a real machine to create the ezremaster

>>C: a second running windows OS with a pxe server.
   Or a linux server for pxe.  Linux is more stable.  Just add an samba share for image storage.

>>... and all that just to be able to run the linux version of ghost...
    Well when you put it like that it is a lot   :)  I do prefer to run ghost from my parted magic pxe image.  Until I figure out why occasional storage modules need to be script launched like hpsa, which only works on newer hp proliants.  I have been putting a lot more effort into making tinycore play nice with all the machines I image regularly. I would just use clonezilla but there are drawbacks, like the fact it can't shrink partitions easily during restore.  Truth is, I just love the wbar in tinycore and the smaller overall size too much to stop trying to perfect it.  Hence the script to help reduce human error as I remaster.

>>then I really don't get the point.
   I just wanted a smaller pxe like tinycore os that has lots of drivers to help ghost image newer hardware.

Title: Re: TinyCore with Symantec Ghost using PXE
Post by: curaga on July 28, 2012, 02:25:34 AM
Quote
   I just wanted a smaller pxe like tinycore os that has lots of drivers to help ghost image newer hardware.

Oh, nothing against that; I assume tinypoodle's main criticism was about the use of Windows, we are on a linux forum after all ;)

Also TC itself can run as a PXE server.
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: tinypoodle on July 28, 2012, 08:04:56 AM
Thanks for all clarifications.

First thing coming to my mind when reading "core + ghost" would be booting a DOS image with ghost from a pxe server running under core...

Note that a pxe server is included in base, including a configuration "wizard", very simple and very low in requirements (X not required).
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: jonatj on October 31, 2012, 09:12:15 PM
Wow funguy, I love what you've done.  I want to use the Tiny Core Builder for VMware View Client and PXE boot it.

The URL for the builder is: "repurpose dot vmwarecloud dot at" 

It looks like the cr_tc-initrd.sh dumps the contents of core.gz and the files listed in copy2fs.lst and merges them in a temp folder and repacks it.  Does it also copy all the files from cde\optional?  And, what does the bootsync.sh line do? 

Then your script adds the Ghost files into the proper folders (using tmp\newinit) and then repack it.  Since the cde\optional folder has a bunch of extensions including the View Client, how would you merge these into the core.gz?  Would the cr_tc-initrd.sh work?

Thanks,

Jonathan

******************UPDATE - 11/1/2012******************

I was able to run the cr_tc-initrd.sh with a slight modification.  Instead of copying the files from copy2fs.lst, I used the onboot.lst.  This seemed to work and when I booted from PXE the GUI started.  However, I think the View Client may have some trouble starting because I see the desktop background and the WBar, but when View Client launches there is a black screen with an X cursor.  So there is something still amiss, but its a pretty good start.  The core.gz is only 20MB! 
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: funguy on January 03, 2013, 08:53:09 AM
Weird thing happened.  I tried 4.7.2 and my base extensions were missing after I ran my old add_ghost_and_create_pxe_core.sh script.  Here is a new fixed script that seems to work better by adding the base extensions to ezremaster.cfg.  Any help improving this script is gladly accepted.  The CDE folder is still auto deleted so that PXE is easier.  PXE is tested and working fine with this new script.
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: sebus on January 05, 2013, 10:38:55 AM
Thanks funguy for an excellent post.
I have created my image by hand (while adding scsi/raid drivers)
The speed of PXE booting TC beats any WinPE iso hands down.

Definitely best solution around (as long as Symantec produces Linux version...)

sebus
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: sebus on February 16, 2013, 08:40:48 AM
Just one issue with Optiplex 360 & 380

I use ghost to auto reboot after finish -rb

Machine starts the shutdown, but never passes beyond System Restating - but it never does!

Most likely the issue as here (http://linux.derkeiler.com/Mailing-Lists/Kernel/2009-06/msg02480.html)

sebus
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: curaga on February 16, 2013, 10:15:39 AM
Not the same, as that is in the kernel.
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: sebus on February 16, 2013, 10:28:19 AM
Exactly, can not reboot TCL on this machine either (by normal reboot), just the fact that Ghost invokes the command, makes no difference
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: TechRavingMad on April 24, 2013, 12:37:08 PM
I know this has been a while, but is there a how-to on how I can add the megaraid_sas modules to this remastering process?  I'm probably just being dense, but I don't see how to do that as part of the remaster.  Everytime I try something it works fine in my VM, but after copying over the iso it doesn't load the kernel module I need to see my drives.

Any help is greatly appreciated.
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: genec on April 28, 2013, 10:54:05 AM
I personally would do it via a dynamic remaster like my dynamic multimaster (http://wiki.tinycorelinux.net/wiki:dynamic_multimaster) or dynamic remaster (http://wiki.tinycorelinux.net/wiki:dynamic_root_filesystem_remastering) (and yes, I have a CPIO.GZ that contains the scsi .tcz and a lot of other kernel module extensions).
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: sebus on April 23, 2015, 01:15:41 PM
In case anybody still interested in this.

ghost version 12.0.0.7026 available in trial symantec_deploymentsolution_7_6_x64.msi (only Windows based, but Linux executable is there!) works in 32-bit latest 6.1 core:

Download http://esdownload.symantec.com/akdlm/CD/MTV/symantec_sim_7_6_67_win_en.exe

Install filling whatever info, ignore SQL warning, no reboot, download the trial of Altiris Deployment Solution 7.6 (7.6.1395), extract ghost executables from msi saved in C:\Program Files\Altiris\Symantec Installation Manager\Installs\Altiris

Then one can copy the executable to core.gz following the guide:

http://devblog.htssoft.com/2012/09/customizing-tinycore-linux-install.html

sebus

edit:

Newer version of ghost 2.0.0.7031 is available in Symantec_deploymentsolution_7_6_hf1_x64.msi
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: sebus on December 20, 2015, 07:14:54 AM
Ghost build 12.0.0.8019 (did not yet test it)

Code: [Select]
Open this link (pref in IE11), no need to download anything
https://www4.symantec.com/Vrt/offer?a_id=32763
then download
http://esdownload.symantec.com/akdlm/CD/MTV/Symantec_Ghost_Solution_Suite_3_0_HF4.exe

A new version of LessMSI (https://github.com/activescott/lessmsi/releases) has been released (v1.4), which adds Win10 support.
LessMSI allows extracting files from MSI files with a nice GUI, and can clearly display the contents inside the MSI.
7-Zip can also open MSI files, but in some cases (like the Ghost MSI) cannot display the contents properly.
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: sebus on December 20, 2015, 08:54:55 AM
msi with Standard tools only

Code: [Select]
http://esdownload.symantec.com/akdlm/CD/MTV/Symantec_Ghost_Standard_Tools_3_0_HF4.msi
Ghost works fine in TC 6.4.1
Title: Re: TinyCore with Symantec Ghost using PXE
Post by: sebus on December 26, 2015, 01:12:55 PM
Linux executable is only 32-bit, so only works with TinyCore-6.4.1.iso, but NOT with TinyCorePure64-6.4.1.iso (pity)