Easy way to setup persistent Backbox Live Medium (Mac supported!)

Started by cyclex25, December 18, 2015, 12:05:43 PM

Previous topic - Next topic

cyclex25

this guide intents to keep things beginner friendly, so no terminal involved here, just plain simple GUI stuff.

What you will need

- latest Ubuntu on bootable live media or VM (i guess VM should be fine, i went the live way)
- destination medium to write backbox to (at very least 16GB recommended.)
- latest backbox iso (might wanna download this from within ubuntu/livelinux)

i wont elaborate further on this cause google pretty much covers anything you need to know. you may try different ways like doing the stuff in a VM. which should be cool anyways. worked fine with kali, never tried with backbox as live instantly worked using the startup media creator. i know ppl reported issues using this, anyways, i ran into lots of issues and im sure it works well using any system as long one follows EXACTLY what we are going to do here.... the reason i used ubuntu was simply that it is running smooth on any mac without any issues. i use 15.10.... just sayin. just get any livelinux including gparted and startupdisk creator!

Going Ahead

here we go, first boot your ubuntu live medium. i use my phone for this, as its the most convenient way to me if you have no hub around and use one of these stripped down macs as i do.... feel free to check drivedroid.

i suggest your destination medium is plugged in. now go to dash and type gp and hit enter. this should throw up gparted partition editor. we gonna use this tool to format our dest. medium.

CAUTION!! BE AWARE OF WHAT YOU ARE DOING

this is the part which is easy, anyways could do serious harm to your system if you dont watch exactly what you gonna choose and click. it makes things easier than terminal, anyways its the same efficiency!

head to the upper right box showing sda drive and chosse the dest. medium. if any partitions left on it, select partition, click partition button, unmount. repeat for all partitions.

select partition, click delete button, confirm immediately. repeat for all partitions. (one after another or you may run into errors!)

you should be left with nothing but grey unallocated space.

now go to device button, select create partition table, confirm msdos. click the green plus now or head to the partition button and create new FAT32 partition. no need to change anything. for now, we gonna format the whole medium (i.e. all the unallocated space ;)) to FAT32, cause this is what the StartupDiskCreator loves ^^ for convenience you may/should apply a label.

thats it, your medium should now be fully prepared to receive the image :) close gparted, go to dash and type startup disk creator and hit enter.

!! its important that you close gparted before heading to this part !!

Carry on

this is the fun part, which should be easy and run off smooth if done right. head to the backbox iso file and place it on your desktop. just did this to avoid any permission issues, which sure can occur if the image is saved on another external media or similar. better put it onto your desktop. if its too late and you already experience perm errors, im sorry i wont go deeper into this. you could chown rights and try other things, but this would involve terminal and i dont want to cover this here to keep things easy as it can be....

so if its too late, download backbox using the linux you actually run to do this stuff here :) take the downloaded file and put it to desktop.

in any case, you want that iso on your desktop. just for convenience. startup disk creator should recognize the iso and throw it up in the source image box. if not, click other, head to desktop, choose iso, confirm. ensure the backbox iso is selected! otherwise you might end up writing the ubuntu image to the dest. medium ^^

now in the box saying "disk to use" choose your freshly formatted dest. medium. BEFORE confirming to make the startup disk, select the "discarded on shutdown..." option. i know this sounds weird, its right. trust me .... ^^ 

STILL DO NOT CONFIRM!!

now for the tricky part :)

adding persistence

you still should not have confirmed to write the image to disk. this has one particular reason. startup disk creator will write the image do disk, resulting a read only medium. but as we need to edit the grub config file it should be accessable and writable. so one easy workaround is this:

have an instance of file-manager or nautilus open. focus the devices part and watch your mounted backbox volume. it should still be empty at this point or you did not follow my advice and just hit "make startup disk" anyways ..... i seriously hope you did not, or you may have to start over again. ^^ 

i will explain now what we gonna do as you need to do that fast, better to know upfront. when we gonna click that button now, startup disk creator will start to write the image to the medium. it does not need any help, nothing else needed, so you may fully concentrate on this now.

instantly on hitting the button, several files and folders should appear of which one is important for now! while its still writing the image open the boot folder on the dest. medium, open grub folder and double click grub.cfg

drag to top of the screen to get fullscreen size. find the line that says:

menuentry "Try BackBox without installing" {
   set gfxpayload=keep
   linux   /casper/vmlinuz.efi  file=/cdrom/preseed/backbox.seed boot=casper persistent quiet splash -- cdrom-detect/try-usb=false noprompt
   initrd   /casper/initrd.gz
}

and add persistent, just like shown above. to get the line fast focus on the left side of text and the word menuentry. its the first line of menuentry lines and should be easy to find when watching fullscreen. click save or ctrl+s and exit. finish this before the imaging process is finished. otherwise the file cannot be saved as the medium is unmounted and read only ;)

again.... finish this before the imaging process ends!!

Hit that damn Button

hit the button when you feel superhero enough to. you may google grub.cfg and read through it so you may find the line faster. i recommend getting a glimpse of that file, not needed though. anyways beneficial to have a basic understanding of what it does and howto alter it.

still adding persistence

now another tricky part. i know startup disk creator said you may use it and reboot... which is cool n all, anyways the persistent command does not work if theres no space to write persistent stuff to.... just like ubuntu, backbox is configured to look for a casper file or partition to add persistence, which startup disk creator would have created if we would not have chosen the "discarded on shutdown" option. the reason we did this has several benefits...i.e.

- we can create a casper partition instead of a file
- thus we can create casper bigger than 4gb
- we can shrink the OS partition to image size

so to get the full joy of this, again go to dash type gp and hit enter. select the backbox drive. if it is not, unmount it. select shrink and drag the right side all to the left and confirm. now you should again be left with unallocated space. hit plus sign again or head to partition button and select "New". create EXT4 partition, label it casper-rw and confirm.

close gparted and take a breath :) your persistent live medium is ready to go now, just some tweaks needed inside backbox. so feel free to restart and point to the backbox medium on boot. on a mac this is simply holding down option key on startup. no clue on actual windows, ditched that more than decade ago. but remember it was any of the F keys to get into boot menu. might be that one has to change boot order on windows machines. not sure though, depending on version n stuff.

this has nothing to say about the functionality of this tutorial. just ensure using the right version for your system ;) as running on my mac, EFI shouldnt be an issue.

Tweaks Needed

to be able to use the persistent version of your backbox, simply boot from the medium you just created and go to "all settings"....never mind anything else for now, cause it will be lost once you reboot. again, this step is crucial to be able to use your persistent live system. so do this upfront :)

now in the settings menu head to the "users and groups" category. click add and create a new user. setup to your liking, choose account type "administrator" and set password. its on your own, but i guess we all agree this to be asked on login ^^ go to advanced settings/user priviliges and check all boxes.

logout!

now you should face the lockscreen :) login with the stuff you just created. one very last thing to do to avoid annoying errors and startup issues, not getting into your created account.... when you logged in, head to file-manager and click filesystem. select "home" -> rightclick "open folder as root" ..... select "backbox" folder and do a rightclick-> secure delete. never mind, it will be rewritten, just kicking out the default user and ensuring you are able to login to your created account. if you don't, backbox will always login the default (backbox) user, without asking for credentials, except you do sessions and ask for these on login. been not appealing to me....

remember: you can't erase the default users account, it won't appear selectable! anyways just erasing its home folder has been sufficient. don't fiddle around with other things, it will most likely leave your installation unusable :)

Thats it!!

chakka comrade, you successfully setup up your new favourite pwn-medium. just a reminder, this is no installation!! so no upgrades needed... weither on terminal, nor software package manager nor elsewhere. simple apt-get update should cover things and keep you on the line. i.e.

NEVER DO

dist-upgrades and/or bad attempts to clean up folders and put together stuff that seems anything.... it does exactly that: "seem"

i have to say i stick to backbox cause of its ease of use and running out of the box. on a mac one faces some issues, anways nothing one cant solve, even if new to terminal usage! basically thats about it. everything should be running fine now. for occuring issues you just have to google, cause i know about issues which anyways have nothing to do with running live or not, its basically stuff that occurs anyways. your backbox should be running smooth, should ask your created account on startup, should save data to created casper partition etc. if it does not, you simply missed the point somewhere and should start over again :)

again, mainly this should be running as is. no fiddling around needed!!

hope this kinda helped, cheers   ;D

refer:

http://www.ubuntu.com/download/desktop
https://www.backbox.org/downloads
http://softwarebakery.com/projects/drivedroid
https://www.kali.org/tutorials/emergency-self-destruction-luks-kali/