亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2038 | 回復(fù): 5
打印 上一主題 下一主題

制作U盤啟動(dòng) [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2010-04-14 12:31 |只看該作者 |倒序?yàn)g覽
USB Linux

系統(tǒng)的啟動(dòng)流程:
        開機(jī)--Bois自檢(硬件檢測)---init 19 ---讀取第一個(gè)可以引導(dǎo)的設(shè)備的MBR--- GRUB讀取grub.conf---grub根據(jù)配置文件加載指定的內(nèi)核鏡像,初始化內(nèi)存盤----初始化內(nèi)存盤驅(qū)動(dòng)必要的硬件,然后內(nèi)核加載----產(chǎn)生第一個(gè)進(jìn)程init ---init /etc/inittab ,判斷運(yùn)行級(jí)別---init 運(yùn)行 rc.sysinit腳本,進(jìn)行系統(tǒng)初始化:讀取fstab進(jìn)行必要的掛載 ----進(jìn)去相應(yīng)的級(jí)別,加載對(duì)應(yīng)級(jí)別的服務(wù)啟動(dòng)腳本,接著rc.local--》根據(jù)運(yùn)行級(jí)別,產(chǎn)生不同的登錄界面

#cat /etc/redhat-release
查看系統(tǒng)版本


制作步驟:
1;備份U盤數(shù)據(jù),再破壞U盤數(shù)據(jù)

        dd if=/dev/sdb of=/tmp/sdb_mbr bs=512k count=1
        意思:假如sdb為U盤的話,讀取sdb的前512k的內(nèi)容,并且存到/tmp/sdb_mbr。即為備份MBR
        恢復(fù)MBR如下
        dd if=/tmp/sdb_mbr of=/dev/sdb

        破壞數(shù)據(jù)如下:
        dd if=/dev/zero of=/dev/sdb bs=512K count=1

        w95 FAT32<-----------------------------------------分區(qū)fdisk用b

        分區(qū)安排:
         /         512M (必須 “打*”)
         swap    256-512M(可選)
         使用剩余的空間作盤U盤使用的分區(qū)(只能在linux使用)

2、在U盤產(chǎn)生系統(tǒng)必要目錄結(jié)構(gòu)

        # rpm   -ivh --root=/mnt --nodeps  /share/rhel_source/Server/filesystem-2.4.0-2.i386.rpm

3、找到必要的工具和命令,安裝到USB

        bash-3.2-24.el5

        基本操作命令 : cp mv ls
        # rpm -qf `which cp`
        coreutils-5.97-19.el5

        系統(tǒng)管理命令:  init  shutdown
        SysVinit-2.86-15.el5
       
        分區(qū)管理命令: fdisk mount
        util-linux-2.13-0.50.el5

        網(wǎng)絡(luò)命令:ifconfig
        net-tools-1.60-78.el5

        進(jìn)程管理命令: ps free top
        procps-3.2.7-11.1.el5

        文本終端下鼠標(biāo)驅(qū)動(dòng):gpm-1.20.1-74.1

        portmap

        帳號(hào)驗(yàn)證相關(guān) : /etc/passwd   ,  passwd  , shadow
        setup-2.5.58-4.el5
        passwd-0.73-1
        shadow-utils-4.0.17-14.el5

        編輯器:vim-enhanced-7.0.109-4.el5_2.4z

        yum install --installroot=/mnt bash coreutils SysVinit util-linux net-tools procps portmap setup passwd shadow-utils openssh-clients vim-enhanced gpm



        -----------------
        可選:
        openssh-server-4.3p2-29.el5
        openssh-clients-4.3p2-29.el5


        安裝完必須同步數(shù)據(jù)一次
        sync

        4、產(chǎn)生一個(gè)initrd鏡像文件
        # mkinitrd --with usb_storage  /mnt/boot/initrd  `uname -r`


        5、拷貝內(nèi)核鏡像和內(nèi)核對(duì)應(yīng)的模塊文件

        # cp /boot/vmlinuz-2.6.18-128.el5 /mnt/boot/vmlinuz

        # cp /lib/modules/2.6.18-128.el5/   /mnt/lib/modules/ -r

        # sync

        5、安裝grub
        # rpm -ivh --force --nodeps  --nopre  --nopost --root=/mnt/  /share/rhel_source/Server/grub-0.97-13.2.i386.rpm

        安裝grub的第一階段的引導(dǎo)程序到mrb里(1-446字節(jié))

        [root@dns usb]# grub-install --root-directory=/usb --recheck /dev/sdb
        grep: /mnt/usb/boot/grub/device.map: 沒有那個(gè)文件或目錄
        mv: 無法 stat “/mnt/usb/boot/grub/device.map”: 沒有那個(gè)文件或目錄
        Probing devices to guess BIOS drives. This may take a long time.
        Installation finished. No error reported.  《————— 看這里
        This is the contents of the device map /mnt/usb/boot/grub/device.map.
        Check if this is correct or not. If any of the lines is incorrect,
        fix it and re-run the script `grub-install'.

        (fd0)   /dev/fd0
        (hd0)   /dev/sda
        (hd1)   /dev/sdb


        # vim /mnt/boot/grub/device.map
        (hd0)   /dev/sdb

        # vim /mnt/boot/grub/grub.conf
        default=0
        timeout=8

        title Usb Linux
        root (hd0,0)
        kernel /boot/vmlinuz
        initrd /boot/initrd


        6、設(shè)置U盤root密碼
        chroot /mnt
        pwconv
        passwd root
        cat /etc/shadow
        exit

        # cp /etc/skel/.bash*  /mnt/root/

        # sync

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2010-04-14 12:47 |只看該作者
學(xué)習(xí)了

論壇徽章:
4
CU大;照
日期:2013-03-13 15:29:07CU大;照
日期:2013-03-13 15:29:49CU大;照
日期:2013-03-13 15:30:192015年迎新春徽章
日期:2015-03-04 09:57:09
3 [報(bào)告]
發(fā)表于 2010-04-14 13:00 |只看該作者
復(fù)雜。。。。直接量產(chǎn) 簡單。。。

論壇徽章:
1
2015年辭舊歲徽章
日期:2015-03-03 16:54:15
4 [報(bào)告]
發(fā)表于 2010-04-14 17:01 |只看該作者
復(fù)雜。。。。直接量產(chǎn) 簡單。。。
dooros 發(fā)表于 2010-04-14 13:00



   

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2010-04-14 17:28 |只看該作者
{:3_188:}

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2010-04-14 17:29 |只看該作者
量產(chǎn)?不會(huì)。。能教教我不?我是新手來著
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP