2024年5月1日 星期三

ubuntu 根目錄使用率 (swapfile and var/cache )

 最近想在一台老電腦裝 ubuntu mate 24.04, 失敗, 因為 disk 要 35G, 靠, 這三小, 想當初第一次裝 ubuntu mate 時只切了 25G 的 partition, =_=|||

然後才發現目前用的22.02的根目錄已經用了 83% !! 48G 的 partition , 為什麼啊? 

先殺了 retropie (實在不用裝在  /opt 的 )

然後發現有個 file 叫 /swapfile, 2G! 殺不掉, 使用中, 查了一下, 發現當初因為 ram 大, 所以沒切個 swap partition ,  結果 install 時就自動生了這個 file , =_= |||

用 gparted 在 HDD 切了一塊 swap , HDD 就可以了, 只是哄一下 ubuntu, 用不到的, 然後改一下 /etc/fstab, 重啟後就可以殺 /swapfile 了

usage 76%

感覺還是很高, 用 ubuntu 24.04 開機, 想用 gparted 加大 22.04 的 root partition, 先備份(雖然 gparted 很可靠) 備份時發現 var/cache 下放了一大堆 deb, 觀察後發現全是安裝過的 deb , 居然會一直留著, 什麼啊 !

感覺應該清掉就不用加大partition, 但反正都做了, 加一點, 加到 64G

重啟後, usage 58%

google 找來清 /var/cache/apt 的方法 : 

sudo apt clean

usage 41%

=_=|||, 太有病了

----------------------

ubuntu mate 24.04 的 animation 無法全消, tooltip 也是, 然後 firefox install from deb 之後一直有問題, 過一陣子再說吧

Lubuntu 24.04 號稱沒有用 snap, 但還是有啊...................


2024年4月24日 星期三

Ubuntu 上製作windows 安裝USB

ubuntu 的老法子 dd, 不行, 執行一半會要你放入 DVD, =_=|||

-------------

google, 多半會要你用 rufus, 我在 Ubuntu 上........
想方設法的借到 windows, 用 rufus 做出來的 usb 卻不能用 (不知為啥)

-----------

再 google, 說 window 自己有個 tool, ........一樣, 我在 Ubuntu 上

------------

再 google, stack overflow 上有人提了一下, 說是直接把 usb format 成 exfat , 然後把 windows iso 的內容全 copy 過去就好, 沒人附合, 我直覺這很瞎, 但試了一下, 在我的i3電腦上居然可以! 但在十幾歲的老電腦上還是不行

-----------

用 "fat windows 10 usb" google, 有新發現
https://learn.microsoft.com/zh-tw/windows-hardware/manufacture/desktop/install-windows-from-a-usb-flash-drive?view=windows-11

windows 真的說 copy 過去就好, 但 format 格式是 fat32, 
iso 裏有個 install.wim 是 5G 啊, fat32 容不下

再仔細讀了之後, 說用 dism 把 install.wim 分割成幾個小的即可
......Ubuntu 沒有 dism, 
google "wim file split on Ubuntu", 找到了, 就叫 wimsplit

切成 install.swm install2.swm 取式 install.wim 

成功!


--------------------------

ps. 第一次 install 時, 很機警的把網路線拔了, 所以 install 很快, 也沒有很嘰歪的要你一定要有個 m$ 帳號才能繼續, 第二次忘了拔, 卡在 m$ 帳號處, 機車!

2024年1月11日 星期四

RetroPie on Ubuntu 22.04

之前玩過一下 : https://vk1968.blogspot.com/2021/06/retropie-on-ubuntu-2004.html

裝了 Ubuntu 22.04 之後還沒試過, 用原來在 Ubuntu 20.04 安裝好的 folder 直接 run 
/retropie/supplementary/emulationstation/emulationstation.sh 
不行

乖乖去 RetroPie 官網照著作一遍 (download/compile/install .....很久) -> 還是不行

都是 "We can't find any systems...."

google 了幾個答案都不對, 最後是這個中了  https://raspberrypi.stackexchange.com/questions/45275/emulation-station-set-up

就是說它的 config path 其實是在 ~/.emulationstation, 並不在 /opt/retropie ... 之下
它會去看 ~/.emulationstation/es_systems.cfg , 裏面會寫 ROM 在哪裏, run ubuntu20.04 copy 當然沒有這個 folder, 而官網 install 之後的 cfg 也是空的, 但它在 /etc/emulationstation 裏有一份完整的, 改一下 path 即可 (它寫在 ~/RetroPie/roms)