boot systemrescue 1.6.1
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 9 Oct 2010 15:28:42 +0000 (15:28 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 9 Oct 2010 15:28:42 +0000 (15:28 +0000)
lib/PXElator/config.pm

index 010e19e..4bf5816 100644 (file)
@@ -18,7 +18,13 @@ our $mounted;
 our $server;
 our $server_ip;
 
-sub available { qw/katalog debian_live webconverger debirf tinycore nfsroot openvz printer wrt clonezilla ubuntu memdisk vyatta android/ };
+sub available { qw/
+       katalog debian_live webconverger
+       debirf tinycore nfsroot
+       openvz printer wrt
+       clonezilla ubuntu memdisk vyatta android
+       systemrescue
+/ };
 
 sub debian_live {
        my ($ip) = @_;
@@ -264,6 +270,28 @@ label android-1.6-donut
        });
 }
 
+
+# http://www.sysresccd.org/Sysresccd-manual-en_PXE_network_booting
+sub systemrescue {
+       my $ip = shift;
+       my $path = upstream::iso( 'http://sourceforge.net/projects/systemrescuecd/files/sysresccd-x86/1.6.1/systemrescuecd-x86-1.6.1.iso/download' );
+
+       my $dir = "$server::base_dir/tftp/systemrescue";
+       symlink '/usr/lib/syslinux/memdisk', "$dir/memdisk" unless -e "$dir/memdisk";
+
+       client::conf $ip => 'kvm.boot' => "n -cdrom $path";
+
+       pxelinux::config_for_ip( $ip, qq{
+
+default systemrescue
+label systemrescue
+
+       kernel iso/isolinux/rescuecd
+       append initrd=iso/isolinux/initram.igz dodhcp netboot=http://$server::ip:7777/systemrescue/iso/sysrcd.dat
+
+       });
+}
+
 sub in_chroot {
        my ( $dir, $command ) = @_;
        write_file "$dir/tmp/inside.sh", $command;