Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / legion / docs / readmes / README.create_diskimage
CommitLineData
920dae64
AT
1/*
2 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
4 */
5#pragma ident "@(#)README.create_diskimage 1.1 05/03/14 SMI"
6
7##########
8## Creating a valid Legion disk image
9##
10## Mon Mar 7 09:33:44 PST 2005
11##
12## Steps for creating a disk image for simulation use. You
13## will need to ensure that the amount of disk space used
14## in your root filesystem is small enough for the disk
15## you are creating (or the disk is large enough for the
16## root partition you are cloning)..
17##
18## tycho.nightingale@sun.com, michael.ogorman@sun.com
19##
20##########
21
22 # mkfile -n 512m file
23 # lofiadm -a file
24 # newfs /dev/rlofi/1
25 # installboot sun4v_bootblk /dev/rlofi/1
26 # mount /dev/lofi/1 /mnt
27 # cd /mnt
28 # ufsdump 0f - / | ufsrestore xf - .
29 # cd /
30 # umount /mnt
31 # fsck -y /dev/rlofi/1
32 # lofiadm -d /dev/rlofi/1
33 # make_valid_disk_label file || teach_legion_about_creating_labels
34
35## Currently, legion needs a valid disk label on your disk image.
36## It will then overwrite this with the new values for the slices
37## you specify in your legion conf file and it creates a valid
38## s2 size to represent the entire disk.
39##
40## This needs to be fixed so that legion can create the entire
41## label on it's own, regardless of what's in the first 512
42## byte block of the disk
43##
44## Until this is done, you need to add a label to a disk image
45## as follows:
46###################
47
48
49 # dd if=/dev/rdsk/c0t1d0s0 of=./label.dd bs=1b count=1 conv=sync
50 # dd if=./label.dd of=./disk.image bs=1b count=1 conv=notrunc
51
52##
53## To make a disk bootable under legion you will
54## need the following config changes:
55## note: $BIN is a reference to /home/mo23723/workspace/snapshots/disks/bin
56
57 # lofiadm -a file
58 # mount /dev/lofi/1 /mnt
59 - Add [hsimd "SUNW,legion-disk"] to /mnt/etc/driver_aliases
60 - Add [hsimd 246] to /mnt/etc/name_to_major (ensure number not already in use)
61 - Add hsimd driver as follows:
62 # cp $BIN/hsimd /mnt/platform/sun4v/kernel/drv/sparcv9/hsimd
63 # cd /mnt; cpio -icdB < $BIN/devices.cpio XXX Show list of devicesto create XXX
64 # cp $BIN/vfstab /mnt/etc/vfstab
65 - remove root passwd
66 - comment out smf startup line in /etc/inittab
67
68