wiki:jazz/10-05-23

2010-05-23

Linux

  • [備忘] 解開 initrd.img 的標準步驟 - 6.4 Examining the initramfs contents
         $ zcat /boot/initrd.img-2.6.18-3-686 | cpio -i
    
  • 拷貝 authorized_keys 的快速指令
    jazz@Wdebian:~/.ssh$ ssh-copy-id jazz@192.168.125.2
    jazz@192.168.125.2's password:
    Now try logging into the machine, with "ssh 'jazz@192.168.125.2'", and check in:
    
      .ssh/authorized_keys
    
    to make sure we haven't added extra keys that you weren't expecting.
    

live-helper

  • lh_build 指令會執行三個 Stage,依序為 lh_bootstrap、lh_chroot 與 lh_binary
           lh_bootstrap - create the first stage by bootstrapping a basic debian system
           lh_chroot - create the second stage by customizing the chroot
           lh_binary - create the third stage by generating a binary image
    
  • 如果要用 live-helper 產生 live cd 並且用更多 apt 來源,可在 config/chroot_sources/ 加入 live.chroot 、 live.binary 跟對應的 gpg key 在 live.chroot.gpg 、live.binary.gpg
  • 要額外裝的套件,可以參考 /usr/share/live-helper/lists/ 底下的檔案。然後用 lh config --bootstrap-config FILE 來指定。預設是使用 /usr/share/live-helper/lists/standard
    LH_PACKAGES_LISTS="standard"
    
  • 要額外拷貝進 Live CD 的檔案,可放在 config/chroot_local-includes
  • 必須注意的是若跑過 lh_build 之後才更動 config/chroot_local-includes 的內容,必須下 lh_clean --chroot 把 chroot 目錄清除才能成功地更新檔案內容。當然最乾淨的做法是 lh_clean --purge 會全部清掉(除了 config 目錄外)
Last modified 14 years ago Last modified on May 24, 2010, 1:01:34 AM