vga仅适用于控制台,X分辨率在.xsession中确定Xvesa的(或使用xsetup.sh进行更改)。
想请问下,能否在某个脚本里面设置下,默认启动我提前安装好的icewm桌面,而不是默认的flwm?
我不想在grub2的启动参数中设置desktop=icewm,我就是想在某个脚本中设置,能做到吗?
我想先確認一件事,你還在用ISO開機嗎?
若是,那就鎖死在flwm了。
如果你照我說的把vmlinuz64, corepure64.gz解出來,那就簡單很多。
只要把onboot.lst裡面的flwm_topsides.tcz換成icewm.tcz
剩下的系統應該會自動搞定
再不行,把/etc/sysconfig/desktop內容換成icewm即可。
我刚才试了下,解开tinycore,启动参数中不带desktop=xxxx参数,tinycore似乎是根据/etc/sysconfig/desktop里面的设置选择桌面。
我尝试了修改为flwm,下次启动他还是icewm。
似乎这个/etc/sysconfig/desktop里面的设置优先级较低,可能是在其他地方设置的吧。
如果启动参数中带desktop=xxxx参数,那么启动参数里面的设置优先级是很高的。
有个问题想请教下阁下,我把原版tinycore放在FAT32分区,tinycore所在的分区会被系统自动挂载,这样子会导致FAT32所在的分区出现乱码现象,而这个分区无法卸载,当然也就不能自动挂载,但是你定做的版本就可以显示中文,请问下你是怎么做到的?能否写一篇详细点的定制教程?主要是分区挂载这一块。我想基于官方tinycore12学习定做下tinycore,我想用icewm。
解决分区编码的问题,是修改了rebuildfstab,ntfs-3g和vfat都增加了参数iocharset=utf8,用cp936也是可以的,不过感觉近年来utf8适应性更好.用diff -u与官方脚本比较一下就一目了然了
/etc/init.d/tc-config是启动的源头,/etc/skel/.profile和xlibs.tcz里的.xsession,都是可以按自己需求修改的地方
要修改系统脚本,必须把iso里的corepure64.gz解压出来:
cd /xxx/rootfs
zcat corepure64.gz | cpio -i -H newc -d
修改完成后重新打包
cd /xxx/rootfs
find | cpio -o -H newc | busybox gzip -2 > /tmp/corepure64.gz
tinycorelinux官方有wiki,可以找来看看
另外我用fcitx,在xfe文件管理器中,给文件或者文件夹改名字,总是无法改名字,但是在geany,liboffice等其他软件中可以正常中文打字,你用的是什么输入法?fcitx还是小小输入法?
https://forum.ubuntu.org.cn/viewtopic.php?t=350396
在 “编辑/选项/字体”中选择一个中文字体,然后重启xfe
我用的fcitx4,试了下显示修改中文名称都正常
http://forum.tinycorelinux.net/index.php/topic,21921.msg137135.html#msg137135
There are many ways in remastering, which generally involves in
Unpacking initrd
tc@box:~$ sudo mkdir /tmp/extract
tc@box:~$ cd /tmp/extract
tc@box:/tmp/extract$ zcat /path/to/core.gz | sudo cpio -i -H newc -d
Adding files (make sure the permissions are OK)
tc@box:/tmp/extract$ sudo unsquashfs -d . -f /etc/sysconfig/tcedir/optional/mylocale.tcz
tc@box:/tmp/extract$ ls -l usr/lib/locale/locale-archive
-rw-r--r-- 1 root root 3702256 Jul 19 2017 usr/lib/locale/locale-archive
Repacking initrd
tc@box:/tmp/extract$ sudo su
root@box:/tmp/extract# find | cpio -o -H newc | gzip -9 > /tmp/my_own_core.gz
root@box:/tmp/extract# exit
tc@box:/tmp/extract$ cd /tmp
tc@box:/tmp$ ls -l /tmp/my_own_core.gz
-rw-r--r-- 1 root root 10678758 May 4 22:46 /tmp/my_own_core.gz
Modifying the ISO files
tc@box:/tmp$ mkdir /mnt/CD /tmp/cdroot
tc@box:/tmp$ sudo mount /path/to/TC.iso /mnt/CD
tc@box:/tmp$ cp -r /mnt/CD/boot /tmp/cdroot
tc@box:/tmp$ chmod +w /tmp/cdroot/boot/isolinux/isolinux.cfg
tc@box:/tmp$ vi /tmp/cdroot/boot/isolinux/isolinux.cfg
...
append loglevel=3 lang="zh_TW.utf8"
...
tc@box:/tmp$ sudo cp -f /tmp/my_own_core.gz /tmp/cdroot/boot/corepure64.gz
Creating ISO file
sudo mkisofs -l -J -R -no-emul-boot \
-V TC-custom \
-boot-load-size 4 -boot-info-table \
-b boot/isolinux/isolinux.bin \
-c boot/isolinux/boot.cat -quiet -r \
-o output.iso /tmp/cdroot/
Verifying the ISO
qemu-system-x86_64 -m 512 -cdrom /tmp/output.iso
Your examples have worked perfectly.
I'll document 'here' exactly what I did to remaster a stock Core-9.0.iso file and integrate a few boots codes.
Setup basic VirtualBox virtual Machine (setting network to 'bridged', setting storage/optical drive to 'Core-9.0.iso')
Boot up vm
copy Core-9.0.iso to usb flash drive
attach usb flash drive to my vm
mount the usb flash drive in vm using $ mount /mnt/sdb1
installed mkisofs-tools
$ tce-load -wi mkisofs-tools
Executed the following commands as per your example
tc@box:/tmp$ mkdir /mnt/CD /tmp/cdroot
tc@box:/tmp$ sudo mount /mnt/sdb1/Core-9.0.iso /mnt/CD
tc@box:/tmp$ cp -r /mnt/CD/boot /tmp/cdroot
tc@box:/tmp$ chmod +w /tmp/cdroot/boot/isolinux/isolinux.cfg
tc@box:/tmp$ vi /tmp/cdroot/boot/isolinux/isolinux.cfg
...
append loglevel=3 syslog waitusb=5 nodhcp noautologin showapps noutc tz=EST-10 cron
...
# I also altered the timeout option to make bootup quicker
timeout 30
Save and exit viI ran your example to repackage the iso exactly and it works just fine.
sudo mkisofs -l -J -R -no-emul-boot \
-V TC-custom \
-boot-load-size 4 -boot-info-table \
-b boot/isolinux/isolinux.bin \
-c boot/isolinux/boot.cat -quiet -r \
-o output.iso /tmp/cdroot/
copied output.iso to usb flash drive
$ cp output.iso /mnt/sdb1
$ sudo umount /mnt/sdb1
ejected the usb flash drive from the vm using virtualbox interface
Windows kindly detected and auto mounted the drive to its fs
copied output.iso to local fs
selected output.iso as a virtual cd for boot up in VirtualBox vm storage settings
booted vm and all boot codes are now integrated to the iso.
Thanks
[EDIT[: Fixed typo. Changed not to now. Rich