Thursday, December 01, 2011

Drivers & Applications Integration in Windows XP using DriverPacks & nLite


DriverPacks Base integration program was created to mainly integrate drivers and eventually triggers an automated or unattended installation of Windows. Therefore before going further into this tutorial, I hope that you are aware of the basics of creating an unattended Windows Setup CD.
This integration program will take all the individual DriverPacks you want to integrate or slipstream (term used by Microsoft for integration) into your 32-Bit Windows 2000 / XP / 2003 Server source.
Here we are going to use Windows XP Professional SP3 CD

First of all you will be needing few items for our recipe listed below -
1.    Windows XP SP3 CD
2.    DriverPacks
4.    nLite
5.    nLite Add-ons

nLite integrator will be used to integrate the applications, hotfixes, service packs prior to finally proceed to make a Bootable CD / DVD out of source so as to save us the time from downloading and then installing packages.

So to get started, you have to create folders named DriverPacks, WinCD & WinISO under C:\

Copy Windows XP SP3 CD contents in WinCD folder.



Then copy DPs_BASE_1006.exe self-extracting archive in C:\DriverPacks folder.

Extract 'DPs_BASE_1006.exe' in the same folder


Now copy the required and downloaded DriverPacks in C:\DriverPacks\DriverPacks (where DriverPacks is a folder inside a folder named DriverPacks in C:\ where you have already extracted the DPs_BASE_1006.exe). Below you can find the screenshot that should resemble yours.


Now run 'DPs_BASE.exe' in C:\DriverPacks and it will open up a window shown below. Click on the 'greater than' that implies next.


Click next on the 'UpdateChecker for NT5 DriverPacks' window.


Click Next on the 'Settings' window too.


In the 'Select Location of platform' window select 'Disc'.


Click on 'Browse'.


Now under 'Location' it will automatically detect and verify the Windows installation files. Click 'Next'.


Now you will find all the drivers listed if you have put all the driver packs related to XP in C:\Driverpacks\DriverPacks\. Here you can select the required drivers for your installation or all of them and click on 'Next'.


In 'Choose the slipstream method' window choose 'method 2' and click on 'Next'.


Now in 'Choose the method to start the Finisher' window select 'GUIRunOnce' and click 'Next'.


Just click 'Next' on 'Optional settings' window.


Select 'DISABLE KTD' on 'KTD' window and click 'Next'.


Click 'Next' on KTD settings window.


Select 'Enable QSC (Recommended)' on 'QuickStream Cache' and click 'Next'.


Leave the defaults i.e. 'Disabled' for DriverPack Graphics A (ATI & Nvidia) and click on 'Next'.


Click 'Next' on 'Overview of settings' and click 'Next'.


Finally click on 'Slipstream!' on About the DriverPacks BASE window.


The integration process begins.


Click 'OK' when there is a message stating that the slipstream has finished.


Now run nLite and click 'Next'.


Locate the Windows XP source as destination i.e. C:\WinCD


Click 'Next' on the 'Presets' window.


At 'Task Selection' window select 'Hotfixes, Add-ons and Update Packs', 'Drivers', 'Unattended' and 'Bootable ISO'. Click on 'Next'.

On 'Hotfixes, Add-ons and Update Packs' window click on 'Insert' and add all the required nLite add-ons. As you can see in the below screenshots. Click on 'Next' when you are done.


Now we will be directed to 'Drivers' window, where you can click on 'Single driver'.

You might be wondering as to why did I choose to select Drivers in the Task Selection window. Well, DriversPack Base program can integrate only archives as you might have noticed. In nLite also we can integrate the drivers but we have to get the .inf file from the self-extracting archive packed drivers. It might sometimes become difficult to extract the archives and find the .inf file. Here below I have done Prolific USB to Serial Port Convertor driver integration using the .inf file.
Note: It's not compulsory to do this step as its only another alternate method that I have tried to show.


On clicking 'Next' we are directed to 'Unattended' window where we can go for all kinds of unattended questions asked during installation like Product Key, Regional and many more. You can explore and make a fully unattended installation without making it ask any of the prerequisites asked during installation. Click on 'Next' when you are done.




It will ask you to start the process and you may click 'Yes' to proceed further.

The process shall begin and you can view the progress and status.

Click 'Next' when it's finished.

On the Bootable ISO window you can select to 'Explore' and add some extra folders. As I chose to add some some additional software packages like Antivirus in the CD / DVD.
Note: These are not going to be integrated, but by doing this I can use this as my Extra Softwares Data CD / DVD.


After you are done with adding any extra packages, you can click on 'Make ISO' and select the destination path for the ISO.

ISO creation starts instantly.

And finally when our image is successfully created, now you can burn it to CD / DVD.

Click on 'Finish' to exit the wizard.

When you have burnt the cd open it up and make sure a folder called $OEM$ is in the root of the CD / DVD.
If everything goes well then you have just created a Ultimate Windows XP CD / DVD that can be installed on various platforms (applies only if you have selected all the drivers before slipstreaming).

Resetting Forgotten Passwords on Linux

Resetting the forgotten root password in RHEL 4.0

There are many ways to reset your forgotten root password. Following are some that I have tried.

Using RHEL Boot CD
The one that I normally go for is by using an alternate boot medium. It may be usb or a cdrom that can be helpful. Many systems these days provide usb booting option. Well we will go for the other one that is cdrom. We just have to make our system ready to boot from the cdrom and this can be done in the BIOS settings. I wont go much into details of BIOS, you will find plenty of material available on the net to do so.
Boot by cd1
Press F5 for rescue mode
Type linux recue at boot:
Choose continue to mount the linux partition on /mnt/sysimage
Finally it gives you a shell prompt
type # chroot /mnt/sysimage
Now you can edit the /mnt/sysimage/etc/shadow file through vi editor
# vi /mnt/sysimage/etc/shadow
Cut out the password from the password field from root in shadow file, save the file and reboot the system.
This will give a passwordless root account.

Using GRUB Menu
At GRUB Boot screen, hightlight the kernel image and press 'e'.
Then press 'e' at line starting with “kernel”.
Give space and type single or rw single init=/bin/bash
Hit enter & then press 'b' to boot the system.
The system will boot to passwordless root shell.
Type
# passwd
And we are done

Using Ubuntu 10.10 Live CD
Boot the system using Ubuntu 10.10 Live CD.
Open a terminal.
Type # sudo fdisk -l to know your root partition.
In my case it was /dev/sda2. After you get to know your partition, type
# sudo mount /dev/sda2 /mnt
Then we have to make /mnt as our /.
# sudo chroot /mnt
Finally change your password
# passwd root
Or we can also go for editing /etc/shadow instead of passwd command
# vi /mnt/etc/shadow





Resetting the forgotten root password Ubuntu 11.04

Using Ubuntu Live CD
boot the system with ubuntu live cd.
open a terminal
# sudo fdisk -l
















# sudo mount /dev/sda1 /mnt
# sudo chroot /mnt
# passwd








Or, we can edit the /etc/shadow file using any editor that you are comfortable with. I had used nano editor.
# nano /etc/shadow
Cut out the password from the password field from root in shadow file and save the file. It should look somewhat like the below pic.

As we can see the password field has been cut out and left with 2 colons. This will give us a passwordless root account.


























Using GRUB Menu
Well in this method you need to do a “little hack” to the grub loader. Sounds cool? Infact its lot more easier.
Boot the system.
Hold down the shift key while booting.
GRUB Menu appears.
Highlight your os image & press 'e'.






























Find the line starting with 'linux' and replace 'ro' with 'rw' and append init=/bin/bash at the end of the line.

















Press ctrl+x
System will boot to passwordless root shell.
# passwd







Here too we can go for editing the /etc/shadow file through any editor you like in case the passwd doesnt work.
Cut out the password from the password field from root in shadow file and save the file

Finally,
# reboot -f
And we are done.