Tiny Core Linux

General TC => International Talk => Topic started by: liuzhaoyzz on January 12, 2022, 04:04:05 PM

Title: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 12, 2022, 04:04:05 PM
How can I automatically load all partitions when tinycore starts? Especially FAT32/NTFS partition?
请问下怎样在tinycore启动的时候自动加载所有的分区?特别是FAT32/NTFS分区?
我用的是TinyCorePure64-12.0.iso,http://www.tinycorelinux.net/12.x/x86_64/release/
54bc11152740fe4b0148521fd5f39639  CorePure64-12.0.iso
我在app中下载了getlocale.tcz,并且用sudo getlocale.sh设置了locale为zh_CN.UTF-8,grub4dos/grub2启动参数里面也添加了 lang=zh_CN.UTF-8
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 12, 2022, 04:05:01 PM
为了发这个帖子,我用了2天的时间,我太难了。大部分的内容无法发送。
总是提示:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@forum.tinycorelinux.net to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 12, 2022, 04:09:46 PM
my grub2 menu:
menuentry "/TinyCorePure64-12.0/boot/vmlinuz64" "/TinyCorePure64-12.0/boot/vmlinuz64" {
search --no-floppy --set --file $2
probe -u ($root) -s uuid
linux $2 quiet loglevel=3 tce=UUID="$uuid"/TinyCorePure64-12.0/cde/ showapps vga=791 lang=zh_CN.UTF-8 tz=GMT-8
initrd /TinyCorePure64-12.0/boot/corepure64.gz
}
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 12, 2022, 05:48:54 PM
sudo passwd root
su


Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 12, 2022, 07:29:46 PM
http://www.nicereader.net/t/61df8784421aa901e6c2f067 (http://www.nicereader.net/t/61df8784421aa901e6c2f067)
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 12, 2022, 08:28:14 PM
Tiny Core is not your average linux system.
The /etc/fstab is rebuilt every time you boot, every time you plug-in a USB.
If I were you, I'd append this to /opt/bootlocal.sh (without "sudo")
Code: [Select]
mount -t ntfs-3g /dev/sda2 /mnt/sda2and run a backup
Code: [Select]
$ filetool.sh -bvAlso, add "util-linux.tcz" and "ntfs-3g.tcz" into your /etc/sysconfig/tcedir/onboot.lst

However, before you do any of that, there's a huge problem with your setup.
my grub2 menu:
menuentry "/TinyCorePure64-12.0/boot/vmlinuz64" "/TinyCorePure64-12.0/boot/vmlinuz64" {
search --no-floppy --set --file $2
probe -u ($root) -s uuid
linux $2 quiet loglevel=3 tce=UUID="$uuid"/TinyCorePure64-12.0/cde/ showapps vga=791 lang=zh_CN.UTF-8 tz=GMT-8
initrd /TinyCorePure64-12.0/boot/corepure64.gz
}
Have you remastered your ISO and boot the system from there ?
How did you setup your system ?

Tiny Core本就不是一套常規的linux系統
/etc/fstab是會一直變的,你硬要改它也只會被刷掉而已。
我會這樣做,在/opt/bootlocal.sh加入mount指令。(切記,不要sudo)
Code: [Select]
mount -t ntfs-3g /dev/sda2 /mnt/sda2然後備份一下
Code: [Select]
$ filetool.sh -bv還有在你的onboot.lst加入"util-linux.tcz"跟"ntfs-3g.tcz"以便開機自動載入。
最後我要問你那個cde是哪來的?
你有自己動手魔改ISO檔嗎?你系統是怎麼裝的?
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich on January 12, 2022, 08:34:22 PM
Hi liuzhaoyzz
The attached script will mount all drives that have been detected but are not currently mounted.
After you have downloaded it, remember to make it executable:
Code: [Select]
chmod 775 MountAll.shMake sure you installed  ntfs-3g.tcz  onboot.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 02:23:04 AM
非常感谢您的回复和指导!

Quote
最後我要問你那個cde是哪來的?
原始的TinyCorePure64-12.0.iso用7z或者winrar解压缩之后,就是这个结构啊。我就是直接解压缩的。
tree /f .
卷 F2 的文件夹 PATH 列表
卷序列号为 00000200 0005:BF35
J:\TINYCOREPURE64-12.0
├─EFI
├─boot
└─cde
    │  copy2fs.lst
    │  onboot.lst
    │  xbase.lst
    └─optional
            Xfbdev.tcz
            Xfbdev.tcz.md5.txt

Quote
你有自己動手魔改ISO檔嗎?你系統是怎麼裝的?
我没有改过TinyCorePure64-12.0.iso,我是直接解压缩,放到FAT32分区,然后添加引导罢了。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 02:27:56 AM
mount -t ntfs-3g /dev/sda2 /mnt/sda2

我现在的主要问题是,在进入系统之前,我不知道设备号倒底是什么样子的,比如/dev/sda1,/dev/sdc3,dev/sda2,所以我想借鉴/usr/sbin/rebuildfstab里面的部分代码来实现遍历,自动挂载所有的分区。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 03:07:27 AM
Thank you for your reply!
Make sure you installed  ntfs-3g.tcz  onboot.
Yes,I have installed ntfs-3g.tcz.

但是运行MountAll.sh挂载的话,FAT32和NTFS分区会出现乱码现象,这段代码和wbar-mounttool手工挂载分区没有区别,一样会产生乱码。
我想要实现的是,对于NTFS分区,用sudo mount -t ntfs-3g命令挂载,如果用sudo mount "/mnt/$F"会乱码。

对于FAT32分区,我想要用sudo mount -t vfat -o iocharset=utf8来挂载,如果用sudo mount "/mnt/$F"会乱码,因为sudo mount "/mnt/$F"缺乏-o iocharset=utf8参数。

所以我原本想利用rebuildfstab来修改,因为里面已经有了遍历的语句了。


Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 04:00:31 AM
在/opt/bootlocal.sh加入mount指令
在onboot.lst加入了util-linux.tcz跟ntfs-3g.tcz
我试过了,我创建了一个/linux2/tinycore/opt目录,/opt/bootlocal.sh加入mount指令,保存设置,关机重启,但上面的脚本不工作啊?
我在/linux2/tinycore/optional目录中创建了一个bootlocal.sh脚本,加入mount指令,保存设置,关机重启,但上面的脚本也不工作啊?
奇怪的很。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 04:16:39 AM
还有个问题,我的tinycore解压缩之后放在/dev/sdd2目录,开机的时候,这个/dev/sdd2会自动挂载,但是自动挂载的磁盘会有乱码,因为默认的mout缺乏-o iocharset=utf8参数。
所以只有想办法从根本上修改/etc/fstab或者/usr/sbin/rebuildfstab.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 04:19:41 AM
tc@box:~$ mount|grep dmask
/dev/sdd2 on /mnt/sdd2 type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

vfat部分参数:

       codepage=value
              在FAT系列文件系统上,"8.3"格式的短文件名以特定的代码页进行存储(可以通过chcp命令查看),
              但长文件名却以Unicode进行存储。此选项的作用就是指定将长文件名转换为短文件名时使用的代码页。
              默认使用内核的FAT_DEFAULT_CODEPAGE值。简体中文一般使用936代码页(codepage=936)。

       iocharset=value
              指定默认以什么字符集显示文件名,必须与系统的locale设置保持一致。默认使用内核的FAT_DEFAULT_IOCHARSET值。
              例如在"en_US.UTF-8"的情况下应该使用"utf8"。
              [注意]应谨慎使用"iocharset=utf8",它会导致FAT文件系统上的文件名变得大小写敏感。


看了下$FAT_DEFAULT_CODEPAGE和$FAT_DEFAULT_IOCHARSET都是空值!
/home/tc/.ashrc
#export FAT_DEFAULT_CODEPAGE=936
#export FAT_DEFAULT_IOCHARSET=cp936

export FAT_DEFAULT_CODEPAGE=utf8
export FAT_DEFAULT_IOCHARSET=utf8

export codepage=utf8
export iocharset=utf8
修改了也没用。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 13, 2022, 04:29:42 AM
我没有改过TinyCorePure64-12.0.iso,我是直接解压缩,放到FAT32分区,然后添加引导罢了。

This could cause serious problems, cde is a predefined directory specifically for CDs.

You should rename it to tce to prevent unwanted behavior.

這很可能在日後造成不必要的問題,cde是專為光碟設計的。
天曉得系統內有多少程式會誤判你的配置,請改成tce避免不必要的麻煩。

但是运行MountAll.sh挂载的话,FAT32和NTFS分区会出现乱码现象,这段代码和wbar-mounttool手工挂载分区没有区别,一样会产生乱码。

You can refactor the script to fit your needs.
I can't post my modification due to the forum internal error.
你可以自己改阿
論壇關係,我無法附上我的版本。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 04:31:51 AM
但是如果我手工修改corepure64.gz\corepure64.cpio\usr\sbin\rebuildfstab,
下一次tinycore版本一更新我又要改,我改了之后,
下一次tinycore版本一更新我又要改,我改了之后,
下一次tinycore版本一更新我又要改,我改了之后,
下一次tinycore版本一更新我又要改,我改了之后,
.....
Oh my god!no!
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 04:42:18 AM
天曉得系統內有多少程式會誤判你的配置,請改成tce避免不必要的麻煩。、
OK,I see.thank you.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 13, 2022, 04:47:35 AM
在/opt/bootlocal.sh加入mount指令
在onboot.lst加入了util-linux.tcz跟ntfs-3g.tcz
我试过了,我创建了一个/linux2/tinycore/opt目录,/opt/bootlocal.sh加入mount指令,保存设置,关机重启,但上面的脚本不工作啊?
我在/linux2/tinycore/optional目录中创建了一个bootlocal.sh脚本,加入mount指令,保存设置,关机重启,但上面的脚本也不工作啊?
奇怪的很。

Where the hell does "/linux2/tinycore/opt" come from ?
Why would you make such directory ?

/linux2/tinycore/opt是從哪冒出來的 ?
用意何在 ?

Please fix your tce directory first before we move on to the remaining problems.
問題有點多,我們一個一個來,請先把tce搞定。

I've attached my MountAll script for you to test.
附檔是我改過的你可以試試
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 05:27:53 AM
oh,/linux2/tinycore/opt is another test.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 05:50:11 AM
 MountAll-refactored.sh
 用你的这个脚本可以正常挂载并且正确地显示FAT32/NTFS/EXT4分区里面的汉字了,我是手工在terminal中运行的sudo  MountAll-refactored.sh.
1、但是xfe里面fcitx似乎不能正常工作,不能修改文件名为中文,好奇怪。

打开中文文件文本文件,用geany编辑,fcitx可以正常输入汉字。

2、我的tinycore是解压缩放在/dev/sdd2,这个是FAT32分区,他是tinycore启动的时候自动挂载的,sudo  MountAll-refactored.sh运行的时候会提示/dev/sdd2已经挂载了,我用sudo umount -l /dev/sdd2,也不行,再次sudo  MountAll-refactored.sh的时候,提示权限不允许。因为tinycore在这上面。

如果直接mount FAT32分区,中文文件名字就会是乱码。现在用sudo  MountAll-refactored.sh挂载不了,权限不够。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 05:50:50 AM
tc@box:~$ chmod 777 /mnt/sdc3/rebuildfstab-backup/MountAll-refactored.sh
tc@box:~$ sudo umount -l /dev/sdd2
tc@box:~$ sudo /mnt/sdc3/rebuildfstab-backup/MountAll-refactored.sh
chown: /mnt/sdd2: Operation not permitted
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 05:52:27 AM
对了,文件夹和cheatcode我已经改成了tce了。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 13, 2022, 06:13:12 AM
MountAll-refactored.sh
 用你的这个脚本可以正常挂载并且正确地显示FAT32/NTFS/EXT4分区里面的汉字了,我是手工在terminal中运行的sudo  MountAll-refactored.sh.
1、但是xfe里面fcitx似乎不能正常工作,不能修改文件名为中文,好奇怪。

打开中文文件文本文件,用geany编辑,fcitx可以正常输入汉字。

2、我的tinycore是解压缩放在/dev/sdd2,这个是FAT32分区,他是tinycore启动的时候自动挂载的,sudo  MountAll-refactored.sh运行的时候会提示/dev/sdd2已经挂载了,我用sudo umount -l /dev/sdd2,也不行,再次sudo  MountAll-refactored.sh的时候,提示权限不允许。因为tinycore在这上面。

1. I'm rather unfamiliar with fcitx, probably has something to do with GTK.
There's also environmental variables.
It's troublesome for sure.
我對fcitx不熟,不過有可能跟GTK有關,還可能牽扯到環境變數,總之很麻煩。

2. Like you said, your extensions are there and loaded, so the partition can't be unmounted.
There's no easy way around, is it really necessary to access that particular partition with UTF-8 support ?
就像你說的,套件都放在那,還都掛起來了,這塊磁碟分割自然沒法卸下來。
單就這個分割而言,一定要支援UTF-8嗎?
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 13, 2022, 06:17:24 AM
tc@box:~$ chmod 777 /mnt/sdc3/rebuildfstab-backup/MountAll-refactored.sh
tc@box:~$ sudo umount -l /dev/sdd2
tc@box:~$ sudo /mnt/sdc3/rebuildfstab-backup/MountAll-refactored.sh
chown: /mnt/sdd2: Operation not permitted

BTW, the script already calls "sudo" when mounting.
You shouldn't call the script as super user.
It may not run.

另外,MountAll-refactored.sh裡面已經呼叫過sudo了
雙重sudo可能不會有作用
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 06:36:50 AM
Quote
單就這個分割而言,一定要支援UTF-8嗎?
是的,必须要utf8,如果不用utf8,中文文件名字和文件夹都是乱码。
我为什么要把tinycore放在FAT32分区?因为只有放在FAT32分区上面,tce才能方便地保存。
特别是tinycore第一次启动的时候,默认是没有加载ntfs-3g的,只能保存在原生支持的FAT32/EXT4分区里面。
除了用linux,我还用windows,所以我选择了FAT32分区,而不是ext4分区,似乎tinycore放在ext4分区也可以保存tce吧。

关于cde和tce,我感觉上来说,只是个名字,他不是cheatcode,不进入内核。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 06:41:49 AM
关于fcitx设置相关:
安装getlocale.tcz和base-locale.tcz,运行sudo getlocale.sh用空格选择zh_CN.UTF8 en_US.UTF-8
安装了中文字库notocjk-regular-fonts-ttc,这个中文字库比较大,37MB,包括sans、serif、Mono,字体显示效果感觉比较好。
安装base-locale.tcz
打开 /home/tc/.ashrc,在文件最后添加如下内容:
export XIM=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XIM_PROGRAM=fcitx
export XMODIFIERS="@im=fcitx"


 重启的时候保存设置。重启后,点击任务栏中的 fcitx 图标,然后才可以使用 Ctrl+Space 切换输入法。
搭配geany,liboffice,等等,都可以输入中文。
但是xfe文件管理器中,有时候不行,有时候又可以,不太清楚。

可能可以用小小输入法代替。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 06:57:12 AM
感觉上来说,还是要折腾/usr/sbin/rebuilderfstab,从底层修改,改完了之后,cpio+gz打包回去,到corepure64.gz里面。
比较麻烦的问题是,tinycore每更新一次就要修改一次,来来回回修改比较麻烦。

OPTIONS="auto,users,exec"
  case "$FSTYPE" in
    ntfs) checkntfs ;;
    vfat|msdos) OPTIONS="${OPTIONS},umask=000,iocharset=utf8" ;;

所以还是建议开发组修改,这样子最方便。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 07:01:49 AM
谢谢大家的帮助,我要睡觉了。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 13, 2022, 07:03:07 AM
Quote
單就這個分割而言,一定要支援UTF-8嗎?
是的,必须要utf8,如果不用utf8,中文文件名字和文件夹都是乱码。
我为什么要把tinycore放在FAT32分区?因为只有放在FAT32分区上面,tce才能方便地保存。
除了用linux,我还用windows,所以我选择了FAT32分区,而不是ext4分区,似乎tinycore放在ext4分区也可以保存tce吧。

关于cde和tce,我感觉上来说,只是个名字,他不是cheatcode,不进入内核。

I usually make a dedicated partition and put all the TC-only stuff there.

If you absolutely need that, then the only way I could think of is going copy2fs mode. That is, to copy your extensions into RAM so you can remount your partition.

What are the "cheatcode" you're referring to ?

我通常會設一個TC專用的分割區。

如果你一定要UTF-8,我只能想到用copy2fs模式,他會把你全部/指定的套件全丟進RAM裡。
這樣你就能重新掛載分割區。

所以你一直在說的cheatcode是指啥?
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 13, 2022, 07:09:43 AM
感觉上来说,还是要折腾/usr/sbin/rebuilderfstab,从底层修改,改完了之后,cpio+gz打包回去,到corepure64.gz里面。
比较麻烦的问题是,tinycore每更新一次就要修改一次,来来回回修改比较麻烦。

You can make your home-brew rebuilderfstab.tcz package for your own need.

As long as you put it in /usr/local/bin, it should be fine.

And make sure it's in your onboot.lst.

你可以自己包個rebuilderfstab.tcz阿,把改寫過的放/usr/local/bin就好了。
記得要加進onboot.lst
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 11:13:22 PM
copy2fs 应该也是一个可行的方法。

cheatcode就是那些启动参数。我忘了他来自那个发行版的说法,似乎是porteus

Boot parameters (also known as cheatcodes) are used to affect the
booting process of Porteus. The cheatcodes listed here are only those
that are specific to Porteus (see the final note for information on
cheatcodes that apply to all linux distributions, including Porteus).
You can use these parameters to disable desired kinds of hardware
detection, start Porteus from a specific location, load additional
modules, etc.

对于tinycore,整体启动iso,

比如iso=UUID=xxxx就是cheatcode,或者可以称之为Boot parameters,他传递启动参数到linux kernel,以“欺骗”linux kernel继续从iso启动。
大概是这样子,抱歉,这个名词让您误会了。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 11:22:01 PM
很抱歉我不能贴上示例菜单,用以说明我要表达的内容。因为发生了Internal Server Error
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 13, 2022, 11:26:23 PM
Quote
你可以自己包個rebuilderfstab.tcz阿,把改寫過的放/usr/local/bin就好了。
記得要加進onboot.lst

想问下怎么把这个rebuildfstab.sh打包进rebuildfstab.tcz?用什么工具?打包进去之后,onboot.lst调用,会不会比系统的/usr/sbin/rebuildfstab调用的晚呢?如果调用的晚,可能不会起作用,因为rebuildfstab提前已经建立了/etc/fstab了啊?
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 14, 2022, 01:01:23 AM
想问下怎么把这个rebuildfstab.sh打包进rebuildfstab.tcz?
Code: [Select]
tce-load -i squashfs-tools
Code: [Select]
mkdir -p packing/usr/local/bin
Code: [Select]
mv yourscript packing/usr/local/bin/rebuildfstab
Code: [Select]
chmod +x packing/usr/local/bin/rebuildfstab
Code: [Select]
mksquashfs packing rebuildfstab.tcz
Code: [Select]
mv rebuildfstab.tcz /etc/sysconfig/tcedir/optional
Code: [Select]
echo rebuildfstab.tcz >> /etc/sysconfig/tcedir/onboot.lst
用什么工具?打包进去之后,onboot.lst调用,会不会比系统的/usr/sbin/rebuildfstab调用的晚呢?如果调用的晚,可能不会起作用,因为rebuildfstab提前已经建立了/etc/fstab了啊?
Code: [Select]
echo rebuildfstab >> /opt/bootlocal.sh
Code: [Select]
filetool.sh -b
P.S. I had to use all these code tags to prevent the internal server error.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 14, 2022, 01:07:47 AM
Quote
linux (loop)/boot/vmlinuz64 iso=UUID="$uuid/linux/tinycore/TinyCorePure64-12.0.iso" cde quiet loglevel=3 showapps vga=791 lang=zh_CN.UTF-8 tz=GMT-8 tce=UUID="$uuid/linux/tinycore/"
This is wrong.
Should be
Code: [Select]
linux (loop)/boot/vmlinuz64 quiet loglevel=3 showapps vga=791 lang=zh_CN.UTF-8 tz=GMT-8 tce=UUID="$uuid/linux/tinycore/"The "tce" parameter (cheatcode) tells the system where your "tcedir" is suppose to be, and that's all you need.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 14, 2022, 03:26:40 AM
我想你是误会了,我给的示例菜单,是不解开tinycore.iso,整体启动哟。
用你给出的菜单只能进入tinycore的命令行,是不可能进入Xvesa或者Xwindow的,不相信的话,你可以试试看。
iso=UUID=xxx就是cheatcode之一,tinycore从loopback设备启动,这个(loop)只在grub2环境下有效,一旦切换进入linux kernel环境,(loop)设备就失效了,而iso=UUID=xxx欺骗了linux kernel,告诉了linux kernel不是从(loop)设备上面找他的kernel和tce,而是从真实的iso里面找他的tce确定root,所以这是从光盘启动,所以要加上cde参数,这个cde参数也应该是cheatcode之一。

不解开tinycore.iso,整体启动tinycore.iso,也是可以保存数据的,前提是tinycore放在FAT32/EXT4这样子的可识别分区,保存的位置在tce这个参数指定的位置,我的放在$uuid/linux/tinycore/。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 14, 2022, 04:08:30 AM
I see, but I gotta say, it would drag on performance.
There are only 2 files, you could have extract the kernel and initrm to your grub directory.
了解,但我必須說,你這樣跑很慢啊。
不過就兩個檔案(vmlinuz64,corepure64.gz)而已,解出來放不好嗎?
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 14, 2022, 04:11:32 AM
用你给出的菜单只能进入tinycore的命令行,是不可能进入Xvesa或者Xwindow的,不相信的话,你可以试试看。
I'm fairly certain I can enter the GUI just fine, you probably did something wrong.
我很確定,進圖形介面完全沒問題,不知道你哪裡沒弄好。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 14, 2022, 04:33:21 AM
tinycore.iso只有29MB,解开不解开启动,速度差别不大,放在一个iso里面显得很整洁,另外,下次tinycore更新的时候,直接下载tinycore.iso,覆盖他就行了。

另外,我也有解tinycore.iso启动的菜单啊。

整体启动iso也只是个尝试。

Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 14, 2022, 04:45:41 AM
我按照你说的方法做好rebuildfatab.tcz之后,放到了optional目录里面,重新启动之后,我看到/usr/local/bin/rebuildfstab.sh文件存在了,是我修改之后的。
但是/usr/local/bin/rebuildfstab.sh并没有自动运行,于是我执行了:
sudo /usr/local/bin/rebuildfstab.sh
sudo mount -a
FAT32/NTFS分区被自动挂载好了,没有乱码。

但我的问题是,我感觉/usr/local/bin/rebuildfstab.sh并没有自动运行,他运行在系统原来的/etc/sbin/rebuildfstab脚本之后,有点晚了。
如果能够早于/etc/sbin/rebuildfstab脚本加载就好了。

另外如果我想让
sudo /usr/local/bin/rebuildfstab.sh
sudo mount -a
开机之后自动运行,我应该怎么办?
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 14, 2022, 04:48:45 AM
by the way,onboot.lst里面已经有了rebuildfatab.tcz
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 14, 2022, 04:59:39 AM
The file name is different. No ".sh"
檔名問題,把".sh"去掉重作tcz
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 14, 2022, 05:22:37 AM
抱歉,我少做了这一步,sorry,是我的问题。
我发现 /opt/bootlocal.sh需要超级管理员权限才能修改。
sudo vi /opt/bootlocal.sh
添加我的
sudo rebuildfstab.sh
sudo mount -a

重启试了下,FAT32/NTFS分区自动挂载了,没有乱码。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 14, 2022, 05:33:37 AM
但是tinycore所在的FAT32分区还是乱码,因为这个分区被挂载晚了,是/etc/fstab里面vfat类型的分区没有iocharset=utf8参数导致。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 14, 2022, 05:41:04 AM
You don't need "sudo" for /opt/bootlocal.sh
Like I said earlier, it may refuse to run.

在/opt/bootlocal.sh裡面別亂加"sudo"
前面說過,雙重sudo可能不會跑。

但是tinycore所在的FAT32分区还是乱码,因为这个分区被挂载晚了,是/etc/fstab里面vfat类型的分区没有iocharset=utf8参数导致。

Try copy2fs, unmount it in /opt/bootlocal.sh, then remount with your script.

開啟copy2fs,在/opt/bootlocal.sh卸掉那個分區,最後用你的腳本重掛。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 14, 2022, 06:00:28 AM
Quote
前面說過,雙重sudo可能不會跑。
好的,知道了。

copy2fs.lst要把所有的模块都放到里面吗?
感觉比较麻烦啊?
还不如彻底折腾那个corepure64.gz+cpio吧?

Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 14, 2022, 06:15:39 AM
2 choices.

1. Set copy2fs.flg, everything will be copied to RAM.
You only have to do it once.
Code: [Select]
touch /etc/sysconfig/tcedir/copy2fs.flg
2. Sort and unique all the "tree" files of the extensions in onboot.lst into copy2fs.lst
For example http://tinycorelinux.net/13.x/x86_64/tcz/util-linux.tcz.tree (http://tinycorelinux.net/13.x/x86_64/tcz/util-linux.tcz.tree)

兩個方法

1. 創一個空檔copy2fs.flg,缺點是所有TCZ一律進RAM。

2. 把你開機馬上要用的那些,包括下游的通通丟進copy2fs.lst,你可以參考tree檔。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 14, 2022, 06:37:16 AM
谢谢您提供的方法!
太晚了,我先睡了。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 15, 2022, 03:16:25 AM
另外想请问下,能否在某个脚本里面设置下,默认启动我提前安装好的icewm桌面,而不是默认的flwm?
我不想在grub2的启动参数中设置desktop=icewm,我就是想在某个脚本中设置,能做到吗?
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 15, 2022, 04:12:20 AM
Let me get this straight, are you still using the loopback method with the ISO file ?
If you are, then there's no other way around, cause the default boot command is always flwm.

If you have extracted the kernel and initrd, then there are only a few adjustments needed.
Remove flwm_topsides.tcz from your onboot.lst
Make sure icewm.tcz is in your onboot.lst
The tce.installed script should automatically handle the rest.
If not, then make sure the content of /etc/sysconfig/desktop is icewm.

我想先確認一件事,你還在用ISO開機嗎?
若是,那就鎖死在flwm了。

如果你照我說的把vmlinuz64, corepure64.gz解出來,那就簡單很多。
只要把onboot.lst裡面的flwm_topsides.tcz換成icewm.tcz
剩下的系統應該會自動搞定
再不行,把/etc/sysconfig/desktop內容換成icewm即可。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 15, 2022, 04:48:41 AM
我的电脑有tinycore.iso整体启动和解开启动多种模式,都存在。

晚点我试下。
谢谢!
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 15, 2022, 05:45:47 AM
我刚才试了下,解开tinycore,启动参数中不带desktop=xxxx参数,tinycore似乎是根据/etc/sysconfig/desktop里面的设置选择桌面。

我尝试了修改为flwm,下次启动他还是icewm。
似乎这个/etc/sysconfig/desktop里面的设置优先级较低,可能是在其他地方设置的吧。

如果启动参数中带desktop=xxxx参数,那么启动参数里面的设置优先级是很高的。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 15, 2022, 08:34:12 AM
That's because /etc/syscofig/desktop gets updates too.
Whenever you load a different window manager, a new value will replace the old one.

那純粹是因為/etc/sysconfig/desktop也很可能被改掉。
只要你又載了別種桌面,舊的值就會被洗掉,備份了也無用。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 15, 2022, 04:04:36 PM
是的,我感觉修改了/etc/config/desktop,备份了也没用,会被刷新掉,有没有其他脚本设置的地方?
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich on January 15, 2022, 06:00:48 PM
Hi liuzhaoyzz
First  /etc/sysconfig/desktop  gets set by the window managers  /usr/local/tce.installed/  script.
If more than one window manager gets loaded, it will be set to the last one loaded.
Then, if a  desttop  boot code is specified, it will overwrite  /etc/sysconfig/desktop  with a new value.
Finally, if you backed up  /etc/sysconfig/desktop , the next restore will overwrite  /etc/sysconfig/desktop  with a new value.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 15, 2022, 10:44:32 PM
感谢您的解释!
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 15, 2022, 10:54:14 PM
我终于还是决定从corepure64.gz动手了。。。

我在tinycore下面用gzip -d corepure64.gz
或者gunzip corepure64.gz
都出错了。

于是我在windows下面用7z对corepure64.gz进行了解压缩。
修改了/usr/sbin/rebuildfstab

然后用下面的语句打包回去:find | cpio -o -H newc | busybox gzip -2 > /tmp/corepure64.gz

替换原来的corepure64.gz,解开后的tinycore启动,出错了。
kernel panic - not syncing,no working init found.Try passing init= option to kernel.

图片:链接: https://pan.baidu.com/s/1jBB1r5rpL3lftaLPL0naPA?pwd=xgna 提取码: xgna
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 15, 2022, 10:56:14 PM
tinycore太难玩了!It's too...........too hard!!!
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 16, 2022, 04:46:06 AM
That's the fun of Tiny Core, you have to configure everything to your own taste.
這就是Tiny Core的樂趣所在阿,自己的系統自己來。

于是我在windows下面用7z对corepure64.gz进行了解压缩。
修改了/usr/sbin/rebuildfstab
I wouldn't do that, 7z probably broke something during the extraction. Try this:
我不會這麼做,7z很可能搞壞了什麼。試試這個:
http://forum.tinycorelinux.net/index.php/topic,21921.msg137135.html#msg137135 (http://forum.tinycorelinux.net/index.php/topic,21921.msg137135.html#msg137135)
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 16, 2022, 03:18:52 PM
用你的方法,kernel panic没有了,但是出现了新的问题。
我改过的/usr/sbin/rebuildfstab:
感觉上来说,还是要折腾/usr/sbin/rebuilderfstab,从底层修改,改完了之后,cpio+gz打包回去,到corepure64.gz里面。
比较麻烦的问题是,tinycore每更新一次就要修改一次,来来回回修改比较麻烦。

OPTIONS="auto,users,exec"
  case "$FSTYPE" in
    ntfs) checkntfs ;;
    vfat|msdos) OPTIONS="${OPTIONS},umask=000,iocharset=utf8" ;;

所以还是建议开发组修改,这样子最方便。

结果出错了:
链接: https://pan.baidu.com/s/1SAJy7dFXB8us7WHH233neA?pwd=696m 提取码: 696m
我该怎么修改/usr/sbin/rebuilderfstab,让所有的分区自动挂载,而且没有乱码呢?

Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 16, 2022, 03:48:32 PM
或者进入了命令行。
链接: https://pan.baidu.com/s/1Z49H2e-SPmOEFYXjwmMDmQ?pwd=591p 提取码: 591p
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich on January 16, 2022, 03:53:10 PM
Hi liuzhaoyzz
... https://pan.baidu.com/s/1SAJy7dFXB8us7WHH233neA?pwd=696m ...
Based on the image you posted, you are getting errors because some of your directories are missing.
You are missing the following directories:  /etc  /home  /proc  /run
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 16, 2022, 05:34:06 PM
OK,I see.
I will check it later.
Thank you.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 16, 2022, 06:10:41 PM
用你的方法,kernel panic没有了,但是出现了新的问题。

我该怎么修改/usr/sbin/rebuilderfstab,让所有的分区自动挂载,而且没有乱码呢?
It's good to hear that you have solved the kernel panic problem.

It would be nicer if you show us the difference the diff output of your modification.
Code: [Select]
diff -u rebuildfstab.old rebuildfstab.new
Also, have you set it as excutable yet ?

[Edit] BTW, it's called rebuildfstab not rebuilderfstab.

恭喜你搞定好kernel panic的問題

麻煩你貼一下你改過的所以細節,最好用diff -u

你有設定chmod讓它可執行嗎?

另外,你檔名還是錯了。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 16, 2022, 06:46:26 PM
我在前面已经贴出了改过的部分了啊(加黑体的部分),就是把option变量的noauto改成了auto,然后对于FAT32分区,option添加了iocharset=utf8参数而已。
diff的结果,够呛能够粘贴上来,因为Internal Server Error,太不容易了。

Quote
你有設定chmod讓它可執行嗎?
原来的可执行权限我没有动,晚点我再检查下。

Quote
BTW, it's called rebuildfstab not rebuilderfstab.
哦,论坛我打字打错了,真实的文件是没错的,因为我都是直接ctrl+C CTRL+V过去的。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 16, 2022, 06:52:08 PM
其实之前,我已经用“mount”作为关键字,搜遍了整个论坛,似乎很多年前(最早是2009年?)都有人有automount硬盘和USB设备这样子的需求,但tinycore官方似乎一直没有改进。

对于FAT32设备来说,为了避免乱码,国际化语言支持,感觉上来说mout -t iocharset=utf8感觉是必须的选项,否则对于FAT32设备就可能会出现乱码现象。wbar里面的mounttool感觉没有考虑这些,不知道在其他语言下面是怎么弄的?这个问题希望tinycore官方重视下,改进代码,并且深度测试其健壮性。

对于USB设备,似乎有个usbautomount.tcz,但我还没有深度测试它。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 17, 2022, 03:46:27 AM
哎,我搞不定。不知道怎样修改rebuildfstab.并且让他自动挂载所有的分区。
太难了!
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 17, 2022, 06:13:15 AM
对于FAT32设备来说,为了避免乱码,国际化语言支持,感觉上来说mout -t iocharset=utf8感觉是必须的选项,否则对于FAT32设备就可能会出现乱码现象。wbar里面的mounttool感觉没有考虑这些,不知道在其他语言下面是怎么弄的?这个问题希望tinycore官方重视下,改进代码,并且深度测试其健壮性。

Tiny Core is a enthusiast-powered project.
If you think things can be improved, you can always grab the source code and see what you can do.
For example, the tc-install package used to be 32-bit only.
Years ago, I grab the code and learn programing to improve its comparability.
The binary size was even reduced after removing some legacy codes.
You can do the same, add new features to the system mount tool.
Just make sure they're backward compatible by default.
Your mounting problem requires additional extensions and locale pack.
There are people who don't care about language support and rather keep the system small, every bit counts.
If that's too much trouble for you, then maybe this system is just not your cup of tea.

Tiny Core完全是由愛好者們支撐的。
如果你覺得哪裡可以改進,原始碼就在那,自己抓來玩玩,看能玩出啥新花樣。
就以tc-install為例,以前它只支援32位元,是我大改後讓它跨平台的。
刪了些用不到的部分後,它還更小了。
你也可以試試阿,自己加些東西。
只是務必預設向下相容,你這問題還需要額外加裝多種套件。
在這裡多數人根本不在乎多國語言(壓根用不到),他們寧可省下幾MB也不願意裝這些有的沒的。
你要是覺得太麻煩了,我只能說這系統可能不適合你。

https://github.com/tinycorelinux/fltk_projects (https://github.com/tinycorelinux/fltk_projects)
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 17, 2022, 06:18:45 AM
哎,我搞不定。不知道怎样修改rebuildfstab.并且让他自动挂载所有的分区。
太难了!

I think what you're missing some adjustments to the /opt/bootlocal.sh
Consider append this line to the end of it and save your changes.
Code: [Select]
mount -aIt should mount according to your new fstab.

我覺得你就只差一步,在 /opt/bootlocal.sh 加一句
Code: [Select]
mount -a讓他開機後馬上照著新版fstab執行
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich on January 17, 2022, 06:51:35 AM
Hi poliko
liuzhaoyzz is making this difficult for himself.
There is no need to modify the systems  rebuildfstab  script.
The modified  MountAll  script you provided should do most of what he wants.
For the  FAT32  /dev/sdd2  device he was complaining about, try using mounts  remount  option:
Code: [Select]
        remount         Remount a mounted filesystem, changing flags
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 17, 2022, 07:37:59 AM
Hi Rich.
Here's a quick recap about the thread.
The file system of the partition that contains his tce directory is fat32.
The content inside requires UTF-8 support to access properly.
He can remount all the other partitions with that refactored MountAll script.
However, since the tczs are loop mounted, the tce partition is locked.
I suggest him to use copy2fs feature, but he think rebuildfstab is the way.
So I tell him to make a custom rebuildfstab.tcz with path /usr/local/bin/rebuildfstab.
He says, it too late in boot, the fstab is already generated at that point.
Then, there's the desktop issue, it appears he boot from an ISO image.
After explaining how remastering work, he says it's still not working.
That leads us here.
I ask him to append mount -a to his /opt/bootlocal.sh, ideally to get all partitions auto-mounted.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich on January 17, 2022, 07:50:30 AM
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.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 17, 2022, 08:10:55 AM
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.
Hi Rich
No I didn't, I've never thought of that method.
We're still waiting for OP's response after your suggestion.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 17, 2022, 03:25:32 PM
Quote
mount -a
讓他開機後馬上照著新版fstab執行

我曾经尝试过在rebuildfstab最后面加上mount -a,不行。

/etc/init.d/rcS这里面已经有了/bin/mount -a了啊。


Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 17, 2022, 03:28:22 PM
现在的问题是,
rebuildfstab里面,如果把79行的OPTIONS="noauto,users,exec"改为  OPTIONS="auto,users,exec",那么开机只能进入命令行,ls命令都执行不了。可能是/dev/sr0被错误地挂载了。

我改成下面这样子也不行:
  OPTIONS="noauto,users,exec"
  case "$FSTYPE" in
    ntfs) checkntfs ;;
    ntfs-3g) OPTIONS="auto,users,exec,rw,umask=000,iocharset=utf8" ;;
    vfat|msdos) OPTIONS="auto,users,exec,umask=000,iocharset=utf8" ;;
    ext2|ext3) OPTIONS="auto,users,exec,relatime" ;;
    swap) OPTIONS="defaults"; MOUNTPOINT="none" ;;
  esac
开机会进入命令行(前面的帖子有截图),任何命令都执行不了,ls都执行不了。

如果79行的OPTIONS="noauto,users,exec"不变,那么mount -a又无法起作用。

这陷入了一个悖论。

Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 17, 2022, 03:34:40 PM
对于FAT32设备来说,为了避免乱码,国际化语言支持,感觉上来说mout -t iocharset=utf8感觉是必须的选项,否则对于FAT32设备就可能会出现乱码现象。wbar里面的mounttool感觉没有考虑这些,不知道在其他语言下面是怎么弄的?这个问题希望tinycore官方重视下,改进代码,并且深度测试其健壮性。

Tiny Core is a enthusiast-powered project.
If you think things can be improved, you can always grab the source code and see what you can do.
For example, the tc-install package used to be 32-bit only.
Years ago, I grab the code and learn programing to improve its comparability.
The binary size was even reduced after removing some legacy codes.
You can do the same, add new features to the system mount tool.
Just make sure they're backward compatible by default.
Your mounting problem requires additional extensions and locale pack.
There are people who don't care about language support and rather keep the system small, every bit counts.
If that's too much trouble for you, then maybe this system is just not your cup of tea.

Tiny Core完全是由愛好者們支撐的。
如果你覺得哪裡可以改進,原始碼就在那,自己抓來玩玩,看能玩出啥新花樣。
就以tc-install為例,以前它只支援32位元,是我大改後讓它跨平台的。
刪了些用不到的部分後,它還更小了。
你也可以試試阿,自己加些東西。
只是務必預設向下相容,你這問題還需要額外加裝多種套件。
在這裡多數人根本不在乎多國語言(壓根用不到),他們寧可省下幾MB也不願意裝這些有的沒的。
你要是覺得太麻煩了,我只能說這系統可能不適合你。

https://github.com/tinycorelinux/fltk_projects (https://github.com/tinycorelinux/fltk_projects)

你说的看源代码,修改,对于我来说太难了,我做不到这些,我只能做一些简单的定制,涉及到源代码修改、systemd/init这样子偏向底层的东西,我搞不定,对我来说太难了,可能我的确不适合tinycore。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz 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
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz 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里面调用,应该都可以吧?
我这边不知道怎么修改,我的能力不够,这是个问题。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 17, 2022, 04:23:55 PM
我上传个veket的mountpartition
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich 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
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz 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.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich on January 17, 2022, 07:11:45 PM
Hi liuzhaoyzz
No, test it with the real computer when you get home.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz 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
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo 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 (https://github.com/tinycorelinux/fltk_projects/tree/master/mnttool)
BTW, we don't mess around with systemd.

修但幾咧
我沒叫你挖這麼深,我只是說你可以試著改改看mnttool (https://github.com/tinycorelinux/fltk_projects/tree/master/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.
給我一(億)點點時間。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz 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,我已经无能为力了。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo 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.
(https://i.imgur.com/cOxUifb.jpg)

P.S. I think the rebuildfstab script might actually need a bit of fixing.
The function checkntfs() is defined INSIDE a for loop.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo 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"
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz 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.
(https://i.imgur.com/cOxUifb.jpg)

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

我前面的帖子,就是这样子修改的呀。启动的的时候只能进入命令行,不知道怎么回事。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz 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

分区挂载问题有点多。。。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo 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 ?

你該不會是不小心洗掉了?
你是用原版的還改版的?
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 18, 2022, 05:57:45 AM
原版修改后,我直接运行了下。FAT32被识别为ext4了。可能改错了。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich on January 18, 2022, 10:22:27 PM
Hi polikuo
It seems no matter what I try, I can't change  iocharset  on a mounted vfat drive.
Using the  remount  option ignores  iocharset , though it does honor the  rw  and  ro  flags.
Mounting the partition a second time to a new mountpoint ignores  iocharset.
I'm starting to think it's not possible.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 18, 2022, 10:37:54 PM
It seems no matter what I try, I can't change  iocharset  on a mounted vfat drive.
Hi Rich.
I couldn't remount with iocharset either.
The only way I could think of without remastering is detailed in my previous post.
OK, I managed to mount all the partitions onboot.
No remastering required.
...
I had to use copy2fs in order to unmount the partition safely.
It's doable with /opt/bootlocal.sh
Now I'm thinking, would it be better if I edit /opt/bootsync.sh instead.
Considering that, /opt/bootsync.sh halt a little until the partition is remounted.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich on January 18, 2022, 10:47:35 PM
Hi polikuo
I suppose the other thing that might work is:
1. Boot base norestore
2. Unmount and remount the partition with desired options.
3. In bootsync, load extensions, for F in `cat onboot.lst`; do tce-load $F; done
4. In bootsync, do restore, filetool.sh -r
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: gadget42 on January 18, 2022, 10:55:26 PM
not sure this would help but maybe worth a read regarding vfat and dosfstools?

https://www.golinuxcloud.com/linux-mount-command-iso-usb-network-drive/#USB_Drive_with_FAT32_or_vFAT_File_System
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 18, 2022, 11:09:23 PM
Hi Rich.
The thing is, the default mount, busybox version, doesn't support that option.
With bootcode "base norestore" the system always goes into prompt.
That's fine for us experienced users, but I doubt the OP would be happy with that.
Further more, with those bootcodes, everything is in its default form.
No modified bootsync.sh or bootlocal.sh.

After reviewing the post, I think there's a better solution.
The OP says he has several partitions.
It's fine to put his tce directory in his other linux distro partition.
Then he only has to put the distribution files (vmlinuz64, corepure64.gz) in that FAT partition so his bootloader can find them and assign tcedir via the bootcode.
Now the locked partition is a ext4 one, he can just mount those windows partitions however he likes.
Everything should be fine.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich on January 18, 2022, 11:11:56 PM
Hi gadget42
No, the vfat driver is built into the kernel.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich on January 18, 2022, 11:15:34 PM
Hi polikuo
That certainly sounds simpler than trying to force a square peg into a round hole.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 18, 2022, 11:18:07 PM
Hi Rich

The questions now remains are, does ext4 support UTF-8 with this setting ?

Are there UTF-8 documents in his ext4 partition ?
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 19, 2022, 06:30:32 AM
Hi polikuo
It seems no matter what I try, I can't change  iocharset  on a mounted vfat drive.
Using the  remount  option ignores  iocharset , though it does honor the  rw  and  ro  flags.
Mounting the partition a second time to a new mountpoint ignores  iocharset.
I'm starting to think it's not possible.

我用我前面修改过的rebuildfstab,可以实现tinycore放在FAT32分区,开机后,FAT32分区有iocharset参数啊,启动后会自动挂载,中文文件名字和文件夹没有乱码。
就是只修改82行为以下内容:    vfat|msdos) OPTIONS="${OPTIONS},umask=000,iocharset=utf8" ;;


但是仅限于Tinycore所在的那个FAT32分区会被自动挂载上去,其他分区不能自动挂载上,需要手工挂载,用polikuo写的脚本或者tcz可以。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 19, 2022, 06:39:09 AM
Hi Rich

The questions now remains are, does ext4 support UTF-8 with this setting ?

Are there UTF-8 documents in his ext4 partition ?

我把tinycore放在EXT4分区,bootcode加载了locale=zh_CN.UTF-8,安装了notocjk-regular-fonts-ttc中文字体,安装了getlocale.tcz,运行
sudo getlocale.sh,选择了zh_CN.UTF-8
xfe文件管理器中,中文文件夹和文件名字都是正常显示的。

ext4分区是tinycore开机启动后自动挂载的,因为vmlinuz64和corepure64.gz在这个分区上面。

但是我不想用ext4分区,因为他们在windows下面难以访问,我除了尝试linux,我还有windows系统呢。
paragonextfs,感觉对于ext4分区访问,在虚拟机中文件感觉不会实时更新。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 19, 2022, 06:47:42 AM
Hi Rich

The questions now remains are, does ext4 support UTF-8 with this setting ?

Are there UTF-8 documents in his ext4 partition ?

链接: https://pan.baidu.com/s/18oFGYPSLkSt4STcGixeU8A?pwd=gpjs 提取码: gpjs
你看下上面的截图,/mnt/sdc3是ext4分区,挂载的option是noauto,users,exec,不需要iocharset参数,iocharset参数好像FAT32/NTFS才需要,特别是FAT32分区,好像必须要iocharset参数,NTFS可能不要也行,但是加上最好。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich on January 19, 2022, 07:40:24 AM
Hi polikuo
ext4  uses the systems  locale.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 19, 2022, 07:43:08 AM
但是我不想用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長怎樣 ?
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 19, 2022, 07:44:11 AM
Hi polikuo
ext4  uses the systems  locale.
Thanks for the info, Rich.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich on January 19, 2022, 07:59:47 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.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo 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.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich 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.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich 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.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich 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
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz 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.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz 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官方团队对于国际化语言的支持不怎么感兴趣。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 19, 2022, 05:55:37 PM
convmv不是我和大家想要的结果。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich 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.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo 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
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich 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.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo 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.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich 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.
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo 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
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: Rich 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.

Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo 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"
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on January 22, 2022, 06:25:42 AM
前面我有帖子测试过了啊,名字叫做cde或者是tce,启动tinycore,保存tinycore,都没有问题,结果是一样的啊。
这只是个文件夹名字,不是bootcode啊。

最主要是我比较偷懒,解压缩tinycore,然后启动就行了,我自己的写的有一个批处理,全自动写好grub4dos/grub2的引导菜单。
如果要改,嫌麻烦。
本来用起来感觉没有什么区别啊。
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on January 22, 2022, 08:34:05 AM
前面我有帖子测试过了啊,名字叫做cde或者是tce,启动tinycore,保存tinycore,都没有问题,结果是一样的啊。
这只是个文件夹名字,不是bootcode啊。

最主要是我比较偷懒,解压缩tinycore,然后启动就行了,我自己的写的有一个批处理,全自动写好grub4dos/grub2的引导菜单。
如果要改,嫌麻烦。
本来用起来感觉没有什么区别啊。

After reviewing the main script.
There seems to be enough checkers to prevent unwanted behaviors.
I guess naming your tcedir as "cde" wouldn't hurt much.
I'm not encouraging the idea though.

重看了一下,裡面有很多檢查點,問題貌似不算太大,雖然我依然不建議。

https://github.com/tinycorelinux/Core-scripts/blob/master/usr/bin/tce-setup (https://github.com/tinycorelinux/Core-scripts/blob/master/usr/bin/tce-setup)
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on March 10, 2022, 07:14:45 AM
想请问下,NTFS乱码的这个问题在论坛反馈了,官方开发人员有没有希望在下个版本中改进呢?还是必须要自己去修改,自己修改太费事儿了。
开发组成员有没有在论坛里呢?
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on March 10, 2022, 08:43:51 PM
Unfortunately, that's not possible right now.
In your case, you're using a more powerful mount command, which is not a part of the base.
The only idea I can think of is to add more checker to the core script.
If the util-linux mount exist, use UTF-8, else use busybox.
However, I'm not sure if it will cause any trouble to those non-utf8 partition...

我覺得恐怕很難,需求太小,再加上這會需要util-linux mount,而這並不屬於系統base的一部份
我只能想到去魔改它,用一堆條件確認系統狀態,來決定是否選用UTF-8
比較在意的是這樣一來會不會打亂其他種類的磁碟分割區...
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: polikuo on March 11, 2022, 12:18:13 AM
There a ezremaster.tcz for 32-bit which is suitable in your use case.
However, I don't think there's a 64-bit build.
In your case, you need both util-linux.tcz rebuildfstab-custom.tcz in your base system.
Otherwise, your partition will be locked.
Even if we patched rebuildfstab, you're still stuck with busybox.

在32位元上,我們有ezremaster可以輕鬆搞定這個。
但我印象中沒有64位元的,好像是兩者不相容。
你的狀況必須把util-linux.tcz rebuildfstab-custom.tcz都丟進初始系統
後者還好說但前者就實在不行了

    [EDIT]: Fixed spelling. Changed suck to stuck.  Rich
Title: Re: (中文) How can I automatically load all partitions when tinycore starts?
Post by: liuzhaoyzz on March 11, 2022, 04:10:20 AM
感谢您的回复!我觉得如果开发组注意到这个问题,由他们出手改进下应该更方便。