-
-
Notifications
You must be signed in to change notification settings - Fork 477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Kali support #148
Added Kali support #148
Conversation
I almost forget I would like to add later a netinstaller pressed.conf combination as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! I have some small comments to make, since Kali is a rolling release distro. Please have a look at them and feel free to comment what you think about my idea! Have nice weekend!
quickget
Outdated
#local HASH="" | ||
local ISO="" | ||
local URL="" | ||
https://cdimage.kali.org/kali-2021.3/kali-linux-2021.3-installer-amd64.iso |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line is here by accident, isn't it? 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes indeed 😅😬
quickget
Outdated
validate_release "releases_kali" | ||
ISO="kali-linux-${RELEASE}-installer-amd64.iso" | ||
HASH=$(wget -q -O- "https://cdimage.kali.org/kali-2021.3/SHA256SUMS" | grep '('"${ISO}"')' | cut -d' ' -f1) | ||
URL="https://cdimage.kali.org/kali-${RELEASE}/${ISO}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Kali is a rolling release distro, it would make sense to always provide the latest ISO instead of one fixed release, to minimize post-install updates. I'd suggest updating the code to do that, like this:
validate_release "releases_kali" | |
ISO="kali-linux-${RELEASE}-installer-amd64.iso" | |
HASH=$(wget -q -O- "https://cdimage.kali.org/kali-2021.3/SHA256SUMS" | grep '('"${ISO}"')' | cut -d' ' -f1) | |
URL="https://cdimage.kali.org/kali-${RELEASE}/${ISO}" | |
validate_release "releases_kali" | |
web_get "https://cdimage.kali.org/current/SHA256SUMS" "${VM_PATH}" | |
HASH=$(head -1 "${VM_PATH}/SHA256SUMS" | cut -d' ' -f1) | |
ISO=$(head -1 "${VM_PATH}/SHA256SUMS" | cut -d' ' -f3) | |
URL="https://cdimage.kali.org/current/${ISO}" |
First, download the checksum file. The current
directory always contains the latest quarterly images. From the checksum file, extract the actual checksum and the ISO filename (which is different for each newly released ISO, of course - see also #146).
You may want to change the "release" name to latest
, as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With that my issue is that first we would need to download hash file determine latest release file name , digest hash and file name into HASH and RELEASE variable , then proceed to the downloading and verifying phase. I would say that's more of an improvement fix later on. Not something I would do at this point, but later i will and thank you for pointing it out.
quickget
Outdated
@@ -143,6 +145,10 @@ function releases_fedora(){ | |||
35_beta | |||
} | |||
|
|||
function releases_kali() { | |||
echo 2021.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to change the release name to latest
if you incorporate my suggested changes from below.
Thank you for your comments . All of them are valid and reasonable. I will make changes later to determine release version. It won't be that hard just need two different cut field when you grep hash value |
Just a small suggestion: besides /current/ for latest stable there's /weekly/ (possible devel release). |
Made changes to get latest release. Thanks for the advices @daPhipz . Point made there @philclifford . I will think about how to do that as well. Might be good for QA testing for sure. Another improvement which i am thinking about. UPDATE: Weekly image added as well. Would like to ask just code revision, if its ugly or not reasonable |
Now, I am somewhat happy with the result. Next idea I had a netinstall and netinstall-unattended. Where you could specify preseed.conf and other scripts to setup the environment. So the netinstall-unattended would download and validate iso and then modify it to look for preseed on ftp/http server. Add example preseed.conf which can be modified by user later or provide variable for path in vm config file where to look for file prepared. Then during install it would be served to the vm. Which is why it's a bit complicated matter as you need to spin up a small service on host even on non-standard port to serve up files to guest. Similar to windows unatended install |
quickget
Outdated
function releases_kali() { | ||
echo latest | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add weekly
here in order to make the weekly ISO builds available ;)
function releases_kali() { | |
echo latest | |
} | |
function releases_kali() { | |
echo latest \ | |
weekly | |
} | |
quickget
Outdated
local SUBDIR="current" | ||
validate_release "releases_kali" | ||
|
||
if [[ "${RELEASE}" == *"weekly"* ]]; then | ||
SUBDIR="kali-weekly" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be personal preference and I might be the odd one out here - and this is very nit picky:
IMO, the code would be easier to understand and more readable if we would check for "$RELEASE == "current"
instead of assigning "current"
to the SUBDIR
variable directly. But as I said, probably just my personal preference ;)
Why are you surrounding "weekly"
with asterisks *
? I haven't seen that anywhere before, and I am curious what it does ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to be honest the asteriks there I have seen it above in the code. I have to double check that. Certainly. I have added current to subdir might be a meaningless effort
Done fixes. There was differences in my local work and the one a pushed. Update: |
* Added Kali support * Support for Kali * remove link left in quickget * made changes to get latest release. * Added weekly iso as well * few typo and clearing up choosing release version * fixing readme about version
I followed previous pull requests. Tested it's working as expected, however room for improvement
The config file name created is
kali-2021.3.conf
, which does not looking as good.The size of the vm by default 16GB, which can be a problem as the system when installed by default takes 12GB. Is there a plan to change that value on creation?