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

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  /
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Hands-on experience with Virtualization

Search

Categories
Archives
« May 2015
SunMonTueWedThuFriSat
     
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
      
Today