Bug 6851 - Suggestions for microroot additions - vi, svcs, mdb
: Suggestions for microroot additions - vi, svcs, mdb
Status: ACCEPTED
Product: installer
autoinstall
: unspecified
: ANY/Generic OpenSolaris
: P3 enhancement (vote)
: 2010.1H
Assigned To: installer watcher
:
:
: top_60
:
:
:
  Show dependency treegraph
 
Reported: 2009-02-24 06:34 UTC by Tim Foster
Modified: 2009-09-28 20:13 UTC (History)
5 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Tim Foster 2009-02-24 06:34:15 UTC
While investigating bug 6850, as the system was failing extremely early in
boot, we weren't getting the *.zlib archives from the network.

This resulted in an pretty unfriendly environment - particularly, the following
would be useful to have in the microroot:

 * /usr/share/lib/terminfo (an extra 3.4 mb)
   - we ship /usr/has/bin/vi, but without the accompanying terminfo database,
   this is a bit useless

 * /usr/bin/svcs + supporting libraries (an extra ~ 300k)

 * mdb + supporting libraries (an extra ~9mb )

perhaps the last item is a bit of a stretch, but certainly having a working
editor would be extremely helpful. I ended up just rolling my own microroot
with
these extra items.

I understand the memory constraints of being able to install on low memory
systems, hence the low priority.
Comment 1 William Schumann 2009-02-27 04:40:39 UTC
Marking this enhancement request as incomplete, hoping to receive more feedback
on this and other prudent additions to the microroot.
Comment 2 Mary Ding 2009-03-13 12:46:11 UTC
the timeout is set to 3/13/2009 and never heard back from the submitter.  Thus
close out as WONTFIX.
Comment 3 Tim Foster 2009-04-01 03:52:18 UTC
Sorry, I was on vacation. What additional information do you need beyond what
was in the description? Vi doesn't work without the terminfo database, so 
debugging early-boot problems when just the microroot has booted is very 
difficult.

Likewise, being able to see what services are running without having to cat 
/etc/svc/volatile/log files would also be extremely useful.
Comment 4 Jan Damborsky 2009-04-09 00:41:46 UTC
this is a request for having following pieces working in microroot without
solaris.zlib archive downloaded:

- vi
- svcs
- mdb

I agree that at least working vi & svcs would be nice to have, since there are
situations when one could end up without solaris.zlib - mostly when networking
is not brought up correctly in microoroot (e.g. when there are missing network
drivers).
Comment 5 Tim Foster 2009-06-15 08:36:36 UTC
(I ended needing to explain to someone today how to add content to their
miniroot, so in the interests of providing a public workaround, here we go:)


The miniroot is a compressed UFS archive downloaded via tftp during pxeboot,
which lives in /boot/x86.microroot on the AI image.  To access its contents,
you need to uncompress  and mount it:

# df -h .
Filesystem             size   used  avail capacity  Mounted on
/export/home/osol-0906-111b2-ai-x86.iso
                       161M   161M     0K   100%    /tmp/iso
# pwd
/tmp/iso/boot
# mkdir /tmp/b 
# mount -F ufs /tmp/microroot.uncompressed /tmp/b
# cd /tmp/b
# ls -al
total 84
drwxr-xr-x  20 root     root         512 May 17 22:52 .
drwxrwxrwt   9 root     sys          804 Jun 15 08:09 ..
-rw-r--r--   1 root     root           0 May 17 22:51 .autoinstall
drwxr-xr-x   2 root     root         512 May 17 22:51 .cdrom
-r--r--r--   1 root     root          26 May 17 22:51 .volumeid
lrwxrwxrwx   1 root     root           9 May 17 22:52 bin -> ./usr/bin
drwxr-xr-x   5 root     sys          512 May 17 22:52 boot
drwxr-xr-x  30 root     sys         4096 May 17 22:52 dev
drwxr-xr-x   3 root     sys          512 May 17 22:52 devices
drwxr-xr-x  49 root     sys         3072 May 17 22:52 etc
drwxr-xr-x   5 65432    staff        512 May 17 22:52 jack
drwxr-xr-x  19 root     sys          512 May 17 22:53 kernel
drwxr-xr-x   9 root     bin         4096 May 17 22:52 lib
drwx------   2 root     root        8192 May 17 22:52 lost+found
drwxr-xr-x   4 root     root         512 May 17 22:52 mnt
lrwxrwxrwx   1 root     root          13 May 17 22:52 opt -> /mnt/misc/opt
drwxr-xr-x   5 root     sys          512 May 17 22:52 platform
dr-xr-xr-x   2 root     root         512 May 17 22:50 proc
-rw-r--r--   1 root     root           0 May 17 22:52 reconfigure
drwx------   2 root     root         512 May 17 22:52 root
drwxr-xr-x   2 root     sys         1536 May 17 22:52 sbin
drwxr-xr-x   4 root     root         512 May 17 22:52 system
drwxrwxrwt   2 root     root         512 May 17 22:50 tmp
drwxr-xr-x   7 root     root         512 May 17 22:52 usr
drwxr-xr-x  30 root     sys          512 May 17 22:52 var
# df -h .
Filesystem             size   used  avail capacity  Mounted on
/tmp/microroot.uncompressed
                       174M   164M    11M    94%    /tmp/b


Now to change the contents of the microroot, if you're adding more than 11mb of
content (which you likely are) you'll need a bigger UFS filesystem to store the
changes in:

# mkfile 300m /tmp/new-microroot.uncompressed                          
# lofiadm -a /tmp/new-microroot.uncompressed
/dev/lofi/3
# newfs /dev/lofi/3
newfs: construct a new file system /dev/rlofi/3: (y/n)? y
/dev/rlofi/3:   614400 sectors in 1024 cylinders of 1 tracks, 600 sectors
        300.0MB in 64 cyl groups (16 c/g, 4.69MB/g, 2240 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 9632, 19232, 28832, 38432, 48032, 57632, 67232, 76832, 86432,
 518432, 528032, 537632, 547232, 556832, 566432, 576032, 585632, 595232, 604832
# mkdir /tmp/c  
# mount /dev/lofi/3 /tmp/c
# pwd  
/tmp/b
# find . | cpio -pdum /tmp/c
331792 blocks

At this point, you can copy anything else into /tmp/c that you want. (obviously
for real systems we'd use IPS, but I was just hacking about here)

I'd recommended the termcap databases, svcs and mdb, but ymmv.  Setting
LD_LIBRARY_PATH temporarily into the new miniroot, and running ldd on any
binaries/libraries I was adding was an easy way to check that stuff had the
correct dependencies.

# df -h /tmp/c
Filesystem             size   used  avail capacity  Mounted on
/dev/lofi/3            281M   164M    90M    65%    /tmp/c
# umount /tmp/c
# lofiadm -d /dev/lofi/3
# gzip -c /tmp/new-microroot.uncompressed > /tmp/x86.microroot.new

giving you a new file you can replace x86.microroot with.
Comment 6 Tim Foster 2009-06-15 08:54:38 UTC
For completeness, I should point out, the /tmp/microroot.uncompressed came from
the /boot/x86.microroot file inside the AI image. I extracted it with

# gunzip -c ./boot/x86.microroot > /tmp/microroot.uncompressed.