Ubuntu, samba, PXE, netbootdisk problems. HELP!
Ubuntu, samba, PXE, netbootdisk problems. HELP!
Author
Discussion

Morningside

Original Poster:

24,147 posts

260 months

Wednesday 21st April 2010
quotequote all
I am ripping my hair out here!

Being a total novice at Ubuntu I am trying to setup a PXE boot with network attached drives.

Using UBUNTU server I have managed to get a DHCP server running, PXE booting of a dos network disk.

here are my (crappy) notes. Sorry if its a bit muddled but I am typing as I think:


Here I install a DHCP server and PXE booting.

DHXP and PXE said:
Boot server CD and make it static IP static 192.168.1.50

During setup checkboxes to Install OpenSSH and Samba File server.


Setup tftpd
>>apt-get install tftpd-hpa
>>nano /etc/default/tftpd-hpa

  1. Defaults for tftpd-hpa
RUN_DAEMON="yes" <<<<----- change to yes
OPTIONS="-l -s /var/lib/tftpboot"

>>mkdir -p /var/lib/tftpboot
>>/etc/init.d/tftpd-hpa start


===============================



Setup DHCP
>>apt-get install dhcp3-server
>>nano /etc/dhcp3/dhcpd.conf

erase file and replace with below.

option domain-name-servers 192.168.1.1;
default-lease-time 86400;
max-lease-time 604800;
authoritative;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.70 192.168.1.100;
filename "pxelinux.0";
next-server 192.168.1.50;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
}


Check DHCP is pointing to correct interface
>>nano /etc/default/dhcp3-server
  1. Defaults for dhcp initscript
  2. sourced by /etc/init.d/dhcp
  3. installed at /etc/default/dhcp3-server by the maintainer scripts
  1. This is a POSIX shell fragment
  1. On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
  2. Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth0" <<<-------------------


PXE Configuration

>>mkdir /var/lib/tftpboot/pxelinux.cfg
>>nano /var/lib/tftpboot/pxelinux.cfg/default

DISPLAY boot.txt

DEFAULT netboot

LABEL netboot
kernel memdisk
append initrd=netb98.img

LABEL memtest
kernel ISOLINUX/MEMTEST


PROMPT 1
TIMEOUT 0

>>nano /var/lib/tftpboot/boot.txt

- Boot Menu -

=======


netboot
memtest


>>cd /var/lib/tftpboot/
>>wget http://ftp.uk.debian.org/debian/dists/etch/main/in...
>>mkdir -p /var/lib/tftpboot/debian/etch/i386
>>cd /var/lib/tftpboot/debian/etch/i386
>>wget http://ftp.uk.debian.org/debian/dists/etch/main/in...
>>wget http://ftp.uk.debian.org/debian/dists/etch/main/in...



Copy over files
>>chmod 777 /var/lib/tftpboot
copy the directory contents of "copy to tftpboot" to /var/lib/tftpboot


REBOOT COMPUTER
reboot 0
Now, all this seems to work without any problems whatsoever! The remote machine boots and loads the DOS disk or the memtest.


Here is where the problem really starts. At this point I install samba.

samba said:
To install

//>>sudo apt-get install samba === Not really needed as already installed at boot time//
>>sudo nano /etc/samba/smb.conf

find section #####Authentication##############
.....
.....
; security = user ---- remove the ; or # at start of line

add after this line
username map =/etc/samba/smbusers
go to end of file and add
[exchange]
path=/home/useraccount
read only=no



create usernames
>>sudo smbpasswd -a useraccount

>>sudo nano /etc/samba/smbusers
add the line
useraccount = "useraccount"

>>sudo /etc/init.d/samba restart


on windows machine.
\\192.168.1.xx or \\UBUNTU
pdbedit -w -L --> lists all the usernames assoicated with samba and does indeed show useraccount


I understand that Linux users and samba users are separate!


The boot screen works 100% and gives me the boot menu.

When I try to boot the DOS network boot disk (netboot) it comes up with a screen showing :



USERNAME: Administrator
PASSWORD: *********

If I accept the default. Then when "Logging on to the network" I get:
You were logged on, but have not been validated etc. etc.

Typing:
"NET VIEW" returns
Servers available in workgroup WORKGROUP
..
\\UBUNTU

If I now type:
"NET VIEW \\UBUNTU" it returns
sharename type comment
exchange Disk

========================================================================



So the next logical step is:

"NET USE D: \\UBUNTU\exchange" it returns
The password is invalid for \\UBUNTU\EXCHANGE****
Type the password for \\UBUNTU\EXCHANGE:

at this point entering ******* it then returns

Error 5: Access has been denied.


banghead, banghead
What the hell does it mean password is invalid? I have not even entered it at this point???

I have tried using 'useraccount' as username
then when using "NET VIEW" it just returns
Error 6118: The list of servers for this workgroup is not currently available.


Another thing. How can I install a linux distro .ISO or whatever using the PXE?

So I am now really at a loss and at the end of my Linux knowledge.

Please can some one help before I go totally MAD!

And yes, pinging works OK and the memtest works 100%



host name = UBUNTU (default)
user name = useraccount


Also to remove any problems with firewalls etc I just have two (laptop) computers wired via a Crossover cable.

Edited by Morningside on Wednesday 21st April 14:46

Morningside

Original Poster:

24,147 posts

260 months

Wednesday 21st April 2010
quotequote all
  • bump**
Anyone frown

RoadRailer

599 posts

259 months

Thursday 22nd April 2010
quotequote all
Morningside said:
Another thing. How can I install a linux distro .ISO or whatever using the PXE?
CloneZilla or LinMin may help with the bare metal provisioning.

Can't offer any usable contribution to your other issues though.

Morningside

Original Poster:

24,147 posts

260 months

Friday 23rd April 2010
quotequote all
biggrin

Thanks for that. I will look into them, but I have managed to get DamnSmallLinux to boot via PXE but still cannot get a remote connection via DOS (ie map a drive) - Keeps coming up that it cannot find password etc.

Linux is 'fun' to learn but what an uphill struggle at times.

The Excession

11,669 posts

281 months

Friday 23rd April 2010
quotequote all
Have you checked the smdb log files? Anything in there?

uk_vette

3,336 posts

235 months

Sunday 25th April 2010
quotequote all
Get rid of Ubuntu, the copy of windows.
The more you try to make it work as windows, the more frustrated you will become.

Ask me,,,,,,,,,,,,,

'vette

Edited by uk_vette on Sunday 25th April 02:50

Morningside

Original Poster:

24,147 posts

260 months

Sunday 25th April 2010
quotequote all
The Excession said:
Have you checked the smdb log files? Anything in there?
This is the odd thing. Sometimes it shows up as 192.168.1.100 and others as useraccount confused

I thought about jumping over to windows but to be honest this is one-of-those 'its not going to beat me' projects.

Good job its for a personal home learning project rather than a commercial issue hehe


I have finally good DSL to run bounce