====== Sitemap ====== This is a sitemap over all available pages ordered by [[doku>namespaces|namespaces]].
Page Actions
Wiki Actions
User Actions
====== Differences ====== This shows you the differences between two versions of the page.
guides:pxe:live:opensolaris [2009/03/04 12:19] 127.0.0.1 external edit |
guides:pxe:live:opensolaris [2009/03/04 12:53] (current) fishy fixups! |
||
---|---|---|---|
Line 27: | Line 27: | ||
pxelinux is not able to boot opensolaris. | pxelinux is not able to boot opensolaris. | ||
- | # mkdir /tftpboot/boot | + | <code> |
- | # cp -av /mnt/cdromimage/boot/grub/pxegrub /tftpboot/boot/grub | + | mkdir /tftpboot/boot |
+ | cp -av /mnt/cdromimage/boot/grub/pxegrub /tftpboot/boot/grub | ||
+ | </code> | ||
Next, get the microroot and the platform-related files from the CD. | Next, get the microroot and the platform-related files from the CD. | ||
- | I havent experimented too much with this, but using the safe route of keeping things as close to the root of the tftp is safe.. | + | I havent experimented too much with this, but using the safe route of |
+ | keeping things as close to the root of the tftp is safe.. | ||
Note: We will patch and replace the x86.microroot later... | Note: We will patch and replace the x86.microroot later... | ||
- | # mkdir /tftpboot/solaris | + | <code> |
- | # cp /mnt/cdromimage/boot/x86.microroot /tftpboot/solaris/ | + | mkdir /tftpboot/solaris |
- | # cp -av /mnt/cdromimage/platform/ /tftpboot/solaris/platform/ | + | cp /mnt/cdromimage/boot/x86.microroot /tftpboot/solaris/ |
+ | cp -av /mnt/cdromimage/platform/ /tftpboot/solaris/platform/ | ||
+ | </code> | ||
Now, set up pxelinux-pxegrub chaining. pxegrub works with the layout | Now, set up pxelinux-pxegrub chaining. pxegrub works with the layout | ||
that we set up previously, that is having the grub distribution at | that we set up previously, that is having the grub distribution at | ||
- | tftp://server/boot/grub/, including the menu.lst file. | + | tftp:server/boot/grub/, including the menu.lst file. |
pxelinux on the other hand, needs the pxegrub file itself to | pxelinux on the other hand, needs the pxegrub file itself to | ||
be located at the root of tftp, with a name ending with .0 | be located at the root of tftp, with a name ending with .0 | ||
- | # cp /tftpboot/boot/grub/pxegrub /tftpboot/pxegrub.0 | + | <code> |
- | # vim /tftpboot/boot/grub/menu.lst | + | cp /tftpboot/boot/grub/pxegrub /tftpboot/pxegrub.0 |
+ | vim /tftpboot/boot/grub/menu.lst | ||
+ | </code> | ||
+ | <code> | ||
default=0 | default=0 | ||
timeout=60 | timeout=60 | ||
Line 53: | Line 61: | ||
kernel$ /solaris/platform/i86pc/kernel/unix -m verbose -B install_server=[ip of your nfs server]:/srv/export/opensolaris/ | kernel$ /solaris/platform/i86pc/kernel/unix -m verbose -B install_server=[ip of your nfs server]:/srv/export/opensolaris/ | ||
module /solaris/x86.microroot | module /solaris/x86.microroot | ||
+ | </code> | ||
- | # vim /tftpboot/pxelinux.cfg/default | + | <code> |
+ | vim /tftpboot/pxelinux.cfg/default | ||
+ | </code> | ||
+ | <code> | ||
label g | label g | ||
menu label ^A PXEGrub | menu label ^A PXEGrub | ||
kernel pxegrub.0 | kernel pxegrub.0 | ||
+ | </code> | ||
Note that the lines described in menu.lst is all that is needed, whereas | Note that the lines described in menu.lst is all that is needed, whereas | ||
Line 71: | Line 84: | ||
route: forcing the kernel to 32bits, and thereby removing the problem. | route: forcing the kernel to 32bits, and thereby removing the problem. | ||
Hack, yes, but it worked. The previous line was: | Hack, yes, but it worked. The previous line was: | ||
+ | <code> | ||
kernel$ /solaris/platform/i86pc/kernel/$ISADIR/unix -m verbose -B install_server=[ip of your nfs server]:/srv/export/opensolaris/ | kernel$ /solaris/platform/i86pc/kernel/$ISADIR/unix -m verbose -B install_server=[ip of your nfs server]:/srv/export/opensolaris/ | ||
+ | </code> | ||
NOW, we need an already installed copy of Solaris to modiy the microroot image.. | NOW, we need an already installed copy of Solaris to modiy the microroot image.. | ||
Line 80: | Line 94: | ||
decompress it. Then set up a loop-file dev-node to mount, and mount it. | decompress it. Then set up a loop-file dev-node to mount, and mount it. | ||
- | # mv x86.microroot x86.microroot.gz;gunzip x86.microroot.gz | + | <code> |
- | # lofiadm -a /path/to/x86.microroot /dev/lofi/1 | + | mv x86.microroot x86.microroot.gz;gunzip x86.microroot.gz |
- | # mkdir /mnt/microroot | + | lofiadm -a /path/to/x86.microroot /dev/lofi/1 |
- | # mount /dev/lofi/1 /mnt/microroot | + | mkdir /mnt/microroot |
+ | mount /dev/lofi/1 /mnt/microroot | ||
+ | </code> | ||
We need to add some essential tools to get our little magic to work... | We need to add some essential tools to get our little magic to work... | ||
- | + | <code> | |
- | # cp /usr/sbin/prtconf /mnt/microroot/usr/sbin/ | + | cp /usr/sbin/prtconf /mnt/microroot/usr/sbin/ |
- | # cp /usr/sbin/i86/prtconf /mnt/microroot/usr/sbin/i86/ | + | cp /usr/sbin/i86/prtconf /mnt/microroot/usr/sbin/i86/ |
- | # cp /usr/bin/cut /mnt/microroot/usr/bin/ | + | cp /usr/bin/cut /mnt/microroot/usr/bin/ |
- | # cp /usr/bin/sed /mnt/microroot/usr/bin | + | cp /usr/bin/sed /mnt/microroot/usr/bin |
- | # cp /usr/sbin/svcadm /mnt/microroot/usr/sbin | + | cp /usr/sbin/svcadm /mnt/microroot/usr/sbin |
+ | </code> | ||
Now, patch the method that loads/mounts the root filesystem using our new tools.. | Now, patch the method that loads/mounts the root filesystem using our new tools.. | ||
- | # vim /mnt/microroot/lib/svc/method/live-fs-root | + | <code> |
+ | vim /mnt/microroot/lib/svc/method/live-fs-root | ||
+ | </code> | ||
Find the following line: | Find the following line: | ||
+ | <code> | ||
echo "\rPreparing live image for use" >/dev/msglog | echo "\rPreparing live image for use" >/dev/msglog | ||
+ | </code> | ||
After that line, add the following hack/patch: | After that line, add the following hack/patch: | ||
+ | <code> | ||
# grab the install_server setting from boot | # grab the install_server setting from boot | ||
install_server=`/usr/sbin/prtconf -v /devices|/usr/bin/sed -n '/install_server/{;n;p;}'|/usr/bin/cut -f 2 -d\'` | install_server=`/usr/sbin/prtconf -v /devices|/usr/bin/sed -n '/install_server/{;n;p;}'|/usr/bin/cut -f 2 -d\'` | ||
Line 114: | Line 136: | ||
/sbin/mount -F nfs -o vers=3 $install_server /.cdrom | /sbin/mount -F nfs -o vers=3 $install_server /.cdrom | ||
echo Mounted $install_server using NFSv3 >/dev/msglog | echo Mounted $install_server using NFSv3 >/dev/msglog | ||
+ | </code> | ||
(note: The bit that was giving me trouble in amd64, and made me force | (note: The bit that was giving me trouble in amd64, and made me force | ||
Line 120: | Line 143: | ||
When running a 64bit kernel, prtconf -v /devices returns the error: | When running a 64bit kernel, prtconf -v /devices returns the error: | ||
+ | <code> | ||
prtconf: devinfo facility not available | prtconf: devinfo facility not available | ||
+ | </code> | ||
If anyone knows how to get around this in the microroot, so that 64bit | If anyone knows how to get around this in the microroot, so that 64bit | ||
Line 127: | Line 152: | ||
After completing the edit, our patching is done. Unmount, pack and rename the microroot: | After completing the edit, our patching is done. Unmount, pack and rename the microroot: | ||
- | # umount /mnt/microroot | + | <code> |
- | # lofiadm -d /dev/lofi/1 | + | umount /mnt/microroot |
- | # gzip /path/to/x86.microroot | + | lofiadm -d /dev/lofi/1 |
- | # mv /path/to/x86.microroot.gz /path/to/x86.microroot | + | gzip /path/to/x86.microroot |
+ | mv /path/to/x86.microroot.gz /path/to/x86.microroot | ||
+ | </code> | ||
And transfer the microroot image to your TFTP server, replacing | And transfer the microroot image to your TFTP server, replacing | ||
Line 138: | Line 165: | ||
the /tftboot/boot/grub/menu.lst.. | the /tftboot/boot/grub/menu.lst.. | ||
- | # cp -av /mnt/cdromimage/ /srv/export/opensolaris | + | <code> |
+ | cp -av /mnt/cdromimage/ /srv/export/opensolaris | ||
+ | </code> | ||
That should do it. At leas it was what was needed in my case. A lot of steps | That should do it. At leas it was what was needed in my case. A lot of steps |