From michael.cox1 at imperial.ac.uk Thu Jun 12 05:13:37 2014 From: michael.cox1 at imperial.ac.uk (Cox, Michael J) Date: Thu, 12 Jun 2014 09:13:37 +0000 Subject: [Bio-Linux] Live Bio-Linux not persistent Message-ID: Hi All, we?re using live USBs for a course next week that Tim kindly cloned after installing a couple of R packages and a test dataset. He?s now on his hols, so I thought I?d check to see whether the rest of the list could help me with an issue that I?m having. On boot, I couldn?t find the data that Tim added. I?ve checked by creating a file and the sticks aren?t persistent and files are removed when the USB stick is. I did find a reference that suggested creating a new user and that user account would be persistent, but no joy, new user and file removed on reboot. The additional R packages that Tim added to the distribution (dev version of PhyloSeq) are present and correct, so that at least has stayed. I have checked in: /syslinux/txt.cfg and this seems correct - the persistent flag is set on the Try Bio-Linux 7 option: default live label live menu label ^Try Bio-Linux 7 without installing kernel /casper/vmlinuz.efi append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash locale=en_GB.UTF-8 -- label live-install menu label ^Install Bio-Linux 7 kernel /casper/vmlinuz.efi append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash -- label check menu label ^Check stick for defects kernel /casper/vmlinuz.efi append boot=casper noprompt integrity-check initrd=/casper/initrd.lz quiet splash -- label memtest menu label Test ^memory kernel /install/mt86plus label hd menu label ^Boot from first hard disk localboot 0x80 This post http://ubuntuforums.org/showthread.php?t=2124124&p=12551088#post12551088 suggests editing syslinux.cfg (rather than txt.cfg) to make a Ubuntu stick persistent, which I?ve tried, but it booted up exactly as before and again was stubbornly resistant to retaining files. Can anyone suggest ways to get this working? Given the fact the R packages have remained, some aspect of this seems to be functioning? I could have the attendees download the data and course material, but would much rather they left with a copy of Bio-Linux and all their work and notes in one elegant package. Thanks very much for your help Mike Mike Cox Research Associate Molecular Genetics & Genomics Genomic Medicine National Heart and Lung Institute Guy Scadding Building Royal Brompton Campus London SW3 6LY 0207 594 7974 http://www1.imperial.ac.uk/medicine/people/michael.cox1/ * New NHLI short course "Principles of Genomic Medicine" * http://www1.imperial.ac.uk/nhli/PGM -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.cox1 at imperial.ac.uk Thu Jun 12 07:12:48 2014 From: michael.cox1 at imperial.ac.uk (Cox, Michael J) Date: Thu, 12 Jun 2014 11:12:48 +0000 Subject: [Bio-Linux] Live Bio-Linux not persistent In-Reply-To: References: Message-ID: Dear All, I think I fixed this, when I checked /boot/grub/grub.cfg there was no persistent flag. Adding this to the first menu entry line: linux /casper/vmlinuz.efi file=/cdrom/preseed/ubuntu.seed boot=casper persistent quite splash ? now renders the sticks persistent. In addition I can now see the data and tutorials that Tim loaded for me in /home. It does take a little longer to load and is slow initially, so I have some concerns that I have done something less than ideal. Comments appreciated. Thanks Mike On 12 Jun 2014, at 12:00, > > wrote: Send Bio-Linux mailing list submissions to bio-linux at nebclists.nerc.ac.uk To subscribe or unsubscribe via the World Wide Web, visit http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux or, via email, send a message with subject or body 'help' to bio-linux-request at nebclists.nerc.ac.uk You can reach the person managing the list at bio-linux-owner at nebclists.nerc.ac.uk When replying, please edit your Subject line so it is more specific than "Re: Contents of Bio-Linux digest..." Today's Topics: 1. Live Bio-Linux not persistent (Cox, Michael J) ---------------------------------------------------------------------- Message: 1 Date: Thu, 12 Jun 2014 09:13:37 +0000 From: "Cox, Michael J" To: "bio-linux at nebclists.nerc.ac.uk" Subject: [Bio-Linux] Live Bio-Linux not persistent Message-ID: Content-Type: text/plain; charset="windows-1252" Hi All, we?re using live USBs for a course next week that Tim kindly cloned after installing a couple of R packages and a test dataset. He?s now on his hols, so I thought I?d check to see whether the rest of the list could help me with an issue that I?m having. On boot, I couldn?t find the data that Tim added. I?ve checked by creating a file and the sticks aren?t persistent and files are removed when the USB stick is. I did find a reference that suggested creating a new user and that user account would be persistent, but no joy, new user and file removed on reboot. The additional R packages that Tim added to the distribution (dev version of PhyloSeq) are present and correct, so that at least has stayed. I have checked in: /syslinux/txt.cfg and this seems correct - the persistent flag is set on the Try Bio-Linux 7 option: default live label live menu label ^Try Bio-Linux 7 without installing kernel /casper/vmlinuz.efi append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash locale=en_GB.UTF-8 -- label live-install menu label ^Install Bio-Linux 7 kernel /casper/vmlinuz.efi append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash -- label check menu label ^Check stick for defects kernel /casper/vmlinuz.efi append boot=casper noprompt integrity-check initrd=/casper/initrd.lz quiet splash -- label memtest menu label Test ^memory kernel /install/mt86plus label hd menu label ^Boot from first hard disk localboot 0x80 This post http://ubuntuforums.org/showthread.php?t=2124124&p=12551088#post12551088 suggests editing syslinux.cfg (rather than txt.cfg) to make a Ubuntu stick persistent, which I?ve tried, but it booted up exactly as before and again was stubbornly resistant to retaining files. Can anyone suggest ways to get this working? Given the fact the R packages have remained, some aspect of this seems to be functioning? I could have the attendees download the data and course material, but would much rather they left with a copy of Bio-Linux and all their work and notes in one elegant package. Thanks very much for your help Mike Mike Cox Research Associate Molecular Genetics & Genomics Genomic Medicine National Heart and Lung Institute Guy Scadding Building Royal Brompton Campus London SW3 6LY 0207 594 7974 http://www1.imperial.ac.uk/medicine/people/michael.cox1/ * New NHLI short course "Principles of Genomic Medicine" * http://www1.imperial.ac.uk/nhli/PGM -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Subject: Digest Footer _______________________________________________ Bio-Linux mailing list Bio-Linux at nebclists.nerc.ac.uk http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux ------------------------------ End of Bio-Linux Digest, Vol 69, Issue 1 **************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm at iehinc.com Thu Jun 12 12:12:06 2014 From: jm at iehinc.com (James Mategko) Date: Thu, 12 Jun 2014 09:12:06 -0700 Subject: [Bio-Linux] Live Bio-Linux not persistent In-Reply-To: References: Message-ID: <5399D156.3030507@iehinc.com> Dear All, Just for your information, their is an alternative way to create Bio-Linux live USB drives. Universal usb installer allows you to create live usb for any Linux os in minutes. For Bio-Linux just select the option for Ubuntu 64 bit. I have several bio-Linux live USB made with tool and never had any issues with it. You can access the tool for free here: http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/ Regards, James On 6/12/2014 4:12 AM, Cox, Michael J wrote: > Dear All, > > I think I fixed this, when I checked /boot/grub/grub.cfg there was no > persistent flag. Adding this to the first menu entry line: > > linux /casper/vmlinuz.efi file=/cdrom/preseed/ubuntu.seed boot=casper > *persistent* quite splash --- > > now renders the sticks persistent. In addition I can now see the data > and tutorials that Tim loaded for me in /home. > > It does take a little longer to load and is slow initially, so I have > some concerns that I have done something less than ideal. Comments > appreciated. > > Thanks > > Mike > > > On 12 Jun 2014, at 12:00, > > > wrote: > >> Send Bio-Linux mailing list submissions to >> bio-linux at nebclists.nerc.ac.uk >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux >> or, via email, send a message with subject or body 'help' to >> bio-linux-request at nebclists.nerc.ac.uk >> >> You can reach the person managing the list at >> bio-linux-owner at nebclists.nerc.ac.uk >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of Bio-Linux digest..." >> >> >> Today's Topics: >> >> 1. Live Bio-Linux not persistent (Cox, Michael J) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Thu, 12 Jun 2014 09:13:37 +0000 >> From: "Cox, Michael J" >> To: "bio-linux at nebclists.nerc.ac.uk" >> Subject: [Bio-Linux] Live Bio-Linux not persistent >> Message-ID: >> Content-Type: text/plain; charset="windows-1252" >> >> Hi All, >> >> we?re using live USBs for a course next week that Tim kindly cloned >> after installing a couple of R packages and a test dataset. He?s now >> on his hols, so I thought I?d check to see whether the rest of the >> list could help me with an issue that I?m having. >> >> On boot, I couldn?t find the data that Tim added. I?ve checked by >> creating a file and the sticks aren?t persistent and files are >> removed when the USB stick is. I did find a reference that suggested >> creating a new user and that user account would be persistent, but no >> joy, new user and file removed on reboot. >> >> The additional R packages that Tim added to the distribution (dev >> version of PhyloSeq) are present and correct, so that at least has >> stayed. >> >> I have checked in: >> >> /syslinux/txt.cfg >> >> and this seems correct - the persistent flag is set on the Try >> Bio-Linux 7 option: >> >> default live >> label live >> menu label ^Try Bio-Linux 7 without installing >> kernel /casper/vmlinuz.efi >> append noprompt cdrom-detect/try-usb=true persistent >> file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz >> quiet splash locale=en_GB.UTF-8 -- >> label live-install >> menu label ^Install Bio-Linux 7 >> kernel /casper/vmlinuz.efi >> append noprompt cdrom-detect/try-usb=true persistent >> file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity >> initrd=/casper/initrd.lz quiet splash -- >> label check >> menu label ^Check stick for defects >> kernel /casper/vmlinuz.efi >> append boot=casper noprompt integrity-check >> initrd=/casper/initrd.lz quiet splash -- >> label memtest >> menu label Test ^memory >> kernel /install/mt86plus >> label hd >> menu label ^Boot from first hard disk >> localboot 0x80 >> >> This post >> http://ubuntuforums.org/showthread.php?t=2124124&p=12551088#post12551088 >> suggests editing syslinux.cfg (rather than txt.cfg) to make a Ubuntu >> stick persistent, which I?ve tried, but it booted up exactly as >> before and again was stubbornly resistant to retaining files. >> >> Can anyone suggest ways to get this working? Given the fact the R >> packages have remained, some aspect of this seems to be functioning? >> I could have the attendees download the data and course material, >> but would much rather they left with a copy of Bio-Linux and all >> their work and notes in one elegant package. >> >> Thanks very much for your help >> >> Mike >> >> >> Mike Cox >> >> Research Associate >> Molecular Genetics & Genomics >> >> Genomic Medicine >> National Heart and Lung Institute >> Guy Scadding Building >> Royal Brompton Campus >> London SW3 6LY >> >> 0207 594 7974 >> >> http://www1.imperial.ac.uk/medicine/people/michael.cox1/ >> >> * New NHLI short course "Principles of Genomic Medicine" * >> http://www1.imperial.ac.uk/nhli/PGM >> >> >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: >> >> >> ------------------------------ >> >> Subject: Digest Footer >> >> _______________________________________________ >> Bio-Linux mailing list >> Bio-Linux at nebclists.nerc.ac.uk >> http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux >> >> >> ------------------------------ >> >> End of Bio-Linux Digest, Vol 69, Issue 1 >> **************************************** > > > > _______________________________________________ > Bio-Linux mailing list > Bio-Linux at nebclists.nerc.ac.uk > http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony.travis at abdn.ac.uk Thu Jun 12 12:25:27 2014 From: tony.travis at abdn.ac.uk (Tony Travis) Date: Thu, 12 Jun 2014 17:25:27 +0100 Subject: [Bio-Linux] Live Bio-Linux not persistent In-Reply-To: References: Message-ID: <5399D477.7090900@abdn.ac.uk> On 12/06/14 10:13, Cox, Michael J wrote: > [...] > Can anyone suggest ways to get this working? Given the fact the R > packages have remained, some aspect of this seems to be functioning? > I could have the attendees download the data and course material, but > would much rather they left with a copy of Bio-Linux and all their > work and notes in one elegant package. Hi, Mike. I had similar problems when I ran a Bio-Linux course in Vienna last year: In my case, it was caused by the UEFI boot config not enabling persistence! You can edit the config by mounting the stick in another system and add the word "persistent" to the UEFI boot. I also had problems with the persistent filesystem getting corrupted, so I modified Tim's bio-linux-usb-creator script to create a separate ext4 partition on the stick: This is what I now use to create Bio-Linux USB sticks and I've had no problems with filesystem corruption since. I think the problem might be worse on >4GB USB-sticks (I'm using 8GiB sticks) because of limitations of the MSDOS filesystem. HTH, Tony. -- Dr. A.J.Travis, University of Aberdeen, Institute of Biological and Environmental Sciences, Cruickshank Building, St. Machar Drive, Aberdeen AB24 3UU, Scotland, UK. tel +44(0)1224 272700, fax +44 (0)1224 272 396 http://www.abdn.ac.uk, mailto:tony.travis at abdn.ac.uk, skype:ajtravis The University of Aberdeen is a charity registered in Scotland, No SC013683. Tha Oilthigh Obar Dheathain na charthannas cl?raichte ann an Alba, ?ir. SC013683. -------------- next part -------------- #!/bin/bash #A beefed up version of remaster_usb that can make multiple #USB memory sticks on the fly. # On 28/11 : Added setup for munged permissions on home directory. # Made it work with CD or DVD # On 26/03/10 : Working on new version for Ununtu 10.04. Using file rather # than partition and eliminating HAL calls. #0 Precautions set -o errtrace set -o nounset trap exit ERR DEBUG=${DEBUG:-} #Run env DEBUG=1 bio-linux-usb-maker to debug NOREPARTITION=${NOREPARTITION:-} #The new sticks we have don't like being repartitioned! #Exit if not root, because the behaviour can be confusing. #Remove this bit if you want to be able to scan devices as a normal user. if [[ `id -u` != "0" ]] ; then echo "This script needs to be run with root privileges - eg. : sudo $0" exit 1 fi #Stop HAL from auto-mounting anything, which it has a tendency to do. #Note that hal-lock stuffs up file handles, so I need to do the <&1 trick #to stop 'read' from falling over. if [[ `id -u` == "0" && -z ${SKIP_HAL_LOCK:-} ]] ; then if [[ -z ${HAL_LOCKED:-} ]] ; then echo -n "Acquiring exclusive HAL lock: " ## This was what I used before I discovered the simpler 'exec <&1' trick... # exec env HAL_LOCKED=1 hal-lock --interface org.freedesktop.Hal.Device.Storage --exclusive --run \ # "/bin/bash -c \"exec /bin/bash '$0' $* <&1\"" exec env HAL_LOCKED=1 hal-lock --interface org.freedesktop.Hal.Device.Storage --exclusive --run $0 "$@" else exec <&1 #Voila! echo "OK" fi fi #1 Settings # Number of MiB of free space to leave on disk when making casper-rw file, and # minimum size of file. MIN_RW_CAPACITY=80 REMASTER_DIR=none LIVE_MEDIUM="" #KEY_MOUNT_DIR=/media #SYSLINUX_BINARY=/usr/bin/syslinux #MBR_IMAGE=/usr/lib/syslinux/mbr.bin #Defaults you may want to override REMASTER_ISO=${REMASTER_ISO:-} BL_AUTORUN=${BL_AUTORUN:-} BLUM_SPARE_SPACE=${BLUM_SPARE_SPACE:-0} BLUM_ALLOW_QUICK_MODE=${BLUM_ALLOW_QUICK_MODE:-0} BLUM_ASSUME_YES=${BLUM_ASSUME_YES:-0} SYSLINUX_BINARY=${SYSLINUX_BINARY:-syslinux} MBR_IMAGE=${MBR_IMAGE:-/usr/lib/syslinux/mbr.bin} if [ -z "${KEY_MOUNT_DIR:-}" ] ; then if [ -d /dev/shm ] ; then KEY_MOUNT_DIR=/dev/shm/keymount else KEY_MOUNT_DIR=/tmp/keymount fi fi mkdir -p "$KEY_MOUNT_DIR" #See if I can spot a suitable image REMASTER_DIR=`echo bio-linux*.iso` #Keep track of mounted stuff for cleanup later MOUNTED_G="" MOUNTED_L="" function umount_then_exit() { local exit_status=${1:-$?} #Clean up all the mounted stuff trap ERR popd >& /dev/null || true wait if [[ -n "$MOUNTED_L" ]] ; then echo "Cleaning up - unmounting key partitions: $MOUNTED_L" sync ; sync eval "umount $MOUNTED_L" fi if [[ -n "$MOUNTED_G" ]] ; then echo "Cleaning up - unmounting ISO files: $MOUNTED_G" sync ; sync eval "umount $MOUNTED_G" fi sync ; sync #just for luck! exit $exit_status } function qm() { [ ${quick_mode:-0} -ne 0 ] } function nr() { [ ${NOREPARTITION:-0} -ne 0 ] } function get_parted_alignment() { #If parted supports -a, return the right alignment #else return nothing sudo parted -a . /dev/null 2>&1 >/dev/null | grep ^parted | grep -q 'invalid argument' && \ echo -n '-a opt' } trap umount_then_exit 1 2 3 15 ERR #Detect if boot is from a live medium [ -n "$DEBUG" ] && echo "Seeing if this is a Live system." if grep -q '/dev/loop0 /rofs squashfs' /proc/mounts ; then boot_media_line=`grep -m1 -B1 '/dev/loop0 /rofs squashfs' /proc/mounts | head -n 1` boot_media_fstype=`echo "$boot_media_line" | cut -d ' ' -f 3` if [[ -n "$boot_media_fstype" ]] ; then [ -n "$DEBUG" ] && echo " Yes - Finding boot medium for live system." LIVE_MEDIUM=`echo "$boot_media_line" | cut -d ' ' -f 1` [ -n "$DEBUG" ] && echo " Boot medium was $LIVE_MEDIUM." else [ -n "$DEBUG" ] && echo "Apparently not a live system." fi fi echo "Looking for a candidate image to copy..." if [ -n "$REMASTER_ISO" ] ; then echo " \$REMASTER_ISO was manually set to $REMASTER_ISO" REMASTER_DIR="$REMASTER_ISO" elif [ "$REMASTER_DIR" = "${REMASTER_DIR#* }" -a "$REMASTER_DIR" = "${REMASTER_DIR#*\*}" ] ; then echo " Found an ISO file in the current directory" REMASTER_DIR=`pwd`"/$REMASTER_DIR" else REMASTER_DIR=none if [ -d /media/cdrom/isolinux ] ; then echo " Found a Live DVD mounted under /media/cdrom" REMASTER_DIR=/media/cdrom elif [ -d /media/dvd/isolinux ] ; then echo " Found a Live DVD mounted under /media/dvd" REMASTER_DIR=/media/dvd elif [ -n "$LIVE_MEDIUM" ] ; then #By this heuristic, it looks like a Live boot, do more heuristics: REMASTER_DIR="$LIVE_MEDIUM" if [[ "$boot_media_fstype" = "iso9660" ]] ; then echo " Detected boot from Live DVD or CD on $REMASTER_DIR" elif [[ "$boot_media_fstype" = "vfat" ]] ; then echo " Detected boot from Live USB memory stick on $REMASTER_DIR" else echo " Detected boot from Live $boot_media_fstype medium on $REMASTER_DIR" fi elif [ -d /media/bl-live-iso/isolinux ] ; then echo " Found an existing Live USB memory stick mounted at /media/bl-live-iso" REMASTER_DIR=/media/bl-live-iso else [ -n "$DEBUG" ] && echo "No candidate image found by guessing." fi fi #Proceed without prompt if REMASTER_ISO was set. if [ -z "$REMASTER_ISO" ] ; then echo "Please give the location of an image to be read. If you are trying to copy directly" echo "from a DVD and it was not detected above, try \"/dev/cdrom\"." echo read -p "ISO, device or directory to use [$REMASTER_DIR]: " rmd if [ "$rmd" != "" ] ; then REMASTER_DIR=$rmd fi fi if [ "$REMASTER_DIR" = "none" ] ; then umount_then_exit 0 fi # Potential places there might be a USB stick #KEY_DEVICES='/dev/sdb /dev/sdc /dev/sdd' # or, better, ask HAL: #KEY_DEVICES=`hal-find-by-property --key storage.bus --string usb | xargs -i hal-get-property --key block.device --udi '{}'` KEY_DEVICES=`hal-find-by-property --key storage.bus --string usb` || true KEY_DEVICES_OK="" echo echo "Found the following candidate memory stick devices:" for device in `echo $KEY_DEVICES` ; do echo `hal-get-property --key block.device --udi $device`" = "`basename $device` done ; echo #Safety-check - anything over 20GB is assumed to be a hard drive for device in `echo $KEY_DEVICES` ; do #device_capacity=`hal-get-property --key storage.removable.media_size --udi $device` #device_capacity=$(( $device_capacity / 1000000000 )) #or # (I prefer this one as it also sanity-checks /proc/partitions) [ -n "$DEBUG" ] && echo "Getting full_dn for $device." full_dn=`hal-get-property --key block.device --udi $device` dn=`basename $full_dn` #HAL has started reporting devices twice for some reason. [ -n "$DEBUG" ] && echo "Checking if $dn is a dupe." if echo "$KEY_DEVICES_OK" | grep -q "$full_dn" ; then echo "Device $dn is already in the list." continue fi [ -n "$DEBUG" ] && echo "Scanning capacity for $dn." device_capacity=`grep " $dn\$" /proc/partitions | awk '{print $3}'` if [ "$device_capacity" = "" ] ; then echo "No capacity found (in /proc/partitions) for device $dn ($device)" continue fi [ -n "$DEBUG" ] && echo "Got capacity $device_capacity for $dn." eval "device_capacity_$dn"=$device_capacity # convert device capacity to MiB (1024 * 1024 = 1048576) device_capacity=$(( $device_capacity / 1048576 )) [ -n "$DEBUG" ] && echo "Converted to capacity $device_capacity for $dn." if [ $device_capacity -lt 2 ] ; then echo "Device $dn looks too small to use." continue fi if [ $device_capacity -gt 24 ] ; then echo "Device $dn is big - maybe a hard drive?" continue fi #Can we check for Stew's IPod and Palm Pilot, so as not to accidentally nuke them?? #Both iPod and iRiver show up thus [ -n "$DEBUG" ] && echo "IPod check on $dn." if [ x`hal-get-property --key portable_audio_player.type --udi $device 2>/dev/null` != 'x' ] ; then echo "Device $dn looks like a music player!" continue fi #Now check for the case where we are booting from a USB stick and exclude that one [ -n "$DEBUG" ] && echo "Live medium check on $dn." if [[ -n "$LIVE_MEDIUM" ]] ; then [ -n "$DEBUG" ] && echo " \$LIVE_MEDIUM was set to $LIVE_MEDIUM, preceeding with check." #resolve if symlink foo=`readlink -e $LIVE_MEDIUM || true` [ -n "$DEBUG" ] && echo " readlink said: $foo" if [[ -n "$foo" && ${foo%[1-9]} = $full_dn ]] ; then echo "Device $dn is the device that the system is running off." continue fi fi #Now check for the case where we are copying from a USB key [ -n "$DEBUG" ] && echo "Source check on $dn." if [ -b "$REMASTER_DIR" ] ; then foo=`readlink -e $REMASTER_DIR` if [[ -n "$foo" && ${foo%[1-9]} = $full_dn ]] ; then echo "Device $dn is the same as the source device." continue fi else #Copying from a mounted key, giving the mount point, maybe? #Resolve dir to device using df trick foo=`df $REMASTER_DIR 2>/dev/null | tail -n1 | cut -d ' ' -f 1` if [[ -n "$foo" && ${foo%[1-9]} = $full_dn ]] ; then echo "Device $dn contains the source directory." continue fi fi #Now check if the device is mounted #Sorry about the horrid if-construct below... device_mounts=`mount | cut -d ' ' -f 1 | egrep $full_dn'[0-9]*$' | tac` if [ -n "$device_mounts" ] ; then if [[ `id -u` = "0" ]] ; then if umount $device_mounts >&/dev/null ; then device_mounts='' fi fi if [ -n "$device_mounts" ] ; then echo "Device $dn busy - needs to be unmounted first if it is to be re-partitioned." continue fi fi KEY_DEVICES_OK="$KEY_DEVICES_OK $full_dn" done KEY_DEVICES_OK="${KEY_DEVICES_OK/# /}" if [[ `id -u` != "0" ]] ; then echo "These devices are ready to load: "${KEY_DEVICES_OK:-NONE} echo " !! You need to be root (eg. run this script under sudo) to actually load the images !!" umount_then_exit 1 fi #Now some sanity checks test -d $KEY_MOUNT_DIR || { echo "Directory $KEY_MOUNT_DIR does not exist - aborting." ; umount_then_exit 1 ; } test -e $MBR_IMAGE || { echo "Image file $MBR_IMAGE does not exist - aborting." ; umount_then_exit 1 ; } #Now get image (either from remaster dir or DVD or iso on loopback) if [ -f $REMASTER_DIR ] ; then [ -n "$DEBUG" ] && echo "Trying to mount loopback source image." #Assume an ISO file, use loop to mount mkdir -p $KEY_MOUNT_DIR/iso1 mount -t iso9660 -o ro,loop $REMASTER_DIR $KEY_MOUNT_DIR/iso1 MOUNTED_G="$KEY_MOUNT_DIR/iso1 $MOUNTED_G" REMASTER_DIR=$KEY_MOUNT_DIR/iso1 elif [ -b $REMASTER_DIR ] ; then [ -n "$DEBUG" ] && echo "Trying to mount source device." #A device to be mounted - virtually the same as above, but if the device is already mounted #we need to get the status right, so try both ro and rw mkdir -p $KEY_MOUNT_DIR/live1 ! mount -t auto -o ro $REMASTER_DIR $KEY_MOUNT_DIR/live1 2>/dev/null && \ mount -t auto -o rw $REMASTER_DIR $KEY_MOUNT_DIR/live1 2>/dev/null MOUNTED_G="$KEY_MOUNT_DIR/live1 $MOUNTED_G" REMASTER_DIR=$KEY_MOUNT_DIR/live1 fi #Also make a mount point for the squashfs mkdir -p $KEY_MOUNT_DIR/loop2 if ! [ -d $REMASTER_DIR/isolinux -o -d $REMASTER_DIR/syslinux ] ; then echo "Expected to find directory $REMASTER_DIR/isolinux or syslinux - not found - aborting." umount_then_exit 1 fi #Calculate estimated size of required first partition. #Add 3% for overheads. #Tweak image_file_count to reflect addition of casper-rw and bl-autorun, but not ldlinux.sys image_size=$(( `du -B MiB --exclude="casper-rw" -s $REMASTER_DIR | awk '{print int($1 * 103 / 100)}'`)) image_file_count=`find $REMASTER_DIR -not -type l | grep -v 'ldlinux.sys' | wc -l` [ -e "$REMASTER_DIR/casper-rw" ] || image_file_count=$(( image_file_count + 1 )) [ -e "$REMASTER_DIR/bl-autorun" ] || image_file_count=$(( image_file_count + 1 )) if [ -z "$KEY_DEVICES_OK" ] ; then echo "Image size is approx $image_size megabytes. No suitable devices found!" umount_then_exit 1 fi #If there is just one device and quick mode is enabled then see if it is #possible. quick_mode=0 if [ ! "$BLUM_ALLOW_QUICK_MODE" -eq 0 ] ; then if [ "${KEY_DEVICES_OK/ /}" = "$KEY_DEVICES_OK" ] ; then if ! grep -q " $KEY_DEVICES_OK"'2$' /proc/partitions ; then echo "** Enabling quick refresh for device $KEY_DEVICES_OK" quick_mode=1 fi fi fi #You must be root because we need to access the devices directly KEY_DEVICES_COUNT=`echo "$KEY_DEVICES_OK" | wc -w` echo "Will now install $image_size MiB image onto $KEY_DEVICES_COUNT devices: $KEY_DEVICES_OK" if [ "$BLUM_ASSUME_YES" -eq 0 ] ; then read -p 'Proceed? (y/n)' -e -n 1 ; [ "$REPLY" = 'y' -o "$REPLY" = 'Y' ] fi #Now for each device: nn=1 echo -n "Making partitions: " for device in `echo $KEY_DEVICES_OK` ; do #Make two partitions on disk - NOREPARTITION allow existing partitions to be kept. if ! nr || qm ; then parted -s $device -- unit MiB mklabel msdos parted -s $device `get_parted_alignment` -- unit MiB mkpart primary 1 $image_size parted -s $device `get_parted_alignment` -- unit MiB mkpart primary $image_size -0 fi #If I can use GPT, set bit 60 (ro) on first partition #(TODO) qm || parted -s $device set 1 boot on #Make sure there is a mount point for sticks and casper-rw mkdir -p "$KEY_MOUNT_DIR/"`basename $device`"1" "$KEY_MOUNT_DIR/"`basename $device`"2" echo -n "$nn " nn=$(( nn + 1)) done ; echo ": DONE" #Allow HAL to finish creating device node sync ; sleep 2 for device in `echo $KEY_DEVICES_OK` ; do stat "$device" "$device"1 > /dev/null done #Again for each device: nn=1 echo -n "Spawning copy processes in parallel: " for device in `echo $KEY_DEVICES_OK` ; do mount_point="$KEY_MOUNT_DIR/"`basename $device`"1" #Estimate size of casper-rw to make, but if this number is too large it should just fill the #disk, and the minimum size for casper-rw is (arbitrarily) 80MiB. eval device_capacity="\$(( \$device_capacity_"`basename $device`" / 1024 ))" if [ "$BLUM_SPARE_SPACE" -eq 0 ] ; then rw_size=$device_capacity else rw_size=$(( $device_capacity - $image_size - $BLUM_SPARE_SPACE )) [ $rw_size -lt $MIN_RW_CAPACITY ] && rw_size=$MIN_RW_CAPACITY fi if [ -n "$DEBUG" ] ; then echo qm || echo "DEBUG: Will make casper-rw with maximum size $rw_size megabytes." ;\ echo "Calculation was : $device_capacity - $image_size - $BLUM_SPARE_SPACE (min $MIN_RW_CAPACITY)" qm && echo "DEBUG: Will use existing casper-rw." fi # Note - there is no real point in zeroing the file but there is also no way around it. # The Linux VFS is careful to avoid allowing a file to contain data that was previously on # the disk, so I have to write something. # Using the seek= option in dd causes the vfat driver to do the zeroing, which saves some # useless copying of chunks of null bytes into and out of userspace. Note if I tried this on # an ext2 disk I'd get a sparse file which would be no use to me. # On 11/6/10 - reverted to using count= instead of seek= because older kernels actually # crash if asked to seek too far into a file on a vfat mount. #Things done to each stick in parallel: # Format vfat partition # Mount vfat partition # Use rsync to copy files # Make a little breathing space # Create the bl-autorun directory # Make casper-rw file (dd may return error if disk full but file should still exist) # Write ext2 file system into casper-rw file # Remove space filler file # Note that if copying from a stick, casper-rw will NOT be copied but bl-autorun WILL be. # Note 2 - I need a way to allow files to be copied from some location, eg: # { [ -d "$BL_AUTORUN" ] && cp -r "$BL_AUTORUN"/* "${mount_point}/bl-autorun" } && \ export nn if qm ; then ( \ trap exit ERR mount -t vfat -o uid="0" "$device"1 $mount_point &&\ test -e "$mount_point/casper-rw" &&\ rsync -r --exclude=ldlinux.sys --exclude=ubuntu --exclude="dists/unstable" --exclude="dists/stable" \ --exclude="casper-rw" --exclude="bl-autorun" --delete --partial "$REMASTER_DIR"/ $mount_point &&\ mkfs.ext2 -F -b 4096 -L "casper-rw" "$mount_point/casper-rw" >/dev/null 2>&1 &&\ echo -n "-$nn " ; ) & else ( \ mkfs.vfat -n "bl-live-iso" "$device"1 >/dev/null 2>&1 &&\ mount -t vfat -o uid="0" "$device"1 $mount_point &&\ rsync -r --exclude=ldlinux.sys --exclude=ubuntu --exclude="dists/unstable" --exclude="dists/stable" --exclude="casper-rw" \ --partial "$REMASTER_DIR"/ $mount_point &&\ dd if=/dev/zero bs=1k count=64 of="$mount_point/buffer.tmp" >/dev/null 2>&1 &&\ mkdir -p "${mount_point}/bl-autorun" &&\ { if [ -d "$BL_AUTORUN" ] ; then cp -r "$BL_AUTORUN"/* "${mount_point}/bl-autorun" ; fi ; } &&\ mkfs.ext3 -L casper-rw "$device"2 2>&1 &&\ rm "$mount_point/buffer.tmp" &&\ echo -n "-$nn " ; ) & fi MOUNTED_L="$mount_point $MOUNTED_L" echo -n "+$nn " nn=$(( nn + 1 )) done #Wait for all rsync processes. #Note - this is broken because wait always returns 0 if ! wait ; then echo "Some writing process returned an error" umount_then_exit 1 fi echo " : DONE" #Yet again, for each device: nn=1 echo -n "Checking and installing syslinux: " #Sync does not seem to mean sync for our cheapo hubs. sleep 2 ; sync ; sleep 2 for device in `echo $KEY_DEVICES_OK` ; do mount_point="$KEY_MOUNT_DIR/"`basename $device`"1" #do a find | wc -l to check all files copied if [ 0`find $mount_point | grep -v ldlinux.sys | wc -l` -ne "$image_file_count" ] ; then echo "WARNING: File count mismatch on $device (expected $image_file_count)" fi if [ ! -d $mount_point/.disk ] ; then echo "WARNING: You seem to be missing the vital hidden .disk directory" fi #do tidy-ups, unless copying from a key image already #Look for any .cfg files in the isolinux directory if [ -d "$mount_point/isolinux" ] && ls $mount_point/isolinux | grep -qx '.*\.cfg' ; then mv "$mount_point/isolinux" "$mount_point/syslinux" #rename isolinux.cfg only if there is no syslinux.cfg #Note if I copied the file I'd need to increment image_file_count. [ ! -e "$mount_point/syslinux/syslinux.cfg" ] && mv "$mount_point/syslinux/isolinux.cfg" "$mount_point/syslinux/syslinux.cfg" #munge text.cfg (this should be idempotent) #On 12.04 this file mysteriously lost the letter 'e' TEXT_CFG="$mount_point/syslinux/text.cfg" test -e "$TEXT_CFG" || TEXT_CFG="$mount_point/syslinux/txt.cfg" sed -i 's/disc/stick/' "$TEXT_CFG" sed -i 's/append *file=/append noprompt cdrom-detect\/try-usb=true persistent file=/' "$TEXT_CFG" sed -i 's/boot=casper *integrity-check/boot=casper noprompt integrity-check/' "$TEXT_CFG" #Remove wubi.exe because it doesn't work properly for BL right now # Nope - this belongs in recon #rm -f "$mount_point/wubi.exe" "$mount_point/autorun.inf" #Regenerate all md5sums sed -i '/\.\/isolinux\//d' $mount_point/md5sum.txt ( cd $mount_point ; find ./syslinux -type f -print0 | xargs -0 md5sum ) >> $mount_point/md5sum.txt fi #run syslinux on ze device, unless we are in quick mode #Deperation... sleep 2 ; sync ; sleep 2 umount "$device"1 if ! qm ; then tee "$device" < $MBR_IMAGE > /dev/null $SYSLINUX_BINARY "$device"1 fi echo -n "$nn " nn=$(( nn + 1 )) done ; echo " : DONE" MOUNTED_L="" #Now mount the ext2 loopback to add initial data #This only works if I can mount the squashfs file system, #so make sure that works first. if mount -t squashfs -o loop "$REMASTER_DIR"/casper/filesystem.squashfs $KEY_MOUNT_DIR/loop2 ; then MOUNTED_G="$KEY_MOUNT_DIR/loop2 $MOUNTED_G" #One final time, for each device: nn=1 echo -n "Building initial file structure in casper-rw loopback: " for device in `echo $KEY_DEVICES_OK` ; do #Mount each stick and then the ext2 loopback in turn. mount_base="$KEY_MOUNT_DIR/"`basename $device` mount_point="${mount_base}2" mount -t vfat -o uid="0" "${device}1" "${mount_base}1" MOUNTED_L="${mount_base}1" mount -t ext3 "${device}2" "$mount_point" MOUNTED_L="$mount_point ${mount_base}1" # on USB stick - create the home tree mkdir -p $mount_point/home/live/ ; pushd $mount_point/home/live/ >/dev/null mkdir -p Desktop Documents Downloads Music Pictures Public Templates Videos # make new home tree public rwx chmod -R 777 . # Gnome complains when the home directory is public RW. chmod 755 . # etc/skel files are required to be copied in premade /home/live # this could be extracted from the loopback image. rsync -at $KEY_MOUNT_DIR/loop2/etc/skel/ . || true # Set umask for live user - but this will only work in zsh echo $'#open umask for live user\n[ `id -u` = 999 ] && umask 000' | tee -a .zshrc .profile > /dev/null chmod 777 Desktop #(again!) # make new home tree owned by live user (UID=999) chown -R 999:100 . popd >/dev/null # Create the handy casper-rw root link to the live user desktop ln -sf home/live/Desktop $mount_point/Bio-Linux-Desktop ##DEBUG if [ -n "$DEBUG" ] ; then echo "BEFORE remount of $device ro" mount echo fi #Umount should result in a nice clean sync but something is wrong. #Maybe this will do the job? #HACK... mount -o remount,ro "$mount_point" sync ##DEBUG if [ -n "$DEBUG" ] ; then echo "BEFORE full umount of $device" mount echo fi sync ; sync #try to get rid of warnings?? eval "umount $MOUNTED_L" && MOUNTED_L="" ##DEBUG if [ -n "$DEBUG" ] ; then echo "AFTER umount of $device" mount echo fi #eject "$device" #Just to turn the light off + force a sync echo -n "$nn " nn=$(( nn + 1 )) done ; echo " : DONE" else echo "WARNING: Squashfs mount failed - will not build initial file system on writeable partition." nn=1 echo -n "Flushing all dirty cache data to sticks: " for device in `echo $KEY_DEVICES_OK` ; do eject "$device" #Just to turn the light off + force a sync echo -n "$nn " nn=$(( nn + 1 )) done ; echo " : DONE" fi if [ "$nn" = "2" ] ; then echo ; echo "All finished - your bootable USB stick is ready to use." else echo ; echo "All finished - your bootable USB sticks are ready to use." fi umount_then_exit From tbooth at ceh.ac.uk Thu Jun 19 06:10:29 2014 From: tbooth at ceh.ac.uk (Tim Booth) Date: Thu, 19 Jun 2014 11:10:29 +0100 Subject: [Bio-Linux] Live Bio-Linux not persistent In-Reply-To: References: Message-ID: <1403172629.5184.7.camel@balisaur> Hi Mike, Congratulations on that bit of detective work. I'd not bothered checking the Grub configuration as it didn't make any difference on our test machines, or any teaching machines I've used before, but I guess your machines boot via EFI and therefore do use Grub. Yes, persistent mode will slow the things down a bit. Unfortunately there's no avoiding this, and I think that your fix is quite correct. As I recall you are teaching today, so I hope it goes well and if you have any urgent issues please do give me a call. Cheers, TIM On Thu, 2014-06-12 at 12:12 +0100, Cox, Michael J wrote: > Dear All, > > > I think I fixed this, when I checked /boot/grub/grub.cfg there was no > persistent flag. Adding this to the first menu entry line: > > > linux /casper/vmlinuz.efi file=/cdrom/preseed/ubuntu.seed boot=casper > persistent quite splash ? > > > now renders the sticks persistent. In addition I can now see the data > and tutorials that Tim loaded for me in /home. > > > It does take a little longer to load and is slow initially, so I have > some concerns that I have done something less than ideal. Comments > appreciated. > > > Thanks > > > Mike > > > > On 12 Jun 2014, at 12:00, > wrote: > > > Send Bio-Linux mailing list submissions to > > bio-linux at nebclists.nerc.ac.uk > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux > > or, via email, send a message with subject or body 'help' to > > bio-linux-request at nebclists.nerc.ac.uk > > > > You can reach the person managing the list at > > bio-linux-owner at nebclists.nerc.ac.uk > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of Bio-Linux digest..." > > > > > > Today's Topics: > > > > 1. Live Bio-Linux not persistent (Cox, Michael J) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Thu, 12 Jun 2014 09:13:37 +0000 > > From: "Cox, Michael J" > > To: "bio-linux at nebclists.nerc.ac.uk" > > > > Subject: [Bio-Linux] Live Bio-Linux not persistent > > Message-ID: > > Content-Type: text/plain; charset="windows-1252" > > > > Hi All, > > > > we?re using live USBs for a course next week that Tim kindly cloned > > after installing a couple of R packages and a test dataset. He?s > > now on his hols, so I thought I?d check to see whether the rest of > > the list could help me with an issue that I?m having. > > > > On boot, I couldn?t find the data that Tim added. I?ve checked by > > creating a file and the sticks aren?t persistent and files are > > removed when the USB stick is. I did find a reference that > > suggested creating a new user and that user account would be > > persistent, but no joy, new user and file removed on reboot. > > > > The additional R packages that Tim added to the distribution (dev > > version of PhyloSeq) are present and correct, so that at least has > > stayed. > > > > I have checked in: > > > > /syslinux/txt.cfg > > > > and this seems correct - the persistent flag is set on the Try > > Bio-Linux 7 option: > > > > default live > > label live > > menu label ^Try Bio-Linux 7 without installing > > kernel /casper/vmlinuz.efi > > append noprompt cdrom-detect/try-usb=true persistent > > file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz > > quiet splash locale=en_GB.UTF-8 -- > > label live-install > > menu label ^Install Bio-Linux 7 > > kernel /casper/vmlinuz.efi > > append noprompt cdrom-detect/try-usb=true persistent > > file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity > > initrd=/casper/initrd.lz quiet splash -- > > label check > > menu label ^Check stick for defects > > kernel /casper/vmlinuz.efi > > append boot=casper noprompt integrity-check > > initrd=/casper/initrd.lz quiet splash -- > > label memtest > > menu label Test ^memory > > kernel /install/mt86plus > > label hd > > menu label ^Boot from first hard disk > > localboot 0x80 > > > > This post > > http://ubuntuforums.org/showthread.php?t=2124124&p=12551088#post12551088 suggests editing syslinux.cfg (rather than txt.cfg) to make a Ubuntu stick persistent, which I?ve tried, but it booted up exactly as before and again was stubbornly resistant to retaining files. > > > > Can anyone suggest ways to get this working? Given the fact the R > > packages have remained, some aspect of this seems to be > > functioning? I could have the attendees download the data and > > course material, but would much rather they left with a copy of > > Bio-Linux and all their work and notes in one elegant package. > > > > Thanks very much for your help > > > > Mike > > > > > > Mike Cox > > > > Research Associate > > Molecular Genetics & Genomics > > > > Genomic Medicine > > National Heart and Lung Institute > > Guy Scadding Building > > Royal Brompton Campus > > London SW3 6LY > > > > 0207 594 7974 > > > > http://www1.imperial.ac.uk/medicine/people/michael.cox1/ > > > > * New NHLI short course "Principles of Genomic Medicine" * > > http://www1.imperial.ac.uk/nhli/PGM > > > > > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: > > > > > > ------------------------------ > > > > Subject: Digest Footer > > > > _______________________________________________ > > Bio-Linux mailing list > > Bio-Linux at nebclists.nerc.ac.uk > > http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux > > > > > > ------------------------------ > > > > End of Bio-Linux Digest, Vol 69, Issue 1 > > **************************************** > > -- Tim Booth NERC Environmental Bioinformatics Centre Centre for Ecology and Hydrology Maclean Bldg, Benson Lane Crowmarsh Gifford Wallingford, England OX10 8BB http://nebc.nerc.ac.uk +44 1491 69 2705 From michael.cox1 at imperial.ac.uk Fri Jun 20 04:25:23 2014 From: michael.cox1 at imperial.ac.uk (Cox, Michael J) Date: Fri, 20 Jun 2014 08:25:23 +0000 Subject: [Bio-Linux] Live Bio-Linux not persistent In-Reply-To: References: Message-ID: <0CCFBD65-6384-4498-B7AB-0C47328E627D@imperial.ac.uk> Hi Tim, thanks, it went really well. There was quite a high attrition rate of sticks when we were booting up - the two most common problems were a file in /var/run no longer being writeable (or absent) and the stick not booting past the splash screen; the stick booting as command line only without xwindows (and me not remembering the command to start it). We lost about 6 to that, but with the extras we had plenty. They had all worked though as I checked them - was wondering whether these errors are easily fixable in future, or whether it?s safest simply to reclone? Managed to introduce Linux, do raw sequence processing with .sff files and QIIME, intro to R and process real datasets (NMDS and Adonis, heatmaps and some hypothesis testing) with Phyloseq in 3 hours. Then a team of sports physios and psychologists put me back together. Feedback really positive, particularly as they could take all the software, files and operating system away with them - think we?ve got some converts :) Thanks agin for your help Cheers Mike Mike Cox Research Associate Molecular Genetics & Genomics Genomic Medicine National Heart and Lung Institute Guy Scadding Building Royal Brompton Campus London SW3 6LY 0207 594 7974 http://www1.imperial.ac.uk/medicine/people/michael.cox1/ * New NHLI short course "Principles of Genomic Medicine" * http://www1.imperial.ac.uk/nhli/PGM On 19 Jun 2014, at 12:00, bio-linux-request at nebclists.nerc.ac.uk wrote: Send Bio-Linux mailing list submissions to bio-linux at nebclists.nerc.ac.uk To subscribe or unsubscribe via the World Wide Web, visit http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux or, via email, send a message with subject or body 'help' to bio-linux-request at nebclists.nerc.ac.uk You can reach the person managing the list at bio-linux-owner at nebclists.nerc.ac.uk When replying, please edit your Subject line so it is more specific than "Re: Contents of Bio-Linux digest..." Today's Topics: 1. Re: Live Bio-Linux not persistent (Tim Booth) ---------------------------------------------------------------------- Message: 1 Date: Thu, 19 Jun 2014 11:10:29 +0100 From: Tim Booth To: bio-linux at nebclists.nerc.ac.uk Subject: Re: [Bio-Linux] Live Bio-Linux not persistent Message-ID: <1403172629.5184.7.camel at balisaur> Content-Type: text/plain; charset="UTF-8" Hi Mike, Congratulations on that bit of detective work. I'd not bothered checking the Grub configuration as it didn't make any difference on our test machines, or any teaching machines I've used before, but I guess your machines boot via EFI and therefore do use Grub. Yes, persistent mode will slow the things down a bit. Unfortunately there's no avoiding this, and I think that your fix is quite correct. As I recall you are teaching today, so I hope it goes well and if you have any urgent issues please do give me a call. Cheers, TIM On Thu, 2014-06-12 at 12:12 +0100, Cox, Michael J wrote: Dear All, I think I fixed this, when I checked /boot/grub/grub.cfg there was no persistent flag. Adding this to the first menu entry line: linux /casper/vmlinuz.efi file=/cdrom/preseed/ubuntu.seed boot=casper persistent quite splash ? now renders the sticks persistent. In addition I can now see the data and tutorials that Tim loaded for me in /home. It does take a little longer to load and is slow initially, so I have some concerns that I have done something less than ideal. Comments appreciated. Thanks Mike On 12 Jun 2014, at 12:00, wrote: Send Bio-Linux mailing list submissions to bio-linux at nebclists.nerc.ac.uk To subscribe or unsubscribe via the World Wide Web, visit http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux or, via email, send a message with subject or body 'help' to bio-linux-request at nebclists.nerc.ac.uk You can reach the person managing the list at bio-linux-owner at nebclists.nerc.ac.uk When replying, please edit your Subject line so it is more specific than "Re: Contents of Bio-Linux digest..." Today's Topics: 1. Live Bio-Linux not persistent (Cox, Michael J) ---------------------------------------------------------------------- Message: 1 Date: Thu, 12 Jun 2014 09:13:37 +0000 From: "Cox, Michael J" To: "bio-linux at nebclists.nerc.ac.uk" Subject: [Bio-Linux] Live Bio-Linux not persistent Message-ID: Content-Type: text/plain; charset="windows-1252" Hi All, we?re using live USBs for a course next week that Tim kindly cloned after installing a couple of R packages and a test dataset. He?s now on his hols, so I thought I?d check to see whether the rest of the list could help me with an issue that I?m having. On boot, I couldn?t find the data that Tim added. I?ve checked by creating a file and the sticks aren?t persistent and files are removed when the USB stick is. I did find a reference that suggested creating a new user and that user account would be persistent, but no joy, new user and file removed on reboot. The additional R packages that Tim added to the distribution (dev version of PhyloSeq) are present and correct, so that at least has stayed. I have checked in: /syslinux/txt.cfg and this seems correct - the persistent flag is set on the Try Bio-Linux 7 option: default live label live menu label ^Try Bio-Linux 7 without installing kernel /casper/vmlinuz.efi append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash locale=en_GB.UTF-8 -- label live-install menu label ^Install Bio-Linux 7 kernel /casper/vmlinuz.efi append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash -- label check menu label ^Check stick for defects kernel /casper/vmlinuz.efi append boot=casper noprompt integrity-check initrd=/casper/initrd.lz quiet splash -- label memtest menu label Test ^memory kernel /install/mt86plus label hd menu label ^Boot from first hard disk localboot 0x80 This post http://ubuntuforums.org/showthread.php?t=2124124&p=12551088#post12551088 suggests editing syslinux.cfg (rather than txt.cfg) to make a Ubuntu stick persistent, which I?ve tried, but it booted up exactly as before and again was stubbornly resistant to retaining files. Can anyone suggest ways to get this working? Given the fact the R packages have remained, some aspect of this seems to be functioning? I could have the attendees download the data and course material, but would much rather they left with a copy of Bio-Linux and all their work and notes in one elegant package. Thanks very much for your help Mike Mike Cox Research Associate Molecular Genetics & Genomics Genomic Medicine National Heart and Lung Institute Guy Scadding Building Royal Brompton Campus London SW3 6LY 0207 594 7974 http://www1.imperial.ac.uk/medicine/people/michael.cox1/ * New NHLI short course "Principles of Genomic Medicine" * http://www1.imperial.ac.uk/nhli/PGM -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Subject: Digest Footer _______________________________________________ Bio-Linux mailing list Bio-Linux at nebclists.nerc.ac.uk http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux ------------------------------ End of Bio-Linux Digest, Vol 69, Issue 1 **************************************** -- Tim Booth NERC Environmental Bioinformatics Centre Centre for Ecology and Hydrology Maclean Bldg, Benson Lane Crowmarsh Gifford Wallingford, England OX10 8BB http://nebc.nerc.ac.uk +44 1491 69 2705 ------------------------------ Subject: Digest Footer _______________________________________________ Bio-Linux mailing list Bio-Linux at nebclists.nerc.ac.uk http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux ------------------------------ End of Bio-Linux Digest, Vol 69, Issue 4 **************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony.travis at abdn.ac.uk Fri Jun 20 04:53:33 2014 From: tony.travis at abdn.ac.uk (Tony Travis) Date: Fri, 20 Jun 2014 09:53:33 +0100 Subject: [Bio-Linux] Live Bio-Linux not persistent In-Reply-To: <0CCFBD65-6384-4498-B7AB-0C47328E627D@imperial.ac.uk> References: <0CCFBD65-6384-4498-B7AB-0C47328E627D@imperial.ac.uk> Message-ID: <53A3F68D.80304@abdn.ac.uk> On 20/06/14 09:25, Cox, Michael J wrote: > Hi Tim, > > thanks, it went really well. > > There was quite a high attrition rate of sticks when we were booting > up - the two most common problems were a file in /var/run no longer > being writeable (or absent) and the stick not booting past the splash > screen; the stick booting as command line only without xwindows (and > me not remembering the command to start it). We lost about 6 to that, > but with the extras we had plenty. They had all worked though as I > checked them - was wondering whether these errors are easily fixable > in future, or whether it?s safest simply to reclone? Hi, Mike. Sounds like you've had the same filesystem corruption I experienced! Please try my "bio-linux-usb-make_new" version of Tim's script that I posted here on 12 Jun. My version creates a separate ext4 partition for the persistence COW and that has solved the problem for me. Bye, Tony. -- Dr. A.J.Travis, University of Aberdeen, Institute of Biological and Environmental Sciences, Cruickshank Building, St. Machar Drive, Aberdeen AB24 3UU, Scotland, UK. tel +44(0)1224 272700, fax +44 (0)1224 272 396 http://www.abdn.ac.uk, mailto:tony.travis at abdn.ac.uk, skype:ajtravis The University of Aberdeen is a charity registered in Scotland, No SC013683. Tha Oilthigh Obar Dheathain na charthannas cl?raichte ann an Alba, ?ir. SC013683.