(2006-08-06) rescue-bootcd
This commit is contained in:
18
build_initrd.sh
Executable file
18
build_initrd.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# crear la imagen del rootfs
|
||||
dd if=/dev/zero of=file.rootfs bs=1k count=4096
|
||||
mke2fs -F -m 0 -N 2000 file.rootfs
|
||||
|
||||
|
||||
#################################
|
||||
# montar y copiar los ficheros
|
||||
#################################
|
||||
mount -t ext2 -o loop file.rootfs tmp.mountp
|
||||
cp -dRvp rootfs/* tmp.mountp/
|
||||
umount tmp.mountp
|
||||
|
||||
# comprimir
|
||||
dd if=file.rootfs bs=1k | gzip -v9 > rootfs.gz
|
||||
# borrar fichero temporal
|
||||
rm file.rootfs
|
||||
Reference in New Issue
Block a user