Thursday 24 March 2016

The final semmester of year 1

Sad face :( 

Who would have thought 21 weeks could go so fast.

Happy face :)

Despite our ever so slightly cramped time frame and manic rush to get a powerpoint together, it seems the group and myself did it. Our presentation had lots of useful goodies, such as hacking techniques, digital forensics and HMAC... no doubt some of this will appear on my blog a little later.

It's been a little cray cray, but I've learnt a lot. I ended going from somebody being scared of linux, to somebody who uses it as a daily driver. Sure, if you're stuck on combersome windows, it's a change but a well worth it one.

I've learnt not to push to the main thread of github repo without checking the code works first... oh and on that note, I also learnt the hard way writing notes helped. I got so into some code (without commenting) it was easier for me to rewrite the whole program that actually work out what the heck I'd written.

Backup. Backup and Backup. So when your BRAND NEW £1300 laptop HDD dies, your things are quickly accessible. FYI - think twice before getting an MSI laptop too.

Never rely on a Mac in an important presentation, it probably won't work. Just... don't rely on a mac (if it works, it probably is only useful for drawing pretty pictures)

Question your lecturers. Unless they give you nasty looks.

Oh. And have fun in the first year.

Monday 21 March 2016

Installing native linux

Installing linux on an Acer Chromebook C730

Any Linux user can usually recommended it for it's super efficient CPU usage and RAM usage ... and even if you can't, because it's linux, you can usually do some fine tuning.

Those of you who have installed linux natively, good job, but lots of us are stuck with using crouton. There's nothing wrong with that, but this usually involves a laggy chromeOS experience and your crouton Linux install can eat into your RAM. When you've got a chroot running with a GUI, you're only left with about 1GB of RAM to play with on either side.

This is where running native linux comes into play. Don't for a minute think you're making a sacrifice in doing this, you've still got access to chrome so all those chromeapps and themes you used are still available. Plus all the other goodies that come with linux!

I'm sure if you haven't got a C730, your steps aren't doing to vary that much, but I'm not responsible for anything.... even if you're trying it on a C730.

Prerequisites:

  • Access to a Windows PC 
  • Developer Mode enabled
  • A USB thumb drive (4GB or more is recommended) 
  • Your write protection screw removed (google for a guide)
  • Common Sense
  • A little bit of luck
Getting started:
If you're running a C730 and you've tried to running linux, you've probably guessed the reason for crouton is because the BIOS that ships with these laptops doesn't support booting off a USB. We need to remove the write protection screw and flash a new BIOS to do this. 

PREPARE TO LOSE YOUR CHROMEBOOK DATA

Flashing the new BIOS: 

We are basically going to follow this guide here

  1. Hit Cntrl+Alt+T to get to a developer shell
  2. Type 'shell' to get to a shell
  3. AGAIN, I AM NOT RESPONSIBLE IF THIS DOESN'T WORK
  4. Use this code:
cd; rm -f flash_chromebook_rom.sh; curl -O https://johnlewis.ie/flash_chromebook_rom.sh; sudo -E bash flash_chromebook_rom.sh

(I found it easier to seperate each command, depending on your configuration, some may not be necessary)


Using the code above will give varying outputs, depending on your model. For my C730, I hit option 2. You basically want the option that mentions about modifying. This script tends to be fairly self descriptive on how to use when you first run it. 

You should see the message mentioning if this has worked, you should successfully be able to restart. It's a lie, so now is the time to get everything you need off your chromebook. Make sure you can access this guide on your secondary computer accessing windows as your chromebook is going to be out of action for a bit. 

DO NOT PANIC! 

You will probably certainly find your chromebook no longer boots into ChromeOS. However, when you turn it on, you should now get into SeaBIOS. You were warned you'd lose everything. 

Creating a bootable linux USB:

Switch to your Windows PC :) 

Next we need to create a linux usb. Now, I highly recommend Rufus or anything that will use a DD imaging process, which copies sector by sector. If not, you may get an error saying a live file system can't be found. I went for Rufus; it's free and easy. You can grab it here

It should take no installing and should just run. It may ask to check for updates, select as you wish. When you get into the program, you should see the little image of a disk (right hand side, half way down the window). Hit it. 

You may want to do some Googling about what distro you like best. I know arch works, but right now I'm using GalliumOS for several reasons:
  • Nice graphical install 
  • Based on Xubuntu
  • Uses XFCE. 
  • Based for ChromeOS hardware and included patches that other distrubutions might not. 
  • Grab a link here
UPDATE: Gallium is the only OS I've tried that has full support for key mapping and touchpad for the c730. Gallium also comes with a pre-configured powertop to get the most juice from your chromebook. 

Select your downloaded ISO in explorer window and hit okay. Rufus will do the rest of the options for you. When you click start, Rufus will mention something about grub, just click okay. When it asks you about the mode you want to write in, select DD. You'll find this is the one below the recommended option.


Installing linux:

This bit is a little tricky. I found my chromebook to be very temperamental. I suffered keyboard freezes or no response, not seeing my USB drive or skipping to boot to the first HDD. 

If you experience this problems, it a bit hit and miss, but it's an art. Here are some things that worked for me:
  • Booting with the USB in and then doing a cold shutdown
  • Doing a cold shutdown
  • Putting my USB stick in quickly after boot
  • Going full crazy and hitting every key on the keyboard
  • Crying (it helps) 
Depending on the distro you selected, your install process will be different. Gallium is very nice and smooth. When you come to the time where you select what disk to install on, it should be easy enough to work out which disk it is by size. Select 'Use the whole disk option' which will overwrite the existing chrome installation. 

Problems:
If you have problems, Google is probably your first port of call. I'm not expert and these are the steps that worked for me through experimenting. It's easy to ruin your chromebook or brick it, so bear that in mind and don't rush the process or you're playing with fire. If you can't find anything or need any of the steps clarified, feel free to comment below.