WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #105 on: January 19, 2022, 08:12:21 AM »
Hi polikuo
Based on reply #99, it sounds like installing Tinycore to ext4 with proper locale works. Once installed, a separate
VFAT partition could be created and mounted with any parameters desired to be used for file sharing with Windows.
Hi Rich.
Assumption confirmed, I can replicate that.
However, ever file has to be created with locale support, otherwise it stays in gibberish.
For instance, I have 2 partitions, one FAT, one EXT4.
Now boot TC without locale support, than copy a file with asterisk (*).
You'll see question marks even after you load the locale support.
The filename is corrupted.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #106 on: January 19, 2022, 08:20:51 AM »
Hi polikuo
... However, ever file has to be created with locale support, otherwise it stays in gibberish. ...
I was under the impression that locale support would already be in place when implementing that.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #107 on: January 19, 2022, 08:23:28 AM »
Hi polikuo
... You'll see question marks even after you load the locale support.
The filename is corrupted.
I think I read somewhere that  iconv  can be used to restore the filenames.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #108 on: January 19, 2022, 09:34:57 AM »
Hi polikuo
... You'll see question marks even after you load the locale support.
The filename is corrupted.
Seems there is actually a tool to deal with that:
Quote
convmv - converts filenames from one encoding to another
Found here:
http://manpages.ubuntu.com/manpages/trusty/man1/convmv.1.html

A more detailed description from the Ubuntu repo:
Quote
convmv can convert a single filename, a directory tree or all files
 on a filesystem to a different encoding. It only converts the
 encoding of filenames, not files contents. A special feature of
 convmv is that it also takes care of symlinks: the encoding of the
 symlink's target will be converted if the symlink itself is being
 converted.
 
 It is also possible to convert directories to UTF-8 which are already
 partially UTF-8 encoded.
Found here:
https://launchpad.net/ubuntu/trusty/+package/convmv

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #109 on: January 19, 2022, 02:53:36 PM »
但是我不想用ext4分区,因为他们在windows下面难以访问,我除了尝试linux,我还有windows系统呢。
paragonextfs,感觉对于ext4分区访问,在虚拟机中文件感觉不会实时更新。
You've obviously misunderstood what we're talking about.
You can keep the distribution files in your FAT partition.
Just the tce directory along with the "optional" one inside.
Then specify the location of the tce directory with your "cheatcode".
Like all the other linux distro, the bootloader can be put into a dedicated partition.
How does your grub.cfg look like now after all the adjustments ?

你顯然誤會我們的意思了,我沒要你把vmlinuz64跟corepure64.gz拿出來。
我只要你的tce資料夾,還有它裡面的optional資料夾,套件都放這。
再從grub2指定資料夾位置即可。
就像其他linux發行版,大家都可以設定獨立的bootloader分割槽(分區)。
經過前面各種改動後,你現在的grub.cfg長怎樣 ?

你之前不是建议我把tinycore.iso解压缩启动的吗?于是我在windows下面用7z解压缩到ext4分区,在grub.cfg里面添加tinycore的启动项,grub.cfg菜单见附件。
BTW,我从来没有用过tinycore官方的tc install.
« Last Edit: January 19, 2022, 03:01:19 PM by liuzhaoyzz »

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #110 on: January 19, 2022, 02:56:55 PM »
Hi polikuo
... You'll see question marks even after you load the locale support.
The filename is corrupted.
Seems there is actually a tool to deal with that:
Quote
convmv - converts filenames from one encoding to another
Found here:
http://manpages.ubuntu.com/manpages/trusty/man1/convmv.1.html

A more detailed description from the Ubuntu repo:
Quote
convmv can convert a single filename, a directory tree or all files
 on a filesystem to a different encoding. It only converts the
 encoding of filenames, not files contents. A special feature of
 convmv is that it also takes care of symlinks: the encoding of the
 symlink's target will be converted if the symlink itself is being
 converted.
 
 It is also possible to convert directories to UTF-8 which are already
 partially UTF-8 encoded.
Found here:
https://launchpad.net/ubuntu/trusty/+package/convmv

convmv或者iconv应该大家想要的结果,因为中文windows下面的文件编码都是GBK的,成千上万的文件和文件夹用iconv或者convmv逐一转换编码,工作量太大,不切实际,我想要的,仅仅是一个iocharset=utf8参数而已,而这项工作,我希望是由tinycore官方来完成,而不是用户自身,这只是个美好的愿景。
看了polikuo的介绍,似乎tinycore官方团队对于国际化语言的支持不怎么感兴趣。
« Last Edit: January 19, 2022, 03:03:10 PM by liuzhaoyzz »

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #111 on: January 19, 2022, 05:55:37 PM »
convmv不是我和大家想要的结果。

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #112 on: January 19, 2022, 06:40:02 PM »
Hi liuzhaoyzz
The reason I posted about  convmv  is not because we are not interested in international language support.
Tinycore is a small distribution with a small staff of volunteers. It provides the basics for a desktop. You provide
the work to customize it to your needs.

If you need something more user friendly:
1. Try a larger distribution (Debian, Ubuntu, Mint, Arch, etc.) that has a large staff to support plug and play style setups.
2. Try Windows which has a staff of many thousands and a big budget to support plug and play style setups.

It was because polikuo mentioned it's possible to corrupt file names if the locale is not properly set up when
copying files, not as a substitute for a proper setup.

It was mention as a possible tool for fixing mistakes.

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #113 on: January 19, 2022, 08:33:52 PM »
Hi Rich.
I've run some tries, but it won't budge.

Create gibberish files
Code: [Select]
$ mkdir /mnt/sda3/tce/gibberish
$ cd /mnt/sda3/tce/gibberish
Code: [Select]
$ /bin/mount /mnt/sda2
$ cp /mnt/sda2/*.txt .
Code: [Select]
$ echo *
??.txt

Test run
Code: [Select]
$ perl convmv -f iso-8859-1 -t utf8 --nosmart --notest *.txt
Ready
$ echo *
??.txt

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #114 on: January 19, 2022, 08:46:08 PM »
Hi polikuo
Perl? I thought it was a binary.

You copied a utf8 encoded file name to a non utf8 file system. I would not expect the result to be 8859-1 encoded
name. It's probably still utf8 or partly utf8.

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #115 on: January 19, 2022, 09:10:21 PM »
You copied a utf8 encoded file name to a non utf8 file system. I would not expect the result to be 8859-1 encoded
name. It's probably still utf8 or partly utf8.
Hi Rich
I'd tried that before, it does nothing.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #116 on: January 19, 2022, 09:28:29 PM »
Hi polikuo
Could you please:
Code: [Select]
cat * > filename.txtand attach it to your next post. And also tell me what the original name was. I'm curious to compare what the
before and after results look like.

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #117 on: January 19, 2022, 10:11:59 PM »
Hi polikuo
Could you please:
Code: [Select]
cat * > filename.txtand attach it to your next post. And also tell me what the original name was. I'm curious to compare what the
before and after results look like.
Hi Rich
You mean "echo" right ?
Code: [Select]
tc@laptop:/mnt/sda3/gibberish$ echo *.txt
??.txt
tc@laptop:/mnt/sda3/gibberish$ echo *.txt > filename.txt
tc@laptop:/mnt/sda3/gibberish$ cat *.txt > filecontent.txt

The original name and content should both be "中文"
It's a test file created in windows environment.
When saving file with notepad, choose UTF-8 encoding
« Last Edit: January 19, 2022, 10:14:51 PM by polikuo »

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #118 on: January 19, 2022, 10:37:55 PM »
Hi polikuo
I was hoping the question marks was how the OS was displaying unprintable characters, but they really are
question marks. Maybe this isn't a way of fixing this type of issue.


Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #119 on: January 21, 2022, 04:35:43 PM »
你之前不是建议我把tinycore.iso解压缩启动的吗?于是我在windows下面用7z解压缩到ext4分区,在grub.cfg里面添加tinycore的启动项,grub.cfg菜单见附件。
Sorry I didn't catch this one.
抱歉,漏掉了,沒看到這則。
Quote
linux $2 quiet loglevel=3 tce=UUID="$uuid"/TinyCorePure64-12.0/cde/ showapps vga=791 lang=zh_CN.UTF-8 tz=GMT-8
You're assigning /etc/sysconfig/tcedir to a cde directory again.
We have talked about this before.
你這還是cde啊
我們前面已經講過了
You should rename it to tce to prevent unwanted behavior.
天曉得系統內有多少程式會誤判你的配置,請改成tce避免不必要的麻煩。
Any name is fine but cde.
啥名子都好
就是不要cde
Code: [Select]
sudo mv cde tce
BTW,我从来没有用过tinycore官方的tc install.
tc-install is not for you, it use syslinux, you already have grub.
All you have to do is copy the files and adjust your bootloader.
Anyone will do, just don't use cde.
tc-install你用不上,你已經有grub了。
只需要把檔案複製過來,再改一下bootloader就好。
哪個都行,就是別叫cde。
Code: [Select]
tce=UUID="$uuid"/TinyCorePure64-12.0/tce
Code: [Select]
tce=UUID="$uuid"/TinyCorePure64-12.0
Code: [Select]
tce=UUID="$uuid"