Difference between revisions of "Linux netbooting"

From WirelessAfrica
Jump to navigation Jump to search
Line 39: Line 39:
 
There are two types of Kernel images you can build. The first is an image which contains all the necessary file system drivers, or even network drivers in the case of NFS, to allow the file systems to mount and let the operating system boot normally. The second type of kernel image puts all the drivers in a file which is mounted in RAM as a RAM disk. This is known as an initrd file. initrd stands for "initial ramdisk"  
 
There are two types of Kernel images you can build. The first is an image which contains all the necessary file system drivers, or even network drivers in the case of NFS, to allow the file systems to mount and let the operating system boot normally. The second type of kernel image puts all the drivers in a file which is mounted in RAM as a RAM disk. This is known as an initrd file. initrd stands for "initial ramdisk"  
  
'''Create kernel image with module drivers built in'''
+
'''I Create kernel image with module drivers built in'''
  
 
1) Start the kernel configuration program
 
1) Start the kernel configuration program
Line 73: Line 73:
 
This will give you your linix kernel image (bzImage) in /usr/src/linux-source-2.6.12/arch/i386/boot/
 
This will give you your linix kernel image (bzImage) in /usr/src/linux-source-2.6.12/arch/i386/boot/
  
5) Copy the kernel image to  
+
5) Copy the kernel image to the server
 +
 +
scp bzImage djohnson@meshy.dhcp:~/vmlinuz.david
 +
 
 +
 
 +
'''II Create kernel image with module drivers built in'''
 +
 
 +
1) Start the kernel configuration program
 +
 
 +
sudo make menuconfig
 +
 
 +
2) Set the following options on the kernel configuration menus
 +
 
 +
Processor type and features  ---> 
 +
  Processor family: Pentium-Classic
 +
Device Drivers  --->
 +
  Networking support  --->
 +
  Networking options  --->
 +
    [*]IP: kernel level autoconfiguration                           
 +
      [*]    IP: DHCP support
 +
      [*]    IP: BOOTP support
 +
      [*]    IP: RARP support             
 +
File systems  --->
 +
  Network File Systems  --->
 +
  <*> NFS file system support
 +
    [*] Root file system on NFS
 +
Loadable module support  --->
 +
  [*] Enable loadable module support
 +
 
 +
3) Make the kernel
 +
 
 +
sudo make
 +
 
 +
4) Make the kernel image
 +
 
 +
sudo make bzImage
 +
 
 +
This will give you your linix kernel image (bzImage) in /usr/src/linux-source-2.6.12/arch/i386/boot/
 +
 
 +
5) Copy the kernel image to the server directory where the booting directory is located
 +
 +
scp bzImage djohnson@meshy.dhcp:/export/tftpboot/vmlinuz.david
 +
 
 +
6) Make the kernel module drivers
 +
 
 
  sudo make modules
 
  sudo make modules
 +
 +
7) Install the module drivers
  
 
  sudo make modules_install
 
  sudo make modules_install
 +
 +
8) Create the initrd ramdisk image
  
 
  sudo mkinitrd -o initrd.img-2.6.12 2.6.12
 
  sudo mkinitrd -o initrd.img-2.6.12 2.6.12
 +
 +
9)

Revision as of 21:25, 20 April 2006

Instructions follow on how to netboot using Ubuntu Linux.

Server Setup

Setup DHCP

/usr/local/etc/dhcp.conf

Setup PXE

Setup Filesystem

Useful information: Building PXE Imager from scratch

1) Use debian debootstrap tool to create basic filesystem.

sudo debootstrap breezy /home/yusuf/ubuntu ftp://ftp.is.co.za/ubuntu/

2) chroot into new filesystem

sudo chroot /home/yusuf/ubuntu/

3) create apt source list

sudo vi /etc/apt/sources.list

4) Add packages

sudo apt-get update
sudo apt-get install ssh olsrd

5) Tar the filesystem

 sudo tar -cvjf ubuntu.tar.gz ./ubuntu/

6) Copy the filesystem to the server and un-tar

 scp ubuntu.tar.gz user@server:

Client Setup

Create Linux Kernel

There are two types of Kernel images you can build. The first is an image which contains all the necessary file system drivers, or even network drivers in the case of NFS, to allow the file systems to mount and let the operating system boot normally. The second type of kernel image puts all the drivers in a file which is mounted in RAM as a RAM disk. This is known as an initrd file. initrd stands for "initial ramdisk"

I Create kernel image with module drivers built in

1) Start the kernel configuration program

sudo make menuconfig

2) Set the following options on the kernel configuration menus

Processor type and features  --->  
 Processor family: Pentium-Classic
Device Drivers  --->
 Networking support  ---> 
  Networking options  --->
    [*]IP: kernel level autoconfiguration                             
     [*]     IP: DHCP support
     [*]     IP: BOOTP support
     [*]     IP: RARP support               
File systems  ---> 
 Network File Systems  ---> 
  <*> NFS file system support 
   [*] Root file system on NFS
Loadable module support  --->
 [] Enable loadable module support

3) Make the kernel

sudo make

4) Make the kernel image

sudo make bzImage

This will give you your linix kernel image (bzImage) in /usr/src/linux-source-2.6.12/arch/i386/boot/

5) Copy the kernel image to the server

scp bzImage djohnson@meshy.dhcp:~/vmlinuz.david


II Create kernel image with module drivers built in

1) Start the kernel configuration program

sudo make menuconfig

2) Set the following options on the kernel configuration menus

Processor type and features  --->  
 Processor family: Pentium-Classic
Device Drivers  --->
 Networking support  ---> 
  Networking options  --->
    [*]IP: kernel level autoconfiguration                             
     [*]     IP: DHCP support
     [*]     IP: BOOTP support
     [*]     IP: RARP support               
File systems  ---> 
 Network File Systems  ---> 
  <*> NFS file system support 
   [*] Root file system on NFS
Loadable module support  --->
 [*] Enable loadable module support

3) Make the kernel

sudo make

4) Make the kernel image

sudo make bzImage

This will give you your linix kernel image (bzImage) in /usr/src/linux-source-2.6.12/arch/i386/boot/

5) Copy the kernel image to the server directory where the booting directory is located

scp bzImage djohnson@meshy.dhcp:/export/tftpboot/vmlinuz.david

6) Make the kernel module drivers

sudo make modules

7) Install the module drivers

sudo make modules_install

8) Create the initrd ramdisk image

sudo mkinitrd -o initrd.img-2.6.12 2.6.12

9)