手斧Linux – 从LFS到Funtoo (2)

第1章 前言

2012年春节前,我开始学习LFS,详尽的LFS手册,让我有依有据地体验了一个系统的构造过程,漫长而劳累。接下来,我开始着迷于另一个问题:如何自己动手从源码开始构造出ubuntu的发行版本。

于是,我从ubuntu的livecd入手,到处寻找相关的信息,试图了解ubuntu的发行版本是如何被煅造出来的。我在网上找到了一些资料:


将一个在硬盘上的ubuntu系统做成LiveCD的详细讲解
http://ubuntuforums.org/showthread.php?t=688872

用debootstrap做LiveCD的相关注解
http://ubuntuforums.org/showpost.php?p=4887531&postcount=65
Build a custom system from scratch using debootstrap

从deb包开始做LiveCD的步骤

https://help.ubuntu.com/community/LiveCDCustomizationFromScratch

This procedure works and can create a bootable Ubuntu LiveCd (along with the automatic hardware detection and configuration) from scratch. You do not need to start from a pre-existing LiveCd. 

手工体验Ubuntu Customization Kit的工作过程

https://help.ubuntu.com/community/LiveCDCustomization
The easiest way to create a custom LiveCD is to use Ubuntu Customization Kit. What follows is the manual way of accomplishing the same.
You might also want to create a LiveCD from an existing installation; in this case, Remastersys is for you. 

将已有的安装做成livecd的工具
http://www.geekconnection.org/remastersys/
Remastersys is a tool that can be used to do 2 things with an existing Debian, Ubuntu or derivative installation.

It can make a full system backup including personal data to a live cd or dvd that you can use anywhere and install.
It can make a distributable copy you can share with friends.  This will not have any of your personal user data in it.

于是,debootstrap进入了我的视野。我想,如果我能从遵循LFS的方法,得到一个干净的编译环境,再依照debootstrap的工作过程,将它的安装工作在得到的编译环境里重现一遍,那么,就能得到一个全完由自己手工编译出来的ubuntu系统了。而最终要达到的目标,应是能在新的环境里具有dpkg的包管理能力,并能编译构造deb包。

但是,几经努力,这个想法失败了。我整理出了debootstrap先后安装了哪些deb包,但我想去编译这些包时,一方面遇上了包依赖关系的循环依赖问题,另一方面,经常为了编译一个deb包,需要不止gcc或新编译环境提供的工具之外的支持。有一些软件包,着实不好处理。如dpkg,在编译的过程中,它还要用dpkg(应是之前安装到ubuntu中的版本)去处理。这样就掉进“鸡和蛋”的问题里了。有一些软件,打上ubuntu的补丁后,对编译环境的依赖变得严重了,而用其orig的版本代码,就能编译。但这样就没了ubuntu的味了。

这个想法很快就陷入了混乱和黑暗之中,不知解决这些困难需要做完哪些工作,也不知最后能否达成目标。于是,我开始检讨这样做是否可行,再努力了解ubuntu是如何开发和发行的。

官网上有个讨论 http://askubuntu.com/questions/82302/how-to-compile-ubuntu-from-source-code ,并不建议从源

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值