PDA

View Full Version : PXE Booting Knoppix From Windows RIS



jason331
04-11-2008, 08:33 PM
Hi everyone,

I'm trying to setup Knoppix on my LAN so that if needed I can PXE boot into a graphical recovery/test/forensics environment. We are a purely Microsoft shop so we use Windows 2003 RIS (Remote Installation Services). I have Knoppix to the point now where it boots from RIS/PXE but can't find the file needed to load the desktop environment. (see screenshot below)

http://www.jasonsconsulting.com/Knoppix1.jpg

The share is on a Windows 2003 server shared out using native Windows file sharing. I can browse to this share using a workstation not joined to the domain and I am not prompted for credentials so I know anonymous access to that share is working. Here is a copy of my pxelinux.cfg/default file on the RIS server:

default knoppix
prompt 0
timeout 30
LABEL knoppix
KERNEL linux
APPEND secure nfsdir=//192.168.0.5/knoppix nodhcp lang=en ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 initrd=miniroot.gz quiet BOOT_IMAGE=knoppix

What am I doing wrong?

jason331
04-11-2008, 08:39 PM
Oh, and I extracted the contents of the Knoppix CD (including the 700MB "KNOPPIX" file) to the shared folder noted above (\\192.168.0.5\knoppix), in case anyone's wondering.

cbagger01
04-12-2008, 10:17 PM
According to the status message, you need to share the KNOPPIX files from the server by using NFS (Unix/Linux) file sharing instead of Microsoft Windows file sharing.

If you are Windows Server 2003 R2, you have a builtin option called "Microsoft Services for Network File System (NFS)" as part of the Microsoft Services for UNIX.

If you do not have Windows Server 2003 R2, you need to download the

"Microsoft Windows Services for UNIX (SFU) version 3.5" for free.

Or you can boot a PXE server from a different operating system like Linux, maybe even from KNOPPIX itself.

For more information of NFS SERVER under Mircosoft, use Google or check out this Wikipedia entry:

http://en.wikipedia.org/wiki/Microsoft_Windows_Services_for_UNIX

cbagger01
04-12-2008, 10:30 PM
FYI,

That -13 error is an attempt to connect to the Win2003 box via the Windows file sharing protocol. It means that authentication failed for the attempted connection.

Google for

cifs_mount 13

for more information on the subject.

jason331
04-12-2008, 11:29 PM
I have services for UNIX installed (v3.5) on the 2003 server. Here's how the folder is shared out:

http://www.jasonsconsulting.com/knoppix2.jpg

Do I need to actually create a user account and password in services for UNIX instead of attempting anonymous access? If so, what is the syntax for supplying credentials in the pxelinux.cfg/default file?[/img]

jason331
04-15-2008, 09:48 PM
Maybe a dumb question, but what if I just put the Knoppix CD in a drive of one of my Windows servers and shared the CD drive out? Would that work or is it still a limitation of Windows file sharing?

cbagger01
04-18-2008, 01:22 PM
Maybe a dumb question, but what if I just put the Knoppix CD in a drive of one of my Windows servers and shared the CD drive out? Would that work or is it still a limitation of Windows file sharing?

You might get it to work, but you would need to share it with file SECURITY permission EVERYONE = READ and also networks sharing permission EVERYONE = READ

jason331
04-22-2008, 07:34 PM
The CD method didn't work...

I burned Knoppix to a CD, shared out the drive on a Windows server (non-domain controller) as well as an XP workstation with read access granted to the "everyone" group. Both times I still got the error mentioned above.

I'm pretty much a Linux newbie, but I do have an OpenSuSE box acting as an anti-spam gateway. What is the command to share out a folder on a Linux box and do I need to modify the pxelinux.cfg/default file any to connect to that? (other than the IP address, obviously)\

Alternatively, is there a way to provide credentials in the pxelinux.cfg/default file to connect to a Windows share?

jason331
05-05-2008, 12:04 AM
Is there a way I can provide an HTTP location for the path in the pxelinux.cfg/default file? For example:

default knoppix
prompt 0
timeout 30
LABEL knoppix
KERNEL linux
APPEND secure http://192.168.0.5/knoppix nodhcp lang=en ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 initrd=miniroot.gz quiet BOOT_IMAGE=KNOPPIX.dat

I tried this but it didn't work. It just get the following over and over no matter what I enter:

http://www.jasonsconsulting.com/knoppix3.jpg

One item of note, I had to change BOOT_IMAGE=KNOPPIX.dat and rename the "KNOPPIX" file because my IIS6 server won't serve unknown or extensionless filetypes (http://support.microsoft.com/default.aspx?scid=kb;en-us;326965). Could that be the problem with my file above?

PhreakShow
11-23-2008, 07:36 PM
I also want to boot knoppix using the ris. But I don't even get to the thread starter's point.
I need to know which files I have to put where, I found some tutorials and every tut is using a different method.

Please give me a tutorial or a walkthrough, how to set this stuff up.

jason331
11-23-2008, 08:34 PM
To setup KNOPPIX to boot from RIS I did the following:
1. Create the following folder structure on my RIS server: <drive>:\RemoteInstall\Setup\English\Tools\Knoppix\i386\t emplates (I created the Knoppix, i386, and templates folders).
2. In the templates folder create a text file that has a .SIF extension. The file name doesn't really matter but I called mine pxelinux.sif.
3. The pxelinux.sif file (or whatever you choose to call yours) should contain the following (you can customize the Description and Help sections to your own preference if desired):

[OSChooser]
Description = "Boot Knoppix Live Linux Environment"
Help = "This option boots into a live Linux environment with a full shell, internet browser, diagnostics tools, applications, etc."
LaunchFile = "Setup\English\Tools\Knoppix\i386\templates\pxelinu x.0"
ImageType = Flat
Version="1.01"

4. In the <drive>:\RemoteInstall\Setup\English\Tools\Knoppix\i386\t emplates folder create another folder called "pxelinux.cfg" (including the dot).
5. In the <drive>:\RemoteInstall\Setup\English\Tools\Knoppix\i386\t emplates\pxelinux.cfg folder create a text file called "default" (with no file extension).
6. The troubles I am having are likely related to the following contents of my particular "default" file so the following may not necessarily be correct:

default knoppix
prompt 0
timeout 30
LABEL knoppix
KERNEL linux
APPEND netboot=nfs nfsroot=192.168.0.7:/KNOPPIX -- nodhcp lang=en ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 initrd=miniroot.gz quiet BOOT_IMAGE=KNOPPIX

7. In the <drive>:\RemoteInstall\Setup\English\Tools\Knoppix\i386\t emplates folder copy miniroot.gz, pxelinux.0, linux, and pretty much any other file from the root of the Knoppix CD, including the 700MB "KNOPPIX" file. You may have to mess around with file paths in the "default" file and pxelinux.cfg a bit as well as change locations of the files you copied to subfolders, etc. I actually have the CD contents copied into *every* folder and subfolder beneath my <drive>:\RemoteInstall\Setup\English\Tools\Knoppix\i386\t emplates folder structure for troubleshooting purposes.
8. Restart Remote Installation Services (or Windows Deployment Services (WDS) Server for Windows Server 2003 SP2) and Trivial FTP Daemon for the changes you just made to take effect.

Please let me know if you get further than I did. I would *really* like to get this working.

PhreakShow
11-25-2008, 12:49 AM
yay, thanks to you I finally managed to get little further. Now Knoppix starts loading, and, well, I'm also dropped to a very limited shell :)

http://www.hs-augsburg.de/~s_mayer/esx35i-2008-11-25-00-44-13.png

This is my default, but I tried to point knoppix to a smb-share. Do you know if it must be nfs, or if other protocols will work as well?




default knoppix
prompt 0
timeout 0
LABEL knoppix
KERNEL knl/vmlinuz-knoppix-x86
APPEND ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 initrd=img/initrd-knoppix-x86.gz install=smb://192.168.1.20/e$/KNOPPIX

jason331
11-25-2008, 03:48 AM
I've given up on Knoppix because I just can't seem to get it to work. I know this is a Knoppix forum so I am certainly not endorsing other distributions or anything like that, but I was able, after much trial and error, to get Ubuntu to boot in the same manner to a live CD environment. Ubuntu has most of the tools I need (GParted, NTFS access, web browser, etc) to recover files from dead systems, image hard drives, and edit partitions. This wasn't the ideal solution for me since Knoppix has MANY more features than Ubuntu, but it works for what I need it to do. Here's how I got it working with Ubuntu:

1. On the RIS server create the following folder structure: <drive>:\<path to your RIS installation>\Setup\English\Tools\Ubuntu\i386\templates. On my server it is G:\RemoteInstall\Setup\English\Tools\Ubuntu\i386\t emplates.
2. Create a text file in the templates folder called pxelinux.sif. It should contain the following text (the Description and Help sections can be customized to your preference):

[OSChooser]
Description = "Boot Ubuntu Linux"
Help = "This option runs the Ubuntu Linux network installer/live CD environment."
LaunchFile = "Setup\English\Tools\Ubuntu\i386\templates\pxelinux .0"
ImageType = Flat
Version="1.01"

3. Create a folder in the templates directory called pxelinux.cfg. The folder structure should then be <drive>:\<path to your RIS installation>\Setup\English\Tools\Ubuntu\i386\templates\pxelinu x.cfg.
4. In the pxelinux.cfg folder create a blank text file named "default" (no file extension) that contains the following (change the IP address and NFS root below according to your own setup):

DISPLAY ubuntu-installer/i386/boot-screens/boot.txt

F1 ubuntu-installer/i386/boot-screens/f1.txt
F2 ubuntu-installer/i386/boot-screens/f2.txt
F3 ubuntu-installer/i386/boot-screens/f3.txt
F4 ubuntu-installer/i386/boot-screens/f4.txt
F5 ubuntu-installer/i386/boot-screens/f5.txt
F6 ubuntu-installer/i386/boot-screens/f6.txt
F7 ubuntu-installer/i386/boot-screens/f7.txt
F8 ubuntu-installer/i386/boot-screens/f8.txt
F9 ubuntu-installer/i386/boot-screens/f9.txt
F0 ubuntu-installer/i386/boot-screens/f10.txt

DEFAULT LiveDesktopCD

LABEL install
kernel ubuntu-installer/i386/linux
append vga=normal initrd=ubuntu-installer/i386/initrd.gz --
LABEL virtualpc
kernel vmlinuz
append initrd=initrd.gz root=/dev/nfs boot=casper netboot=nfs nfsroot=192.168.0.7:/ubuntu noreplace-paravirt --
LABEL LiveDesktopCD
kernel vmlinuz
append initrd=initrd.gz root=/dev/nfs boot=casper netboot=nfs nfsroot=192.168.0.7:/ubuntu --
LABEL linux
kernel ubuntu-installer/i386/linux
append vga=normal initrd=ubuntu-installer/i386/initrd.gz --
LABEL cli
kernel ubuntu-installer/i386/linux
append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=normal initrd=ubuntu-installer/i386/initrd.gz --

LABEL expert
kernel ubuntu-installer/i386/linux
append priority=low vga=normal initrd=ubuntu-installer/i386/initrd.gz --
LABEL cli-expert
kernel ubuntu-installer/i386/linux
append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false priority=low vga=normal initrd=ubuntu-installer/i386/initrd.gz --

LABEL rescue
kernel ubuntu-installer/i386/linux
append vga=normal initrd=ubuntu-installer/i386/initrd.gz rescue/enable=true --

PROMPT 1
TIMEOUT 300

5. Copy the following files from the casper folder in the root of the Ubuntu CD to <drive>:\<path to your RIS installation>\Setup\English\Tools\Ubuntu\i386\templates:
vmlinuz, initrd.gz. (Note the ~680MB file in the same folder called filesystem.squashfs. That is the actual live desktop environment in a single compressed file.)

6. Download ftp://ftp.ubuntu.com/ubuntu/dists/intrepid/main/installer-i386/current/images/netboot/netboot.tar.gz and extract the contents of that file to <drive>:\<path to your RIS installation>\Setup\English\Tools\Ubuntu\i386\templates. You should now have a folder called "ubuntu-installer" in the templates folder.
7. Download http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.72.zip and extract pxelinux.0 from the ZIP file. Copy pxelinux.0 to <drive>:\<path to your RIS installation>\Setup\English\Tools\Ubuntu\i386\templates.
8. Create an NFS share on the Linux server and share out the contents of the Ubuntu CD. I used the following commands on my SuSE box that actually shares out the main SquashFS file for the live CD environment:

8a. Copy the Ubuntu ISO to the Linux server.
8b. mount -o loop ubuntu-8.04.1-desktop-i386.iso /mnt
8c. md ubuntu
8d. cp -a /mnt /ubuntu
8e. umount /mnt
8f. Depending on your Linux distribution, share out the /ubuntu folder using NFS.

8. Restart the Trivial FTP Daemon and the Windows Deployment Services (WDS) Server services on the RIS server.
9. Boot a PXE-enabled client and choose F12 to boot from the network.
10. At the client installation wizard welcome screen, press Enter.
11. Type a valid username and password on the domain and press Enter.
12. Select Maintenance And Troubleshooting under the OS selection screen. If this option is not enabled on the RIS server, you can enable it by following the steps detailed here: http://www.tomspeirs.co.uk/stuff/RestrictingClientInstallationOptions.doc.
13. Choose the new live CD environment and boot.

PhreakShow
11-25-2008, 10:53 PM
Wow, thanks for this great walkthrough :)

I had some issues setting up the NFS "emulation" under windows server 2003 (especially with the rights and stuff), but finally it works!

Thanks!

jason331
11-26-2008, 12:26 AM
You're welcome! Glad I could help. Just out of curiosity, did you end up using Ubuntu or were you able to get Knoppix working? If you did succeed in getting Knoppix to boot via Windows RIS I would be very interested to know what was done. My whole goal in doing this is to have some kind of recovery environment I can boot into to recover dead systems, etc without having to burn a CD every time. Burned CDs tend to get lost, scratched, etc.

I'm also interested to learn how you got NFS working in Windows Server 2003 using SFU (Services For Unix). I initially tried sharing out my live CD via Windows NFS but couldn't get it to work, hence the need to use a Linux NFS server instead. I was able to see in the SFU logs where the PXE client was trying to make a connection but that was it. I'd much rather share out the live CD using SFU and NFS on my Windows server than having to rely on a separate Linux server somewhere.

PhreakShow
11-26-2008, 07:24 AM
At first I tried to get Knoppix working, but in my logs there was no login attempt when I tried to boot it. So I used Ubuntu.

NFS-stuff seems to be a bit complicated. I copied /etc/passwd and /etc/groups from a knoppix livecd und put them in their own folder. Then I pointed SFU in 2k3 to their location.
Afterwards, I remapped windows' administrator account to linux' root und changed the permissions in sharing dialogue from both -2 to both 0.

And it worked. Let me know if that is enough information, I can also upload some screenshots if you do not get it working.

Terradyne
04-20-2009, 07:01 PM
Hey all!

I'm also very interested in this setup and followed the steps above very gently but, I'm using a W2K3 RIS server with NFS shares and I can manage to boot up my client in RIS and lookup the Ubuntu boot in the menus but when I select this, the only thing I see is a black screen and a underscore cursor. No network traffic, just stops...

Can anyone post screenshots perhaps???

hancook
05-05-2009, 01:11 PM
NFS-stuff seems to be a bit complicated. I copied /etc/passwd and /etc/groups from a knoppix livecd und put them in their own folder. Then I pointed SFU in 2k3 to their location.
Afterwards, I remapped windows' administrator account to linux' root und changed the permissions in sharing dialogue from both -2 to both 0.
hancook