Table of Contents
This blog is my notebook for computer and technology related information, copies of useful webcontent (with refs of course), troubleshooting, general tips and setups that work well for me.
Useful tags:
Blog
Linux on USB Stick
Carrying your private OS with you on an encrypted USB stick is very useful.
Here are my personal notes how I did this. I have written them carefully, however I assume no responsibility for them.
What you need:
- Computer with Ethernet connection 1)
- Fast and large USB 3.0 Drive (Sandisk Extreme 128GB) (INSTALLSTICK)
- Any USB Drive with 4GB (STARTSTICK)
- A current full backup of the computer you are using
Installing Debian on a USB Stick with encryption
- Download ISO for the Distribution of your choice:
- MINT is easy to get started and looks great: https://linuxmint.com/edition.php?id=237
- Debian is rock solid and easy to install but needs a bit more work to get started:
- Ubuntu provides an easy start, but has lots of software preinstalled which you may not want: https://www.ubuntu.com/
- Copy ISO to the STARTSTICK using
dd
or on windows use ''Rufus'' - 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
- Plug in INSTALLSTICK
- Go through the installation questions, choose “Full Disk Encrypted LVM”
- Make sure that you choose the correct drive, e.g. Sandisk Extreme 128GB
- The INSTALLSTICK will be prepared for encryption and erased, which will take some time.
- In the question for GRUB install again make 100% sure that you select the proper drive.
- After that, remove the STARTSTICK and boot into your new system.
Post install work:
- To connect the computer to a wireless network, you will probably need to install non-free drivers. Open
/etc/apt/sources.list
and addnon-free contrib
to all lines aftermain
, like so:
... deb http://mirror.switch.ch/ftp/mirror/debian/ jessie main non-free contrib deb-src http://mirror.switch.ch/ftp/mirror/debian/ jessie main non-free contrib ...
- Then do
sudo apt-get update; sudo apt-get upgrade; sudo apt-get install firmware-linux-nonfree
Optimizing performance
noatime
By default, the ext3/ext4 filesystem updates the access time attribute on a file system object whenever it's read. This results in even the most trivial file reads result in a write operation. Keeping the access time updated is only important for some very specific tasks which we're not likely to come across.
Open /etc/fstab and for each mount that is on your USB storage, add a noatime parameter. For example:
/dev/mapper/vg_root-lv_root / ext4 errors=remount-ro 0 1
Becomes:
/dev/mapper/vg_root-lv_root / ext4 noatime,errors=remount-ro 0 1
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 /etc/fstab:
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
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 /etc/grub.d/10_linux and find the following stanza:
linux_entry "${OS}" "${version}" false \ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_EXTRA} ${GRUB_CMDLINE_LINUX_DEFAULT}" \ quiet
We're just going to remove the quiet option:
linux_entry "${OS}" "${version}" false \ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_EXTRA} ${GRUB_CMDLINE_LINUX_DEFAULT}"
Note: notice that the '\' is also removed from the second line. 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 /etc/default/grub and find the following line:
GRUB_CMDLINE_LINUX=""
Add the verbose option:
GRUB_CMDLINE_LINUX="verbose"
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://tombuntu.com/index.php/2008/09/04/four-tweaks-for-using-linux-with-solid-state-drives/
The default IO Scheduler used by Ubuntu is cfq. Changing this to deadline will see improved performance during times where multiple processes are trying to read/write to disk. You can change the default scheduler for all devices by adding a kernel parameter into grub.
Open /etc/default/grub
and find the following line:
GRUB_CMDLINE_LINUX=""
Add the elevator option:
GRUB_CMDLINE_LINUX="elevator=deadline"
Or, if you added the verbose option earlier:
GRUB_CMDLINE_LINUX="elevator=deadline verbose"
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 /sys/block/<device>/queue/scheduler
SATA ALPM
To save more power when using sata drives, consider https://wiki.ubuntu.com/Kernel/PowerManagementALPM
Ref: http://ghanima.net/doku.php?id=wiki:linuxtips:runningfromusb
Archive
Blog History
2024
September
2023
December
September
May
2022
November
- 29 - Bandplan DARC
June
May
- 13 - AWG m2 Table
- 13 - Kabelfarben
2021
July
February
January
2020
January
August
- 10 - Mac OS X Hotkeys
2019
October
September
May
February
2018
October
2017
December
November
October
August
July
May
April
February
January
2016
October
July
June
May
April
- 22 - Convert OTF to TTF
2015
September
- 10 - Windows 7 Postinstall
- 10 - Infiniality installation on linux
- 10 - Cinnamon (nemo) desktop font color
April
2014
August
- 05 - How to create a Zotero group for cooperation
- 01 - Best software for managing and playing videos and music
April
- 24 - Installing Sage on Debian or Ubuntu
- 24 - Declouding my data
- 24 - Windows 7, disable file open security message for samba fileserver
- 24 - The 'ultimate' bash prompt
- 24 - Converting videos for embedding in Powerpoint
- 24 - bash snippets
- 24 - synergy protocol version woes
- 24 - Configure dns settings in /etc/network/interfaces
- 24 - Ubuntu post install tasks
- 24 - Moving form Dokuwiki blog to Wordpress, and coming back
2013
April
2012
October
September
- 30 - blog:setup_zoneminder_on_ubuntu_12.04_virtual_server
- 28 - Set up private firefox sync server
- 22 - Access encrypted lvm disk from live cd
- 02 - Ubuntu 24h Time display when using en locale
June
April
- 30 - Configure Linux as an Airprint Server
- 17 - Linux adapt keyboard
- 09 - Convert Technisat TS file to mkv
February
January
- 26 - Ubuntu 11.04 fingerprint
- 22 - Installing sage on ubuntu
- 19 - Ubuntu 11.04 vnc access, screen repaint problem
- 16 - Find ubuntu/debian package Simple way to look up what package contains a given file?
- 09 - vmware ubuntu
2011
December
November
October
- 24 - Word 2007 shortcuts
- 17 - Download rtmp streams to mp3 files
- 16 - Keep versioning info of etc edits using etckeeper
- 01 - Remote debian updates using apt-dater
September
- 21 - Word footnotes have undeletable extra lines
- 17 - Badblock check in linux
- 09 - Encrypting tar files using openssl
- 04 - Word Silbentrennung für bestimmte Wörter verhindern
August
- 31 - Replace faulty disk in linux md
- 31 - Convert nero nrg to iso file
- 30 - Enable SDD trim in ubuntu
- 30 - Linux print screen tool with upload shutter
- 28 - Latex picins.sty not found
- 26 - Thunderbird dictionary problem
- 24 - Things to set in ubuntu after installing
- 23 - Use dd to overwrite disk with zeroes, with progress information
- 15 - Apache htaccess for ip or auth based access
- 11 - Quick image upload to imageshack in ubuntu
- 08 - Plugin to check free server memory with nagios
- 06 - Reinstall grub after installing windows xp or windows 7
July
- 26 - Using exiftool to add meta information to jpeg images
- 22 - Ubuntu disable password request after suspend/hibernate
- 20 - Angepasste Nummerierung von Ueberschriften in Word 2007
- 17 - Thinkpad middle mouse scrolling
- 13 - epr.ch mail settings
- 08 - Install flash player in linux 64bit
- 05 - Firefox and Chrom cache on ramdrive
- 04 - Install terminator with built-in quake mode
- 03 - Ubuntu Make logitech G15 special keys work
- 01 - Ubuntu Install handbrake from ppa
- 01 - Debian backup and restore package selections
June
- 26 - Webcam indicator for ubuntu
- 24 - Ubuntu natty not displaying PDF thumbnails on nfs drives
- 23 - Disable BIOS Beep
- 17 - Privacy Tunnel DNS Lookups through socks proxy when browsing
- 04 - Configure apache2 to use comodo essential ssl certificate
May
- 27 - Use fetchmail to retrieve mail from exchange 2010 server
- 22 - Monitor Linux network interface traffic using nagios
- 11 - epstopdf bounding box problem
- 02 - Convert img to iso image file under linux
April
March
- 20 - Opening a file manager from the term
- 16 - Automatically lock windows PC, even if screensaver is disabled by administrator
- 16 - Enable screensaver using registry files
- 10 - Set rights of files in public_html
- 08 - Zebra striping in Libreoffice/Openoffice
February
- 21 - Very best VIM tips
- 16 - How to trap interrupts in the bash shell
- 14 - Recenty notify app for ubuntu
January
- 25 - Fix Incorrect Clock Settings in Windows When Dual-Booting with OS X or Linux
- 24 - Record streaming videos from the web
- 12 - Replace Oracle Openoffice with Libreoffice (Linux)
- 07 - Display windows version on the desktop
- 04 - vim replace in multiple files
2010
December
- 30 - Change windows desktop background for day and night (Ubuntu, GNU/Linux)
- 25 - Perfectly Rip Audio CDs to FLAC (works under windows and ubuntu/wine)
- 23 - Change windows desktop background for day and night, using batchfile
- 19 - Maxima snippets
- 11 - mencoder stream copy for lossless avi to mpg conversion
- 04 - Fix Gnome desktop icons disappeared, no right click
November
October
- 29 - Bios password backdoors
- 24 - Maxmind geoip on debian lenny
- 22 - OpenSSH VPN setup
- 21 - Install puddletag on linux, mp3tag replacement
- 20 - Reset zarafa outlook users
- 02 - Embedding subtitles in videos
September
- 19 - Writing custom man pages
- 17 - Command line tipps
- 10 - Configure backuppc with a non-root account
- 07 - OpenVPN Setup (debian)
August
- 29 - Elegant solution for remotely accessible vnc desktops
- 15 - Running bastille on debian lenny
- 14 - Upgrade debian etch to lenny
- 10 - Optimize Ubuntu Lucid NFS client
- 08 - Thinkpad 301 Ericson wan card disappears
July
- 20 - Transfer typo3 site to a new url
- 15 - Resize ext2/3 volume with LVM
- 14 - Windows installation guide with must-have programs
- 11 - wbt-201 gps under linux
- 08 - Display shortcuts in mozilla firefox html display
- 08 - Renew license key of bitdefender for linux command line version
- 07 - Backup and restore complete TYPO3 installation
- 06 - Thunderbird tags with dovecot imap
June
- 29 - Configure awstats on debian webserver
- 28 - Vmware guest clock running too fast
- 25 - Create clean html image gallery from linux with 'jigl'
- 23 - Display nagios status on the desktop using conky
- 23 - Securely wipe free space using built-in cypher command
- 22 - Word 2003 page numbering
- 16 - Use RSS feeds with conky
- 15 - Blank screen with maple 12 on Ubuntu lucid if running compiz
- 08 - Bash resources
- 08 - Install bitdefender on linux
May
- 26 - Create encrypted tar backups and store them on the amazon S3 cloud
- 03 - Ubuntu 10.04 change menu button alignments
- 01 - Evernote for blackberry in switzerland
April
March
February
- 15 - Convert avi to flv
- 08 - namebench dns benchmark
- 06 - Using RDP+rdesktop to run remote windows apps on linux desktop
January
2009
December
- 13 - Rip DVDs into multi language multi subtitle video file
- 10 - vim show linenumbers
- 09 - vmware tools update after Ubuntu kernel update
- 02 - vim-latexsuite on ubuntu 9.10
November
- 10 - Boxplots using excel
- 04 - Configure Conky
- 03 - Configure autologon in windows xp
- 02 - bash use ALT-. to copy last argument
- 02 - Linux speed up Speed up ext3
October
- 12 - Copy a filesystem from one computer to another using tar and netcat
- 10 - How to fix font rendering of Firefox 3.5 under Ubuntu 9.04
September
August
- 26 - How to keep your PC running fast
- 13 - Lightning fast command line use in Linux
- 11 - Search Google.com from the Linux command line
- 07 - Synchronize blackberry with outlook connecting to a zarafa server
- 03 - Capturing analog video with DV cam and windv
July
- 29 - Common SED taks
- 29 - Tasks that are best done on the command line
- 28 - Apache2 SSL with CAcert
- 28 - Install CACert certificate for postfix smtp/tls
- 26 - Install firefox 3.5 on ubuntu using ubuntuzilla
- 19 - Flexible vacation responder using procmail
- 19 - Adding syntax custom extensions to vim
- 13 - Counting the number of files with a given extension
- 02 - Send email on root login
June
- 24 - debian package backup
- 19 - Enable shell escape in Miktex running from WinEdt
- 19 - Remove Ubuntu Jaunty update manager popup
- 19 - Export Maple figure to eps file
- 17 - Reducing the size of word document with built-in pictures
- 15 - Thunderbird - Temporarily Switch Composing Between Plain Text/HTML
- 14 - Excel tipps
- 14 - 11 Very useful Excel keyboard shortcuts you may not know
- 14 - Excel mouse tricks
- 12 - Useful website netalyzr analyses your network
- 03 - Metacity compositing effects in Ubuntu
- 02 - Shut Down Your Windows PC Remotely From Linux
May
- 27 - Simple backup procedure for windows (c't bff)
- 24 - Convert and crop Humax iCord HD Files
- 23 - Nikto web server security assessment
- 22 - AltGr key does not work in windows guest on linux host
- 22 - Latex under windows
- 21 - Latex unter Windows (deutsch)
- 21 - Crontab quick reference
- 20 - Windows XP Fehlermeldung beim Serverzugriff
- 20 - split-tar creates tar files of limited size
- 20 - Restore windows MBR
- 20 - Debian setup on hexonet virtual servers
- 20 - Cool tool cutter
- 20 - Install NUT on ipcop
- 20 - Setting up proxy autoconfiguration
- 20 - Firefox speedup
- 20 - Disable windows keys
- 20 - Recommended site network problem solver
- 20 - Install fonts on linux