终于走到LFS了
时间:2007-03-28 来源:net_liufeng
在LINUX的路上走了三年了,终于走到了LFS,从2.6内核的主系统上编译2.4内核的LFS,这是本周和下周主要的任务,书都翻了好几遍了,前天想在办公室机器上实践一下,无奈LFS需要额外的磁盘空间,俺看了一下fdisk -l 的输出:
[root@localhost ~]# fdisk -l
Disk /dev/hdb: 80.0 GB, 80025280000 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System
/dev/hdb1 * 1 1275 10241406 7 HPFS/NTFS
/dev/hdb2 1276 8287 56323890 f W95 Ext'd (LBA)
/dev/hdb3 8288 8300 104422+ 83 Linux
/dev/hdb4 8301 9729 11478442+ 83 Linux
/dev/hdb5 1276 2550 10241406 7 HPFS/NTFS
/dev/hdb6 2551 3825 10241406 7 HPFS/NTFS
/dev/hdb7 3826 5737 15358108+ 83 Linux
/dev/hdb8 5738 5802 522081 82 Linux swap
/dev/hdb9 5803 8287 19960731 83 Linux
[root@localhost ~]#
本以为到8287就完了呢,狂喜,结果往上一看,乖乖!结束块9729,80G全部用完了,晕,还是回家在VMWARE上做吧,相信全程做完一两次水平应该有所大幅提高。 其实还有个方法,因为俺看了看磁盘的使用情况,想从大空间上分割部分出来,查了一下硬盘使用情况: [root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hdb4 11G 495M 9.8G 5% /
/dev/hdb3 99M 8.2M 86M 9% /boot
none 126M 0 126M 0% /dev/shm
/dev/hdb7 15G 2.1G 12G 16% /usr
/dev/hdb9 19G 816M 17G 5% /var
[root@localhost ~]#
看到/var所在的挂载点/dev/hdb9分区还有这么硕大无比的17G空间,不禁一阵砰然心动,赶快祭出暴强的parted [root@localhost ~]# parted /dev/hdb
GNU Parted 1.6.15
Copyright (C) 1998 - 2004 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License. This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details. Using /dev/hdb
(parted) print
Disk geometry for /dev/hdb: 0.000-76318.054 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 10001.403 primary ntfs boot
2 10001.404 65005.202 extended lba
5 10001.435 20002.807 logical ntfs
6 20002.838 30004.211 logical ntfs
7 30004.242 45002.395 logical ext3
8 45002.426 45512.270 logical linux-swap
9 45512.301 65005.202 logical ext3
3 65005.203 65107.177 primary ext3
4 65107.178 76316.594 primary ext3
(parted)
嘿嘿,然后就对9(也就是/dev/hdb9啦)开始resize了,结果人家说:9正在挂载,不能操作,于是俺看看到底是/var底下的哪个进程在活跃? [root@localhost ~]# ps -aux | grep var
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
root 2238 0.0 0.3 3716 824 ? Ss Mar25 0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
root 2411 0.0 3.6 13188 9372 ? Ss Mar25 0:02 /var/lamp/named/sbin/named
root 4303 0.0 0.2 5520 648 pts/0 R+ 00:13 0:00 grep var
[root@localhost ~]#
哦,原来是xinetd的守护进程号和bind域名服务啊,还是别动了,虽说parterd可以无损分割,可是无法备份还原,风险太大了,放弃。 上周末去甜水园买了本《C高级编程实践》和《LINUX系统编程实践》主要讲的是系统API的调用方法,俺对其中关于chroot的介绍表示强烈的赞成和非常的激动:)终于搞明白了chroot的工作原理了,也终于对GNU这大名鼎鼎的软件设计概念有了个清晰的认识,这么晚,惭愧啊。 今天拿到了Fedora3的四张光盘,明天早上下班回家就先在虚拟机上安装宿主系统,只要编程/开发和基本的工具集,系统装了N次,每次都装GUI,这次终于可以摆脱了,LFS,我来了,哈哈。
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System
/dev/hdb1 * 1 1275 10241406 7 HPFS/NTFS
/dev/hdb2 1276 8287 56323890 f W95 Ext'd (LBA)
/dev/hdb3 8288 8300 104422+ 83 Linux
/dev/hdb4 8301 9729 11478442+ 83 Linux
/dev/hdb5 1276 2550 10241406 7 HPFS/NTFS
/dev/hdb6 2551 3825 10241406 7 HPFS/NTFS
/dev/hdb7 3826 5737 15358108+ 83 Linux
/dev/hdb8 5738 5802 522081 82 Linux swap
/dev/hdb9 5803 8287 19960731 83 Linux
[root@localhost ~]#
本以为到8287就完了呢,狂喜,结果往上一看,乖乖!结束块9729,80G全部用完了,晕,还是回家在VMWARE上做吧,相信全程做完一两次水平应该有所大幅提高。 其实还有个方法,因为俺看了看磁盘的使用情况,想从大空间上分割部分出来,查了一下硬盘使用情况: [root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hdb4 11G 495M 9.8G 5% /
/dev/hdb3 99M 8.2M 86M 9% /boot
none 126M 0 126M 0% /dev/shm
/dev/hdb7 15G 2.1G 12G 16% /usr
/dev/hdb9 19G 816M 17G 5% /var
[root@localhost ~]#
看到/var所在的挂载点/dev/hdb9分区还有这么硕大无比的17G空间,不禁一阵砰然心动,赶快祭出暴强的parted [root@localhost ~]# parted /dev/hdb
GNU Parted 1.6.15
Copyright (C) 1998 - 2004 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License. This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details. Using /dev/hdb
(parted) print
Disk geometry for /dev/hdb: 0.000-76318.054 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 10001.403 primary ntfs boot
2 10001.404 65005.202 extended lba
5 10001.435 20002.807 logical ntfs
6 20002.838 30004.211 logical ntfs
7 30004.242 45002.395 logical ext3
8 45002.426 45512.270 logical linux-swap
9 45512.301 65005.202 logical ext3
3 65005.203 65107.177 primary ext3
4 65107.178 76316.594 primary ext3
(parted)
嘿嘿,然后就对9(也就是/dev/hdb9啦)开始resize了,结果人家说:9正在挂载,不能操作,于是俺看看到底是/var底下的哪个进程在活跃? [root@localhost ~]# ps -aux | grep var
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
root 2238 0.0 0.3 3716 824 ? Ss Mar25 0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
root 2411 0.0 3.6 13188 9372 ? Ss Mar25 0:02 /var/lamp/named/sbin/named
root 4303 0.0 0.2 5520 648 pts/0 R+ 00:13 0:00 grep var
[root@localhost ~]#
哦,原来是xinetd的守护进程号和bind域名服务啊,还是别动了,虽说parterd可以无损分割,可是无法备份还原,风险太大了,放弃。 上周末去甜水园买了本《C高级编程实践》和《LINUX系统编程实践》主要讲的是系统API的调用方法,俺对其中关于chroot的介绍表示强烈的赞成和非常的激动:)终于搞明白了chroot的工作原理了,也终于对GNU这大名鼎鼎的软件设计概念有了个清晰的认识,这么晚,惭愧啊。 今天拿到了Fedora3的四张光盘,明天早上下班回家就先在虚拟机上安装宿主系统,只要编程/开发和基本的工具集,系统装了N次,每次都装GUI,这次终于可以摆脱了,LFS,我来了,哈哈。
相关阅读 更多 +