上周買了一個(gè)ASUS的ASUS EeeBook X205TA,主要是看到價(jià)格便宜盐固。
本本自帶windows 8 with Bing,用起來可以,但是想到最近一直在看一些linux方面的書卸奉,就想裝一個(gè)linux,不想裝雙系統(tǒng),想裝到U盤中啟動(dòng)拢蛋”恃剩考慮到主要是學(xué)習(xí)用搔预,沒有必要裝很多的東西,搜索了一下小的linux系統(tǒng)叶组,TinyCore ,以前折騰過SLAX
,DSL
等都比這個(gè)還大拯田;Tinycore可以做到10M一下,文檔寫得也可以甩十,就用它了船庇。
由于電腦沒有光驅(qū),那就先用虛擬機(jī)跑吧侣监,下載了VirtualBox,開源的鸭轮,很好,我一直在用橄霉。把TinyCore丟進(jìn)虛擬機(jī)窃爷,很順利的跑起來了。
其實(shí)要不TinyCore從U盤啟動(dòng)姓蜂,官方的手冊也提供了一個(gè)最直接的辦法按厘,推薦用core2usb,一個(gè)開源的工具钱慢,很直接逮京;但是我在EeeBook上用的時(shí)候,一直說我的U盤非空束莫,在我的Mac Air上和window 8 下面快速懒棉,深度格式化都沒有用: 因?yàn)檫@個(gè)U盤原來是用來作為window 8的啟動(dòng)盤,是不是其前面的section有MBR系統(tǒng)導(dǎo)致問題呢麦箍,找到這篇文章
CMD+R
漓藕,the windows flag key +R to running the command line;
Diskpart
list disk
select disk n
clean
是有個(gè)EFI分區(qū),刪除挟裂,還是沒有用享钞,挺奇怪的;反正是抱著要學(xué)習(xí)的態(tài)度,那就麻煩一點(diǎn)栗竖,手動(dòng)來折騰一下暑脆。
進(jìn)入Tinycore.官方手冊還提供一個(gè)工具Tc-install,但是只在core pluse 中有狐肢,我下載的是core添吗,需要手動(dòng)裝,先放一邊份名,用最復(fù)雜的手動(dòng)辦法先來試一下碟联。
手動(dòng)安裝因?yàn)橛幸欢ǖ碾y度,其實(shí)就更有通用性僵腺,對其余的linux等安裝都有一定的參考意義鲤孵。手動(dòng)安裝有三部分:
Partition and formatting
Need to check if BIOS support booting from USB;
Formatting the USB toext2
, there are some command in Linux used here:
df -h
ls -al /dev/sd*
: check and confirm the dev file and mounting point state;
fdisk -l
fdisk /dev/sdb
: use then
indisk
to create one new partitions;a
toggle the partition active the partition as bootable partition;w
to save the change;
mkfs.ext2 /dev/sdb
: make theext2
file systemFiles
There are two files: vmlinuz and core.gz, actually, most of Linux liveCD distro have similar files. For corelinux, we can download the two file from the [WEB SITE]( http:// repo.tinycorelinux.net/4.x/x86/release/distribution_files/), but we can get the files from the ISO file in our Tinycore running on virtual box. There are the commands:
cp -a
copy the file and directory ,-a
means to copy the entire directory;
mkdir /mnt/adb1
mount /dev/sdb1 /mnt/sdb1
, we suppose that the ISO file store on you USB , and you formatting the USB with two partitions :sdb1 with one FAT, and sdb2 with ext2 file system, and the sdb1 can attached to windows or you os x system normally to store the ISO file.
If there is any problem with this when you do in virtual box, just push out the USB in you host machine which maybe running on windows or os x, and then ,in the virtual box menu to select :Device
=>USB Device
=> your USB , you can re-do the last two steps if there is still any problems.
cd /mnt/sdb1
you can check the ISO file in Tinycore, then:
mount -o loop Core-current.iso /mnt/tmp
cd /mnt/tmp
cp -a boot /mnt/sdb2
, after youmount /dev/sdb2 /mnt/sdb2
if there is no such file and directory ,please check the step before.Bootloader
Here, I use the Grub0.9. In Tinycore:
tce-ab
Follow the instruction to install the Grub0.9.
sudo su
**ensure youmount /dev/sdb2 /mnt/sdb2
**
grub-install --root-directory=/mnt/sdb2 --no-floppy /dev/sdb
This install the grub in the sdb MBR, and at the same time, build up directory /mnt/sdb2/boot/grub and cp the files there. After that , you should get message to show like this:
(hd0) /dev/sda
(hd1) /dev/sdb
Enter in grub interactive window by typing grub
.
root (hd1,1)
setup (hd1)
Here, grub-install
just build the device map , and map the SCSI device to HD device , and copy the file to /boot/grub ,actually , it does not write the MBR, need to use setup (hd1)
to really write the MBR , need to take a note to the device in grub has not same name in Linux.
At last, we can edit the menu.lst
or the grub.conf
file under /boot/grub, if no existing , just create one.