Thursday, August 16, 2018

Booting Linux off USB pendrives


Booting a Linux system off USB Pendrives is one of my favorite things.


On a laptop we have the following advantages,



  • The Harddisk can be shutdown and that reduces power consumption (hdparm)

  • The system heats lesser and the fans are triggered less frequently

  • The system can take more shocks (a bumpy backseat taxi ride)


With old workstation hardware,



  • Can be used for quick testing of the hardware platforms

  • Linux (Ubuntu these days) works quite well with most hardware

  • One Downside: Many old motherboard BIOS do not support a USB boot


I have preferred a USB "boot-stick" to a LiveCD in most cases.


Questions.



  1. What other advantages and problems have you seen or anticipate with USB booted Linux?

    • What is your choice of Linux for this purpose?

    • Would you suggest ext4 or something more proven/stable for a linux usb-boot?

    • Do you often find USB drives getting corrupted?

    • Do you partition your USB drives?





Recent install guide reference,
Ubuntu Karmic Koala Encrypted Flash Memory Installation (edited July 22 2009).



This install guide is for installing Ubuntu 'Karmic Koala' in a USB flash memory stick with
the LUKS encrypted ext4 file system by running the Ubuntu Karmic Koala 'Alternate CD'.



Answer



When booting of USB media, I would be careful of the following:



  1. Swap, unless you need it, save the writes of the flash

  2. Keep the filesystem slim, turn off SELinux/AppArmour unless you need it

  3. Tune the journaling and cache settings to get better performance


I have a USB key that I use to boot all my systems, it contains the kernel and bootloader with configurations for machine. I also keep the encryption keys for my hard-disks on it.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...