Skip to content

Commit

Permalink
automatically detect which kernel options to use if -i is used
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Lange committed Mar 2, 2012
1 parent bee7b2a commit 0a67397
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bin/fai-chboot
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,18 @@ unless ($opt_o) {
}

if ($opt_i) {

# check if we use live-boot or dracut inside the nfsroot
if ( -d $nfsroot/live/filesystem.dir/boot ) {
$bopt="boot=live";
} else {
$bopt="aufs";
}

# create config so host will boot the install kernel
$kernelname = "kernel vmlinuz-$kernelsuffix";
$initrd = "initrd=initrd.img-$kernelsuffix";
$rootfs = "root=/dev/nfs nfsroot=$nfsroot boot=live";
$rootfs = "root=/dev/nfs nfsroot=$nfsroot $bopt";
$bootprot = "ip=dhcp ";

} elsif ($opt_o) {
Expand Down

0 comments on commit 0a67397

Please sign in to comment.