Re: How to build a bootable ISO for sparc64?

Rene Maroufi <[email protected]>
Newsgroups gmane.os.openbsd.sparc
Message-ID <[email protected]>
On Wed, Jul 08, 2009 at 08:50:05PM +0200, Richard Mueller wrote:
> Hy folks...
> 
> I want to build a bootable CD for booting my custom kernel
> in a Sun Fire 210 (Ultrasparc III), but I do not exactly know
> how.

Read man mksuncd:
http://www.openbsd.org/cgi-bin/man.cgi?query=mksuncd&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=sparc64&format=html

I use a simple shellscript for this:

#!/bin/sh

# creates a bootable cd for sun ultrasparc

# Extra options for mkhybrid (-l -r is always set)
opts="-T -J"

# Name for the cd image
title="OpenBSD 4.5 sparc64"

# Preparer of the cd
prep="Maruweb"

# Publisher of the cd
pub="Theo de Raadt"

# File with bootimage
bimage="${1}"/4.5/sparc64/miniroot45.fs

# File in which the cd image should written
iso=install45.iso

# Check if the directory with the files for the cd, is
# given as an argument

if [ $# -ne 1 ]
then
   echo "This script needs an directory with files for a cd as an argument!" >&2
   exit 1
elif [ ! -d "${1}" ]
then
   echo "This script needs an directory with files for a cd as an argument!" >&2
   exit 2
fi

# Put slicemapfile in the root-directory of the cd

echo "m 1       sun4" > "${1}"/.slicemapfile
echo "m 2       sun4c" >> "${1}"/.slicemapfile
echo "m 3       sun4m" >> "${1}"/.slicemapfile
echo "m 4       sun4d" >> "${1}"/.slicemapfile
echo "m 5       sun4u" >> "${1}"/.slicemapfile
echo "m 5       sun4us" >> "${1}"/.slicemapfile
echo "m 6       sun4v" >> "${1}"/.slicemapfile

# Make the cd image

mkhybrid -l -r ${opts} -P "${pub}" -p "${prep}" -o "${iso}" "${1}"

# Make the image bootable (needs a already existing boot image)

vnconfig svnd0 "${iso}"
disklabel -w svnd0 fakecdrom
vnconfig -u svnd0
mksuncd f "${iso}" "${bimage}"

-- 
Reni Maroufi
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.