LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Obtaining slice 1 from Solaris 9 ISO image on Linux (https://www.linuxquestions.org/questions/solaris-opensolaris-20/obtaining-slice-1-from-solaris-9-iso-image-on-linux-656297/)

ChooseLife 07-17-2008 01:25 AM

Obtaining slice 1 from Solaris 9 ISO image on Linux
 
Hello,

I am setting up a jumpstart server for Solaris 9 Sparc on Linux (Slackware 12.1)

The challenge I am facing is making Linux recognize multisliced Solaris ISO image correctly.

I found this article, which provides the exact solution. However, the numbers for offset and slice size greatly differ between the example and my case (see below).

Does anyone know how to solve this problem?

I have two versions:
a) od has different parameters/behaviour on Linux and Solaris (and the article describes the process for Solaris jumpstart server)
b) slice 1 offset/size is in a different part of VTOC, but I have no idea where to find this information

Any ideas?

TIA

Example

Code:

# dd if=sol-9-u1-sparc-v1.iso of=vtoc bs=512 count=1
1+0 records in
1+0 records out

# od -D -j 452 -N 8 < vtoc
0000000 0000000888 0000546560
0000010

# echo 888*640 | bc
568320

# dd if=sol-9-u1-sparc-v1.iso of=sol-9-u1-sparc-v1-s1 bs=512 skip=568320 count=546560
546560+0 records in
546560+0 records out

CD1 (Software 1/2 CD)
Code:

# dd if=sol-9-905hw-ga-sparc-v1.iso of=vtoc-1 bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00120578 s, 425 kB/s

# od -D -j 452 -N 8 < vtoc-1
0000704 3489857536 2150631680
0000714

# echo 3489857536*640 | bc
2233508823040

# dd if=sol-9-905hw-ga-sparc-v1.iso of=sol-9-905hw-ga-sparc-v1-s1.iso bs=512 skip=2233508823040 count=2150631680
0+0 records in
0+0 records out
0 bytes (0 B) copied, 137.874 s, 0.0 kB/s

CD0 (Install CD)
Code:

# dd if=sol-9-905hw-install-ga-sparc.iso of=vtoc-0 bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.0114962 s, 44.5 kB/s

# od -D -j 452 -N 8 < vtoc-0
0000704  33554432    5248000
0000714

# echo 33554432*640 | bc
21474836480

# dd if=sol-9-905hw-install-ga-sparc.iso of=sol-9-905hw-install-ga-sparc-s1.iso bs=512 skip=21474836480 count=5248000
0+0 records in
0+0 records out
0 bytes (0 B) copied, 204.653 s, 0.0 kB/s


jlliagre 07-19-2008 02:30 PM

I strongly suspect an endianness issue.

The values you pick are big endian while your x86 box is little endian. You need to convert them to get the correct offset and size.

ChooseLife 07-20-2008 05:13 AM

thank you, jlliagre, you seem to be right about the root of the problem.

with regards to endianness i get these numbers:

Code:

# od -j 452 -N 8 -t x1 < vtoc
0000704 00 00 03 d0 00 09 30 80

which seem to be much more reasonable.

once again, thank you! :)

ChooseLife 07-23-2008 12:54 AM

I just came back to post my solution if someone struggles with this in the future.

jlliagre was right about problem with endianness in vtoc. However, much easier approach to this whole thing was using fdisk to see vtoc of the iso image.

So here's the simple way of obtaining slice 1 (on x86 Linux):

Code:

# fdisk -l sol-9-905hw-install-ga-sparc.iso

Disk sol-9-905hw-install-ga-sparc.iso (Sun disk label): 1 heads, 640 sectors, 2048 cylinders
Units = cylinders of 640 * 512 bytes

                            Device Flag    Start      End    Blocks  Id  System
sol-9-905hw-install-ga-sparc.iso1  r        0        2      640    4  SunOS usr
sol-9-905hw-install-ga-sparc.iso2  r        2      2082    665600    2  SunOS root
sol-9-905hw-install-ga-sparc.iso3          2082      2086      1280    0  Unassigned
sol-9-905hw-install-ga-sparc.iso4          2086      2090      1280    0  Unassigned
sol-9-905hw-install-ga-sparc.iso5          2090      2094      1280    0  Unassigned
sol-9-905hw-install-ga-sparc.iso6          2094      2098      1280    0  Unassigned

# dd if=sol-9-905hw-install-ga-sparc.iso skip=1280 bs=512 count=1331200 of=v0-s1.iso

# mount -t ufs -o loop,ro,ufstype=sun v0-s1.iso s1/

"skip=1280" comes from offset of 2 units x 640, and "count=1331200" is (2082 - 2) untis x 640.

Cheers


All times are GMT -5. The time now is 11:26 PM.