Your company's ad could live here and reach over 50,000 people a month!

Share This Post

Using SCCM to deploy Linux ( and dual boot with XP)

First off I have to say I know hardly anything about Linux! I was given a linux SOE installed “prepped” on a second partition and was tasked to get it deployed via sccm.

The first problem was automating the bootloader; I didn’t want to have to use grub as the default bootloader so I tried tutorials on the internet to copy the grub bootsector bits and use the Windows bootloader to boot into grub/linux. This seemed to work but only on the test machine I was playing with, not deployable. I then found Grub4Dos that can be used to boot into a partition that has Grub on it from the Windows bootloader.

The second problem was deploying the actual image, we are licensed to use Ghost 11.5 so I thought that this may work well since it supports linux file systems.

The third problem is the space for the linux partition, in our environment the linux OS is only required in Student Labs and since they are only now getting moved onto the SCCM site we set the Student Windows imaging task sequence to leave 10% of the hard drive for a Linux partition if required. There may be tools out there to resize windows partitions.

Whats Required:

Grub4Dos:
http://sourceforge.net/projects/grub4dos/

Ghost 11.5 or possibly another Linux imaging tool.

A “prepped” linux soe and GRUB (configured to boot into Linux straight away) installed onto a partition.

Instructions:

1. Capture the Linux partition using Ghost, I boot into winpe then map a network drive to capture to.

2. Create a menu.lst file for Grub4Dos to use using your favorite text editor.

######################################################
# GvR Sept 30th 2004
color black/cyan yellow/cyan
timeout=1
default=0
title Linux
rootnoverify (hd0,1)

chainloader +1
boot
######################################################

The bold line here is saying boot into the second partition, there is also a timeout of 1 set above so it boots into Linux straight away. I left the gross colors default for now.

3. Also create a boot.ini to replace the system’s current one.

[boot loader]
timeout=10
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=”Microsoft Windows” /noexecute=optin /fastdetect
c:\grldr=”Scientific Linux”

I have added the last line that tells the bootloader that Scientific Linux can also be booted, I also changed the timeout to 10 seconds. This could be better scripted to allow for different scenarios.

4.Create an Install.bat file

Ghost32.exe -clone,mode=PRESTORE,src=LinuxSoe2012.GHO:1,dst=1:2 -sure
attrib -r -s -h C:\boot.ini
copy boot.ini C:\ /Y
copy grldr C:\ /Y
copy menu.lst C:\ /Y
attrib +r +s +h C:\boot.ini
attrib +r +h C:\grldr
attrib +r +h C:\menu.lst

This runs ghost to image the second partition silently, then replaces the boot.ini, then copys the grub4dos files to the C:  and sets permissions on the files so they can’t be modified or viewed.

5. Create a package source folder for SCCM

6. Copy the ghost program files, the ghost image, grldr (from Grub4dos), menu.lst, the boot.ini file and the install.bat to the package source folder

7. Create a SCCM package with the program being the install.bat.

8. Deploy!

Notes:

  • I’m unsure whether the image has to be captured on the second partition.
  • Grub has to be installed to that partition
  • With the prepped version of Linux I captured it won’t work on systems with IDE emulation enabled (the Linux SOE creator could either install and prep on IDE emulation or SATA and that would determine what systems could take the image), I’m not sure if that is a limitation on prepping a linux image or if there’s a better system to prep an image.

Share This Post

I am an SOE Engineer working mainly with SCCM. I hope some of my blogs can help others deal with problems I have come across.

Leave a Reply