WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: (中文) How can I automatically load all partitions when tinycore starts?  (Read 342250 times)

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #75 on: January 17, 2022, 03:41:25 PM »
Hi poliko
... The file system of the partition that contains his tce directory is fat32.
The content inside requires UTF-8 support to access properly. ...
So you are saying this command does not work for remounting that partition:
Code: [Select]
sudo mount -t vfat -o remount,iocharset=utf8 "/dev/sdd2" "/mnt/sdd2"There should be no need to  umount  first.

Nothing changed,sdd2 was messy code,too.

链接: https://pan.baidu.com/s/1HxoHvYdR_QYR30U3hpnwNw?pwd=ddb8 提取码: ddb8

链接: https://pan.baidu.com/s/1wMBj9l5Uw6Pbt4prN8rcNg?pwd=zt9t 提取码: zt9t
« Last Edit: January 17, 2022, 04:05:45 PM by liuzhaoyzz »

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #76 on: January 17, 2022, 03:48:42 PM »
你们能在你们那边测试下吗?
很简单就可以测试,只要实现了进入xvesa或者xwindow之后,/etc/fstab里面,dev设备的option里面有iocharset=utf8就行了。那么mount -a就可以生效了,至于mount -a放在/opt/bootlocal.sh或者是/etc/init.d/rcS里面调用,应该都可以吧?
我这边不知道怎么修改,我的能力不够,这是个问题。

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #77 on: January 17, 2022, 04:23:55 PM »
我上传个veket的mountpartition

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #78 on: January 17, 2022, 07:01:59 PM »
Hi liuzhaoyzz
How about like this:
Code: [Select]
sudo mount -o utf8,remount /mnt/sdd2
This command should confirm whether the  remount  was accepted:
Code: [Select]
grep /mnt/sdd2 /etc/mtab

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #79 on: January 17, 2022, 07:09:15 PM »
I will try the code later,the computer is in my home,my working notepad didn't have FAT32 partition.
Maybe I can test in vmware.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #80 on: January 17, 2022, 07:11:45 PM »
Hi liuzhaoyzz
No, test it with the real computer when you get home.

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #81 on: January 17, 2022, 07:54:50 PM »
The PC in my home,real machine or vmware,I got the same result.

I test the code in my notepad,in vmware.It seems did not take effect.

链接: https://pan.baidu.com/s/1nGnLNgYQx9E8XMHjnxazJA?pwd=6nkp 提取码: 6nkp

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #82 on: January 18, 2022, 12:13:49 AM »
我曾经尝试过在rebuildfstab最后面加上mount -a,不行。
/etc/init.d/rcS这里面已经有了/bin/mount -a了啊。
The symbolic link /bin/mount is a part of /bin/busybox.suid, it doesn't support utf8.
It most likely refuse to mount when it sees that.
That's why I kept emphasizing that you need util-linux.tcz and the adjustment to /opt/bootlocal.sh
At that moment, you'll have GNU mount to handle that.

系統預設的/bin/mount是閹割版,不支援UTF-8。
我相信它看到UTF-8會直接跳過。
所以我才一直說你需要util-linux.tcz,並在/opt/bootlocal.sh加入mount -a指令。
因為那時已經有GNU mount了。

现在的问题是,
rebuildfstab里面,如果把79行的OPTIONS="noauto,users,exec"改为  OPTIONS="auto,users,exec",那么开机只能进入命令行,ls命令都执行不了。可能是/dev/sr0被错误地挂载了。
You mean with your version of rebuildfstab, you only get command prompts.
To make matter worse, not even the simple command such as "ls" would work.
That shouldn't happen, the default "ls" command is linked to busybox.
If that doesn't run, then your custom initrd is not loaded properly.
Tiny Core only needs 2 files to run, it just doesn't care whether your ISO/CD is mounted or not.
I can only guess that you messed up something when you were remastering.

這實在很迷,連ls都執行不了暗示著你自己做的corepure64.gz沒有載入。
Tiny Core只需要兩個檔案即可執行,你的ISO/CD有沒有掛載它壓根不在乎。
你大概不小心刪了什麼。

你说的看源代码,修改,对于我来说太难了,我做不到这些,我只能做一些简单的定制,涉及到源代码修改、systemd/init这样子偏向底层的东西,我搞不定,对我来说太难了,可能我的确不适合tinycore。
Hold up
You don't have to go THAT far, I'm talking about the mnttool
BTW, we don't mess around with systemd.

修但幾咧
我沒叫你挖這麼深,我只是說你可以試著改改看mnttool
題外話,我們不搞systemd。

Nothing changed,sdd2 was messy code,too.
A quick question here.
Does the Xfe from our repo support utf8 ?
You said things were fine when you mount manually, no ?
If not, you should use a different file manager.

先確認一下,之前你說手動掛沒問題是吧?
我沒用過Xfe,不曉得我們的版本是否支援中文。
如果不行你最好換一個。

你们能在你们那边测试下吗?
It may take a while.
給我一(億)點點時間。

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #83 on: January 18, 2022, 02:20:04 AM »
Quote
系統預設的/bin/mount是閹割版,不支援UTF-8。
我相信它看到UTF-8會直接跳過。
你可以試著改改看mounttool

我感觉这个看法不对,因为之前我也是用的mount,不过是手工输入,多加了个参数iocharset=utf8就行了,是同一个mount啊,如果/bin/mount有问题,那么乱码的问题就不可能通过手工输入命令解决。

Quote
先確認一下,之前你說手動掛沒問題是吧?
手工挂载,除了tinycore所在的FAT32分区因为被系统提前挂载挂载好了不能重复挂载,其他的FAT32/NTFS分区挂载都没有问题,没有乱码。

Quote
我沒用過Xfe,不曉得我們的版本是否支援中文。
我确定xfe支持中文文件名字和文件夹,前提是boot codes里面的locale匹配utf8+FAT32/NTFS分区iocharset=utf8正常挂载+中文字体完善。

我现在不知道该怎么测试了,因为我改过的corepure64.gz,只能进入命令行,进入不了Xwindow,我已经无能为力了。

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #84 on: January 18, 2022, 02:34:00 AM »
Here's a quick test with a modified rebuildfstab script located in /usr/local/bin
Since my tce directory isn't in a FAT partition, I'll do a re-installment real quick.


P.S. I think the rebuildfstab script might actually need a bit of fixing.
The function checkntfs() is defined INSIDE a for loop.

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #85 on: January 18, 2022, 03:34:10 AM »
OK, I managed to mount all the partitions onboot.
No remastering required.

Here's my onboot.lst:
Code: [Select]
Xorg-7.7.tcz
firefox.tcz
firmware-iwlwifi.tcz
firmware-radeon.tcz
graphics-KERNEL.tcz
ntfs-3g.tcz
openbox-config.tcz
rebuildfstab.tcz
sakura.tcz
unifont.tcz
util-linux.tcz
wbar.tcz
wpa_supplicant-dbus.tcz
xfe.tcz
zh_TW.tcz

Note that rebuildfstab.tcz is a custom patched version.
Code: [Select]
tc@box:~$ which rebuildfstab
/usr/local/bin/rebuildfstab

That zh_TW.tcz, is mylocale.tcz
Code: [Select]
tc@box:~$ locale -a
C
POSIX
zh_TW
zh_TW.big5
zh_TW.euctw
zh_TW.utf8

Make sure the copy2fs.flg is set.
Code: [Select]
touch /etc/sysconfig/tcedir/copy2fs.flg
The last 3 line in my /opt/bootlocal.sh:
Code: [Select]
umount $(blkid -U B6B1-CCF5)
Code: [Select]
rebuildfstab
Code: [Select]
mount -a
My extlinux.conf:
Code: [Select]
LABEL experiment
KERNEL /tce/boot/vmlinuz64
INITRD /tce/boot/corepure64.gz
APPEND quiet multivt blacklist=pcspkr swapfile=sda3 lang=zh_TW.utf8 tz=UTC-8 laptop waitusb=5:UUID="B6B1-CCF5" tce=UUID="B6B1-CCF5"
« Last Edit: January 18, 2022, 06:42:21 AM by Rich »

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #86 on: January 18, 2022, 03:38:44 AM »
Here's a quick test with a modified rebuildfstab script located in /usr/local/bin
Since my tce directory isn't in a FAT partition, I'll do a re-installment real quick.


P.S. I think the rebuildfstab script might actually need a bit of fixing.
The function checkntfs() is defined INSIDE a for loop.

我前面的帖子,就是这样子修改的呀。启动的的时候只能进入命令行,不知道怎么回事。

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #87 on: January 18, 2022, 04:47:26 AM »
sdb2本来是100MB的FAT32分区,结果运行rebuildfstab,把sdb2识别成了ext4分区,详见/etc/fstab

链接: https://pan.baidu.com/s/1IVoeTCPcNefR10G1qWStEw?pwd=dbkk 提取码: dbkk

分区挂载问题有点多。。。

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #88 on: January 18, 2022, 05:00:32 AM »
sdb2本来是100MB的FAT32分区,结果运行rebuildfstab,把sdb2识别成了ext4分区,详见/etc/fstab
A FAT32 partition is recognized as EXT4 by the script ?
Did you format it by accident ?
Which rebuildfstab did you use ?

你該不會是不小心洗掉了?
你是用原版的還改版的?

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #89 on: January 18, 2022, 05:57:45 AM »
原版修改后,我直接运行了下。FAT32被识别为ext4了。可能改错了。