Скрипт для создания злобного initrd, который сотрёт все разделы на диске, создаст два и отформатирует первый в NTFS в конце заметки. Не запускайте его на своей машинке >:)
----
Sometimes, I have a need to admin an well-known World Evil OS (Windows, yeah). And to do some unattended operations like custom disk partitioning, I've made special initrd that could be booted over network, and do the work. This was simple thanks to febootstrap util. Though, I had to patch it to flawlessly run under root, see bug 528687.
Script that makes an evil initrd that erases all partitions, creates two and formats first to NTFS at the end of post. Be careful not to run it on your machine >:)
----
LANG=C i386 febootstrap fedora-11 fedora-parted file:///home/alex/tmp/repo -i coreutils -i parted -i ntfsprogs -i upstart MAKEDEV -d fedora-parted/dev -x sd{a,b,c,d}{,1,2,3,4,5,6,7,8} febootstrap-minimize fedora-parted cat > fedora-parted/init <<EOF #!/bin/sh /sbin/parted -s /dev/sda mklabel msdos mkpart primary ntfs 0 50% mkpart primary ext2 50% 100% set 1 boot on /sbin/partprobe /dev/sda /sbin/mkfs.ntfs /dev/sda1 /sbin/reboot -f EOF chmod +x fedora-parted/init febootstrap-to-initramfs fedora-parted > initrd-parted.img