Создаваться LiveUSB будет в системе OpenSolaris.
Понадобится флешка и образ OpenSolaris, например osol-dev-134-x86.usb
Сначала нужно узнать как система определила флешку:
$ rmformat
Looking for devices...
1. Logical Node: /dev/rdsk/c7t0d0p0
Physical Node: /pci@0,0/pci1043,1fa7@4,1/storage@4/disk@0,0
Connected Device: SanDisk Cruzer Micro 8.01
Device Type: Removable
Bus: USB
Size: 1,9 GB
Label: <None>
Access permissions: Medium is not write protected.
OpenSolaris монтирует флешки в систему при их подключении, так что необходимо её размонтировать используя Gnome или консоль.
Если флешка размонтирована, её не должно быть в выводе команды:
$ df -h
Удаление всех данных с флешки:
# time dd if=/dev/zero of=/dev/rdsk/c7t0d0p0 bs=16384
dd: unexpected short write, wrote 15872 bytes, expected 16384
123140+0 records in
123140+0 records out
real 5m58.528s
user 0m0.172s
sys 0m2.721s
Нужно разметить флешку на два раздела. Один будет с файловой системой FAT для файлов, другой подходящего размера для OpenSolaris.
$ du -sk osol-dev-134-x86.usb
806658 osol-dev-134-x86.usb
Запускаем fdisk:
# fdisk /dev/rdsk/c7t0d0p0
Редактируем таблицу партиций - n
No fdisk table exists. The default partition for the disk is:
a 100% "SOLARIS System" partition
Type "y" to accept the default partition, otherwise type "n" to edit the
partition table.
n
Создать партицию - 1
Total disk size is 962 cylinders
Cylinder size is 4096 (512 byte) blocks
Cylinders
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
WARNING: no partitions are defined!
SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Edit/View extended partitions
6. Exit (update disk configuration and exit)
7. Cancel (exit without updating disk configuration)
Enter Selection: 1
Тип партиции - C
Select the partition type to create:
1=SOLARIS2 2=UNIX 3=PCIXOS 4=Other
5=DOS12 6=DOS16 7=DOSEXT 8=DOSBIG
9=DOS16LBA A=x86 Boot B=Diagnostic C=FAT32
D=FAT32LBA E=DOSEXTLBA F=EFI 0=Exit? C
Процент партиции от размера флешки - 50
Select the partition type to create:
Specify the percentage of disk to use for this partition
(or type "c" to specify the size in cylinders). 50
Неактивная партиция - n
Select the partition type to create:
Should this become the active partition? If yes, it will be activated
each time the computer is reset or turned on.
Please type "y" or "n". n
Создать вторую партицию - 1
Total disk size is 962 cylinders
Cylinder size is 4096 (512 byte) blocks
Cylinders
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
1 Win95 FAT32 1 481 481 50
SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Edit/View extended partitions
6. Exit (update disk configuration and exit)
7. Cancel (exit without updating disk configuration)
Enter Selection: 1
Тип партиции - 1
Select the partition type to create:
1=SOLARIS2 2=UNIX 3=PCIXOS 4=Other
5=DOS12 6=DOS16 7=DOSEXT 8=DOSBIG
9=DOS16LBA A=x86 Boot B=Diagnostic C=FAT32
D=FAT32LBA E=DOSEXTLBA F=EFI 0=Exit? 1
Процент партиции от размера флешки - 50
Select the partition type to create:
Specify the percentage of disk to use for this partition
(or type "c" to specify the size in cylinders). 50
fdisk: Maximum percentage available is 49
Процент партиции от размера флешки - 49
Select the partition type to create:
Specify the percentage of disk to use for this partition
(or type "c" to specify the size in cylinders). 49
Активная партиция - y
Select the partition type to create:
Should this become the active partition? If yes, it will be activated
each time the computer is reset or turned on.
Please type "y" or "n". y
Записать разметку на флешку - 6
Total disk size is 962 cylinders
Cylinder size is 4096 (512 byte) blocks
Cylinders
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
1 Win95 FAT32 1 481 481 50
2 Active Solaris2 482 952 471 49
SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Edit/View extended partitions
6. Exit (update disk configuration and exit)
7. Cancel (exit without updating disk configuration)
Enter Selection: 6
Partition 2 is now the active partition.
Нужно подготовить раздел Solaris:
# format -e c7t0d0s0
Посмотрим на разметку партиции - p
selecting c7t0d0s0
[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
Текущая разметка - 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> p
Разметка слайса 0
Current partition table (original):
Total disk cylinders available: 469 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 468 938.00MB (469/0/0) 1921024
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 unassigned 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 unassigned wm 0 0 (0/0/0) 0
partition> 0
Пустое поле - Enter
Enter partition id tag[unassigned]:
Пустое поле - Enter
Enter partition permission flags[wm]:
Начало слайса с цилиндра 3
Enter new starting cyl[0]: 3
Весь оставшийся объём на слайс 0 - $
Enter partition size[0b, 0c, 3e, 0.00mb, 0.00gb]: $
Текущая разметка - p
partition> p
Current partition table (unnamed):
Total disk cylinders available: 469 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 3 - 468 932.00MB (466/0/0) 1908736
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 468 938.00MB (469/0/0) 1921024
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 unassigned 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 unassigned wm 0 0 (0/0/0) 0
Записать разметку слайсов на партицию - label
partition> label
[ 0 ] SMI Label
[ 1 ] EFI Label
Тип - 0
Specify Label type[0]: 0
Записать - y
Ready to label disk, continue? y
Выход - Ctrl+d
partition> ^D
Теперь можно перенести образ osol-dev-134-x86.usb на флешку:
# time dd if=./osol-dev-134-x86.usb of=/dev/rdsk/c7t0d0s0 bs=16384
50377+1 records in
50377+1 records out
real 2m26.850s
user 0m0.079s
sys 0m1.876s
Нужно установить загрузчик системы.
Монтирование раздела Solaris, точка монтирования - /mnt/usb
# mkdir /mnt/usb
# mount /dev/dsk/c7t0d0s0 /mnt/usb
Всё ли нормально:
# df -k /mnt/usb
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c7t0d0s0 756053 672775 22794 97% /mnt/usb
Установка Grub:
# installgrub -mf /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c7t0d0s0
stage1 written to partition 1 sector 0 (abs 1974272)
stage2 written to partition 1, 273 sectors starting at 50 (abs 1974322)
stage1 written to master boot sector
После установки размонтировать раздел:
# umount /mnt/usb
И напоследок останется отформатировать раздел FAT в системе Windows.