Virtual Guru's Blog – Home of Virtualization Workshops

January 5, 2010

OpenSolaris JeOS Prototype (Part 14: Remove GUI pkgs BE)

Filed under: jeos, opensolaris, Virtualization — natiku @ 6:21 am

This entry is part of OpenSolaris JeOS (Just Enough Operating System) Prototype workshop.

L3 osol0906rgui Remove main GUI front end part


Lets try to uninstall most GUI related packages.

1. Create a BE osol0906rgui

beadm create  osol0906rgui
mkdir /tmp/osol0906rgui
beadm mount osol0906rgui /tmp/osol0906rgui

2. Getting installed packages groups

Note: We can group by part of pkg name (*gnome*) or by group , but groups are not public param yet (and looks filling it is optional)

pkg -R /tmp/osol1108rgui contents -t legacy -o "pkg.name,category,name" | egrep "GNOME2"

3. Remove virtual Meta Packages packages (workaround)

pkg  -R /tmp/osol0906rgui uninstall  slim_install babel_install

4. Check current size

du -s -k /tmp/osol0906rgui/
2 946 979 /tmp/osol0906rgui/

5. Getting list of all packages

pkg -R /tmp/osol1108rgui list >/tmp/osol0906rgui/alllist.lst
cat /tmp/osol0906rgui/alllist.lst | wc -l
585

6. Remove GNOME2 related ones

pkg -R /tmp/osol0906rgui contents -t legacy -o "pkg.name,category,name" | egrep "GNOME2" | sort | uniq | awk '{print $1}' | xargs -t pkg -R /tmp/osol0906rgui uninstall -nvr
pkg -R /tmp/osol0906rgui contents -t legacy -o "pkg.name,category,name" | egrep "GNOME2" | sort | uniq | awk '{print $1}' | xargs -t pkg -R /tmp/osol0906rgui uninstall -r

7. Also remove know User apps from previous step (Most of them was removed due to dependency on GUI coponentrs)

pkg -R /tmp/osol0906rgui contents -t legacy -o "pkg.name,category,name" | egrep "thunderbird|evolution|firefox|compiz" | sort | uniq | awk '{print $1}' | xargs -t pkg -R /tmp/osol0906rgui uninstall -r

8. Check sizes now

du -s -k /tmp/osol0906rgui/
1 640 116 /tmp/osol0906rgui/
pkg -R /tmp/osol1108rgui list >/tmp/osol0906rgui/rgui1.lst
cat /tmp/osol0906rgui/rgui1.lst | wc -l
372

9. Check if we don’t have broken dependency

pkg -R /tmp/osol0906rgui verify | egrep "pkg:|depend:"

10. Prepare for reboot

Now we need to repair uninstalled files by slim_install

cp /etc/pam.conf /tmp/osol0906rgui/etc/pam.conf.bck
cp  /etc/passwd /tmp/osol0906rgui/etc/passwd.bck
cp  /etc/shadow /tmp/osol0906rgui/etc/shadow.bck
cp /etc/user_attr /tmp/osol0906rgui/etc/user_attr.bck

11. BE is ready to boot into it and test your app

cd /
beadm list osol0906rgui
BE           Active Mountpoint Space  Policy Created
--           ------ ---------- -----  ------ -------
osol0906rgui -      -          52.55M static 2008-10-23 13:11
beadm umount osol0906rgui
zfs list | grep osol0906rgui
rpool/ROOT/osol0906rgui  29.7M  11.2G  1.55G  /
Advertisements

1 Comment »

  1. […] L3 osol0906rgui Remove main GUI front end part […]

    Pingback by OpenSolaris JeOS (Main Page) « Virtual Guru's Blog – Home of Virtualization Workshops — February 7, 2010 @ 3:50 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: