LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 07-17-2008, 01:25 AM   #1
ChooseLife
Member
 
Registered: May 2007
Distribution: Ubuntu, RHEL, Slackware
Posts: 49

Rep: Reputation: 17
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
 
Old 07-19-2008, 02:30 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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.
 
Old 07-20-2008, 05:13 AM   #3
ChooseLife
Member
 
Registered: May 2007
Distribution: Ubuntu, RHEL, Slackware
Posts: 49

Original Poster
Rep: Reputation: 17
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!
 
Old 07-23-2008, 12:54 AM   #4
ChooseLife
Member
 
Registered: May 2007
Distribution: Ubuntu, RHEL, Slackware
Posts: 49

Original Poster
Rep: Reputation: 17
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
modify linux iso image xelnt Linux - General 6 07-15-2010 06:41 PM
Need help with Linux image ISO Sabs Linux - General 11 03-08-2008 02:23 PM
Burn iso image in linux android6011 Linux - Software 1 06-25-2006 10:30 AM
linux image iso albywiller Linux - General 5 05-18-2006 07:59 AM
obtaining debian dvd iso with mac os x bobotoes Linux - Newbie 4 09-30-2004 09:56 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 07:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration