Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[MiniHOWTO] Diskless Gentoo without NetworkBoot(uses bootcd)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
CoolBeer
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2003
Posts: 76
Location: Alta, Norway

PostPosted: Sun Nov 05, 2006 4:26 am    Post subject: [MiniHOWTO] Diskless Gentoo without NetworkBoot(uses bootcd) Reply with quote

Ok, this is my first howto, don't kill me because I did something wrong :P

As I was searching for information about how to set up my diskless P2-400(without capability to boot from network) I could only find snippets of useful information scattered across sites. So I decided to give you a little input in how my setup looks like.

First of all, you need a server running a NFS server(Yes there are other alternatives, but NFS is by far the easiest I think, be free to prove me wrong if you will)
And second of all, you should have a DHCPD service running on your server aswell(it can probably be configured to a static ip, but I haven't done the research on it, please enlighten me :P )

So install nfs-utils and dhcp

The configuration of the dhcp server is quite straighforward (/etc/dhcp/dhcpd.conf)
Code:

server-identifier coolserver.cool.lan;
local-address 172.16.0.1;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style interim;
update-static-leases on;
authoritative;

key COOLKEY {
    algorithm hmac-md5;
    secret "**************************";
};

zone cool.lan. {
    primary 172.16.0.1;
    key COOLKEY;
}
   
zone 0.16.172.in-addr.arpa. {
    primary 172.16.0.1;
    key COOLKEY;
}

log-facility local7;

subnet 172.16.0.0 netmask 255.255.255.0 {
    range 172.16.0.100 172.16.0.200;
    option subnet-mask 255.255.255.0;
    option broadcast-address 172.16.0.255;
    option domain-name "cool.lan";
    one-lease-per-client on;
    option domain-name-servers 172.16.0.1;
    option routers 172.16.0.1;
}
host koffert {
    hardware ethernet 00:30:4F:1B:18:33;
    fixed-address 172.16.0.99;
    next-server 172.16.0.1;
    ddns-hostname "koffert";
    option host-name "koffert";
    option broadcast-address 172.16.0.255;
    option domain-name "cool.lan";
    option domain-name-servers 172.16.0.1;
    option routers 172.16.0.1;
    option root-path "/usr/p2-400";
    default-lease-time -1;
    max-lease-time -1;
   
}


This is my complete configuration for MY dhcp server, the important things to take note of is the next-server and root-path options, it will tell the kernel where the nfs share is.

Next to configure the NFS server(/etc/exports)
Code:

/usr/p2-400/ 172.16.0.0/24(sync,no_root_squash,rw)

Of cause you need the /usr/p2-400 directory to exist, and remember to change the iprange to your subnet
It could also be an idea to start the services before you try to mount them on the diskless machine, and maby add them to the default runlevel ;)

Now comes the fun part :D

Boot your diskless(exept a cdrom) machine using a standard installcd
When you are about to configure the disks, skip all that and mount the nfs at /mnt/gentoo
Code:

example: mount -t nfs 172.16.0.1:/usr/p2-400 hard,rsize=16384,wsize=16384,timeo=4,intr,nfsvers=3,tcp,nolock

(A little warning here, doing stuff over nfs can be sloooooooooow, you might be better off doing the install on your server itself)

Install as usual, when making the kernel, there is a few thing to remember
Add theese:
Code:

Networking->Networking options->IP: kernel level autoconfiguration
Networking->Networking options->IP: DHCP Support
File Systems->Network file systems->NFS file system support
File Systems->Network file systems->Provide NFSv3 client support
File Systems->Network file systems->Root file system on NFS

And you might want to add the nfs share to your fstab, for gentoo to remount it writeable.

Now to making the bootcd, you probably need cdrtools, and loop support in your kernel
Quote:

mkdir /mnt/livecdtemp
mkdir /mnt/livecd
mount -o loop /home/hightower/install-x86-minimal-2006.1.iso /mnt/livecd

Copy the isolinux directory from /mnt/livecdtemp to /mnt/livecd
Delete everything but isolinux.bin and isolinux.cfg
Copy the kernel into the isolinux directory on /mnt/livecd (name it kernel or something, be creative :) )
Now edit the isolinux.cfg on /mnt/livecd/isolinux
Code:

default koffert
timeout 150
prompt 1
label koffert
  kernel koffert
  append ip=dhcp root=/dev/nfs

NOTE: if you don't want to get the info for nfs-share by dhcp, add "nfsroot=<ip of server>:<path on server>"
Now make the CDROM, cd to /mnt/livecd and run
Code:

mkisofs -no-emul-boot -boot-load-size 4 -boot-info-table -r -b isolinux/isolinux.bin -c isolinux/boot.cat -o /mnt/newgentoo.iso .

Burn this to a CDROM, and happy booting

(Please be gentle :P)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum