hsinchn的聚會手記
2011-01-06
來源: 2011-01-06
LiveUSB 作的話, 給 windows 用的話,要割 FAT32,而且 FAT32 一定要擺前面
usb-creator
grub2 現在可以直接開 iso ,很方便
casper-rw 預設會多這個檔案給 aufs 來掛
http://www.linuxcertif.com/man/7/casper/
http://www.free-fly.org/cnblog/?p=105
GPartd 可以 resize 分割區
syslinux 的話, partition一定要擺最前面, grub2則可以載入到後面的磁區
2010-12-23
來源: 2010-12-23
解lz
lzma -dc -S .lz /mnt/casper/initrd.lz | cpio -id
解img
gzip -dc /boot/temp/initrd.img | cpio -idmv
壓img
find . | cpio -ov > ./initrd.new.img
find . | cpio -o -H newc > ../myinitrd.img
gzip -9 myinitrd.img
壓lz
find . | cpio —quiet —dereference -o -H newc | lzma -7 > ~/new-initrd.lz
壓gz
find . | cpio —quiet —dereference -o -H newc | gzip -9 > ~/new-initrd.gz
檔案/scripts/casper
fstype=$(get_fstype "${devname}")
if is_supported_fs ${fstype}; then
devuid=$(blkid -o value -s UUID "$devname")
[ -n "$devuid" ] && grep -qs "\<$devuid\>" $tried && continue
mount -t ${fstype} -o ro,noatime,utf8=1,shortname=mixed "${devname}" $mountpoint || continue
[ -n "$devuid" ] && echo "$devuid" >> $tried
if is_casper_path $mountpoint && \
([ "$skip_uuid_check" ] || matches_uuid $mountpoint); then
echo $mountpoint
return 0
else
umount $mountpoint