LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Blogs > Notes on Linux
User Name
Password

Notices



I leave notes here that I find particularly worth remembering myself.
  1. Old Comment

    USB stick with Ubuntu Live system doesn't boot - why?

    Quote:
    Originally Posted by drkitty View Comment
    THANK YOU! THANK YOU1 I'd been beating my head against the monitor and trying *every* version of creating an Ubuntu boot usb drive. You were *absolutely* right that the "small print": needs to be set up as an installable drive is totally useless without some of idea of *how* one makes an installable drive. I followed your steps here and it worked like a charm.
    Glad it helped!
    Posted 11-21-2012 at 05:54 AM by bittner bittner is offline
  2. Old Comment

    USB stick with Ubuntu Live system doesn't boot - why?

    THANK YOU! THANK YOU1 I'd been beating my head against the monitor and trying *every* version of creating an Ubuntu boot usb drive. You were *absolutely* right that the "small print": needs to be set up as an installable drive is totally useless without some of idea of *how* one makes an installable drive. I followed your steps here and it worked like a charm.
    Posted 11-20-2012 at 09:03 AM by drkitty drkitty is offline
  3. Old Comment

    USB stick with Ubuntu Live system doesn't boot - why?

    Quote:
    Originally Posted by grizlbr View Comment
    I just formatted removable disk as fat32 boot from Ubuntu live. Reboot to physicaly remove thumb drive and return to 'Try' option before you insert disk into usb or slot to mount file system or ubuntu will ask to boot from serial drive2. From System Administration choose Create Boot Disk, format and set rw space to allow room for updates. First attempt gave disk full error.
    Was that a question? Is there anything I can help you with? Have you tried step-by-step what I described above?
    Posted 04-16-2012 at 08:21 AM by bittner bittner is offline
  4. Old Comment

    USB stick with Ubuntu Live system doesn't boot - why?

    I just formatted removable disk as fat32 boot from Ubuntu live. Reboot to physicaly remove thumb drive and return to 'Try' option before you insert disk into usb or slot to mount file system or ubuntu will ask to boot from serial drive2. From System Administration choose Create Boot Disk, format and set rw space to allow room for updates. First attempt gave disk full error.
    Posted 01-21-2011 at 03:39 PM by grizlbr grizlbr is offline
  5. Old Comment

    Shortest command to calculate the sum of a column of output

    Calculate using Bash when bc is not installed

    A much better alternative to bc than using a lengthy for loop is using Bash's calculation capability directly. Interestingly, I've figured out, there are two ways of assigning a value to a variable this way:
    • (( A=1+1 ))
    • A=$(( 1+1 ))
    The spacing after and before the double-brackets is optional. The above calculation exercise would then read like this:

    Code:
    ((SUM=$(dpkg-deb -c mypackage.deb | sed -e 's/.*root\s*//' -e 's/\s*2010-.*$//' | xargs | tr ' ' +)))
    or
    Code:
    SUM=$(($(dpkg-deb -c mypackage.deb | sed -e 's/.*root\s*//' -e 's/\s*2010-.*$//' | xargs | tr ' ' +)))
    Posted 08-25-2010 at 04:12 AM by bittner bittner is offline
  6. Old Comment

    Howto build your own Debian repository

    "generate" silently fails sometimes (workaround)

    Sometimes, for some reason I have not yet fully figured out apt-ftparchive generate puts old (probably cached) data into the Packages file. You only note this problem when, e.g., the .deb file size has changed and the old size doesn't match the new size anymore. In this special case apt-get will then complain:
    Code:
    E: Failed to fetch http://....
      Size mismatch
    You can work around this issue using the packages command:
    Code:
    $ cd /home/bittner/Development/debian/mirror
    $ apt-ftparchive -c personal-archive.conf packages \
      pool/personal/main > dists/personal/main/binary-i386/Packages
    $ apt-ftparchive -c personal-archive.conf release \
      dists/personal > dists/personal/Release
    Of course, if your mirror hosts several components and architectures you have to loop over all of them to generate separate Packages files.
    Posted 08-06-2010 at 09:22 AM by bittner bittner is offline
  7. Old Comment

    Shortest command to calculate the sum of a column of output

    Usually, bc should be installed on your Debian system. If you don't have it you could simply use a for loop that's built into bash:

    Code:
    SUM=0; for i in $(dpkg-deb -c mypackage.deb | sed -e 's/.*root\s*//' -e 's/\s*2010-.*$//' | xargs | tr ' ' +); do SUM=$(($SUM+$i)); done; echo $SUM
    Or probably easier to read:
    Code:
    NUMBERS=$(dpkg-deb -c mypackage.deb | sed -e 's/.*root\s*//' -e 's/\s*2010-.*$//' | xargs | tr ' ' +)
    SUM=0; for i in $NUMBERS; do SUM=$(($SUM + $i)); done
    echo $SUM
    You will notice that this takes a while, because the for loop is slow. Here, stripping out the 0-value lines may make sense...
    Posted 06-02-2010 at 07:57 AM by bittner bittner is offline

  



All times are GMT -5. The time now is 01:44 AM.

Main Menu
Advertisement

Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration