湖濱散記部落格的樹心幽徑[login][主頁]
478:20190126為遠端的Image加裝Fedora Workstation桌面

(0)#  sudo -i

(1) 將dev dev/pts dev/shm proc sys run 等六個根目錄(/)下的目錄改掛在/fc28下:

# for i in dev dev/pts dev/shm proc sys run; do mount -o bind /$i /fc28/$i; done


(2)改變/usr/bin/bash的根目錄為/fc28

# chroot /fc28 /usr/bin/bash --login

 

(3)安裝Fedora Workstation在/fc28

# dnf -y groupinstall "Fedora Workstation"

(4) # dnf -y remove gnome-initial-setup

(5-1)# systemctl disable sshd.service
Removed /etc/systemd/system/multi-user.target.wants/sshd.service.

(5-2)# systemctl enable gdm.service
Created symlink /etc/systemd/system/display-manager.service → /usr/lib/systemd/system/gdm.service.

(5-3)# systemctl set-default graphical.target
Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/graphical.target.

(5-4)# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux

(5-5) #sudo dnf install ibus-rime

(6) # for i in run sys proc dev/shm dev/pts dev; do umount /fc28/$i; done

#  date
六  1月 26 07:09:26 CST 2019

(7)執行qemu-system-x86_64 -machine 虛擬機器,終於可載入GNOME

# qemu-system-x86_64 -machine accel=kvm -m 1024 -drive if=pflash,format=raw,unit=0,file=/usr/share/edk2/ovmf/OVMF_CODE.fd,readonly=on -drive if=pflash,format=raw,unit=1,file=$HOME/OVMF_VARS.fd -drive if=ide,format=raw,file=$HOME/uefi.img -net bridge,br=br0 -net nic,model=virtio

(8)qemu虛擬機器執行成功的畫面如下:

alt

(9-1)因colord無法啟動而無法進入gnome,請先執行如下指令:

$ ls /var/lib/colord/ -l
總計 44
drwxr-xr-x. 2 colord colord     6  3月 12  2018 icc
-rw-r--r--. 1 colord colord 16384  2月 11 13:19 mapping.db
-rw-r--r--. 1 colord colord 28672  2月 11 13:19 storage.db

$sudo  cp  /var/lib/colord/*.db  /fc28/var/lib/colord

$sudo  chown colord.colord /fc28/var/lib/colord/*.db

(9-2)

$  xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
XWAYLAND0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 520mm x 290mm
   1920x1080     59.96*+

[treehrt@sice ~]$  journalctl|grep colord

:

 2月 21 19:45:48 sice.home.idv.tw dbus-daemon[816]: [system] Activating via systemd: service name='org.freedesktop.ColorManager' unit='colord.service' requested by ':1.60' (uid=42 pid=1492 comm="/usr/libexec/gsd-color ")
 2月 21 19:49:35 sice.home.idv.tw sudo[2779]:  treehrt : TTY=pts/0 ; PWD=/home/treehrt ; USER=root ; COMMAND=/usr/bin/cp /var/lib/colord/*.gdb /fc28/var/lib/colord
 2月 21 19:50:23 sice.home.idv.tw sudo[2813]:  treehrt : TTY=pts/0 ; PWD=/home/treehrt ; USER=root ; COMMAND=/usr/bin/cp /var/lib/colord/mapping.db /var/lib/colord/storage.db /fc28/var/lib/colord
 2月 21 19:52:00 sice.home.idv.tw sudo[2970]:  treehrt : TTY=pts/0 ; PWD=/home/treehrt ; USER=root ; COMMAND=/usr/bin/chown colord.colord /fc28/var/lib/colord/mapping.db /fc28/var/lib/colord/storage.db

ls /fc28/usr/share/polkit-1/actions |grep color
org.freedesktop.color.policy

 

(9-3)

[liveuser@sice_client01 ~]$ sudo journalctl|grep color
 

Feb 21 11:55:50 localhost kernel: efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
Feb 21 11:56:17 sice_client01.home.idv.tw dbus-daemon[750]: [system] Activating via systemd: service name='org.freedesktop.ColorManager' unit='colord.service' requested by ':1.45' (uid=42 pid=1232 comm="/usr/libexec/gsd-color ")
Feb 21 11:56:17 sice_client01.home.idv.tw colord[1314]: failed to get edid data: EDID length is too small
Feb 21 11:56:18 sice_client01.home.idv.tw gsd-color[1232]: failed to get edid: unable to get EDID for output
Feb 21 11:56:19 sice_client01.home.idv.tw gsd-color[1232]: unable to get EDID for xrandr-Virtual-1: unable to get EDID for output
Feb 21 11:56:41 sice_client01.home.idv.tw gsd-color[1232]: unable to get EDID for xrandr-Virtual-1: unable to get EDID for output
Feb 21 11:56:41 sice_client01.home.idv.tw gsd-color[1232]: unable to get EDID for xrandr-Virtual-1: unable to get EDID for output
Feb 21 11:57:11 sice_client01.home.idv.tw gsd-color[1232]: unable to get EDID for xrandr-Virtual-1: unable to get EDID for output
Feb 21 11:57:11 sice_client01.home.idv.tw gsd-color[1232]: unable to get EDID for xrandr-Virtual-1: unable to get EDID for output
Feb 21 11:57:15 sice_client01.home.idv.tw gsd-color[1232]: unable to get EDID for xrandr-Virtual-1: unable to get EDID for output
Feb 21 11:57:15 sice_client01.home.idv.tw gsd-color[1232]: unable to get EDID for xrandr-Virtual-1: unable to get EDID for output

REF:https://fedoramagazine.org/how-to-build-a-netboot-server-part-1/


select id,article_id,topic,text from lt_articles_text where article_id =478; ok. update lt_articles set num_reads=num_reads +1 where id=478; ok.