【Termux】使用atilo安裝linux報錯解決方案

我的博客主頁:https://rehtt.com

0x00 安裝時出現proot容器錯誤

 

0.發現問題

已經termux-chroot授權運行

 

atilo install (liunx版本)

時出現類似proot No such file or directory等報錯。

 

1.查找問題

通過查看atilo運行信息發現解壓文件信息有明顯的錯誤

 

[ Extracting ]
64.0KiB 0:00:00 [ 235KiB/s] [>        ]  0%

一般系統文件都有幾十兆大小,而這個解壓信息小得離譜
再翻閱atilo代碼時發現安裝時會在~/.atilo/tmp中存放下載的系統文件,查看目錄下的文件大小發現也是非常小的,這說明之前下載文件失敗。

 

2.解決方案

有了這個思路之後編輯atilo源碼找到要下載的系統的鏈接,我這裏使用安裝kali來示範

 

找到
kali)
    aarch64=https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Rootfs/Kali/arm64/kali-rootfs-armhf.tar.gz
    arm=https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Rootfs/Kali/armhf/kali-rootfs-armhf.tar.gz
    amd64=https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Rootfs/Kali/amd64/kali-rootfs-amd64.tar.gz
    i386=https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Rootfs/Kali/i386/kali-rootfs-i386.tar.gz
    zip=xz
    upgrade="apt update"
    ;;

因爲我的手機cpu是arm64架構的,所已更改aarch64的地址,將它替換爲清華源https://mirrors.tuna.tsinghua.edu.cn/lxc-images/images/kali/current/arm64/default/20191216_17%3A14/rootfs.tar.xz
因爲清華源提供的是.tar.xz的包,所已也要更改zip=xzzip=Jx
其他系統或架構的需要替換對應的清華源

 

kali)
    aarch64=https://mirrors.tuna.tsinghua.edu.cn/lxc-images/images/kali/current/arm64/default/20191216_17%3A14/rootfs.tar.xz
    arm=https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Rootfs/Kali/armhf/kali-rootfs-armhf.tar.gz
    amd64=https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Rootfs/Kali/amd64/kali-rootfs-amd64.tar.gz
    i386=https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Rootfs/Kali/i386/kali-rootfs-i386.tar.gz
    zip=Jx
    upgrade="apt update"
    ;;

如果提供的是其他格式的包就要對應修改zip的內容

 

.tar.gz -> zip=xz
.tar.xz -> zip=Jx

重新運行安裝之前要記得rm ~/.atilo/tmp/*刪除下載失敗的包

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章