Here we go again, more braindead experiments. Although by now, I feel like a day old zombie, you know, I've eaten a little and my IQ has to be going up.
Lets mount up the ISO images again:
# lofiadm -a /isos/images/solarisdvd.iso /dev/lofi/1 # mount -F hsfs -o ro /dev/lofi/1 /isos/mnt/x86 # lofiadm -a /isos/images/sol-10-u1-companion-ga.iso /dev/lofi/2 # mount -F hsfs -o ro /dev/lofi/2 /isos/mnt/companion
Do a better cpio of the data:
# find . -depth -print | cpio -pudm /kanigix
4850032 blocks
# pwd
/isos/mnt/x86
# cd ..
# ls -la
total 18
drwxr-xr-x 5 tdh staff 512 Mar 16 15:35 .
drwxr-xr-x 4 tdh staff 512 Mar 16 01:51 ..
dr-xr-xr-x 2 root sys 2048 Nov 9 08:54 companion
dr-xr-xr-x 2 root sys 4096 Mar 6 15:24 x86
drwxr-xr-x 2 root root 512 Mar 16 15:35 x86_slice0
# cd companion/
# ls -la
total 16
dr-xr-xr-x 2 root sys 2048 Nov 9 08:54 .
drwxr-xr-x 5 tdh staff 512 Mar 16 15:35 ..
-r--r--r-- 1 root sys 77 Nov 9 08:54 .cdtoc
-rw-r--r-- 1 root sys 31 Nov 9 08:54 .volume.inf
drwxr-xr-x 4 root sys 2048 Nov 9 08:54 Solaris_sparc
drwxr-xr-x 4 root sys 2048 Nov 9 08:54 Solaris_x86
# find . -depth -print | cpio -pudm /kanigix/companion
cpio: Error during access() of "/kanigix/companion", errno 2, No such file or directory
USAGE:
cpio -i[bcdfkmrstuv@BSV6] [-C size] [-E file] [-H hdr] [-I file [-M msg]] [-R id] [patterns]
cpio -o[acv@ABLV] [-C size] [-H hdr] [-O file [-M msg]]
cpio -p[adlmuv@LV] [-R id] directory
# mkdir /kanigix/companion
# find . -depth -print | cpio -pudm /kanigix/companion
1758784 blocks
I grabbed the vtoc, but ended up not using it since the x86 DVD only has one slice and thus does not need to be hacked like for the Sparc DVD. Speaking of which, lets create a new ISO image:
# cd /isos # mv kanigix.iso kanigix.iso.1 # mkisofs -R -d -L -l -o /isos/kanigix.iso /kanigix mkisofs: The option '-L' is reserved by POSIX.1-2001. mkisofs: The option '-L' means 'follow all symbolic links'. mkisofs: Mkisofs-2.02 will introduce POSIX semantics for '-L'. mkisofs: Use -allow-leading-dots in future to get old mkisofs behavior. Warning: creating filesystem that does not conform to ISO-9660. mkisofs: Missing pathspec. Usage: mkisofs [options] file... Use mkisofs -help to get a list of valid options. # mkisofs -R -d -L -l -o /isos/kanigix.is0^H^[[Ko /kanigix/^H^[[K^M mkisofs: The option '-L' is reserved by POSIX.1-2001. mkisofs: The option '-L' means 'follow all symbolic links'. mkisofs: Mkisofs-2.02 will introduce POSIX semantics for '-L'. mkisofs: Use -allow-leading-dots in future to get old mkisofs behavior. Warning: creating filesystem that does not conform to ISO-9660. Using SFW000 for ./rr_moved/sfw (sfw) Using SFW001 for ./rr_moved/sfw (sfw) Using SFW002 for ./rr_moved/sfw (sfw) ... Using GMT_12000;1 for /kanigix/.install/JRE/jre/lib/zi/Etc/GMT-12 (GMT+12) Using GMT_11000;1 for /kanigix/.install/JRE/jre/lib/zi/Etc/GMT-11 (GMT+11) Using GMT_10000;1 for /kanigix/.install/JRE/jre/lib/zi/Etc/GMT-10 (GMT+10) Using GMT_1000;1 for /kanigix/.install/JRE/jre/lib/zi/Etc/GMT-1 (GMT+1) 3.30% done, estimate finish Thu Mar 16 20:17:40 2006 3.60% done, estimate finish Thu Mar 16 20:18:41 2006 3.90% done, estimate finish Thu Mar 16 20:18:41 2006 4.20% done, estimate finish Thu Mar 16 20:19:05 2006 4.50% done, estimate finish Thu Mar 16 20:19:03 2006 4.79% done, estimate finish Thu Mar 16 20:19:02 2006 ... 98.89% done, estimate finish Thu Mar 16 20:20:53 2006 99.19% done, estimate finish Thu Mar 16 20:20:52 2006 99.49% done, estimate finish Thu Mar 16 20:20:53 2006 99.79% done, estimate finish Thu Mar 16 20:20:52 2006 Total translation table size: 0 Total rockridge attributes bytes: 13082774 Total directory bytes: 107638784 Path table size(bytes): 792660 Max brk space used 700e000 1668571 extents written (3258 MB)
Okay, the name translations may end up biting me here. I forsee another round of burns.
The first interesting thing is the size of the ISO:
# ls -la total 11518522 drwxr-xr-x 4 tdh staff 512 Mar 16 20:13 . drwxr-xr-x 39 root root 1024 Mar 16 20:23 .. drwxr-xr-x 2 tdh staff 512 Mar 16 15:36 images -rw-r--r-- 1 root root 3417233408 Mar 16 20:20 kanigix.iso -rw-r--r-- 1 root root 2477342720 Mar 16 01:57 kanigix.iso.1 drwxr-xr-x 5 tdh staff 512 Mar 16 15:35 mnt -rw-r--r-- 1 root root 512 Mar 16 20:05 sol.x86.b35.vtoc [tdh@wont /isos]> ls -la /rmdisk/unnamed_rmdisk/*.iso -rwxrwxrwx 1 tdh staff 3443589120 Mar 13 23:05 /rmdisk/unnamed_rmdisk/kanigix-x86-b35.iso -rwxrwxrwx 1 tdh staff 943718400 Nov 9 08:55 /rmdisk/unnamed_rmdisk/sol-10-u1-companion-ga.iso -rwxrwxrwx 1 tdh staff 2499870720 Mar 12 14:47 /rmdisk/unnamed_rmdisk/solarisdvd.iso
This new image is larger than the second and close in size to the first. My best bet is that this is due to the chopping off of too deep paths.
But does it boot?
No.
My guess is either the VTOC or some additional mkisofs options. If we look at the VTOC for the Nevada b35 DVD:
# prtvtoc /dev/dsk/c1t0d0s0
* /dev/dsk/c1t0d0s0 partition map
*
* Dimensions:
* 0 bytes/sector
* 1 sectors/track
* 1 tracks/cylinder
* 1 sectors/cylinder
* 2384 cylinders
* 2382 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 0 2382 2381
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 5 01 0 4882624 4882623
2 5 01 0 4882624 4882623
versus this new image:
# prtvtoc /dev/dsk/c1t0d0s0
* /dev/dsk/c1t0d0s0 partition map
*
* Dimensions:
* 0 bytes/sector
* 1 sectors/track
* 1 tracks/cylinder
* 1 sectors/cylinder
* 3258 cylinders
* 3256 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 0 3256 3255
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 5 01 0 6674368 6674367
2 5 01 0 6674368 6674367
we can see that the space has been adjusted.
I've got more to say, but I want it as a different experiment...
So I just read through Building a Bootable Jumpstart Installation CD-ROM and I lifted several nice tips - like how to get and set the VTOC, how to invoke mkisofs, etc.
I had started following the instructions at Create a Solaris Jumpstart from iso and I figured out that the x86 DVD only has a slice 0:
# lofiadm -a /isos/images/solarisdvd.iso /dev/lofi/1 # mount -F hsfs -o ro /dev/lofi/1 /isos/mnt/x86 # lofiadm -a /isos/images/sol-10-u1-companion-ga.iso /dev/lofi/2 # mount -F hsfs -o ro /dev/lofi/2 /isos/mnt/companion # mkdir /isos/mnt/x86_slice0 # cd /isos # ls -la total 4840952 drwxr-xr-x 4 tdh staff 512 Mar 16 01:51 . drwxr-xr-x 38 root root 1024 Mar 16 00:44 .. drwxr-xr-x 2 tdh staff 512 Mar 16 01:04 images -rw-r--r-- 1 root root 2477342720 Mar 16 01:57 kanigix.iso drwxr-xr-x 5 tdh staff 512 Mar 16 15:35 mnt # cd images # dd if=../images/solarisdvd.iso of=vtoc.b35 bs=512 count=1 1+0 records in 1+0 records out # tcsh # od -D -j 452 -N 8 < vtoc.b35 0000000 0000000000 0000000000 0000010
Nothing there, lets look somewhere else:
# prtvtoc vtoc.b35
prtvtoc: vtoc.b35: Not a raw device
# prtvtoc ../images/solarisdvd.iso
prtvtoc: ../images/solarisdvd.iso: Value too large for defined data type
# prtvtoc /vol/dev/dsk/c1t0d0/sol_11_x86
* /vol/dev/dsk/c1t0d0/sol_11_x86 partition map
*
* Dimensions:
* 0 bytes/sector
* 1 sectors/track
* 1 tracks/cylinder
* 1 sectors/cylinder
* 2384 cylinders
* 2382 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 0 2382 2381
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 5 01 0 4882624 4882623
2 5 01 0 4882624 4882623
Okay, according to the Sun Blueprints document, I was supposed to turn off the volume manager. I'll do that when I follow the steps to make the DVD. Anyway, it turns out we can verify the slices from the ISO:
# ls -la /isos/mnt/x86/.slicemapfile -r--r--r-- 1 root root 419 Mar 2 17:33 /isos/mnt/x86/.slicemapfile # more !$ more /isos/mnt/x86/.slicemapfile # # @(#) i386.dot.slicemapfile 1.4@(#) # # # # a slice map file for install CD boot slices - maps platform (or not) # or karch to an install boot slice. # # entries are one of: # x "" <`uname -i`> exclude platform (must preceed "m" entries) # used if the platform is not really in a karch # p<`uname -i`> platform token entry (must preceed "m" entries) # m <`uname -m`> karch entry # m 0 i86pc
So, my next step is to follow the blueprint's receipe.
I just got warned that my Sun Ray 1G was infected. My 'Security Center' informed me that 'Win32res.exe' was sending information out to the web!
Here is the evidence:
I better buy that software for Windows!
So, as I'm trying things out, I'm findind things via google that I wasn't finding earlier. In some cases, this new information invalidates what I was experimenting. What's the quote:
Three hours in the library are worth three months in the lab.
I thought I would detail the searches I did.
Note that the days are fuzzy, the 03/16/06 happened late at night on 03/15/06. Also, I just took alphabetical order from my browser history. And I just went with the results from the one box - I might have done searches on other machines.
Looking at the data, I think I was thinking that Sun information was proprietary (looking for data before the advent of OpenSolaris and also convinced since the info is not on OpenSolaris, it must be involved with patent complications) and that my best bet was to figure out what Knoppix and such did in the Linux world. It was just as I moved to specific issues, e.g., how to mount an ISO image over a loopback, that I discovered more interesting payloads.
Back to the quote, sometimes you need to know what you are looking for before you can search effectively. I.e., an hour or two in the lab can save ten hours in the library, two more in the bar, eight sleeping, and then repeat until dumb luck pans out.
Okay, my next attempt is to create a new ISO image based on the contents of both of the others. I'm going to do this along the lines of stuff I've seen for Linux.
First I create some paths under /isos for storing the original images and for mounting them back under the loopback filesystem:
[tdh@wont /isos]> ls -la total 8 drwxr-xr-x 4 tdh staff 512 Mar 16 01:04 . drwxr-xr-x 38 root root 1024 Mar 16 00:44 .. drwxr-xr-x 2 tdh staff 512 Mar 16 01:04 images drwxr-xr-x 4 tdh staff 512 Mar 16 01:04 mnt
I simply copied the ISO images into the /isos/images directory. Next I will mount the images:
# lofiadm -a /isos/images/solarisdvd.iso /dev/lofi/1 # mount -F hsfs -o ro /dev/lofi/1 /isos/mnt/x86 # lofiadm -a /isos/images/sol-10-u1-companion-ga.iso /dev/lofi/2 # mount -F hsfs -o ro /dev/lofi/2 /isos/mnt/companion # ls -al /isos/mnt/companion total 16 dr-xr-xr-x 2 root sys 2048 Nov 9 08:54 . drwxr-xr-x 4 tdh staff 512 Mar 16 01:04 .. -r--r--r-- 1 root sys 77 Nov 9 08:54 .cdtoc -rw-r--r-- 1 root sys 31 Nov 9 08:54 .volume.inf drwxr-xr-x 4 root sys 2048 Nov 9 08:54 Solaris_sparc drwxr-xr-x 4 root sys 2048 Nov 9 08:54 Solaris_x86
I even verified I could see them. Now, the instructions for Knoppix on I Built a Custom Debian CD from Knoppix state to use cp -Rp, but I think that is going to have issues:
[tdh@wont ~]> sudo cp -Rp /isos/mnt/x86 /kanigix cp: cannot access /isos/mnt/x86/Solaris_11/Product/locale/C/.clustertoc cp: cannot access /isos/mnt/x86/Solaris_11/Product/locale/ja/.clustertoc cp: cannot access /isos/mnt/x86/Solaris_11/Product/locale/ko/.clustertoc cp: cannot access /isos/mnt/x86/Solaris_11/Product/locale/zh/.clustertoc ^C Time spent in user mode (CPU seconds) : 0.12s Time spent in kernel mode (CPU seconds) : 10.82s Total time : 0:50.79s CPU utilisation (percentage) : 21.5%
Lets try it with cpio:
[tdh@wont ~]> sudo sh -c "(cd /isos/mnt; find x86 -depth -print | cpio -pd /kanigix)" 4850032 blocks Time spent in user mode (CPU seconds) : 1.48s Time spent in kernel mode (CPU seconds) : 139.63s Total time : 8:05.33s CPU utilisation (percentage) : 29.0%
This creates a /kanigix/x86, not what we want, but good enough!
[tdh@wont /kanigix]> ls -la total 20 drwxr-xr-x 3 root root 512 Mar 16 01:25 . drwxr-xr-x 38 root root 1024 Mar 16 00:44 .. drwx------ 2 root root 8192 Mar 15 23:09 lost+found [tdh@wont /kanigix]> ls -la total 22 drwxr-xr-x 4 root root 512 Mar 16 01:25 . drwxr-xr-x 38 root root 1024 Mar 16 00:44 .. drwx------ 2 root root 8192 Mar 15 23:09 lost+found drwxr-xr-x 5 root root 512 Mar 16 01:25 x86 [tdh@wont /kanigix]>
Note that I'm winging it - I have no clue if this is going to work or if the second ever Kanigix DVD is going to be as great as the first one. I'll sell them one day on eBay. I'll publish images soon for verification purposes. :->
I'm pretty sure this will fail, I'm not going to explicitly attempt to do slices. But it will be a path towards the final product. I have to be able to pull information off of the DVD ISOs for now.
Okay, and now I get the stuff from the Solaris Software Companion DVD image:
[tdh@wont ~]> sudo sh -c "(cd /isos/mnt; find companion -depth -print | cpio -pd /kanigix)" 1758784 blocks Time spent in user mode (CPU seconds) : 0.53s Time spent in kernel mode (CPU seconds) : 39.87s Total time : 2:45.64s CPU utilisation (percentage) : 24.3%
By the way, I'm doing this on wont, the same machine I will have to test the install on. I've got a 300G drive for doing some testing on, and I'm using a 7-1/2G slice for /kanigix.
And once again, we get /kanigix/companion, which is not optimal. But since this is on the same slice, we will be able to move the contents easily. My goal is to be able to boot from this DVD, install, reboot, and then be able to install the extra stuff. Eventually, I want to be able to remove the reboot step and get space calculations, etc., in the first pass. But for now, all on one DVD is the goal.
For that end, I'm going to try something really braindead here:
[tdh@wont /kanigix]> mv companion/ x86/ mv: cannot rename companion/ to x86//companion/: Permission denied [tdh@wont /kanigix]> ls -la total 24 drwxr-xr-x 5 root root 512 Mar 16 01:35 . drwxr-xr-x 38 root root 1024 Mar 16 00:44 .. dr-xr-xr-x 4 root sys 512 Mar 16 01:36 companion drwx------ 2 root root 8192 Mar 15 23:09 lost+found dr-xr-xr-x 5 root sys 512 Mar 16 01:33 x86 [tdh@wont /kanigix]> sudo mv companion x86
Did I mention it was past my bedtime?
Now, I need to make an ISO and hope that it is bootable!
I think I'm already hosed, I found this Create a Solaris Jumpstart from iso and I think the slices have already bit me. No biggie, lets just press on. And I found another good resource here as Creating a Bootable Solaris Recovery CD.
And there are too many options to mkisofs and it is too late. As I said, after a quick glance at the above links, my new goal for this excerise is to burn an ISO. I did get some warnings about exceeding directory depths, which tells me I need to spend some time with the above docs.
[tdh@wont /isos]> sudo mkisofs -o kanigix.iso /kanigix/x86 ... 99.20% done, estimate finish Thu Mar 16 01:57:20 2006 99.62% done, estimate finish Thu Mar 16 01:57:21 2006 Total translation table size: 0 Total rockridge attributes bytes: 0 Total directory bytes: 35186688 Path table size(bytes): 247126 Max brk space used 2160000 1209640 extents written (2362 MB) Time spent in user mode (CPU seconds) : 3.56s Time spent in kernel mode (CPU seconds) : 33.48s Total time : 5:58.97s CPU utilisation (percentage) : 10.3%
Hmm, this image is 2.4G and the one in my first experiment was 3.4G.
And the thing did not boot. I have a valid DVD, but I'm guessing the missing info is on the other slices.
Some various observations, the displayed name on my desktop is CDROM instead of the normal title for the DVD. And it looks like using the standard ISO format failed - it has 8.3 format file names:
[tdh@adept cdrecorder]> ls -la total 480 dr-xr-xr-x 1 root root 2048 Mar 16 01:41 . drwxr-xr-x 3 root root 4096 Mar 15 00:29 .. dr-xr-xr-x 1 root root 2048 Mar 16 01:25 boot -r-xr-xr-x 1 root root 2048 Mar 16 01:25 _catalog -r-xr-xr-x 1 root root 92 Mar 16 01:25 _cdtoc dr-xr-xr-x 1 root root 2048 Mar 16 01:41 companio -r-xr-xr-x 1 root root 6851 Mar 16 01:25 copyrigh dr-xr-xr-x 1 root root 2048 Mar 16 01:25 _install -r-xr-xr-x 1 root root 257 Mar 16 01:25 installe -r-xr-xr-x 1 root root 459760 Mar 16 01:25 jds_thir -r-xr-xr-x 1 root root 419 Mar 16 01:25 _slicema dr-xr-xr-x 1 root root 2048 Mar 16 01:33 solaris_ -r-xr-xr-x 1 root root 17 Mar 16 01:33 _volume_.2 -r-xr-xr-x 1 root root 17 Mar 16 01:33 _volume_.3 -r-xr-xr-x 1 root root 17 Mar 16 01:33 _volume_.4 -r-xr-xr-x 1 root root 15 Mar 16 01:33 _volume.inf
All in all, I'm happy with the effort. I found out I can make a DVD, that I can rip out the contents, and that I have to do some reading to learn how to really get slices of off a DVD and back on.