自動分區(qū)問題
原因 : Kylin在partman中的一個腳本recipes.sh中添加了自己的邏輯,但是并不嚴(yán)謹(jǐn)玩般,導(dǎo)致dell傳入的recipe不生效爆袍,并會導(dǎo)致一些無法預(yù)料的問題。
解決 : 將recipe.sh替換為原生的坞琴。
initramfs階段安裝dell-recovery包失敗
原因 : 缺包 —— 可以在/var/log/boot.log中找到問題
解決 : 在作ISO時哨查,在squansh中通過chroot將缺失的包安裝進(jìn)去。
解決2 : 將缺失包放在/cdrom/debs下(dell-recovery也是放在該目錄下的)剧辐,在initramfs階段制作本地源時將這些包包含進(jìn)去寒亥。該方法未驗證,理論可行荧关。
dell-recovery進(jìn)入第二階段無法正確引導(dǎo)
原因 : EFI引導(dǎo)EFI分區(qū) efi/ubuntu/grubx64.efi起來后溉奕,grub的root、prefix不對忍啤,導(dǎo)致無法找到grub.cfg導(dǎo)致加勤,此時會進(jìn)入grub的命令行模式。
解決 : 此時grub的root指向當(dāng)前分區(qū)檀轨,prefix指向**(prefix)處建立一個grub.cfg文件
search --file --set=new_root /factory/grubenv
set root=$new_root
set prefix=($root)/boot/grub
configfile /boot/grub/grub.cfg
在新建立的grub.cfg中搜索RP分區(qū),然后進(jìn)入RP分區(qū)中的grub.cfg参萄。
解決2 : 從新生成grubx64.efi文件卫枝。理論可行,但是擔(dān)心引入新問題讹挎,沒有采用該方式校赤。
grub階段紅屏問題
原因 : grub.cfg中檢測/factory/grubenv及其中的數(shù)據(jù)吆玖。正常安裝完畢后,在ubiquity最后階段马篮,會調(diào)用 ubiquity/install/success_command中存儲的命令 —— dell-recovery中的chroot.sh 傳入的參數(shù)為success沾乘。該腳本最終會刪除/factory/grubenv文件。目前的情況是在執(zhí)行chroot.sh過程中失敗了浑测,導(dǎo)致沒有刪除/factory/grubenv翅阵,所以出現(xiàn)紅屏。
解決 : 排除chroot.sh中的腳本問題迁央,使之走完全流程掷匠。
PS : 目前是初步解決,還有完善空間岖圈。
EFI Entry —— 多一個ubuntu問題
這個entry只有在第二階段有用讹语,添加邏輯在進(jìn)入第二階段后,通過efibootmgr刪除所有名為ubuntu的entry蜂科。
Kylin修改ubiquity引入問題
見代碼
gtk_ui.py
# kylin add, is_oem is last
if os.path.isfile("/tmp/.kylin_reboot_go_oem"):
last_page = self.pages[-3].module.__name__
..........
if finished_step == last_page and not self.backup:
self.finished_pages = True
syslog.syslog("fucking life enter into last_page")
if self.finished_installing or self.oem_user_config:
self.debconf_progress_info('')
# thaw container size
self.progress_section.set_size_request(-1, -1)
self.install_details_expander.show()
self.install_progress.show()
self.progress_section.show()
dbfilter = plugininstall.Install(self)
dbfilter.start(auto_process=True)
elif finished_step == 'ubi-partman':
# Flush changes to the database so that when the parallel db
# starts, it does so with the most recent changes.
self.stop_debconf()
self.start_debconf()
options = misc.grub_options()
self.grub_options.clear()
for opt in options:
self.grub_options.append(opt)
self.switch_to_install_interface()
from ubiquity.debconfcommunicator import DebconfCommunicator
if self.parallel_db is not None:
# Partitioning failed and we're coming back through again.
self.parallel_db.shutdown()
env = os.environ.copy()
# debconf-apt-progress, start_debconf()
env['DEBCONF_DB_REPLACE'] = 'configdb'
env['DEBCONF_DB_OVERRIDE'] = 'Pipe{infd:none outfd:none}'
self.parallel_db = DebconfCommunicator('ubiquity', cloexec=True,
env=env)
dbfilter = partman_commit.PartmanCommit(self, db=self.parallel_db)
dbfilter.start(auto_process=True)
ubi-usersetup.py:
#elif os.path.isfile("/tmp/.kylin_reboot_go_oem"):
# return True
問題1: kylin使用一個文件kylin_reboot_go_oem顽决,開控制是否是OEM安裝。該文件在ubi-isoem.py中被創(chuàng)建导匣。但是在dell_recovery干預(yù)下才菠,ubi-isoem無法出現(xiàn),導(dǎo)致不能生成該文件逐抑。
解決辦法:在dell-recovery的第二階段添加邏輯鸠儿,創(chuàng)建kylin_reboot_go_oem文件屹蚊;該方法為臨時方法厕氨,后期考慮使用環(huán)境變量的形式控制OEM流程。
問題2: kylin修改了lastpage汹粤,如果有文件kylin_reboot_go_oem則lastpage為倒數(shù)第二個步驟命斧。按照dell-recovery中的情況,ubiquity共有4個步驟 dell-bootstrap嘱兼、 ubi-lanuage国葬、partman、usersetup芹壕。若按照kylin的邏輯汇四,lastpage變成了partman,那么就破壞了ubiquity的工作流程踢涌。
ubiquity目前的步驟為 dell-bootstrap --> ubi-lanuage ----> partman -----> partman-commit -------> install ---->install plugin通孽。按此時邏輯,到partman就斷了睁壁,導(dǎo)致安裝流程無法走完背苦。
解決辦法 :
- 不讓user-setup skip互捌,以automatic模式運行,這樣lastpage為user-setup行剂;這就是ubiquity的正常流程秕噪。
- lasetpage指向除user-setup、partman之外的步驟厚宰。這種改法和kylin的做法一致腌巾,不推薦。
kylin postaction重復(fù)執(zhí)行問題
原因 :在install-plugin階段铲觉,一般都會判斷UBIQUITY_OEM_USER_CONFIG是否存在于環(huán)境變量中壤躲;如果ENV中有這個,表示當(dāng)前處于OEM模式下备燃,需要額外的處理(一般都return了)碉克。但是在kylinpostaction步驟中,沒有對這個進(jìn)行判斷并齐,所有ubiquity執(zhí)行幾次(oem同樣是ubiquity)漏麦,這個步驟執(zhí)行幾次。
解決方法: 判斷該環(huán)境變量况褪,如果發(fā)現(xiàn)撕贞,則不再執(zhí)行即可。
配置較低機(jī)型安裝過程中出現(xiàn)內(nèi)核panic
原因:ubiquity最后階段测垛,執(zhí)行chroot.sh捏膨,再往下會調(diào)用 SUCCESS_SCRIPT,其中有個步驟:
105 IFHALT "Regenerate md5sum.txt at the end..."
106 $(python3 << EOF
107 from Dell.recovery_common import regenerate_md5sum
108 regenerate_md5sum("$RP")
109 EOF
110 )
這個步驟導(dǎo)致硬盤及其繁忙食侮,有幾率(幾率較大)導(dǎo)致問題号涯。
解決方法:注釋調(diào)這段代碼即可。
影響:估計不會有影響锯七,關(guān)于該功能的說明:
head_info = """This file contains the list of md5 checksums of all files on this medium.\n\nYou can verify them automatically with the 'integrity-check' boot parameter,\nor, manually with: 'md5sum -c md5sum.txt'.\n\n"""
user-setup出錯
原因:如果沒有文件kylin_reboot_go_oem文件的話链快,usersetup不會跳過,則會走到usersetup-apply中眉尸,在這里會設(shè)置用戶名和密碼域蜗;來源是dell-recovery中的 ubuntu.seed文件,用戶名:密碼為 【oem:password】噪猾;在V10中霉祸,要求密碼必須是數(shù)字、字母甚至更多種類袱蜡。
解決方法: 修改ubuntu.seed丝蹭,將密碼改為qwe123即可。
Dell recovery模式總結(jié)
四種模式
x模式(該模式在UI文件中有體現(xiàn)戒劫,但是代碼中沒有相關(guān)處理半夷,無視之)
dhc模式
automatic模式(選中磁盤后婆廊,不用管)
interactive模式(手動模式,自己分區(qū)等)
目前常用的是 automatic模式和interactive模式
PS:這幾種模式是界面上體現(xiàn)出來的巫橄,還有通過debconf設(shè)置的模式