Difference between revisions of "NST USB FAQ"

From NST Wiki
Jump to navigationJump to search
(Can all systems boot from a USB device?)
(How do I create a USB Live memory from the command line after booting the NST DVD?)
Line 107: Line 107:
 
* Determine the device entry of your DVD drive which you booted from (typically: ''/dev/sr0'').
 
* Determine the device entry of your DVD drive which you booted from (typically: ''/dev/sr0'').
  
* Determine the device entry of your USB memory stick (it will typically be something like: ''/dev/sdf''). Running ''fdisk -l'' will often help give you a clue.
+
* Determine the device entry of your USB memory stick (it will typically be something like: ''/dev/sdf1''). Running ''fdisk -l'' will often help give you a clue.
  
If your USB memory stick already contains a VFAT file system, you can do a non-destructive installation from the contents of the NST DVD (''/dev/sr0'') to your USB memory stick (replace ''/dev/sdX'' with your device entry):
+
If your USB memory stick already contains a VFAT file system, you can do a non-destructive installation from the contents of the NST DVD (''/dev/sr0'') to your USB memory stick (replace ''/dev/sdXX'' with your device entry):
  
  livecd-iso-to-disk /dev/sr0 /dev/sdX
+
  livecd-iso-to-disk /dev/sr0 /dev/sdXX
  
If you want to destroy the current contents of your USB memory stick (start from a clean slate), use the following command (DESTROYS ALL PRE-EXISTING DATA ON: ''/dev/sdX''):
+
If you want to destroy the current contents of your USB memory stick (start from a clean slate), use the following command (DESTROYS ALL PRE-EXISTING DATA ON: ''/dev/sdXX''):
  
  livecd-iso-to-disk --format --reset-mbr /dev/sr0 /dev/sdX
+
  livecd-iso-to-disk --format --reset-mbr /dev/sr0 /dev/sdXX
  
 
= USB Live Persistence =  
 
= USB Live Persistence =  

Revision as of 16:35, 12 December 2009

USB General

Can all systems boot from a USB device?

No. In order to boot directly from a USB device, the BIOS in your system must be capable of booting from a USB drive. In addition, depending on your BIOS, it may only be able to boot from a USB drive.

However, even if your system is not able to boot directly from a USB device, you might be able to indirectly boot from a USB device using the following strategy:

  • Insert the NST Live DVD or NST Live Minimal CD into your system.
  • Insert your USB Flash Drive into a USB port.
  • When the NST Live DVD boots, press the down arrow keep to prevent it from automatically booting from the DVD.
  • Use the down arrow key until you reach the "PLoP Boot Manager (Boot USB)" menu option.
  • Press the Enter key to bring up the PLoP boot loader.
  • Select the USB boot option from the PLoP boot loader menu.
  • The boot process should then transfer to your USB Flash drive.

This procedure might not always work, but it doesn't hurt to try.

This procedure might work for other USB distributions as well as NST.

This procedure is not recommended for systems having only a USB 1.1 interface.

What key do I press to bring up the BIOS boot menu?

This varies from system to system. Try F10 or F12. Sometimes a BIOS won't offer a boot chooser keyboard shortcut. In this case you'll need to enter your BIOS setup utility (F2 or Delete keys are common) and change the boot order such that USB drives are checked first.

Can all USB Drives be booted from?

No. While most USB drives can be booted from, it is our understanding that the ability to boot from a USB drive is not necessarily a requirement (that being said, I'm not sure we've run across a drive which can not be booted from).

What are the different ways to boot NST from a USB device?

There are three different ways in which you can boot the NST from a USB device:

  • A USB Live boot without a persistence overlay requires the least amount of space and behaves almost identically to booting from the ISO image burned to a DVD.
  • A USB Live Persistence boot is similar to a USB Live boot with the addition of a persistence overlay. This is a bit like a hybrid between a Live boot and a full hard disk installation (updates to the system will persist between boots, but you will periodically need to start over).
  • A USB Full Install boot is very similar to a full hard disk installation.

Can a Mac Mini 2009 boot the NST from a USB device?

While the Mac Mini can boot the NST from a ISO image burned onto a DVD, it can not boot a NST distribution on a USB attached drive.

What is the performance hit when booting from a USB Flash drive?

It depends upon the USB Flash drive (speeds will differ). Typically USB Flash drives will offer good read performance (15 to 25 MB/sec), but not so great write performance (5 to 10 MB/sec).

Here are a couple of links related to speed tests that will be influencing my next purchase:

USB Flash Drive Comparison – 21 Tested and Compared

16gb USB Drive Comparison – 17 Drives Compared

This article has some interesting points in the evaluation of USB flash drive perfomance:

Two Fast and Functional USB Flash Drives

Can I edit the boot menu?

Yes.

  • If you have a USB Live or USB Live Persistence installation, use a text editor to modify the file: isolinux/isolinux.cfg on the partition of your installation.
  • If you have a USB Full Install, boot your NST system and then edit the file: /boot/grub/grub.conf. It should be noted that the /boot/grub/grub.conf file is modified whenever a kernel update is installed.

Can I select Local from the boot menu?

You can not use the Local boot method when booting from a live USB device. Feel free to delete this choice from your syslinux.cfg file.

USB Live

What is the minimum size memory stick for a USB Live boot?

2 GB (if you could find a 1.5GB USB memory stick it would probably work as well).

Does a USB Live boot remember changes between boots?

No. You need a USB Live Persistence or USB Full Install boot if you want to remember changes to the systems between reboots.

Can I update packages on a USB Live boot?

Yes, but there are some caveats:

  • A lot of RAM is consumed both when downloading the files and during the installation process.
  • You will lose your updates when your reboot the system.
  • It is not possible to update the kernel. You can download and install it, but you can't reboot your system to actually load it.

How do I create a USB Live memory from the command line after booting the NST DVD?

Please review the man page for livecd-iso-to-disk from the livecd-tools package before attempting this process.

To create a USB Live memory stick:

  • Install the livecd-tools package if it isn't already installed on your system:
rpm -q livecd-tools || yum install livecd-tools
  • Determine the device entry of your DVD drive which you booted from (typically: /dev/sr0).
  • Determine the device entry of your USB memory stick (it will typically be something like: /dev/sdf1). Running fdisk -l will often help give you a clue.

If your USB memory stick already contains a VFAT file system, you can do a non-destructive installation from the contents of the NST DVD (/dev/sr0) to your USB memory stick (replace /dev/sdXX with your device entry):

livecd-iso-to-disk /dev/sr0 /dev/sdXX

If you want to destroy the current contents of your USB memory stick (start from a clean slate), use the following command (DESTROYS ALL PRE-EXISTING DATA ON: /dev/sdXX):

livecd-iso-to-disk --format --reset-mbr /dev/sr0 /dev/sdXX

USB Live Persistence

What is the minimum size memory stick for a USB Live Persistence boot?

2 GB. However, this will limit you to roughly 0.5 GB for your persistence layer.

Does a USB Live Persistence boot remember changes between boots?

Yes - until you fill the persistence layer. Using this boot method, your NST system will gradually consume memory in the persistence layer. Once all of the memory in the persistence layer is consumed, you will need to clear the entire persistence layer and start over from the initial ISO boot.

Can I update packages on a USB Live Persistence boot?

Yes, but there are some caveats:

  • A lot of your persistence overlay will be consumed each time you update your system.
  • You will lose your updates when your persistence overlay fills and you need to reset it (you'll have to start over).


How do I tell if a persistence overlay is being used?

During a live boot, a overlay image is used. This overlay may be created in RAM, or it may be persistent in which case changes will be preserved across boots.

The current method for testing for the presence of a persistent overlay is to look for the presence of the string: "overlay=" on the command line (/proc/cmdline).

How do I reset (clear) the persistence layer?

When your persistence layer fills (it will eventually), you will need to reset it in order to use the system again. This reset your system as if it booted from the initial ISO image.

To reset the persistence overlay, you'll need to append the following string to the end of the kernel boot options:

reset_overlay

USB Full Install

What is the minimum size memory stick for a USB Full Install?

8 GB.

Can I update packages on a USB Full Install?

Yes. A USB Full Install behaves like a normal hard disk installation and updates are fully supported (though they seem to take a long time to install).

Does a USB Full Install remember changes between boots?

Yes - a USB Full Install behaves pretty much the same as a normal USB hard disk installation.

Why does a yum update take so long on a USB Full Install?

We don't know the answer to this question. We think it is something to the way the update process is implemented and it is quite annoying.

Can I move a USB Full Install between systems?

Yes. However, this can confuse the udev system. The udev system tends to keep track of all hardware which the system sees. If you plan on moving your USB Full Install to different systems (which is common), it is recommended that you add the following line to your: /sbin/halt.local script:

/usr/bin/nstboot --move --verbose;

The above line will clear the hardware information collected by the udev system whenever you shutdown the system.

If you don't have a /sbin/halt.local script, you can use the following as a template (make sure to mark the file as executable):

#!/bin/bash
 
/usr/bin/nstboot --move --verbose;

Can I dual boot from a USB Flash Drive?

Yes. It is possible to dual boot off of a USB memory stick. This allows one to put both the NST Live version and the NST hard disk installation on the same memory stick. This will require a memory stick of 8GB or more.

The following steps are required:

  • Setup up a 2GB partition as primary partition 1 on the system according to the requirements of the liveusb-creator utility.
  • Install the NST Live version onto the 2GB partition using the "System Utilities|Create NST Live USB Disk" command from the fluxbox menu.
  • Verify that the NST Live version installed boots.
  • After booting NST Live, perform a full hard disk installation to the remaining portion of the memory stick use the "System Utilities|Install NST Live To Disk" command from the fluxbox menu (or directly from the icon on the GNOME desktop).
  • Reboot the system, it should boot up using the hard disk installation on your USB memory stick (you should see the grub boot loader).
  • After logging in, add the following to your: /boot/grub.conf file:
title NST Live (for install)
      root (hd0,0)
      chainloader +1
  • From this point on, when you boot off of your USB memory stick, you should see the grub boot loader come up and you should have the option to select "NST Live (for install)" from the grub boot screen.


NOTE: This may work for other USB devices (like a USB hard disk), but has not been tested.