名词解说
另外有一些很特殊的例子,是黑客文化极端介入政治,导致产生的各种政治和宗教流派。例如飞天面条教,就我所知有不少geek程序员加入了恶搞行为,甚至参与了网页制作或线下活动。另外一个不得不提的和黑客文化有关的政治事务则是海盗党。海盗党的主张和hacker挑战权威,自由万岁的想法完全一致。不同的是,hacker(此处取褒义)以技术手段,破解他们认为非法的数据。而海盗党则以政治运动和政党体系为手段,推进政治改革。
名词解说
另外有一些很特殊的例子,是黑客文化极端介入政治,导致产生的各种政治和宗教流派。例如飞天面条教,就我所知有不少geek程序员加入了恶搞行为,甚至参与了网页制作或线下活动。另外一个不得不提的和黑客文化有关的政治事务则是海盗党。海盗党的主张和hacker挑战权威,自由万岁的想法完全一致。不同的是,hacker(此处取褒义)以技术手段,破解他们认为非法的数据。而海盗党则以政治运动和政党体系为手段,推进政治改革。
最近整XEN,出了一个奇怪的错误。
Traceback (most recent call last):
File "/usr/lib/xen-4.0/lib/python/xen/xend/server/SrvDaemon.py", line
335, in run
xinfo = xc.xeninfo()
Error: (22, 'Invalid argument')
去年我写过一篇freenas和解决方案,今年我又测试了一下,发现这玩意更加完善了,更企业化了,也更不适合玩玩了。今天写一下大概的步骤,供需要的参考一下。
废话不说,上干货。先装一下syslinux,genisoimage,kvm,debootstrap,squashfs-tools。
$ mkdir debcd
$ cd debcd
$ mkdir isoroot
$ cp /usr/lib/syslinux/isolinux.bin isoroot/
$ cat > isoroot/isolinux.cfg << "EOF"
prompt 0
default linux
label linux
kernel vmlinuz
append initrd=initrd.img
EOF
$ cp /boot/vmlinuz-3.2.0-1-amd64 isoroot/vmlinuz
完成上述步骤后,你就准备好了一个基础的iso镜像文件系统,并有了一个基础的引导模块和内核。现在,我们尝试把这玩意烧到iso上,并且测试一下。
$ genisoimage -o output.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table isoroot/
$ sudo kvm -cdrom output.iso -m 512
如果没法装kvm,换成qemu。屏幕会停在内核引导过程中——因为你没有initrd.img,所以在isolinux.cfg中指定的initrd就不正确。下面我们会设法弄一个initrd.img。
$ cp -a /etc/initramfs-tools/ initramfs
$ mkinitramfs -d initramfs -o isoroot/initrd.img
$ genisoimage -o output.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table isoroot/
$ sudo kvm -cdrom output.iso -m 512
现在看看?你应该能看到有initrd被加载上去了,但是很可惜,没有root,因此也无法启动。所以下一步,我们需要弄一个root。
$ mkdir sysroot
$ sudo debootstrap –arch amd64 stable sysroot/ http://localhost:9999/debian/
$ sudo chown -R user.user sysroot
$ mksquashfs sysroot isoroot/rootfs -all-root
把上面的源换成你喜欢的——我用approx做了一个缓存,所以一直使用这个缓存进行加速。在脚本执行完后,你会有一个压缩为squash格式的rootfs,可以作为root。但是这个root有两个缺陷。1.不能直接mount。2.即使mount了,启动的时候也会因为只读而挂掉。所以你需要做一点调整
$ cat >> initramfs/modules << "EOF"
squashfs
aufs
EOF
$ cat > initramfs/scripts/local-premount/iso << "EOF"
#!/bin/sh
case "${1}" in
prereqs)
echo 'iso script run'
exit 0
;;
esac
mkdir /cdrom
mount -t iso9660 /dev/sr0 /cdrom
mkdir /cdroot
mount -t squashfs /cdrom/rootfs /cdroot
mkdir /shadow
mount -t tmpfs -o size=128m none /shadow
mount -t aufs -o br:/shadow=rw:/cdroot=ro none /root
EOF
$ chmod +x initramfs/scripts/local-premount/iso
$ mkinitramfs -d initramfs -o isoroot/initrd.img
$ genisoimage -o output.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table isoroot/
$ sudo kvm -cdrom output.iso -m 512
好,现在再make clean,make test,光盘基本就OK了。
root密码多少?我怎么知道你的root密码呢?用sudo chroot sysroot切换到自己的系统里面去改。另外,你可能需要安装一些软件,这时候记得把/sys /proc挂到chroot里面。还有记得调整一下/etc/udev/rules.d/70-persistent-net.rules,把主机里面的记录删掉(或者干脆删掉文件)。调整/etc/network/interfaces,把以下内容加进去。
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
基本来说,可定制的引导系统就是这样。不过这个系统有以下几点需要注意:
1.可写入数量只有128M,如果写多了就完蛋。
2.128M全在内存中,内存不足完蛋。
3.一次一次生成很麻烦,我用的是make。
TARGETS=isoroot/initrd.img isoroot/rootfs
all: output.iso
test: output.iso
sudo kvm -cdrom $^ -m 512
clean:
rm -f output.iso $(TARGETS)
output.iso: isoroot/isolinux.cfg isoroot/vmlinuz $(TARGETS)
genisoimage -o $@ -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table isoroot/
isoroot/initrd.img: initramfs
mkinitramfs -d $^ -o $@
isoroot/rootfs: sysroot
mksquashfs $^ $@ -all-root
4.可以用一个dsvc保存中间结果,我用的是git。下面是gitignore。
*.iso
isoroot/vmlinuz*
isoroot/initrd*
isoroot/rootfs*
sysroot
别紧张,我不是要progress Linux,这是一种新的distribution(算是吧)。 http://progress-linux.org,是一个基于Debian的dist。
为什么要有这个dist?其实严格意义上说,这不是一个完整的dist。不同于Ubuntu,这个dist可以完全的寄生在Debian stable(squeeze)上面。你不需要真的去官网上下载一个ISO,然后安装。只需要安装Debian stable,然后加入 Progress-Linux的source就好了。如果你胆敢在Ubuntu上这么干,只会把系统弄的一团糟。当然,直接下载Progress-Linux的安装ISO也是可以的,这个ISO基于Debian Live,作者(Daniel Baumann)本人也是DD,是Debian Live的主要作者之一。
为什么要这样?因为Debian是以严谨到变态而闻名的系统。例如,mdadm这个包有一个很小的不便。每个月当检查RAID的时候,会发一封mail。如果你有一堆电脑需要管理,这件事情就非常烦人了。要修正这个问题,只需要在其中一个脚本中加入参数-q。但是Debian修这个bug修了9个月。因为具体的包维护者并不是很关心这个事情(低优先级),而Release Term需要确保这个bug必须先在Sid中修复,确认没事了(基本是没问题的,只加一个-q而已),再修复testing的,最后修复stable的。于是,你的邮箱要被一堆垃圾持续淹没9个月。
Progress-Linux就快多了。
但是为什么要做成dist呢?
Debian的模式设计,是方便fork,而严格控制release的。Debian的版本库更新要很多条件,例如符合DSFG(也就意味着符合一系列的开源授权协议),更新的时候首先作用于SID,Release Term说了算等等。DD也没有权利要求更新Debian stable中的包,他必须申请Release Term批准。想想也能明白,如果真的每个DD都能直接更新包,那才天下大乱了。我们不能绕过Release Term去解决问题,也不想让这些问题留着。
那么怎么办?只有自己做一个仓库。Debian鼓励这么做(有很多dist就是这么做的),但是这时就不能用Debian的名字,因此作者才做了一个新的dist。DSFG这时变成了一个优势,Debian的所有包,都满足DSFG的第8条,“不仅仅对Debian授权”,可以直接应用。
因此,其实Progress-Linux是一个基于Debian的改进。更快的bug fix,更多的backport,更少考虑版权问题。当然,限于作者关心的包。另一个激动人心的特点是, Progress-Linux的包和backport包不会碰撞,因此使得stable可以简单的安装很多新的包。如果你喜欢,可以在安装系统后加入他的source,作为系统的改进。但是不要指望有什么实质性变化,都是一些细节改进而已。如果你希望知道几个例子,可以看这个页面(http://www.progress-linux.org/project/about/)。
也许你希望使用一个中国区的mirror来做这个事情(这样更快,也省去中间的一些其他麻烦),http://mirrors.ustc.edu.cn是debian中国区域的主镜像(即http://ftp.cn.debian.org),这个节点已经完成Progress-Linux的镜像。
Relax, I don't mean to progress Linux, it's a new distribution (kind of). http://progress-linux.org, a new dist based on Debian.
Why people made this dist? Technically, it is no a fully dist. Unlike Ubuntu, this dist can totally on the top of Debian stable(squeeze). You don't need to download a ISO from website and install. Just install Debian stable, and add source of Progress-Linux. It will be done. If you do something like that under Ubuntu, it will destroy your system. Even though that's possible: Progress-Linux install CD is based on the Debian Live (the main author of Progress-Linux, Daniel Baumann, is a Debian Developer, and he is the main person behind Debian Live).
Why? Because Debian is a preciseness dist. For example, the package mdadm had a little tiny inconveniences. It will send you a Email When check RAID every month. So if there are huge amounts of computers, it will be annoying. To fix it, one of the scripts need to be added a extra parameter '-q'. But it toke 9 months to fix it. Because maintainer don't care much about this issue, and Release Term insist this bug MUST be fixed in Sid first, then testing, finally stable. So your mailbox will be submerged under log reports for 9 months.
Progress-Linux is faster.
But why new dist?
The design of Debian, is easy to fork, but strictly in release. There are many of conditions to be met to upgrade some package, like DSFG (which means a series of open source license), upgrade in Sid first, Release Term make the decision, etc. Never, a DD can update a package in Debian stable directly. He has to ask approval from the Release Term. If every DDs can update package in stable directly, that will be the hell. DD can't cut through the Release Term, and we can't wait for the issues.
What's gonna do? Make a new repository! The Debian project encourage you to do so (and many dist do), but new repository can't use the name of Debian. So the author of Progress-Linux made a new dist. Now, DSFG is a advantage. Every package in Debian is meet No.8 rule of DSFG, License Must Not Be Specific to Debian.
So, Progress-Linux is a improvement based on Debian. Faster bug fix, more backport packages, less license considering. Of course, that only work for the packages author care. Another exciting fact is, all the packages in Progress-Linux and it's backport will not clashing. It help stable to install many new software easily. If you like, you can add it's source for an enhance. But don't expect too much, it all above details. If you wanna know some of them, try this page (http://www.progress-linux.org/project/about/).