Images taken at the Black Sheep Trading in Bar Harbor, Maine USA.
Tag: Boot
How to Boot from a Ubuntu SAN
Introduction
The following section is a brief overview of “How to Boot from a Ubuntu SAN” with a Microsoft Server Operating System, and is intended as a reference.
These instructions were done as a guide to setup a test environment.
The following Microsoft Server Operating systems have been tested:
- Windows 2003 SP-3
- Windows 2008 SP-2 (Core)
- Windows 2008 SP-2 (Enterprise)
- Windows 2008 SP-2 (Standard)
If you see anything that is in “error” or would like to have something added, please feel free to contact us.
– SDC
Install the Windows Operating System
Install the Windows Operating System as you normally would, with the following notes:
- Install the OS unto an External Storage Device;
- This Device will later be moved and mounted on the Ubuntu target
- Format the OS installation partition as small as possible, but keep in mind:
- Physical RAM on the Initiator/Client machine;
- Windows Patching needs;
Minimal Recommendations:
Although numerous attempts were done with a bare minimal requirements, it is STRONGLY suggested that you install the following:
- Windows Server 2003 SP2 or Greater
Download iSCSI support (2003 and below)
If you are installing a Microsoft Windows OS 2003 SP2 (or below), then you will need to do the following:
- Download the “Microsoft iSCSI Software Initiator BootVersion”
- The BOOT version is REQUIRED
- It is also recommend the you download the Check version
- Downloads can be found here:
Install and Setup of Microsoft iSCSI Software Initiator (2003 and below)
The basic installation of the software is straight forward,
- Run the setup program;
- In the Microsoft iSCSI Initiator Installation window, be sure to select:
- Initiator Service
- Software Service
- DO NOT SELECT “Microsoft MPIO Multipathing Support for iSCSI” because it is NOT COMPATIBLE with iSCSI boot.
- In the next dialog box, you will be asked to select “Configure iSCSI Network Boot Support”
- After the installation is complete, Reboot the system to check that is boots correctly.
Transferring Windows OS Image to Ubuntu
In these steps, you will be physically and digitally transferring the Target OS image.
- Shut down the Windows OS machine;
- Disconnect the Drive from the Windows machine;
- Reconnect the Drive to the Ubuntu Server;
- Once mounted, Open a Terminal Window;
- Type in the following command:
- Disk path – Example:
/dev/sdb
- Bytes per Cylinder – Example:
8225280
- Ending cylinder number for the partition – Example:
1026
- Disk path – Example:
sudo fdisk -l
Which should return something similar to:
You will need the the following information:
- Using this information, type in:
dd if=/dev/sdb of=/path/to/image/file.img bs=8225280 count=1026
It is strongly recommended that the /path/to/file.img
, be placed into a LARGE /var
path.
Note: Using /dev/sdb
copies the Master Boot Record (MBR), while /dev/sdb1
just copies the partition.
- To verify the image transfer, use the following command:
fdisk -l /path/to/image/file.img
Making the Windows OS image available on iSCSI
Now the Windows OS image need to be made available:
- In the terminal window, type in:
sudo gedit /etc/ietd.conf
- Add the following to the end of the file:
yyyy
is the year andmm
is the month that the domain became valid.- is written as
1.168.192
orcom.yourdomain
(this will change in your environment). [Optional identifier]
is used to further identify the target.Path=
is where your files are located on the local machine.
Target iqn.yyyy-mm.com.mydomain:[Optional identifier]
Lun 0 Path=/path/to/image,Type=fileio,IOMode=rw
Where:
- Restart the iSCSI daemon:
sudo invoke-rc.d iscsitarget restart
Configure your Ubuntu DHCP Server
Now to configure your DHCP Server:
- In the terminal window, type in:
sudo gedit /etc/dhcpd.conf
- Add the following to the end of the file:
filename "";
option root-path "iscsi:my.target.dns.name::::iqn.2007-08.name.dns.target.my:iscsiboot";
Note: The second line (“Option…”) should be all on one line.
- Restart the DHCP daemon:
sudo /etc/init.d/dhcpd restart
Boot from the Diskless Client
It is now possible to boot from your Diskless client:
- Insert and Boot the Initiator/Client from the Etherboot media.
- After a short time, the Target OS should start to boot in a Normal fashion.
Etherboot Project
- Required for Booting the Local Computer over the network to the SAN.
- Booting can be done with Floppies, CD/DVD or USB devices.
- This documentation is derived from the “HowTo Guides – Boot from SAN“
Windows Boot Sequence
- Turn on your computer;
- The Computer initiates a POST (Power On Self Test) for devices that have a BIOS (Basic Input/Output System);
- Test the memory & various Subsystems
- Examples: AGP and Network cards
- Test the memory & various Subsystems
- BIOS then attempts to find the MBR (Master Boot Record)
- A 512-byte sector (LBA 0 or HD0)
- If successful, the Windows OS takes Control, and looks for NTLDR(Boot Loader for Windows NT based OSes)
- In Vista and Server 2008, this has been replaced with:
- NTLDRallows:
- Memory Addressing
- Initiates the File System
- Reads boot.ini
- Additional NT Kernel switches (General)
- Available Switches for XP and 2003
- ARC Path Naming Conventions
- NTLDRhas to be at the ROOT of an active partition to detect:
- NTDETECT.COM
- BOOT.INI
- BOOTSECT.DOS (needed for multi-OS installs)
- NTBOOTDD.SYS(need for SCSI adapters)
- Only used if:
- Boot Drive is SCSI;
- Not using real-mode INT 0x13;
- Then a copy of the SCSI miniport driver is loaded for Windows to run
- Only used if:
- Troubleshooting:
- If XP is selected in the Boot Menu, NTLDRruns:
- NTDETECT.COM
- Gathers basic information from hardware BIOs
- BOOT.INI
- BOOTSECT.DOS
- The systems starts in 16-bit real mode, and then moves into 32-bit protected mode
- It is possible to select F8 for Additional Boot Modes (Safe Mode, Last Known Good Configuration, etc.)
- NTDETECT.COM
- NTLDR then loads NTOSKRNL.EXE and HAL.DLL
- Located at: %SystemRoot%System32
- Additional files/locations loaded:
- kdcom.dll (Kernel Debugger HW)
- bootvid.dll (Windows Logo & Side-Scrolling bar)
- NTLDRreads the Registry for the following information:
- Hardware Profile
- Authorized Device Drivers
- And needs to be in the Exact Order
- “Session Manager” is then started
- Smss.exe starts Autochk
- Mounts all drives
- Checks drives for a Clean shutdown state
- Starts win32k.sys for the Graphical User Interface (GUI) interface
- Starts csrss.exe (Client/Server Runtime Subsystem)
- User-Mode Applications
- Creates Virtual Memory/Paging file
- HKLMSYSTEMCurrentControlSetControlSession ManagerMemory Management
- Smss.exe starts Autochk
- NTOSKRNL.EXE takes control and starts WINLOGON.EXE which in turn starts LSASS.EXE
- LSASS.EXE (Local Security Authority Subsystem Service) provides the Logon screen