Difference between pages "PXE Network Windows Installation" and "FLOP:Release Engineering"

(Difference between pages)
 
 
Line 1: Line 1:
''Howto use your Funtoo machine to serve a MS Windows installation over the network''
+
{{FLOP
In this guide we will assume that you have followed the [[PXE network boot server]] Wiki article and have a working network/pxe boot setup. As of now this guide will cover Windows XP. Soon it will be expanded to also cover Windows 7.  
+
|Created on=2013/07/28
==Prerequisites==
+
|Summary=This is a proposal to implement a strong release engineering infrastructure for Funtoo Linux. Funtoo currently is only a rolling-release distro and does not have the option to also be non-rolling. In order to create a more stable Funtoo system, this proposal will be offering a few things that we can do to make that happen.
#A working Funtoo installation
+
|Author=Fearedbliss
#A working PXE Setup (DHCP, TFTP, PXELinux)
+
|Maintainer=Fearedbliss
#app-arch/cabextract
+
}}
#A legitimate copy of Microsoft Windows
+
=== Introduction ===
#Driver for your NIC - ''Suggested to use a complete driver pack with all major supported NIC hardware for the version of Windows to be installed.''
+
#RIS Linux toolkit >=0.4
+
#A working Samba server setup
+
  
== Creating the Windows XP Image ==
+
This is a proposal to implement a strong release engineering infrastructure for Funtoo Linux. Funtoo currently is only a rolling-release distro and does not have the option to also be non rolling. In order to create a more stable and maintainable Funtoo, this proposal will be offering a few things that we can do to make that happen.
  
*In the previous guide, [http://www.funtoo.org/wiki/PXE_network_boot_server PXE Network Boot Server], we used /tftproot as the working directory so we will also use it in this guide for convenience. If you chose to use a different working directory then please apply it where needed in place of the /tftproot we will be going by here.
+
This proposal will not change Funtoo from a rolling release distro to a non rolling one, but it will instead simply add the option to also be non rolling.
  
First you will need to create an ISO from your Windows XP installation disc. If you already have the ISO image you may skip this step.  
+
Funtoo will also not become a binary distro and will remain a source based one. However, binaries do provide various advantages that allow users to have faster deployments or easier disaster recovery. For this reason Funtoo will make available binary packages for the most time consuming, and most commonly used applications.
  
<console>
+
This will make Funtoo a much more stable and maintainable distro for users that want to have predictability with their system upgrades, whether they are a normal user, or an enterprise one.
###i## dd if=/dev/sr0 of=/tftproot/winxp.iso
+
</console>
+
If your cdrom device isn't ''<code>/dev/sr0</code>'' please use the appropriate device in this command.
+
  
== Mount the ISO and Prepare Installation Sources ==
+
The following things are proposed:
Mount the image to ''<code>/tftproot/cdrom</code>'':  
+
* Semi-Rolling Releases (Funtoo Frozen)
<console>
+
* A Complete OS
###i## mkdir /tftproot/cdrom; mount -o loop /tftproot/winxp.iso /tftproot/cdrom
+
* Funtoo Binary Platform
</console>
+
Create the new directory for the network installation files and copy the needed files to it:
+
<console>
+
###i## mkdir /tftproot/winxp; cp -R /tftproot/cdrom/i386 /tftproot/winxp/i386
+
</console>
+
Depending on your CD/DVD copy of windows the directory name may be I386 as opposed to i386, if that is the case you will just need to change the first part of the command, keeping the new directory name i386 - this is going to be very important later on when creating the remap file!
+
Check the contents of your newly created i386 directory to see if the filenames are in all CAPS or if they are already in lowercase.
+
<console>
+
###i## ls /tftproot/winxp/i386
+
</console>
+
If you happen to have all UPPERCASE filenames, lets go ahead and run a script to convert it to all lowercase:
+
<console>
+
###i## cd /tftproot/winxp/i386;ls | awk '$0!=tolower($0){printf "mv \"%s\" \"%s\"\n",$0,tolower($0)}' | sh
+
</console>
+
  
==Extracting and Modifying the Required Boot Files ==
+
=== Semi-Rolling Releases (Funtoo Frozen/Chinchilla) ===
Install {{Package|app-arch/cabextract}}
+
<console>
+
###i## emerge -av app-arch/cabextract
+
</console>
+
Extract the prepackaged drivers:
+
<console>
+
###i## cd /tftproot/winxp/i386;cabextract driver.cab
+
</console>
+
Install support for a large list of network cards:
+
<console>
+
###i## cd /tftproot/;wget http://downloads.sourceforge.net/project/bootfloppy/pxefiles.tar.gz
+
###i## tar zxvf pxefiles.tar.gz; cp pxefiles/drivers/* winxp/i386/
+
</console>
+
Copy the BINLSRV /INFParser tools to /tftproot:
+
<console>
+
###i## cp pxefiles/script/* /tftproot/
+
</console>
+
Extract the netboot startrom:
+
<console>
+
###i## cd /tftproot; cabextract winxp/i386/startrom.n1_
+
</console>
+
Fix the startrom for netbooting xp:
+
<console>
+
###i## sed -i -e 's/NTLDR/XPLDR/gi' startrom.n12
+
###i## mv startrom.n12 winxp.0
+
</console>
+
Fix XPLDR:
+
<console>
+
###i## cabextract winxp/i386/setupldr.ex_
+
###i## sed -i -e 's/winnt\.sif/winxp\.sif/gi' setupldr.exe
+
###i## sed -i -e 's/ntdetect\.com/ntdetect\.wxp/gi' setupldr.exe
+
###i## mv setupldr.exe xpldr
+
###i## cp winxp/i386/ntdetect.com ntdetect.wxp
+
</console>
+
  
== Creating a remapping file ==
+
The semi-rolling release model is a hybrid between a rolling release and a non-rolling release. This means that instead of bring new packages in all the time (rolling release), and instead of just completely freezing everything and bringing new packages/features every X months, we can have a middle ground where we can quickly and easily branch the Portage Tree git branch and then focus on stabilizing that tree. Once we stabilize it, people can use it without having to worry about major version upgrades. The user can then use this branch until another branch later in the future is created. The user can then easily upgrade to the new branch by switching their profile to the new version.
Create the file ''<code>/tftproot/tftpd.remap</code>'' and add the following to it:
+
<console>
+
###i## nano /tftproot/tftpd.remap
+
ri ^[az]: # Remove “drive letters”
+
rg \\ / # Convert backslashes to slashes
+
rg \# @ # Convert hash marks to @ signs
+
rg /../ /..no../ # Convert /../ to /..no../
+
rg A a
+
rg B b
+
rg C c
+
rg D d
+
rg E e
+
rg F f
+
rg G g
+
rg H h
+
rg I i
+
rg J j
+
rg K k
+
rg L l
+
rg M m
+
rg N n
+
rg O o
+
rg P p
+
rg Q q
+
rg R r
+
rg S s
+
rg T t
+
rg U u
+
rg V v
+
rg W w
+
rg X x
+
rg Y y
+
rg Z z
+
r ^/(.*) \1
+
r ^xpldr xpldr
+
r ^ntdetect.wxp ntdetect.wxp
+
r ^winxp.sif winxp.sif
+
</console>
+
  
==Install/Configure Samba ==
+
==== New Funtoo Profiles for Releases ====
If you don't already have {{Package|net-fs/samba}} installed, then:
+
<console>
+
###i## emerge -av net-fs/samba
+
</console>
+
Create a Samba share for your tftp server in ''<code>/etc/samba/smb.conf</code>''
+
  
{{Note}} Be sure you have the other required samba settings configured in the file
+
Since we want to provide users the ability to easily enter and exit into a frozen phase, new profiles will be added periodically.
<console>
+
###i## nano /etc/samba/smb.conf
+
[Global]
+
interfaces = lo eth0 wlan0
+
bind interfaces only = yes
+
workgroup = WORKGROUP
+
security = user
+
  
[tftproot]
+
The first and main branch for development is the “current” branch. This is the same branch that everyone is using and that is the traditional rolling release branch.
path = /tftproot
+
browsable = true
+
read only = yes
+
writable = no
+
guest ok = yes
+
</console>
+
Start Samba:
+
<console>
+
###i## /etc/init.d/samba start
+
</console> 
+
or if samba has already been started:
+
<console>
+
###i## /etc/init.d/samba restart
+
</console>
+
  
== Creating a Setup Instruction File ==
+
The second branch is the “stable” branch. This is the same stable branch that is available today , also using a rolling release approach and that uses ‘arch’ and other masks in order to provide stability.
Create the file ''<code>/tftproot/winxp.sif</code>'' and add the following, replacing SAMBA_SERVER_IP with the local IP address of your samba server:
+
<console>
+
###i## nano /tftproot/winxp.sif
+
[data]
+
floppyless = "1"
+
msdosinitiated = "1"
+
; Needed for second stage
+
OriSrc = "\\SAMBA_SERVER_IP\tftproot\winxp\i386"
+
OriTyp = "4"
+
LocalSourceOnCD = 1
+
DisableAdminAccountOnDomainJoin = 1
+
  
[SetupData]
+
The new branches are considered “Funtoo Frozen” branches. These branches configure your system to follow the Funtoo tree selected. This funtoo tree will not introduce any version changes and will only include tree fixes (bugs or ebuild) and security updates.
OsLoadOptions = "/fastdetect"
+
; Needed for first stage
+
SetupSourceDevice = "\Device\LanmanRedirector\SAMBA_SERVER_IP\tftproot\winxp"
+
  
[UserData]
+
For example: Funtoo 14.1 is currently the January 2014 release. In order to use this release you can select this release from the profile module:
ComputerName = *
+
</console>
+
  
== Editing the pxelinux.cfg/default boot menu ==
+
# eselect profile set-build 5
Edit your boot menu so that it contains the following entry:
+
# eselect profile list
<pre>
+
Currently available arch profiles:
LABEL WinXP
+
[1] funtoo/1.0/linux-gnu/arch/x86-64bit *
MENU LABEL Install MS Windows XP
+
[2] funtoo/1.0/linux-gnu/arch/pure64
KERNEL winxp.0
+
Currently available build profiles:
</pre>
+
[3] funtoo/1.0/linux-gnu/build/stable
== Re-Start all required daemons==
+
[4] funtoo/1.0/linux-gnu/build/current
If the daemon isn't already running use start instead or restart in the following commands
+
[5] funtoo/1.0/linux-gnu/build/14.1 *
<pre>
+
Currently available flavor profiles:
/etc/init.d/dnsmasq restart
+
[6] funtoo/1.0/linux-gnu/flavor/minimal
/etc/init.d/in.tftpd restart
+
[7] funtoo/1.0/linux-gnu/flavor/core *
</pre>
+
[8] funtoo/1.0/linux-gnu/flavor/desktop
== Modify Binlsrv, update driver cache, and start driver hosting service ==
+
[9] funtoo/1.0/linux-gnu/flavor/workstation
Change the BASEPATH= variable at or around line #62 of binlsrv.py so that it is:
+
[10] funtoo/1.0/linux-gnu/flavor/hardened
<pre>
+
BASEPATH='/tftproot/winxp/i386/'
+
</pre>
+
Generate driver cache
+
<pre>
+
cd /tftproot;./infparser.py winxp/i386/
+
</pre>
+
Start binlservice
+
<pre>
+
./binlsrv.py
+
</pre>
+
  
== Booting the client ==
+
Once a new frozen release is released, you can change your profile to point to that release. Frozen releases are made to freeze the distro for the short term, and upgrading to the next frozen release is recommended. There will most likely be a “Long Term” frozen release as well for people that do not like to update every 4 months.
If all is well, you should be able to boot the client choosing to ''boot from network'' in the boot options, you should get to your PXELinux bootloader, and see the Install Windows XP option after pressing enter you *should* kick off your XP installation via network!! Congratulations!
+
  
[[Category:HOWTO]]
+
In the event that you do not update for various releases, a full system reinstall is recommended since a lot of things change over time including toolchain updates that have cascading effects.
 +
 
 +
==== Example of 4 Month Release Cycle ====
 +
 
 +
Funtoo 14.1 (January 2014)
 +
Funtoo 14.2 (May 2014)
 +
Funtoo 14.3 (September 2014)
 +
Funtoo 15.1 (January 2015)
 +
 
 +
==== Which branch is for what person? ====
 +
The “current” branch is for people who want to be on the bleeding edge all the time. You will get the latest updates, and here is where all the development happens. Your system might not be fully stable all the time, and things might fail to compile. This is the traditional Funtoo rolling release model. If you want to continue using your system the way it has always been, this is the branch for you.
 +
 
 +
The “stable” branch is for people who still want to be using the rolling release model but want to depend on the traditional method of ebuild’s hiding newer versions based on “~”.
 +
 
 +
The new frozen branches are for people who don’t want a lot of updates but would rather have a more stable version of the “current” tree that is audited for stability.
 +
 
 +
=== A Complete OS ===
 +
 
 +
An operating system is not just a stage3 tarball. The stage3 is incomplete and requires the user to compile their own kernel and bootloader before being able to use their system. We should have a stage which includes a well tested kernel, bootloader, and other utilities necessary for an user to deploy their system. This will speed up deployments and will provide predictability for kernel modules, and other applications that rely on a kernel.
 +
 
 +
The fundamental and primary contents of a stage3 is to have a full @system, and nothing more. A stage4 would be the next iteration which includes the stage3, a kernel, bootloader, and other utilities necessary for an user to deploy their system.
 +
 
 +
=== Funtoo Binary Platform ===
 +
 
 +
The Funtoo Binary Platform is intended to provide binaries for the most time consuming and most commonly used applications in the Funtoo Community. There are applications that will not be provided in the the FBP. Examples of these applications are applications that require a kernel for compilation, applications that require explicit license acceptance, or applications that cannot be distributed due to certain patents/copyright issues.
 +
 
 +
Example of some applications that will be in the FBP can be found at the link below:
 +
 
 +
Funtoo Binary Platform
 +
 
 +
You can download Funtoo 14.1 which is mostly using all the above concepts (Excluding profile selection) here:
 +
 
 +
Funtoo 14.1
 +
[[Category:Internals]]
 +
[[Category:FLOP]]
 +
{{FLOPFooter}}

Revision as of 00:32, February 25, 2014

Created on
2013/07/28
Original Author(s)
Fearedbliss
Current Maintainer(s)
Fearedbliss

Funtoo Linux Optimization Proposal: Release Engineering

This is a proposal to implement a strong release engineering infrastructure for Funtoo Linux. Funtoo currently is only a rolling-release distro and does not have the option to also be non-rolling. In order to create a more stable Funtoo system, this proposal will be offering a few things that we can do to make that happen.

Introduction

This is a proposal to implement a strong release engineering infrastructure for Funtoo Linux. Funtoo currently is only a rolling-release distro and does not have the option to also be non rolling. In order to create a more stable and maintainable Funtoo, this proposal will be offering a few things that we can do to make that happen.

This proposal will not change Funtoo from a rolling release distro to a non rolling one, but it will instead simply add the option to also be non rolling.

Funtoo will also not become a binary distro and will remain a source based one. However, binaries do provide various advantages that allow users to have faster deployments or easier disaster recovery. For this reason Funtoo will make available binary packages for the most time consuming, and most commonly used applications.

This will make Funtoo a much more stable and maintainable distro for users that want to have predictability with their system upgrades, whether they are a normal user, or an enterprise one.

The following things are proposed:

  • Semi-Rolling Releases (Funtoo Frozen)
  • A Complete OS
  • Funtoo Binary Platform

Semi-Rolling Releases (Funtoo Frozen/Chinchilla)

The semi-rolling release model is a hybrid between a rolling release and a non-rolling release. This means that instead of bring new packages in all the time (rolling release), and instead of just completely freezing everything and bringing new packages/features every X months, we can have a middle ground where we can quickly and easily branch the Portage Tree git branch and then focus on stabilizing that tree. Once we stabilize it, people can use it without having to worry about major version upgrades. The user can then use this branch until another branch later in the future is created. The user can then easily upgrade to the new branch by switching their profile to the new version.

New Funtoo Profiles for Releases

Since we want to provide users the ability to easily enter and exit into a frozen phase, new profiles will be added periodically.

The first and main branch for development is the “current” branch. This is the same branch that everyone is using and that is the traditional rolling release branch.

The second branch is the “stable” branch. This is the same stable branch that is available today , also using a rolling release approach and that uses ‘arch’ and other masks in order to provide stability.

The new branches are considered “Funtoo Frozen” branches. These branches configure your system to follow the Funtoo tree selected. This funtoo tree will not introduce any version changes and will only include tree fixes (bugs or ebuild) and security updates.

For example: Funtoo 14.1 is currently the January 2014 release. In order to use this release you can select this release from the profile module:

  1. eselect profile set-build 5
  2. eselect profile list

Currently available arch profiles: [1] funtoo/1.0/linux-gnu/arch/x86-64bit * [2] funtoo/1.0/linux-gnu/arch/pure64 Currently available build profiles: [3] funtoo/1.0/linux-gnu/build/stable [4] funtoo/1.0/linux-gnu/build/current [5] funtoo/1.0/linux-gnu/build/14.1 * Currently available flavor profiles: [6] funtoo/1.0/linux-gnu/flavor/minimal [7] funtoo/1.0/linux-gnu/flavor/core * [8] funtoo/1.0/linux-gnu/flavor/desktop [9] funtoo/1.0/linux-gnu/flavor/workstation [10] funtoo/1.0/linux-gnu/flavor/hardened

Once a new frozen release is released, you can change your profile to point to that release. Frozen releases are made to freeze the distro for the short term, and upgrading to the next frozen release is recommended. There will most likely be a “Long Term” frozen release as well for people that do not like to update every 4 months.

In the event that you do not update for various releases, a full system reinstall is recommended since a lot of things change over time including toolchain updates that have cascading effects.

Example of 4 Month Release Cycle

Funtoo 14.1 (January 2014) Funtoo 14.2 (May 2014) Funtoo 14.3 (September 2014) Funtoo 15.1 (January 2015)

Which branch is for what person?

The “current” branch is for people who want to be on the bleeding edge all the time. You will get the latest updates, and here is where all the development happens. Your system might not be fully stable all the time, and things might fail to compile. This is the traditional Funtoo rolling release model. If you want to continue using your system the way it has always been, this is the branch for you.

The “stable” branch is for people who still want to be using the rolling release model but want to depend on the traditional method of ebuild’s hiding newer versions based on “~”.

The new frozen branches are for people who don’t want a lot of updates but would rather have a more stable version of the “current” tree that is audited for stability.

A Complete OS

An operating system is not just a stage3 tarball. The stage3 is incomplete and requires the user to compile their own kernel and bootloader before being able to use their system. We should have a stage which includes a well tested kernel, bootloader, and other utilities necessary for an user to deploy their system. This will speed up deployments and will provide predictability for kernel modules, and other applications that rely on a kernel.

The fundamental and primary contents of a stage3 is to have a full @system, and nothing more. A stage4 would be the next iteration which includes the stage3, a kernel, bootloader, and other utilities necessary for an user to deploy their system.

Funtoo Binary Platform

The Funtoo Binary Platform is intended to provide binaries for the most time consuming and most commonly used applications in the Funtoo Community. There are applications that will not be provided in the the FBP. Examples of these applications are applications that require a kernel for compilation, applications that require explicit license acceptance, or applications that cannot be distributed due to certain patents/copyright issues.

Example of some applications that will be in the FBP can be found at the link below:

Funtoo Binary Platform

You can download Funtoo 14.1 which is mostly using all the above concepts (Excluding profile selection) here:

Funtoo 14.1