You are here

Operating system installers

How to boot Linux Mint 13 using PXE

Prepare the tftp folder

  • Download pxelinux.0
  • Copy initrd.lz and vmlinux from the iso (casper folder)
  • pxelinux's config file (pxelinux.cfg/default):
    DEFAULT Linux-Mint-13-x86
    
    LABEL Linux-Mint-13-x86
    MENU LABEL Linux-Mint-13-x86
    KERNEL vmlinuz
    APPEND boot=casper netboot=nfs nfsroot=IP.ADD.RE.SS:/ initrd=initrd.lz quiet splash --
    

Which gives:

# ls tftproot
initrd.lz     pxelinux.0    pxelinux.cfg  vmlinuz

Prepare the NFS folder

  • Copy the required files from the casper folder

Which gives:

# ls nfsroot
casper

# ls nfsroot/casper
filesystem.manifest          filesystem.size
filesystem.manifest-desktop  filesystem.squashfs
filesystem.manifest-remove

Boot

Set up your DHCP, NFS and TFTP servers and boot your target.

How to install FreeBSD 90 via PXE from anywhere (i.e. without a NFS server)

Not so frequently asked questions and stuff: 

The situation

You want to install FreeBSD on another machine. You don't want to use a NFS server, because you are either on a Windows computer or because you simply want to boot the installer using pxeboot or gpxe.

From FreeBSD 9.0, the bootonly CD does not use a mfs file system anymore, so instead of just copying the existing one, you either need to make one yourself or find one on the internet.

We will be using one from mfsbsd, from Martin Matuška.
http://mfsbsd.vx.sk/

[2014-06-15] Update: I've been told by email that mfsbsd now provides images directly from their website:
http://mfsbsd.vx.sk/files/images/
Thanks to Roman Makarov for the information.

Step 1: build the FreeBSD image disk

Create some dirs:

# mkdir /tmp/build
# mkdir /tmp/build/iso.mnt
# mkdir /tmp/build/hd.mnt
# cd /tmp/build

Get the image:

fetch http://mfsbsd.vx.sk/iso/mfsbsd-9.0-amd64.iso
mfsbsd-9.0-amd64.iso                          100% of   28 MB 3904 kBps

Mount the image:

# mdconfig -a -t vnode -f /tmp/build/mfsbsd-9.0-amd64.iso
md0
# mount_cd9660 /dev/md0 /tmp/build/iso.mnt/

Create a hard disk image. Be sure to choose the right size.

# dd if=/dev/zero of=/tmp/build/FreeBSD-9.0-RELEASE-amd64-bootonly-mfsbsd.hd bs=1m count=30
30+0 records in
30+0 records out
31457280 bytes transferred in 0.371249 secs (84733651 bytes/sec)
# mdconfig -a -t vnode -f /tmp/build/FreeBSD-9.0-RELEASE-amd64-bootonly-mfsbsd.hd
md1
# fdisk -B -I /dev/md1
******* Working on device /dev/md1 *******
fdisk: invalid fdisk partition table found
fdisk: Class not found
# bsdlabel -B -w /dev/md1
# bsdlabel -e /dev/md1
# /dev/md1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:    61424       16    4.2BSD        0     0
  c:    61440        0    unused        0     0         # "raw" part, don't edit
/tmp/EdDk.LJ3WUbdhRH: 5 lines, 212 characters
# newfs /dev/md1a
/dev/md1a: 30.0MB (61424 sectors) block size 16384, fragment size 2048
        using 4 cylinder groups of 7.50MB, 480 blks, 960 inodes.
super-block backups (for fsck -b #) at:
 160, 15520, 30880, 46240
# mount /dev/md1a /tmp/build/hd.mnt

Copy the boot files from the iso to the disk image:

# cp -r iso.mnt/* hd.mnt/

Umount everything:

# umount /tmp/build/hd.mnt
# mdconfig -d -u 1
# umount /tmp/build/iso.mnt
# mdconfig -d -u 0

You now have a bootable mfsBSD image disk.

Step2: Boot the image disk

Download pxelinux.0.
Download memdisk. You can find it packaged with syslinux: http://www.kernel.org/pub/linux/utils/boot/syslinux/

Create pxelinux config file (pxelinux.cfg/default):

DEFAULT fbsd
 
LABEL fbsd
 kernel memdisk
 append initrd=/FreeBSD-9.0-RELEASE-amd64-bootonly-mfsbsd.hd harddisk raw

Setup your DHCP and TFTP servers to serve the directory and you're good.

Once booted, login as root and launch the usual installer:

bsdinstall

Sources

How to install FreeBSD 82 via PXE from anywhere (i.e. without a NFS server)

Not so frequently asked questions and stuff: 

The situation

You want to install FreeBSD on another machine. You don't want to use a NFS server, because you are either on a Windows computer or because you simply want to boot the installer using pxeboot or gpxe.

Step 1: build the FreeBSD image disk

Create some dirs:

# mkdir /tmp/build
# mkdir /tmp/build/iso.mnt
# mkdir /tmp/build/hd.mnt
# mkdir /tmp/build/mfs.mnt
# cd /tmp/build

Get the image:

# wget ftp://ftp.fr.freebsd.org/pub/FreeBSD/ISO-IMAGES-i386/8.2/FreeBSD-8.2-RELEASE-i386-bootonly.iso
--2011-12-15 09:30:41--  ftp://ftp.fr.freebsd.org/pub/FreeBSD/ISO-IMAGES-i386/8.2/FreeBSD-8.2-RELEASE-i386-bootonly.iso
           => `FreeBSD-8.2-RELEASE-i386-bootonly.iso.1'
Resolving ftp.fr.freebsd.org... 88.191.250.131
Connecting to ftp.fr.freebsd.org|88.191.250.131|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/FreeBSD/ISO-IMAGES-i386/8.2 ... done.
==> SIZE FreeBSD-8.2-RELEASE-i386-bootonly.iso ... 49262592
==> PASV ... done.    ==> RETR FreeBSD-8.2-RELEASE-i386-bootonly.iso ... done.
Length: 49262592 (47M) (unauthoritative)

100%[======================================>] 49,262,592  2.57M/s   in 18s

2011-12-15 09:30:59 (2.62 MB/s) - `FreeBSD-8.2-RELEASE-i386-bootonly.iso.1' saved [49262592]

Mount the image:

# mdconfig -a -t vnode -f /tmp/build/FreeBSD-8.2-RELEASE-i386-bootonly.iso
md0
# mount_cd9660 /dev/md0 /tmp/build/iso.mnt/

Create a hard disk image. Be sure to choose the right size.

# dd if=/dev/zero of=/tmp/build/FreeBSD-8.2-RELEASE-i386-bootonly.hd bs=1m count=60
60+0 records in
60+0 records out
62914560 bytes transferred in 0.737012 secs (85364374 bytes/sec)
# mdconfig -a -t vnode -f /tmp/build/FreeBSD-8.2-RELEASE-i386-bootonly.hd
md1
# fdisk -B -I /dev/md1
******* Working on device /dev/md1 *******
fdisk: invalid fdisk partition table found
fdisk: Class not found
# bsdlabel -B -w /dev/md1
# bsdlabel -e /dev/md1
# /dev/md1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   122864       16    4.2BSD        0     0
  c:   122880        0    unused        0     0         # "raw" part, don't edit

# newfs /dev/md1a
/dev/md1a: 60.0MB (122864 sectors) block size 16384, fragment size 2048
        using 4 cylinder groups of 15.00MB, 960 blks, 1920 inodes.
super-block backups (for fsck -b #) at:
 160, 30880, 61600, 92320
# mount /dev/md1a /tmp/build/hd.mnt

Copy the boot files from the iso to the disk image:

# cp -r /tmp/build/iso.mnt/boot /tmp/build/hd.mnt/boot

Umount everything:

# umount /tmp/build/hd.mnt
# mdconfig -d -u 1
# umount /tmp/build/iso.mnt
# mdconfig -d -u 0

You now have a bootable FreeBSD installer image disk.

Step2: Boot the image disk

Download pxelinux.0.
Download memdisk. You can find it packaged with syslinux: http://www.kernel.org/pub/linux/utils/boot/syslinux/

Create pxelinux config file (pxelinux.cfg/default):

DEFAULT fbsd

LABEL fbsd
 kernel memdisk
 append initrd=/FreeBSD82.hd harddisk

Setup your DHCP and TFTP servers to serve the directory and you're good.

Sources

Subscribe to Operating system installers