Wednesday, September 16, 2009

How to make a sparc Live CD from AI

That's what I did to get the LiveCD from last AI iso.
On sparc machine:

# mkdir -p /opt/livecd/s0.
# mount -F hsfs `lofiadm -a osol-1002-122-ai-sparc.iso` /mnt

I copied all iso's content to s0 and then I've unpacked /opt/livecd/s0/boot/boot_archive with root_archive to /opt/livecd/tmp.

# cd /opt/livecd/tmp
# echo snv122 > .volumeid
# mv .autoinstall .livecd

I've also removed last block about keyboard configuration and gdm in /lib/svc/method/live-fs-root.
Next I've created lofi directory in /opt/livecd/tmp/dev and symlink in this directory to ../../devices/pseudo/lofi@0:1 (this is required for mounting solaris.zlib).
I took hsfs.bootblock from SXCE DVD and put it in boot directory.

# cd /opt/livecd/s0/boot/
# root_archive pack boot_archive /opt/livecd/tmp

Script root_archive required small hack for boot-archive size - I've added line "size=130000" before "/usr/sbin/mkfile ${size}k "$TMR".
Next I've created symlinks for boot_archive in /opt/livecd/s0/platform/sun4v and /opt/livecd/s0/platform/sun4u
Now iso:

# cd /opt/livecd/
# mkisofs -G s0/boot/hsfs.bootblock -B ... -l -ldots -R -N -D -V snv122 -o /opt/sparc_snv122.iso s0/

Live CD boots on my old Ultra 60 (you can see some warnings and services errors but that's another story):


guzgkuzgkuz said...

how did you unpack the boot_archive with root_archive? I tried it in several ways on opensolaris/x86 and always got something like "not a gzip" or "unknown fstype".

Can you put your already build iso online?

alhazred said...

guzgkuzgkuz: you need sparc machine for this

Hans said...

can I install OpenSolaris from this live CD on sparc? My selfmade live CD of opensolaris 200906 don't work :'( Can you make a image for download?

Unknown said...

Amazing find (and great instructions), but I'm having an issue following a few steps:

When I'm to symlink the lofi@0:1, do I expect to have it named the same (just flat ln -s [file]?)

Lastly, when I'm mkisofs, the -B elipse, is it suppose to be an elipse or are you referring to the previous hsfs.bootblock?

Additionally, I was only able to burn this CD on a linux machine (or solaris I suppose, but didn't try). Windows kept giving me errors. Should I be able to only burn this on a Solaris machine for some reason?

alhazred said...

You'd better use usual last sparc LiveCD now :)

Unknown said...

I'm attempting to cut a sparc livecd with added scripts, so unfortunately I need to try to get this working.

The error I get on boot, after research (found the ellipse in the mkisofs man page >.<), is the following:

"Warning: Fcode sequence resulted in a net stack depth change of 1

The file just loaded doers not appear to be executable.

{1} ok "

I've been working on Linux for years, but Solaris is a new beast so this means little to me.

I've successfully made the mod too root_archive, packed and unpacked the created file with out error, made all the changes you listed (except the lofi part I still may have wrong due to intelligence issues).

If you have any advice, I'll gladly take it but I've failed to find anyone else who seems to have successfully produced a Sparc Live CD. You're unofficially my only hope. ^_^

alhazred said...

You should have sparc Solaris running to create iso image.

Unknown said...

Unfortunatly I am working on a Sparc Solaris machine currently running on a v210 installed with I'm still having the same issue I listed before and have been struggling with this for obviously awhile.

Is there any way you could try making a new CD and post command-by-command instructions for some of the steps you skipped or the entire process? The things that confused me are something as easy as copying the files from the ISO. I used "find . -depth -print | cpio -pdm ", but I'm sure there are several ways, and not all of them are right. Creating the lofi symlink is still confusing (What is the final name, "1"?), and which boot directory are you wanting us to put hsfs.bootblock in (I assumed the s0)? I assume we need to modify root_archive before running it even if it's in the opposite order. I know this is basically what you had already done, but there seems to be something missing, and lots of assumptions needed to be made. Even when looking at your iso, it doesn't appear to have all of the steps you posted done to it, and the ISO works.

I know your blog is geared toward more of the group that would have been using Solaris for nearly a decade but I'm jumping into it head first and having a hard time catching up on years of "that's how we do it in Solaris".

I appreciate any help.

How to determine PXE mac address when booting illumos via PXELinux/iPXE

In illumos, if you need to determine the interface which was used for booting via PXE then it's possible to use "boot-mac" pro...