LinuxSir.Org  
| 网站首页 | 论坛帮助 |

欢迎来到LinuxSir.Org!
您还未登录,请登录后查看论坛,或者点击论坛上方的注册链接注册新账号。


发表新主题 回复
 
主题工具
旧 09-08-29, 16:03 第 1 帖
ServerOnly
 
ServerOnly 的头像
 
 
注册会员  
  注册日期: Aug 2004
  帖子: 338
  精华: 4
 

标题: 升级 lfslivecd-x86-6.3-r2160


需要安装的包:
cdrtools
zisofs-tools

环境变量:
代码:
export WORK=xxxx
本例中 $WORK=/mnt/lfslivecd

需要的脚本:
$WORK/openlivecd
$WORK/closelivecd
$WORK/mklfslivecd
具体如下

$WORK/openlivecd
PHP 代码:
#!/bin/sh

export WORK=/mnt/lfslivecd
cd $WORK

# remount
mount -o loop $WORK/root.ext2 $WORK/root

mkdir $WORK
/root/build
mount 
--bind $WORK/build $WORK/root/build

mount 
-t proc proc $WORK/root/proc
mount 
-t sysfs sysfs $WORK/root/sys
mount 
-t devpts devpts $WORK/root/dev/pts
mount 
-t tmpfs tmpfs $WORK/root/dev/shm 
$WORK/closelivecd
PHP 代码:
#!/bin/sh

export WORK=/mnt/lfslivecd
cd $WORK

#umount
umount $WORK/root/dev/shm
umount $WORK
/root/dev/pts
umount $WORK
/root/sys
umount $WORK
/root/proc
umount $WORK
/root/build
rmdir $WORK
/root/build

#remove history
rm $WORK/root/root/.bash_history
rm $WORK
/root/root/.viminfo

#umount
umount $WORK/root 
$WORK/mklfslivecd
PHP 代码:
#!/bin/sh

export WORK=/mnt/lfslivecd
cd $WORK

# umount
./closelivecd

# compress
mkzftree --F $WORK/root.ext2 iso/root.ext2

# burn cd
cd $WORK/iso
mkisofs 
-----allow-leading-dots --
    
../lfslivecd-x86-6.3-r2160-custom.iso -b boot/isolinux/isolinux.bin 
    
-c boot/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table 
    
-"lfslivecd-x86-6.3-r2160" ./

# transfer
cd $WORK
ftp 192.168.101.1


# remount
./openlivecd 


下面开始具体工作

1. mount ISO

代码:
root[ ~ ]# mount /dev/cdrom /media/cdrom/ mount: block device /dev/hda is write-protected, mounting read-only root[ ~ ]# ll /media/cdrom/ total 383881 -rw-r--r-- 1 root root 32701 Dec 29 2007 README.html drwxr-xr-x 3 root root 2048 Dec 29 2007 boot drwxr-xr-x 2 root root 4096 Dec 29 2007 drivers drwxr-xr-x 2 root root 14336 Dec 29 2007 lfs-sources -rw-r--r-- 1 root root 1610612736 Dec 29 2007 root.ext2 root[ ~ ]#
2. 复制源 ISO 内容

代码:
mkdir $WORK/iso -p mkdir $WORK/root cp /media/cdrom/* $WORK/iso/ -a
如果 root.ext2 有 1.6G 左右,那么:
代码:
mv $WORK/iso/root.ext2 $WORK/
如果 root.ext2 有 400M 左右,那么:
代码:
mkzftree -u -F $WORK/iso/root.ext2 $WORK/root.ext2
3. 更新内容

代码:
cd $WORK ./openlivecd
3.1. lfs packages

代码:
rm $WORK/iso/lfs-sources/*
下载 6.5 所有 package, 放入 $WORK/iso/lfs-sources/

3.2. 6.5 LFS BOOK

下载 LFS-BOOK-6.5-HTML, LFS-BOOK-6.5-XML 解压到 $WORK/root/usr/share/
删除原 6.3 的 HTML 和 XML

3.3. jhalfs-2.3.2

下载 jhalfs-2.3.2 解压到 $WORK/root/home/jhalfs/
删除原 /$WORK/root/home/jhalfs/jhalfs-2.3.1

3.4. 其它

复制一份 kernel-config 及 fstab 到 $WORK/root/home/jhalfs/
(需要一份完备的 kernel-config, 好让 jhalfs 无缝地运行)

准备一份 jhalfs 的 configuration 到 $WORK/root/home/jhalfs/jhalfs-2.3.2/configuration
(configuration 内容见附录)

代码:
root[ /mnt/lfslivecd ]# ll $WORK/root/home/jhalfs total 52 -rw-r--r-- 1 101 101 518 Aug 27 07:57 fstab drwxr-xr-x 13 101 101 4096 Aug 27 11:21 jhalfs-2.3.2 -rw-r--r-- 1 101 101 44458 Aug 26 01:10 kernel-config root[ /mnt/lfslivecd ]#
4. 制作 ISO

代码:
cd $WORK ./mklfslivecd
5. 结束

代码:
cd $WORK ./closelivecd

附录A. 如果需要 opensshd

代码:
touch $WORK/root/.autosshd chroot $WORK/root passwd
附录B. 关于 /media/cdrom/root.ext2 的大小

如果 kernel
代码:
File systems ---> CD-ROM/DVD Filesystems ---> [*] Transparent decompression extension
那么 root.ext2 就是 1.6G, 反之就是 400M, 需要先解压

附录C. $WORK/root/home/jhalfs/jhalfs-2.3.2/configuration

代码:
# # Automatically generated configuration: don't edit # use make menuconfig or make config to make changes # # # --- BOOK Settings # BOOK_LFS=y # BOOK_CLFS is not set # BOOK_CLFS2 is not set # BOOK_CLFS3 is not set # BOOK_BLFS is not set PROGNAME="lfs" RUN_ME="./jhalfs run" # relSVN is not set WORKING_COPY=y # BRANCH is not set BRANCH_ID="" BOOK="/usr/share/LFS-BOOK-6.5-XML" # ARCH_X86 is not set # ARCH_MIPS is not set # ARCH_PPC is not set # ARCH_SPARC is not set # ARCH_ALPHA is not set # ARCH_ARM is not set # ARCH_HPPA is not set # PLATFORM_GENERIC is not set # PLATFORM_WRT is not set # DATA_32 is not set # DATA_64 is not set # DATA_MULTI is not set # PROC_i486 is not set # PROC_i586 is not set # PROC_i686 is not set # PROC_mipsel is not set # PROC_mips is not set # PROC_unknown is not set # PROC_hppa1 is not set # PROC_hppa2 is not set # PROC_EV5 is not set # PROC_EV56 is not set # PROC_PCA56 is not set # PROC_PCA57 is not set # PROC_EV6 is not set # PROC_EV67 is not set # PROC_EV68 is not set # PROC_ARM is not set # PROC_ARM5L is not set # PROC_ARM5B is not set # PROC_ULTRA1 is not set # PROC_ULTRA2 is not set # PROC_ULTRA3 is not set # ABI_32 is not set # ABI_N32 is not set # ABI_64 is not set TARGET="" TARGET32="" PLATFORM="GENERIC" SPARC64_PROC="none" ARCH="" MIPS_LEVEL="" ABI="" ENDIAN="" # BUILD_CHROOT is not set # BUILD_BOOT is not set METHOD="" BOOT_CONFIG="" # GRSECURITY_HOST is not set # LIB_GLIBC is not set # LIB_UCLIBC is not set MODEL="" # KERNEL_26 is not set # KERNEL_24 is not set KERNEL="" SSP=",ssp," ASLR=",aslr," PAX=",pax," HARDENED_TMP=",hardened_tmp," WARNINGS=",warnings," MISC=",misc," BLOWFISH=",blowfish," # CUSTOM_TOOLS is not set # BLFS_TOOL is not set # BLFS_SVN is not set # BLFS_BRANCH is not set BLFS_BRANCH_ID="" # DEP_LIBXML is not set # DEP_LIBXSLT is not set # DEP_TIDY is not set # DEP_DBXML is not set # DEP_UNZIP is not set # DEP_LYNX is not set # DEP_SUDO is not set # DEP_WGET is not set # DEP_GPM is not set # DEP_SVN is not set BLFS_ROOT="" BLFS_XML="" TRACKING_DIR="" # # --- General Settings # # CONFIG_USER is not set DEF_USER="lfs" SET_USER="" # CONFIG_GROUP is not set SET_GROUP="" # CONFIG_HOME is not set SET_HOME="" LUSER="lfs" LGROUP="lfs" LHOME="/home" BUILDDIR="/mnt/lfs" GETPKG=y SRC_ARCHIVE="/lfs-sources" SERVER="http://ftp.lfs-matrix.net/" GETKERNEL=y RUNMAKE=y # CLEAN is not set # # --- Build Settings # # CONFIG_TESTS is not set # TST_1 is not set # TST_2 is not set # TST_3 is not set TEST=0 # NO_BOMB is not set # BOMB is not set # BOMB_TEST is not set # INSTALL_LOG is not set HAVE_FSTAB=y FSTAB="/home/jhalfs/fstab" CONFIG_BUILD_KERNEL=y CONFIG="/home/jhalfs/kernel-config" STRIP=y VIMLANG=y # NO_PROGRESS_BAR is not set TIMEZONE="GMT" LANG="$LANG" PAGE_LETTER=y # PAGE_A4 is not set PAGE="letter" # # --- Advanced Features # REPORT=y # COMPARE is not set ITERATIONS=0 # RUN_ICA is not set # RUN_FARCE is not set # CONFIG_OPTIMIZE is not set # OPT_1 is not set # OPT_2 is not set OPTIMIZE=0 # # --- Internal Settings (WARNING: for jhalfs developers only) # SCRIPT_ROOT="jhalfs" JHALFSDIR="$BUILDDIR/$SCRIPT_ROOT" LOGDIRBASE="logs" LOGDIR="$JHALFSDIR/logs" TESTLOGDIRBASE="test-logs" TESTLOGDIR="$JHALFSDIR/test-logs" FILELOGDIRBASE="installed-files" FILELOGDIR="$JHALFSDIR/$FILELOGDIRBASE" ICALOGDIR="$LOGDIR/ICA" FARCELOGDIR="$LOGDIR/farce" MKFILE="$JHALFSDIR/Makefile" XSL="$PROGNAME.xsl" PKG_LST="unpacked" # REBUILD_MAKEFILE is not set







__________________
If Linux doesn't have the solution, you have the wrong problem.
There are no silly questions, only stupid answers ;^)

此帖于 09-08-30 10:47 被 ServerOnly 编辑.
  ServerOnly 当前离线   回复时引用此帖
旧 09-08-29, 19:10 第 2 帖
ServerOnly
 
ServerOnly 的头像
 
 
注册会员  
  注册日期: Aug 2004
  帖子: 338
  精华: 4
 

写了 XML, 看这里吧:

http://imghch.com/doc/lfs_r2160_livecd.html

此帖于 09-11-26 21:39 被 ServerOnly 编辑.
  ServerOnly 当前离线   回复时引用此帖
旧 09-08-30, 06:54 第 3 帖
d00m3d
 
d00m3d 的头像
 
 
资深版主  
  注册日期: Nov 2004
  帖子: 14,541
  精华: 10
 

感谢 Server 兄分享心得,似乎本篇更值得置顶 :)

原有的 6.5 packages patches list 在此 http://www.linuxsir.org/bbs/thread355492.html







__________________
nO ^^4+73R wH1<h d!5+R0z j00 42E U$1N9 7r% LpHZ 4+ l3457 oN(&
  d00m3d 当前离线   回复时引用此帖
旧 09-09-02, 17:00 第 4 帖
xcrdjn
 
 
 
注册会员  
  注册日期: Apr 2007
  帖子: 59
  精华: 0
 

楼主 厉害 值得学习







__________________
LFS ID Name First LFS Version
21268 xcrdjn 6.3
Linux XcRdJn_LFS_7.0 3.1.0 #1 SMP Mon Nov 14 13:22:21 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
Acer TravelMate 4530
AMD Athlon(tm) X2 Dual-Core QL-64 2.1GHz/#?845?#/2GB DDR2/160G SATA /10G LFS 6.7_64 /10G LFS 7.0_64/ WIN7_64 20G /ATI Radeon HD3200/DVD-combo/

Linux XcRdJn_LFS_6.7 2.6.38.2 #1 SMP Tue Apr 5 00:12:25 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
AMD Athlon II X4 640/ AMD 880G / DDR3 1600 4G /1 T
  xcrdjn 当前离线   回复时引用此帖
旧 09-11-26, 21:00 第 5 帖
actioin
 
 
 
注册会员  
  注册日期: Aug 2004
  帖子: 7
  精华: 0
 

有没有用过的?反馈一声!谢谢!
  actioin 当前离线   回复时引用此帖
旧 09-12-01, 23:28 第 6 帖
loves123
 
 
 
注册会员  
  注册日期: Apr 2009
  帖子: 3
  精华: 0
 

openlivecd中
mount --bind $WORK/build $WORK/root/build
按照
http://imghch.com/doc/lfs_r2160_livecd.html
描述的应该是
mount --bind /usr/src $WORK/root/build
  loves123 当前离线   回复时引用此帖
发表新主题 回复


主题工具

发帖规则
您 [不可以] 发表新主题
您 [不可以] 回复主题
您 [不可以] 上传附件
您 [不可以] 编辑您的帖子

已 [启用] BB 代码
已 [启用] 表情符号
已 [启用] IMG 代码
已 [禁用] HTML 代码
[论坛跳转…]


所有时间均为[北京时间]。现在的时间是 17:05


Powered by vBulletin 版本 3.6.8
版权所有 ©2000 - 2012, Jelsoft Enterprises Ltd.
官方中文技术支持: vBulletin 中文
版权所有 ©2002 - 2011, LinuxSir.Org