Menu

Need help booting Kali Linux

Moaz Ahmed
2018-07-14
2018-08-24
  • Moaz Ahmed

    Moaz Ahmed - 2018-07-14

    I used the Grub2win GUI and set description for Kali Linux but it didn't work, so I opened the .cfg file and found the code given below. I don't know what to do next, so plz guid me.

    menuentry 'Kali Linux Hotkey=k' --hotkey=k --class debian --class icon-debian {
    set gfxpayload=1366x768
    set reviewpause=5
    set partlabel=Kali-Linux-2018
    getbootpartition label $partlabel
    linux /vmlinuz root=LABEL=$partlabel verbose nomodeset
    initrd /initrd.img
    echo Grub will boot Kali Linux
    echo Boot disk address is $root
    echo The boot mode is Partition Search By Label
    sleep -i -v $reviewpause ; echo
    savelast 1 'Kali Linux'
    echo Grub is now loading Kali Linux
    }

    P.S. I have an .iso file of Kali Linux and want to boot from there.

     
  • Ed  P

    Ed P - 2018-07-14

    You need to choose the ISOBOOT option which will generate code similar to this.

     search -f $iso --set=root
     loopback loop $iso
     linux (loop)/boot/syslinux/vmlinuz from=$iso $boot_parms
     initrd (loop)/boot/syslinux/initrd.xz
    
     

    Last edit: Ed P 2018-07-14
  • Drummer

    Drummer - 2018-07-14

    Hi Moaz,

    I need some more information to help you.

    What happened when you booted? Black screeen? Error messages?

    A screen shot would be be good. Simply saying it "doesn't work" is not at all helpful.

    Also, please run the Grub2Win diagnostics as shown in the help file, zip up the C:\grub2\diagnose directory and send it to me as an attachment.

    Thanks,

    Dave

     
  • stressat

    stressat - 2018-07-15

    Hi. You could erase those lines and manually add menuentry on grub.cfg:
    menuentry "Kali" {
    insmod loopback
    insmod iso9660
    set isofile="/path-to-kali.iso"
    loopback loop (hdx,y)$isofile
    linux (loop)/live/vmlinuz boot=live findiso=$isofile noconfig=sudo username=root hostname=kali noprompt noeject toram panic=5
    initrd (loop)/live/initrd.img
    }
    In my case (Kali iso is kali-linux-kde-2018.1-amd64.iso on /dev/sda2, the fourth partition on first disk, on ISO folder; you must replace with correct name and path):
    menuentry "Kali 2018" {
    insmod loopback
    insmod iso9660
    set isofile="/ISO/kali-linux-kde-2018.1-amd64.iso"
    loopback loop (hd0,4)$isofile
    linux (loop)/live/vmlinuz boot=live findiso=$isofile noconfig=sudo username=root hostname=kali noprompt noeject persistence rw toram panic=5
    initrd (loop)/live/initrd.img
    }
    Another Kali iso image (kali-linux-kde-2018.2-amd64.iso), from second partition on disk, in /dan/Downloads/ISO folder, in Linux ext4 partition:
    menuentry "Kali 2018" {
    insmod loopback
    insmod iso9660
    set isofile="/dan/Downloads/ISO/kali-linux-kde-2018.2-amd64.iso"
    loopback loop (hd0,2)$isofile
    linux (loop)/live/vmlinuz-4.15.0-kali2-amd64 boot=live findiso=$isofile noconfig=sudo username=root hostname=kali noprompt noeject persistence rw toram panic=5
    initrd (loop)/live/initrd.img-4.15.0-kali2-amd64
    }

    If you want persistence you must create a small partition labeled persistence with a persistence.conf file contain /union.

     

    Last edit: stressat 2018-07-15
  • Ed  P

    Ed P - 2018-07-15

    Nice stressat.

    A suggestion, if you add:

    search -f $isofile --set=root

    between your:

    set isofile="/path-to-kali.iso"
    loopback loop (hdx,y)$isofile

    lines

    you won't need the (hdx,y) parm. It's what I do when booting ISOs.

    menuentry " antiX ISO" --class debian --class icon-debian {

     set iso='/ISOs/antiX-16.1_x64-full.iso'
     set bootparms='from=all quiet '
    
     search -f $iso --set=root
     loopback loop $iso
     linux (loop)/antiX/vmlinuz fromiso=$iso $bootparms
     initrd (loop)/antiX/initrd.gz
     }
    
     

    Last edit: Ed P 2018-07-15
  • stressat

    stressat - 2018-07-15

    Thanks Ed, but i like the old Linux way (DIY), it's safer, sometimes I have multiple versions of one distribution on disk (Kali 2018.1, Kali 2018.2, etc)...
    menuentry "AntiX" {
    set isofile='/dan/Downloads/ISO/antiX-17_x64-full.iso'
    loopback loop (hd0,2)$isofile
    linux (loop)/antiX/vmlinuz fromiso=$isofile from=all disable=lx persist_all pdev=sda6 plab=AntiX-Persist tz=Europe/Bucharest nomodeset toram
    initrd (loop)/antiX/initrd.gz
    }

    PS: don't use persistence?

    Dan.

     
  • Ed  P

    Ed P - 2018-07-15

    I always uniquely name my ISOs so multipe versions is not an issue. And for newbies, who may not understand the numbering scheme of Linux verses Windows, IMO it's a safer option.

    As for AntiX and persistence I never got that far with it. Does it require a partition for persistence?

     
  • Ed  P

    Ed P - 2018-07-16

    I use Porteus with persistence, which is Slackware based, but no partition needed. I use the Porteus Save File Manager to create a porteussave.dat file and I create modules of my changes and add them to my Porteus extramods folder.

     

    Last edit: Ed P 2018-07-16
  • Ed  P

    Ed P - 2018-07-19

    So Moaz, did you figure it out or go another route?

     
  • Shreyas Kulkarni

    I tried kali in 3 methods with GRUB2win 1) Via ISO (Yes it did successfully boot but was finiky, I dont remember how I did it back then :v ) 2) From a seperate partition (Most Stable) 3) From external USB in Persistance.
    I'd rather recommend you to install kali in a single SEPERATE disk partition, rather than using isoboot.

     

    Last edit: Shreyas Kulkarni 2018-08-24

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.