作者: mlyu 時間: 2022-11-13 08:28 標題: ChromeOS 個 Linux 可以mount disk image 嗎?
如果喺ChromeOS 入面個Linux, 可以整VHD或其他disk image, 跟住mount 同 format 做 ext4 嚟用嗎?
如果可以,要點做呢?搵咗一排都唔見有講
via HKEPC IR Pro 3.6.1 - Android(3.3.1)
作者: dinosw 時間: 2022-11-13 12:30
回復 1 #mlyu
答你問題前,我想知點解要咁做?
via HKEPC Reader for Android
作者: javacomhk 時間: 2022-11-13 12:43
本帖最後由 javacomhk 於 2022-11-13 05:16 編輯
ChromeOS 係用 Files App -> Share with Linux 比 Linux 用 external devices
USB device, SMB mount, 同 Google drive 都可以

至於響Linux 入面 mount file image 就同其他 Linux OS 一樣方法用 Command Line mount。
作者: mlyu 時間: 2022-11-13 13:16
SD Card 係可以 share with Linux, 但係唔係 ext4
我用 NTFS 都係放唔到 symlink 入去
如果可以 mount disk image, 我可以 format 隻 ext4 去放 program
作者: mlyu 時間: 2022-11-13 13:17
ChromeOS 係用 Files App -> Share with Linux 比 Linux 用 external devices
USB device, SMB mount, 同 G ...
javacomhk 發表於 2022-11-13 12:43
喱個係得, 但係只 support FAT/exFAT/NTFS, 佢地都放唔入 linux symbolic link
作者: dinosw 時間: 2022-11-13 13:51
本帖最後由 dinosw 於 2022-11-13 13:55 編輯
SD Card 係可以 share with Linux, 但係唔係 ext4
我用 NTFS 都係放唔到 symlink 入去
如果可以 mount di ...
mlyu 發表於 2022-11-13 13:16
唔係NTFS 唔可以create symlink,而係ChromeOS 用9p filesystem 去 passthrough 個mount point 比crostini,set 了option 唔allow symlink,其實exec 一樣唔比。不過我冇乜用crostini ,冇去研究點攪... 我用開croutons+sommelier 冇呢啲問題
你個想法要用loop device,自己 google 'create loop device for ext4' 就搵到(咁樣要用raw format)。不過你如果唔需要format (mount only),可以用libguestfs-tools(可以用其他qcow2/vmdk/vhd format)
via HKEPC Reader for Android
作者: mlyu 時間: 2022-11-13 14:03
唔係NTFS 唔可以create symlink,而係ChromeOS 用9p filesystem 去 passthrough 個mount point 比crostin ...
dinosw 發表於 2022-11-13 13:51
sommelier 係咩嚟?
我本來喺 Windows 整咗隻 VHD, format 咗做 ext4, 但係 guestmount mount 唔到
如果用 loop device 可唔可以做到 dynamic size 呢?
作者: dinosw 時間: 2022-11-13 14:19
本帖最後由 dinosw 於 2022-11-13 18:49 編輯
回復 7 #mlyu
'Sommelier is a nested Wayland compositor with X11 forwarding support.' 簡單啲講- 令到x protocol program 可以display 去ChromeOS 個desktop度
https://www.reddit.com/r/chromeos/comments/86r2yh/sommelier_enables_x11_apps_to_display_in_wayland/
咁qemu-img 可唔可以display 到個image 的information ?試下用qcow2 ,可以dynamic size又可以enable compression,vhd 除了在hyper-v ,其他地方我唔會用...
RAW就一定要fixed size
PS: 好似錯咗,RAW image 應該可以變返做dynamic size
via HKEPC Reader for Android
作者: javacomhk 時間: 2022-11-13 15:03
crostini 可以。
作者: dinosw 時間: 2022-11-13 15:54
本帖最後由 dinosw 於 2022-11-13 15:55 編輯
剛剛check 過,啲人話v96-97就remove 個non-executable 的 restrictions ,唔知nosymfollow有冇改埋,我上次用crostini 已經係3-4年前的事... 而家亦冇enable,唔知近況...
重有個方法用vmc create 一多個virtual disk(external disk) 比crostini,剛剛見返...
不過我之前見過你試攪box86+wine,其實用crouton 可以直接start VM,唔使再行nested mode。crouton應該係唯一辦法在Chromebook 行Windows on ARM 的VM,不過我冇試過,另外crouton 就收皮
via HKEPC Reader for Android
作者: mlyu 時間: 2022-11-13 19:04
要點做呢?
作者: mlyu 時間: 2022-11-13 19:07
回復 mlyu
'Sommelier is a nested Wayland compositor with X11 forwarding support.' 簡單啲講- 令到x p ...
dinosw 發表於 2022-11-13 14:19
用 qemu-img 可以 create qcow2
跟住用 guestfish 喺入面做 format, 而家做到 dynamic disk, 同埋 format 到 ext4
不過 copy 嘢入去都幾慢, 用住先
guestmount 都係慢, 冇計因為用緊 sd card
作者: mlyu 時間: 2022-11-13 19:08
剛剛check 過,啲人話v96-97就remove 個non-executable 的 restrictions ,唔知nosymfollow有冇改埋,我 ...
dinosw 發表於 2022-11-13 15:54
vmc create 一多個virtual disk(external disk) 比crostini
會唔會要 set ChromeOS 做 developer mode?
暫時唔想轉 developer mode, 睇可唔可以就咁做到
作者: dinosw 時間: 2022-11-13 19:45
本帖最後由 dinosw 於 2022-11-13 19:51 編輯
用 qemu-img 可以 create qcow2
跟住用 guestfish 喺入面做 format, 而家做到 dynamic disk, 同埋 forma ...
mlyu 發表於 2022-11-13 19:07
應該係guestmount 攪成咁,始終係user space
我用張快少少sdcard 用來行crouton 同dual boot 去breath Linux (成個OS 裝在sdcard,boot from sdcard,不過只support x86),可以接受
via HKEPC IR Pro 3.6.1 - Android(3.3.1)
作者: dinosw 時間: 2022-11-13 19:48
vmc create 一多個virtual disk(external disk) 比crostini
會唔會要 set ChromeOS 做 developer mode? ...
mlyu 發表於 2022-11-13 19:08
應該唔使developer mode,不過呢個feature 係我冇用crostini 後先出,我冇試過
https://www.reddit.com/r/Crostini/comments/sgpp33/install_steam_games_to_external_drive/?utm_source=share&utm_medium=android_app&utm_name=androidcss&utm_term=1&utm_content=share_button
via HKEPC IR Pro 3.6.1 - Android(3.3.1)
作者: dinosw 時間: 2022-11-13 20:11
應該係guestmount 攪成咁,始終係user space
我用張快少少sdcard 用來行crouton 同dual boot 去breath L ...
dinosw 發表於 2022-11-13 19:45
還有9p 呢個filesystem 係極慢(share with Linux之前一定要用,而家係咪一樣?)! Google 應該自己implement 過隻
via HKEPC Reader for Android
作者: mlyu 時間: 2022-11-13 20:12
應該唔使developer mode,不過呢個feature 係我冇用crostini 後先出,我冇試過
via HKEPC IR Pro 3 ...
dinosw 發表於 2022-11-13 19:48
if you get an error about untrusted or developer mode then you need to turn on dev mode and use this command instead
crosh> vmc start termina --enable-gpu --untrusted --extra-disk "/media/removable/SD Card/extra-disk.img"
似乎要 developer mode
作者: mlyu 時間: 2022-11-13 20:12
應該係guestmount 攪成咁,始終係user space
我用張快少少sdcard 用來行crouton 同dual boot 去breath L ...
dinosw 發表於 2022-11-13 19:45
係咪可以轉用 loop device 會快啲?
作者: dinosw 時間: 2022-11-13 20:23
如果原因係9p 攪成,你要在crosh行losetup,唔可以在crostini 行,先可以bypass 9p,應該要dev mode
via HKEPC Reader for Android
作者: mlyu 時間: 2022-11-13 21:09
還有9p 呢個filesystem 係極慢(share with Linux之前一定要用,而家係咪一樣?)! Google 應該自己implem ...
dinosw 發表於 2022-11-13 20:11
我隻 SD card 行 NTFS, 之後喺入面放個 qcow2, copy 入 qcow2 好慢
但係 linux copy 入 exFAT 就好啲 (non qcow2 image, 直入 sd card)
唔知係咪 guestmount 慢, 但唔似同 q9 有關
作者: mlyu 時間: 2022-11-13 21:13
guestmount 慢可能係因為 guestmount 喺入面再行多個 vm
作者: dinosw 時間: 2022-11-14 14:19
本帖最後由 dinosw 於 2022-11-14 14:23 編輯
我隻 SD card 行 NTFS, 之後喺入面放個 qcow2, copy 入 qcow2 好慢
但係 linux copy 入 exFAT 就好啲 (n ...
mlyu 發表於 2022-11-13 21:09
因為你咁講,尋晚我走去試返crostini,反正呢個問題我好快要面對...
用crosh 同crostini 對同一storage,去read/write test,不過唔係好嚴謹
read performance 經咗9p(crostini下),比在crosh 直寫,速度得返1/3 咁上下的速度
Write performance 就大件事,得返唔夠2%!
跟住試loop device ,一定要enable dev mode在crosh create loop device 再用lxc passthrough 先可以,咁樣不如add 多隻virtual disk 反正一定要dev mode
之後諗到用overlayfs filesystem ,lowerdir 係9p mount point ,upperdir係internal virtual disk(所有symlink同update 在呢度)。試咗陣,read performance 同直接用9p mount point 冇分別,write 因寫在internal virtual disk 當然快好多(係冇9p),不過比唔用overlayfs 直接write virtual disk,都係得返一半,但已經好好多。
呢個方法最唔好係如果多update ,upperdir 好快越來越大,你要自己manual merge返(不過想keep ownership一定唔可以under 9p做),不過好處係可直接用NTFS做底,唔使用image file
到有一日crouton 真係完全用唔到,我到時再算,disable 返crostini 唔攪
via HKEPC Reader for Android
作者: mlyu 時間: 2022-11-14 14:57
我唔識用 overlayfs 同個 virtual disk, 有冇教學?
作者: dinosw 時間: 2022-11-14 21:07
Crostini create 時,有問storage size,就是隻virtual disk,即係個root (/),無野需要set,亦冇得set。我在/opt 下create directory 比upperdir 同workdir用。
overlayfs 真係好簡單,佢個GitHub 有example ,跟住就試幾個folders 就明
https://github.com/containers/fuse-overlayfs
via HKEPC Reader for Android
作者: dinosw 時間: 2022-11-14 21:17
回復 24 #dinosw
今日記返好多3-4年前的事,我第一部Chromebook 就係因當時而買。尋日回覆嘅時候講3-4年前用crostini,竟然聯想起呢件事... 還以為自己記憶力幾好...
今晚唔思考乜鬼邏各斯,唱下歌算
via HKEPC Reader for Android
作者: mlyu 時間: 2022-11-14 23:32
Crostini create 時,有問storage size,就是隻virtual disk,即係個root (/),無野需要set,亦冇得set。 ...
dinosw 發表於 2022-11-14 21:07
暫時都唔係好明
不過似乎要 developer mode 整隻 virtual disk?
另外, directory share with linux 好似熄咗機再開返又要 set 過
作者: mlyu 時間: 2022-11-15 00:24
啱啱睇到我可以用 crosh create virtual disk
似乎係隻 raw disk, 用 crosh 行 vmc start termina --extra-disk 可以 mount 到隻 virtual disk
但唔知點樣可以 pass --extra-disk 個 parameter 俾原先 chromeos create 嗰個 penguin terminal, pass 到我就差唔多可以用到 sd card 起隻大啲嘅 disk image
希望咁可以做到嘢

