Bootable Linux USB stick: Difference between revisions

no edit summary
No edit summary
Line 1: Line 1:
We regularly and successfully use USB sticks for courses where participants bring their own notebooks. The big benefit is that students
We regularly and successfully use USB sticks for courses where participants bring their own notebooks. The big benefit is that students
learn Linux, and realize that they can easily use the hardware they
learn Linux, and realize that they can easily use the hardware they already own. Current notebook hardware is by far fast enough for data
already own. Current notebook hardware is by far fast enough for data
processing, structure solution and coot visualization. What we found:
processing, structure solution and coot visualization. What we found:
# the sticks should be fast USB3 (very good results with SANdisk Extreme 32GB). The computers do_not_  have to be recent, nor do they have to have USB3 ports
# the sticks should be fast USB3 (very good results with SANdisk Extreme 32GB). The computers do ''not'' have to be recent, nor do they have to have USB3 ports. USB2 ports support up to 30MB/s, but only USB3 sticks deliver this!
# we use Fedora 23 because its hardware support is very good
# we use Fedora 23 because its hardware support is very good. We always use the 64bit distro.
# we produce >50% BIOS-bootable sticks and the rest are EFI-bootable sticks (we have not yet found out how to combine this into one). The latter can be booted on Macbooks as well; their hardware works well with Fedora 23. For Windows clients, one has to make sure that "fast boot" (or "fast startup") is disabled (or Shift is pressed while shutting Windows down), and sometimes powercfg -H off (as Administrator in a console window) is additionally required; otherwise the USB stick may not boot. Occasionally we find a computer that does not boot from any of the sticks because the BIOS screen can not be reached (due to unknown BIOS password; happens with machines belonging to institutions which administer them centrally) or some such, but 19 out of 20 work as they should.
# we produce >50% BIOS-bootable sticks and the rest are EFI-bootable sticks (we have not yet found out how to combine this into one). The latter can be booted on MacBooks as well; their hardware works well with Fedora 23. For Windows clients, one has to make sure that "fast boot" (or "fast startup") is disabled (or Shift is pressed while shutting Windows down), and sometimes <pre>powercfg -H off</pre> (as Administrator in a console window) is additionally required; otherwise the USB stick may not boot. Occasionally we find a computer that does not boot from any of the sticks because the BIOS screen can not be reached (due to unknown BIOS password; happens with machines belonging to institutions which administer them centrally) or some such, but 19 out of 20 work as they should.
# performance tuning (not required): We use an ext4 filesystem and <pre> data=writeback,nobarrier </pre> in /etc/fstab. To set the writeback option on the / filesystem one needs to use tune2fs on a Linux machine where the stick is just mounted (i.e. not booted from), with the option data_journal_writeback; one should also set nobarrier that way. With this tuning the stick is as fast as a local harddisk.
# performance tuning (not strictly required): We use an ext4 filesystem and <pre> data=writeback,nobarrier </pre> in /etc/fstab. To set the writeback option on the / filesystem one needs to use tune2fs on a Linux machine where the stick is just mounted (i.e. not booted from), with the option data_journal_writeback; one should also set nobarrier that way. With this tuning the stick is as fast as a local harddisk.
# we always create a few-GB FAT32 partition because that makes file exchange with Windows and Macs very simple
# we always create a few-GB FAT32 partition because that makes file exchange with Windows and Macs very simple
# we just install CCP4 and whatever else we need (XDS, Phenix, Chimera, ..), and then dd or ddrescue (on a machine with USB3 ports) an image of that stick to all other sticks.
# we just install CCP4 and whatever else we need (XDS, Phenix, Chimera, ..), and then dd or ddrescue (on a machine with USB3 ports) an image of that stick to all other sticks.
# any number of bells and whistles could be added to this, like clients sending their hostnames to a server after booting, and accepting updates by rsync.
# any number of bells and whistles could be added to this, like clients sending their hostnames to a server after booting, and accepting updates by rsync.


To make students familiar with the sticks and how to boot them, one
To make students familiar with the sticks and how to boot them, one needs 30+ minutes and a few tutors.  
needs 30+ minutes and a few tutors.  


If somebody figures out how to install Fedora23 sticks that boot on
If somebody figures out how to install Fedora23 sticks that boot on ''both'' BIOS- and EFI PC hardware, I'd like to hear about this.
both BIOS- and EFI hardware, I'd like to hear about this.




1,330

edits