WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline polikuo

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

兩個方法

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

2. 把你開機馬上要用的那些,包括下游的通通丟進copy2fs.lst,你可以參考tree檔。

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #46 on: January 14, 2022, 06:37:16 AM »
谢谢您提供的方法!
太晚了,我先睡了。

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #47 on: January 15, 2022, 03:16:25 AM »
另外想请问下,能否在某个脚本里面设置下,默认启动我提前安装好的icewm桌面,而不是默认的flwm?
我不想在grub2的启动参数中设置desktop=icewm,我就是想在某个脚本中设置,能做到吗?

Offline polikuo

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

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #49 on: January 15, 2022, 04:48:41 AM »
我的电脑有tinycore.iso整体启动和解开启动多种模式,都存在。

晚点我试下。
谢谢!

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #50 on: January 15, 2022, 05:45:47 AM »
我刚才试了下,解开tinycore,启动参数中不带desktop=xxxx参数,tinycore似乎是根据/etc/sysconfig/desktop里面的设置选择桌面。

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

如果启动参数中带desktop=xxxx参数,那么启动参数里面的设置优先级是很高的。

Offline polikuo

  • Hero Member
  • *****
  • Posts: 665
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #51 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也很可能被改掉。
只要你又載了別種桌面,舊的值就會被洗掉,備份了也無用。

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #52 on: January 15, 2022, 04:04:36 PM »
是的,我感觉修改了/etc/config/desktop,备份了也没用,会被刷新掉,有没有其他脚本设置的地方?

Offline Rich

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

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #54 on: January 15, 2022, 10:44:32 PM »
感谢您的解释!

Offline liuzhaoyzz

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

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #56 on: January 15, 2022, 10:56:14 PM »
tinycore太难玩了!It's too...........too hard!!!

Offline polikuo

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

Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #58 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,让所有的分区自动挂载,而且没有乱码呢?


Offline liuzhaoyzz

  • Jr. Member
  • **
  • Posts: 75
Re: (中文) How can I automatically load all partitions when tinycore starts?
« Reply #59 on: January 16, 2022, 03:48:32 PM »
或者进入了命令行。
链接: https://pan.baidu.com/s/1Z49H2e-SPmOEFYXjwmMDmQ?pwd=591p 提取码: 591p