Following on from Alan's presentation, here's how you can transfer the
OpenSolaris CD image to make a  bootable USB device:

Boot OpenSolaris DVD, (login as jack automatically).

If you want to do this remotely using ssh:

as "jack" :

jack at opensolaris:~$ pfexec su -
root at opensolaris:~# svcadm enable ssh

Plug in the removable USB key.
Look for the removable devices (here mine show up as c4t0d0p0)

root at opensolaris:~# rmformat
Looking for devices...
     1. Logical Node: /dev/rdsk/c4t0d0p0
        Physical Node: /pci at 0,0/pci1043,1557 at 1d,7/storage at 1/disk at 0,0
        Connected Device:          USB DISK 2.0     PMAP
        Device Type: Removable
        Bus: USB
        Size: 7.6 GB
        Label: <None>
        Access permissions: Medium is not write protected.
     2. Logical Node: /dev/rdsk/c5t0d0p0
        Physical Node: /pci at 0,0/pci-ide at 1f,1/ide at 0/sd at 0,0
        Connected Device: TSSTcorp CDDVDW TS-L632H  AS02
        Device Type: DVD Reader/Writer
        Bus: IDE
        Size: 656.0 MB
        Label: <None>
        Access permissions: Medium is not write protected.

Create a DOS MBR partition, and use the whole disk for Solaris:

root at opensolaris:~# fdisk -B /dev/rdsk/c4t0d0p0

Create a single slice within that partition:

root at opensolaris:~# format -e /dev/rdsk/c4t0d0s0
selecting /dev/rdsk/c4t0d0s0
[disk formatted]


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        scsi       - independent SCSI mode selects
        cache      - enable, disable or query SCSI disk cache
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> p


PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        9      - change `9' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        !<cmd> - execute <cmd>, then return
        quit
partition> mo
Select partitioning base:
        0. Current partition table (original)
        1. All Free Hog
Choose base (enter number) [0]? 1

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       0               0         (0/0/0)           0
  1       swap    wu       0               0         (0/0/0)           0
  2     backup    wu       0 - 3820        7.46GB    (3821/0/0) 15650816
  3 unassigned    wm       0               0         (0/0/0)           0
  4 unassigned    wm       0               0         (0/0/0)           0
  5 unassigned    wm       0               0         (0/0/0)           0
  6        usr    wm       0               0         (0/0/0)           0
  7 unassigned    wm       0               0         (0/0/0)           0
  8       boot    wu       0 -    0        2.00MB    (1/0/0)        4096
  9 alternates    wm       0               0         (0/0/0)           0

Do you wish to continue creating a new partition
table based on above table[yes]?
Free Hog partition[6]? 0
Enter size of partition '1' [0b, 0c, 0.00mb, 0.00gb]: 0
Enter size of partition '3' [0b, 0c, 0.00mb, 0.00gb]: 0
Enter size of partition '4' [0b, 0c, 0.00mb, 0.00gb]: 0
Enter size of partition '5' [0b, 0c, 0.00mb, 0.00gb]: 0
Enter size of partition '6' [0b, 0c, 0.00mb, 0.00gb]: 0
Enter size of partition '7' [0b, 0c, 0.00mb, 0.00gb]: 0

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       1 - 3820        7.46GB    (3820/0/0) 15646720
  1       swap    wu       0               0         (0/0/0)           0
  2     backup    wu       0 - 3820        7.46GB    (3821/0/0) 15650816
  3 unassigned    wm       0               0         (0/0/0)           0
  4 unassigned    wm       0               0         (0/0/0)           0
  5 unassigned    wm       0               0         (0/0/0)           0
  6        usr    wm       0               0         (0/0/0)           0
  7 unassigned    wm       0               0         (0/0/0)           0
  8       boot    wu       0 -    0        2.00MB    (1/0/0)        4096
  9 alternates    wm       0               0         (0/0/0)           0

Okay to make this the current partition table[yes]?
Enter table name (remember quotes): original

Ready to label disk, continue? y

partition> quit


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        scsi       - independent SCSI mode selects
        cache      - enable, disable or query SCSI disk cache
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> quit

Create a UFS filesystem on that slice:

root at opensolaris:~# newfs /dev/rdsk/c4t0d0s0
newfs: construct a new file system /dev/rdsk/c4t0d0s0: (y/n)? y
Warning: 2048 sector(s) in last cylinder unallocated
/dev/rdsk/c4t0d0s0:     15646720 sectors in 2547 cylinders of 48 tracks, 128
sectors
        7640.0MB in 160 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
 14748448, 14846880, 14945312, 15043744, 15142176, 15240608, 15339040,
 15437472, 15535904, 15634336

Mount it, and copy the CD contents to it:

root at opensolaris:~# mkdir /a
root at opensolaris:~# mount /dev/dsk/c4t0d0s0 /a
root at opensolaris:~# cd /media/OpenSolaris
root at opensolaris:/media/OpenSolaris# find . -print | cpio -pdum /a
1342912 blocks
root at opensolaris:/media/OpenSolaris# cd /

Make the USB disk bootable with grub (-m used to install grub in the MBR and
within the partition boot block):

root at opensolaris:/# installgrub -fm /a/boot/grub/stage[12]
/dev/rdsk/c4t0d0s0
stage1 written to partition 0 sector 0 (abs 4096)
stage2 written to partition 0, 273 sectors starting at 50 (abs 4146)
stage1 written to master boot sector
root at opensolaris:/# umount /a

Done. Reboot (Cold, through the BIOS):

root at opensolaris:/# reboot -p



Have fun - Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.opensolaris.org/pipermail/ug-msosug/attachments/20100321/951e38dc/attachment.html>

Reply via email to