WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #30 on: January 14, 2022, 02:22:01 AM »
很抱歉我不能贴上示例菜单,用以说明我要表达的内容。因为发生了Internal Server Error

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #31 on: January 14, 2022, 02:26:23 AM »
Quote
你可以自己包個rebuilderfstab.tcz阿,把改寫過的放/usr/local/bin就好了。
記得要加進onboot.lst

想问下怎么把这个rebuildfstab.sh打包进rebuildfstab.tcz?用什么工具?打包进去之后,onboot.lst调用,会不会比系统的/usr/sbin/rebuildfstab调用的晚呢?如果调用的晚,可能不会起作用,因为rebuildfstab提前已经建立了/etc/fstab了啊?

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #32 on: January 14, 2022, 04: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.

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #33 on: January 14, 2022, 04: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.

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #34 on: January 14, 2022, 06: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/。
« Last Edit: January 14, 2022, 06:28:40 AM by liuzhaoyzz »

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #35 on: January 14, 2022, 07: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)而已,解出來放不好嗎?

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #36 on: January 14, 2022, 07:11:32 AM »
用你给出的菜单只能进入tinycore的命令行,是不可能进入Xvesa或者Xwindow的,不相信的话,你可以试试看。
I'm fairly certain I can enter the GUI just fine, you probably did something wrong.
我很確定,進圖形介面完全沒問題,不知道你哪裡沒弄好。

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #37 on: January 14, 2022, 07:33:21 AM »
tinycore.iso只有29MB,解开不解开启动,速度差别不大,放在一个iso里面显得很整洁,另外,下次tinycore更新的时候,直接下载tinycore.iso,覆盖他就行了。

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

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


Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #38 on: January 14, 2022, 07: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
开机之后自动运行,我应该怎么办?

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #39 on: January 14, 2022, 07:48:45 AM »
by the way,onboot.lst里面已经有了rebuildfatab.tcz

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #40 on: January 14, 2022, 07:59:39 AM »
The file name is different. No ".sh"
檔名問題,把".sh"去掉重作tcz

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #41 on: January 14, 2022, 08:22:37 AM »
抱歉,我少做了这一步,sorry,是我的问题。
我发现 /opt/bootlocal.sh需要超级管理员权限才能修改。
sudo vi /opt/bootlocal.sh
添加我的
sudo rebuildfstab.sh
sudo mount -a

重启试了下,FAT32/NTFS分区自动挂载了,没有乱码。

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #42 on: January 14, 2022, 08:33:37 AM »
但是tinycore所在的FAT32分区还是乱码,因为这个分区被挂载晚了,是/etc/fstab里面vfat类型的分区没有iocharset=utf8参数导致。

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #43 on: January 14, 2022, 08: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卸掉那個分區,最後用你的腳本重掛。
« Last Edit: January 14, 2022, 08:45:09 AM by polikuo »

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #44 on: January 14, 2022, 09:00:28 AM »
Quote
前面說過,雙重sudo可能不會跑。
好的,知道了。

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