3 # initramfs hook for live-boot (Debian Live)
7 # initramfs-tools header
23 .
/usr
/share
/initramfs-tools
/hook-functions
30 mkdir
-p "${DESTDIR}"/usr
/share
/live-boot
31 cp /usr
/share
/live-boot
/languagelist
"${DESTDIR}"/usr
/share
/live-boot
34 mkdir
-p "${DESTDIR}"/lib
/live-boot
37 copy_exec
/usr
/share
/live-boot
/live-reconfigure
/bin
38 copy_exec
/usr
/share
/live-boot
/live-preseed
/bin
41 cp /usr
/share
/initramfs-tools
/scripts
/live-functions
"${DESTDIR}"/scripts
42 cp /usr
/share
/initramfs-tools
/scripts
/live-helpers
"${DESTDIR}"/scripts
45 for FILE
in /lib
/libacl
* /lib
/libblkid
* /lib
/libuuid
* /lib
/libdevmapper
* /lib
/libattr
*
47 if [ ! -e "${DESTDIR}"/"${FILE}" ]
49 cp -a "${FILE}" "${DESTDIR}"/"${FILE}"
53 # udev dependencies (squeeze and newer)
54 for FILE
in /lib
/udev
/*_id
56 if [ ! -e "${DESTDIR}/${FILE}" ]
58 mkdir
-p "${DESTDIR}/lib/udev"
59 copy_exec
"${FILE}" /lib
/udev
63 if [ -e /lib
/udev
/rules.d
/60-cdrom_id.rules
]
65 mkdir
-p ${DESTDIR}/lib
/udev
/rules.d
66 cp -p /lib
/udev
/rules.d
/60-cdrom_id.rules
${DESTDIR}/lib
/udev
/rules.d
69 # Handling other stuff
71 # Configuration: keymap (usefull when using encryption)
72 if [ -x /bin
/loadkeys
] && [ -r /etc
/console
/boottime.kmap.gz
]
74 copy_exec
/bin
/loadkeys
/bin
76 mkdir
-p "${DESTDIR}"/etc
77 cp /etc
/console
/boottime.kmap.gz
"${DESTDIR}"/etc
80 # Configuration: Unique ID
81 if [ -n "${LIVE_GENERATE_UUID}" ]
83 mkdir
-p "${DESTDIR}"/conf
84 uuidgen
-r > "${DESTDIR}"/conf
/uuid.conf
88 if [ -x /sbin
/mount.cifs
]
90 copy_exec
/sbin
/mount.cifs
/sbin
91 manual_add_modules cifs
94 # Filesystem: ext3/ext4
95 manual_add_modules ext3
96 manual_add_modules ext4
99 manual_add_modules jffs2
101 if [ -x /usr
/bin
/rsync
]
103 copy_exec
/usr
/bin
/rsync
/bin
106 # Filesystem: squashfs
107 copy_exec
/sbin
/losetup
/sbin
108 manual_add_modules loop
109 manual_add_modules squashfs
110 manual_add_modules sqlzma
111 manual_add_modules unlzma
113 # Filesystem: aufs/unionfs
114 manual_add_modules aufs
115 manual_add_modules unionfs
117 # Filesystem: unionfs-fuse
118 if [ -x /usr
/bin
/unionfs-fuse
]
120 copy_exec
/usr
/bin
/unionfs-fuse
/bin
124 manual_add_modules nls_cp437
125 manual_add_modules nls_iso8859-1
126 manual_add_modules nls_utf8
127 manual_add_modules vfat
130 manual_add_modules ntfs
133 manual_add_modules ide-cd
134 manual_add_modules ide-generic
135 manual_add_modules ohci1394
136 manual_add_modules sbp2
137 manual_add_modules sr_mod
140 manual_add_modules sd_mod
146 if [ -x /usr
/bin
/eject
]
148 copy_exec
/usr
/bin
/eject
/bin
152 copy_exec
/usr
/bin
/md5sum /bin
155 # busybox and klibc lacks --no-absolute-filenames and --sparse, needed for snapshots
156 if [ -e "${DESTDIR}/bin/cpio" ]
158 # Override already present cpio's, mostly klibc's
159 rm "${DESTDIR}/bin/cpio"
161 copy_exec
/bin
/cpio /bin
164 if [ -x /sbin
/udevadm
]
167 copy_exec
/sbin
/udevadm
/sbin
170 copy_exec
/sbin
/udevtrigger
/sbin
171 copy_exec
/sbin
/udevsettle
/sbin
173 if [ -x /usr
/bin
/udevinfo
]
175 copy_exec
/usr
/bin
/udevinfo
/bin
179 if [ -x /usr
/bin
/wget
]
181 copy_exec
/usr
/bin
/wget
/bin
185 if [ -x /sbin
/blockdev
]
187 copy_exec
/sbin
/blockdev
/sbin
191 manual_add_modules fuse
193 # FUSE filesystem: httpfs2
194 if [ -x /usr
/bin
/httpfs2_ssl
]
196 copy_exec
/usr
/bin
/httpfs2_ssl
/bin
/httpfs
197 elif [ -x /usr
/bin
/httpfs2
]
199 copy_exec
/usr
/bin
/httpfs2
/bin
/httpfs
202 # FUSE filesystem: curlftpfs
203 if [ -x /usr
/bin
/curlftpfs
]
205 copy_exec
/usr
/bin
/curlftpfs
/bin
209 if [ -x /usr
/sbin
/iscsistart
]
211 copy_exec
/usr
/sbin
/iscsistart
/bin
212 #manual_add_modules ib_iser
213 manual_add_modules iscsi_tcp
214 manual_add_modules crc32c