Blog previously known as 'Home Theatre PC'
Comments have been disabled due to spam and lack of time for moderation.
Use the contact link on top to get in touch if you wish.
« 1-wire temperatures with ArduinoSamba (smb,cifs) share from Mac OSX Snow Leopard to Linux »

Ubuntu 10.04 Lucid Lynx - PXE bootable installation without any bootable media to begin with

  09/21/10 23:22, by Esa, Categories: Software

I have an old Thinkpad, which cannot boot from anything else than over the network using PXE client. I do have server in the lan that can handle PXE clients.

A quick summary how to get Lucid Lynx to be served over NFS, using installation CD and USB stick to install it to. Or like me, using PXE booting installation CD (there are instructions on the net on how to do it, if you have problems, ask here).

  • Boot the machine with the installation cd and do whatever kind of installation you want to the USB stick, make it one partition with no swap.
  • When finished, reboot the machine with the installation CD again, mount the USB stick, mount proc & dev to it and then chroot

Assuming your USB stick goes to sda1

sudo mkdir -p /mnt/stick
sudo mount /dev/sda1 /mnt/stick
sudo mount -t proc none /mnt/stick/proc
sudo mount -o bind /dev /mnt/stick/dev
sudo chroot /mnt/stick
source /etc/profile

You're now basically using your brand new Lucid Lynx on a stick. Next you need to generate initrd image which contains necessary modules etc for your pxe boot.

  • Create a copy of /etc/initramfs-tools
  • Edit /etc/initramfs-tools-pxe/initramfs.conf. Change line 'MODULES=most' to 'MODULES=netboot' and line 'BOOT=local' to 'BOOT=nfs'
  • Generate new initrd.
  • Edit fstab, remove existing root definition, add new usig /dev/nfs
  • Transfer the USB stick contents to PXE server
cp -R /etc/initramfs-tools /etc/initramfs-tools-pxe
nano /etc/initramfs-tools-pxe/initramfs.conf
mkinitramfs -d /etc/initramfs-tools-pxe -o /boot/initrd.img-2.6.32-21-generic-pxe 2.6.32-21-generic
nano /etc/fstab

Contents of /etc/fstab after editing

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/nfs	/		nfs	defaults	1	1
proc            /proc           proc    nodev,noexec,nosuid 0       0

To transfer the filesystem contents to PXE server you can use whatever method you want, just preserver file permissions. I used rsync over ssh.

rsync -avz --exclude /proc -e ssh / root@10.10.10.1:/tftproot/stick/

Now you're done on the client side. Next copy boot/initrd.img-2.6.32-21-generic-pxe and boot/vmlinuz-2.6.32-21-generic to the root of your tftp server. Then configure the rest PXE server (use google, or ask here). Remember to add the directory with the stick contents to /etc/exports. This is my /tftproot/pxelinux.cfg/01-XX-XX-XX-XX-XX-XX (x's being the mac address of the thinkpad)

timeout 10
prompt 1
default Ubuntu

label Ubuntu
        kernel vmlinuz-2.6.32-21-generic
        append root=/dev/nfs initrd=initrd.img-2.6.32-21-generic-pxe nfsroot=10.10.10.100:/tftproot/stick ip=dhcp rw nosplash 

Reboot the client and you're done.

No feedback yet

Search

Contents

powered by b2evolution free blog software
 

©2017 by admin

Contact | Help | Blog skin by Asevo | blogsoft | LAMP hosting | blog ads