WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10217
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #60 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

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #61 on: January 16, 2022, 05:34:06 PM »
OK,I see.
I will check it later.
Thank you.

Offline polikuo

  • Hero Member
  • *****
  • Posts: 666
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #62 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讓它可執行嗎?

另外,你檔名還是錯了。
« Last Edit: January 16, 2022, 06:17:50 PM by polikuo »

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #63 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过去的。
« Last Edit: January 16, 2022, 06:48:17 PM by liuzhaoyzz »

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #64 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,但我还没有深度测试它。
« Last Edit: January 16, 2022, 06:56:21 PM by liuzhaoyzz »

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #65 on: January 17, 2022, 03:46:27 AM »
哎,我搞不定。不知道怎样修改rebuildfstab.并且让他自动挂载所有的分区。
太难了!

Offline polikuo

  • Hero Member
  • *****
  • Posts: 666
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #66 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
« Last Edit: January 17, 2022, 06:19:52 AM by polikuo »

Offline polikuo

  • Hero Member
  • *****
  • Posts: 666
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #67 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執行

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10217
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #68 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

Offline polikuo

  • Hero Member
  • *****
  • Posts: 666
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #69 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.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10217
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #70 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.

Offline polikuo

  • Hero Member
  • *****
  • Posts: 666
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #71 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.

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #72 on: January 17, 2022, 03:25:32 PM »
Quote
mount -a
讓他開機後馬上照著新版fstab執行

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

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



Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #73 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又无法起作用。

这陷入了一个悖论。

« Last Edit: January 17, 2022, 03:31:37 PM by liuzhaoyzz »

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #74 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

你说的看源代码,修改,对于我来说太难了,我做不到这些,我只能做一些简单的定制,涉及到源代码修改、systemd/init这样子偏向底层的东西,我搞不定,对我来说太难了,可能我的确不适合tinycore。