Tinycore, Virtualbox, USB booting

上周買了一個(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í)就更有通用性,對(duì)其余的linux等安裝都有一定的參考意義。手動(dòng)安裝有三部分:

  1. Partition and formatting
    Need to check if BIOS support booting from USB;
    Formatting the USB to ext2 , 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 the n in disk 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 the ext2 file system

  2. Files
    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 you mount /dev/sdb2 /mnt/sdb2 if there is no such file and directory ,please check the step before.

  3. Bootloader
    Here, I use the Grub0.9. In Tinycore:
    tce-ab
    Follow the instruction to install the Grub0.9.
    sudo su
    **ensure you mount /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.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容