Changeset 282
- Timestamp:
- Mar 11, 2007 6:44:34 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/debirf/make-debirf (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/debirf/make-debirf
r281 r282 6 6 cd /srv/debirf 7 7 8 /usr/sbin/debootstrap --exclude=aptitude etch ./root/ http://ftp.debian.org/debian 8 # start by fetching initramfs-tools because they'll be handy 9 /usr/sbin/debootstrap --exclude=aptitude --include=initramfs-tools etch ./root/ http://ftp.debian.org/debian 9 10 10 cd root 11 echo debirf > root/etc/hostname 12 cat >root/etc/kernel-img.conf <<EOF 13 do_symlinks = yes 14 do_bootloader = no 15 do_initrd = yes 16 EOF 11 17 12 echo debirf > /etc/hostname 18 mount -t proc proc root/proc 19 mount -t sysfs sys root/sys 13 20 14 # enter chroot ############################################ 15 chroot . 16 apt-get update 17 echo 'do_initrd = Yes' >> /etc/kernel-img.conf 18 # another modification of /etc/kernel-img.conf to not do symlinks? 19 apt-get install linux-image-2.6-486 20 21 # remove locales? 22 # find /usr/share/locale -maxdepth 1 -mindepth 1 -type d ! -iname 'en*' -exec rm -rf '{}' \; 21 # set $KERNEL_PACKAGE to the path to a kernel .deb if you have one 22 # lying around: 23 if [ "$KERNEL_PACKAGE" ]; then 24 KNAME=$(basename "$KERNEL_PACKAGE") 25 cp "$KERNEL_PACKAGE" "root/root/$KNAME" 26 chroot root dpkg --install "root/$KNAME" 27 else 28 chroot root apt-get update 29 chroot root apt-get install linux-image-2.6-486 30 fi 23 31 24 32 # clean apt? 25 33 if false ; then 26 apt-cacheclean27 rm /var/cache/apt/*.bin28 rm -rf /var/lib/apt/lists/*29 mkdir /var/lib/apt/lists/partial34 chroot root apt-get clean 35 rm root/var/cache/apt/*.bin 36 rm -rf root/var/lib/apt/lists/* 37 mkdir root/var/lib/apt/lists/partial 30 38 fi 31 39 32 exit 33 # exit chroot ############################################ 40 umount root/proc 41 umount root/sys 34 42 35 mv boot/vmlinuz-* ../ 36 mv boot/initrd.img-* ../ 43 mkdir -p extras/boot 44 45 mv root/boot/vmlinuz-* extras/boot 46 mv root/boot/initrd.img-* extras/boot 47 48 # remove/backup locales: 49 mkdir -p extras/usr/share/locale 50 (cd root && find usr/share/locale -maxdepth 1 -mindepth 1 -type d ! -iname 'en*' -exec mv '{}' '../extras/{}' \; ) 51 37 52 38 53 # stupid simple method 39 54 if [ "$METHOD" = 0 ] ; then 40 >etc/mtab41 echo proc /proc proc defaults 0 0 >>etc/fstab42 ln -s sbin/initinit43 find * | cpio -H newc --create | gzip > ../debirf.cgz55 > root/etc/mtab 56 echo proc /proc proc defaults 0 0 >> root/etc/fstab 57 ln -s sbin/init root/init 58 (cd root && find * | cpio -H newc --create | gzip ) > debirf.cgz 44 59 fi 45 60
Note: See TracChangeset
for help on using the changeset viewer.

