手动安装Tiny Core Linux

我之前自己试验时,用CorePlus(即最大的那个70+MB的)中得图形化安装选择Text Only,安装出来虚拟机硬盘占了33M!我就纳闷了,应该9M左右才对啊!

TC官网上的Install guide和Older的都是图形化的。我下载了9MB的Core后,进去连/mnt/sr0下的boot都没有!!!

找了好多资料,终于找到一个非常详尽的。感谢这位老外!


========================         华丽的分割线          =========================


http://blog.matchgenius.com/tiny-core-microcore-install-to-hdd-with-openssh/


Setup ultra fast development test box using one of the smallest linux distro. Tiny Core Microcore install with OpenSSH will allow you to manage it from your local machine. With minimal footprint of this distribution you can concentrate on your development needs and eliminate unnecessary operating system resources hog.


Note that before you continue with this tutorial it’s recommended that you know some basics of Linux and are comfortable with using only terminal interface.


Lets start by downloading distribution image file.

#1: Download Core ISO

Tiny Core download page

Select just Core (8Mb)

Create bootable USB, CD or like me use visualization. Im using 500MB disk 1 core CPU and 500 MB of RAM. Definitely overkill for what Microcore is but we want to have some room to play with later for testing purposes.


#2: Boot

When booting you dont need to change any settings, just hit enter and let it load. If everything went fine you will land as user tc inside /home/tc


#3: Prepare disk

First you need your hard drive to be partitioned and formatted. Type fdisk -l to list your disks.

My disk is /dev/sda so just add that to fdisk command and you can edit partitions. Im going to use just 1 partition without swap for this demonstration. You can add boot and swap partitions as you would normally do in Linux installations. Check how to turn swap partition in Tiny Core tutorial. Note that we must use sudo command to be able to write to disks.

Type n to create new partition, then type p for primary. Press 1, then hit [enter] for First cylinder then for last cylinder type +500M
Next we have to add partition type. Press t. Partition 1 will be automatically selected because we dont have anything else, then enter 83. Thats the code for Linux Partition.
Lastly press w to write changes to disk and exit.

Tiny Core Microcore install to HDD with OpenSSH

Lets create ext3 type filesystem on our new partition. You can see witch one by typing fdisk -l again.

#4: Copy kernel and image

Create directory in /mnt/sda1

Mount /dev/sda1 to that directory

Create boot directory in /mnt/sda1

Mount your USB/CD media with Tiny Core. In my case its device sr0 and I already have directory created under /mnt

Copy core.gz and vmlinuz to our hard drive

#5: Download GRUB tce extension

You must be connected physically to network. Assuming you are lets start extension browser:

Press s for search and type grub and hit enter. We will need grub-0.97-splash.tcz. In my case its 1. so hit 1, then q and i to install that extension on your filesystem. After download is done press q.

Now we need to copy grub files to our hard drive

#6: Configure and install GRUB

We have to create menu.lst file inside /boot/grub on our hard drive.

Save and quit :wq

Installing GRUB from this point is simple just type

Inside GRUB select root by typing root and partition number. In our case its very basic:

Add one more directory so after reboot we can save our tce extensions.

If everything went fine you should be able to reboot the machine and boot inside Microcore without media. Lets unmount our disk and do first reboot.


至此TC linux安装结束。

关键是!我发现硬盘还是占了33MB!!!!可能各种解压,安装后就是这么大吧。不要太贪心,已经很小了。
笔者后面的部分也正是我需要的——如何在Text Based system下安装ssh




#7: Tiny Core Microcore with OpenSSH

Lets install OpenSSH the same way we did GRUB.

Press s then type openssh and select 1. Press q then i for install. After fetching and installation press q.

Copy default server configuration file

Start sshd deamon

For the first time server will generate public and private keypairs and it will take few seconds. To make configuration persistent we have to edit /opt/.filetool.lst

Edit your hostname on boot time in /opt/bootsync.sh

Add sshd to startup script /opt/bootlocal.sh

Create password for you user tc

Finally save backup

#8: Microcore OpenSSH connection test

Find out your IP

Tiny Core Microcore install with OpenSSH

Tiny Core Microcore install complete.


=============================     这个网站上还是有很多有用的文章的        ===============================================

http://blog.matchgenius.com/category/linux-2/

  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值