My favorites | Sign in
Project Home Wiki Issues Source
Search
for
usbboot  
Booting from USB disk
Updated May 21 (4 days ago) by cinap_le...@gmx.de

Introduction

Booting from USB disk is handled just like booting from hard drive. In general, the boot process is able to use an ISO image stored on a FAT filesystem as its root filesystem, so all you need to do is install the 9boot(8) bootloader, a kernel and the 9front.iso on the USB disk.

Plan 9

Build and install the mbr and boot loader:

dev=/dev/sdU10.0 # path to your usb device

cd /sys/src/boot/pc
mk 9bootfat mbr pbs
disk/mbr -m mbr $dev/data

If it doesn't already exist, create and format a FAT partition. Don't forget to set it active:

disk/fdisk -b $dev/data
disk/format -b pbs -d -r 2 $dev/dos

Mount the USB device:

s=sdos
n=/n/dos

dossrv -f $dev/dos $s
mount -c /srv/$s $n

Create a suitable $n/plan9.ini:

bootfile=/386/9pcf
mouseport=ask
monitor=ask
vgasize=ask

Copy files to the USB device:

cp /$cputype/9bootfat $n
mkdir $n/$cputype
cp /$cputype/9pcf $n/$cputype
cp /tmp/9front.iso $n

Unmount the USB device:

unmount $n
rm -f /srv/$s

Boot.

See also: prep(8)

Unix

Obtain mbr, pbs and 9bootfat binaries:

% cd /sys/src/boot/pc; mk install

Note that the distibuted iso image already contains the binaries under /386, so you might just copy that.

Create $dir with the following files:

  • /tmp/9front.iso (see build)
  • /386/9pcf (kernel name may vary)
  • plan9.ini containing line "bootfile=9pcf"
  • /386/9bootfat built in previous step or obtained from the iso

Use makebootfat tool to obtain bootable device (ie. /dev/sdc):

$ makebootfat -m mbr -b pbs -o /dev/sdc $dir

Boot.

Problems

See the troubleshooting guide.


Sign in to add a comment
Powered by Google Project Hosting