blog:linux_on_usb_stick
                | Next revision | Previous revision | ||
| blog:linux_on_usb_stick [2017-07-05 10:40] – brb | blog:linux_on_usb_stick [2017-10-21 14:36] (current) – brb | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| * Fast and large USB 3.0 Drive (Sandisk Extreme 128GB) (INSTALLSTICK) | * Fast and large USB 3.0 Drive (Sandisk Extreme 128GB) (INSTALLSTICK) | ||
| * Any USB Drive with 4GB (STARTSTICK) | * Any USB Drive with 4GB (STARTSTICK) | ||
| - | * Debian Linux 9.0 Live iso copied to a second USB Stick, any brand will do | ||
| * A current full backup of the computer you are using | * A current full backup of the computer you are using | ||
| Installing Debian on a USB Stick with encryption | Installing Debian on a USB Stick with encryption | ||
| - | * Download ISO https:// | + | * Download ISO for the Distribution of your choice: | 
| - | * Copy ISO to the STARTSTICK using '' | + | * MINT is easy to get started and looks great: https:// | 
| + | * Debian is rock solid and easy to install but needs a bit more work to get started: | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * Ubuntu provides an easy start, but has lots of software preinstalled which you may not want: https:// | ||
| + | * Copy ISO to the STARTSTICK using '' | ||
| * Boot your computer with STARTSTICK. You may need to enter the BIOS and choose a temporary startup device and/or add the usb stick to the boot options. If the usb stick is not recognized, it may help to try different usb ports. | * Boot your computer with STARTSTICK. You may need to enter the BIOS and choose a temporary startup device and/or add the usb stick to the boot options. If the usb stick is not recognized, it may help to try different usb ports. | ||
| * When STARTSTICK boots, choose graphical install | * When STARTSTICK boots, choose graphical install | ||
| Line 26: | Line 30: | ||
| Post install work: | Post install work: | ||
| - | * To connect the computer to a wireless network, you will probably need to install non-free drivers. | + | * To connect the computer to a wireless network, you will probably need to install non-free drivers. | 
| - | * To optimize | + | < | 
| + | ... | ||
| + | deb http:// | ||
| + | deb-src http:// | ||
| + | ... | ||
| + | </ | ||
| + | * Then do '' | ||
| + | |||
| + | ===== Optimizing performance ===== | ||
| + | |||
| + | ==== noatime ==== | ||
| + | |||
| + | By default, | ||
| + | |||
| + | Open /etc/fstab and for each mount that is on your USB storage, add a noatime parameter. For example: | ||
| + | |||
| + | / | ||
| + | |||
| + | Becomes: | ||
| + | |||
| + | / | ||
| + | |||
| + | ==== tmpfs ==== | ||
| + | |||
| + | There should be no application that writes data that needs to be persistant to the /tmp directory. Let's move it into RAM so there are no disk reads or writes associated with it's usage. | ||
| + | |||
| + | Append the following to / | ||
| + | |||
| + | tmpfs   / | ||
| + | |||
| + | ==== Kernel Boot Options ==== | ||
| + | |||
| + | This one is purely for appearances. It can be disconcerting if you start up your machine and you get a blank screen for an extended period. This does happen though while the Kernel and InitRAMFS images are loaded from your slower storage. There is a simple alteration that makes Grub output a little imformation to let you know that things are happening | ||
| + | |||
| + | Open / | ||
| + | |||
| + | linux_entry " | ||
| + | " | ||
| + | quiet | ||
| + | |||
| + | We're just going to remove the quiet option: | ||
| + | |||
| + | linux_entry " | ||
| + | " | ||
| + | |||
| + | Note: notice that the ' | ||
| + | Even more output | ||
| + | |||
| + | If you're after even more output so you can watch the kernel go through it's startup, you can turn on verbose output. | ||
| + | |||
| + | Open / | ||
| + | |||
| + | GRUB_CMDLINE_LINUX="" | ||
| + | |||
| + | Add the verbose option: | ||
| + | |||
| + | GRUB_CMDLINE_LINUX=" | ||
| + | |||
| + | Now, use update-grub to apply your changed setting to grub.cfg and restart for the change to take effect. | ||
| + | |||
| + | sudo update-grub | ||
| + | sudo reboot | ||
| + | |||
| + | ==== IO Scheduler ==== | ||
| + | |||
| + | Reference: [[http:// | ||
| + | |||
| + | The default IO Scheduler used by Ubuntu is cfq. Changing this to deadline will see improved | ||
| + | |||
| + | Open ''/ | ||
| + | |||
| + | GRUB_CMDLINE_LINUX="" | ||
| + | |||
| + | Add the elevator option: | ||
| + | |||
| + | GRUB_CMDLINE_LINUX=" | ||
| + | |||
| + | Or, if you added the verbose option earlier: | ||
| + | |||
| + | GRUB_CMDLINE_LINUX=" | ||
| + | |||
| + | Now, use update-grub to apply your changed setting to grub.cfg and restart for the change to take effect. | ||
| + | |||
| + | sudo update-grub | ||
| + | sudo reboot | ||
| + | |||
| + | To see that your new scheduler has taken effect you can query which scheduler is currently in use for a specific device with this command: | ||
| + | |||
| + | cat / | ||
| + | |||
| + | ===== SATA ALPM ===== | ||
| + | |||
| + | To save more power when using sata drives, consider https:// | ||
| + | |||
| + | |||
| + | Ref: http:// | ||
| {{tag>}} | {{tag>}} | ||
blog/linux_on_usb_stick.1499244058.txt.gz · Last modified: 2017-07-05 10:40 by brb
                
                