Fri, 20 Jan 2012
/Linux/misc:
Running and Installing Debian from a USB Stick
So unbelievably easy[1]:
cat debian.iso > /dev/sdX
sync
I grabbed the latest net install[2] ISO, did the above, popped it into
my new laptop, hit F12 during boot to get the boot menu, and picked the
USB option. Never had such a swift and painless install....
Update:
And then there was Ubuntu Lucid. Not so easy. The ISO will not boot from USB per the above. After a bit
of flailing around, it seems the easiest way (and so far the only way) that has worked for me is to
use usb-creator, which is packaged with Lucid. And only works with X, there is no console version.
Yes, that means you need a running Lucid desktop to do this. Lame. The package that needs to be
installed is usb-creator-gtk. Note that you can invoke it from the following menu:
System --> Administration --> Startup Disk Creator
but that did not work for me either, there were errors. What I did was installed the sux package,
logged into root in a terminal by invoking sux, and then invoked usb-creator-gtk as root. Then it worked,
and the USB stick booted.
[1] http://www.debian.org/releases/stable/i386/ch04s03.html.en
[2] http://www.debian.org/CD/netinst/
posted at: 07:51 | path: /Linux/misc | permanent link to this entry
Sun, 13 Sep 2009
/Linux/misc:
Removable Storage Should Always Mount on the Same Mount Point
I am writing this as of the kernel 2.6.30/udev era, on Debian
testing.
I have a an external USB hard drive that I use all the time. When I boot
from scratch, the default udev configuration always assigns the first
partition to /dev/sda1. However, when I suspend and then resume, udev
likes to put it somewhere else, /dev/sdb1 for instance. Therefore an
/etc/fstab entry of the following variety:
/dev/sda1 /mnt/usbfat vfat user,exec,dev,suid,rw,umask=0000 0 0
will not always work because there is no guarantee the partition will
get /dev/sda1 every time. The solution is to identify the partition by
its label in /etc/fstab. First assign a label to the partition.
For a FAT partition, use the mtools package. First configure
mtools by adding the following line
drive x: file="/dev/sdb1"
to /etc/mtools.conf. (This of course assumes that the drive is being
assigned currently to /dev/sdb1, which you can verify in
/var/log/syslog.) Then write the label to the partion:
# mlabel x:
Volume has no label
Enter the new volume label : USBFAT1
For an ext2/ext3 partition, use:
# e2label /dev/sdb1 USBEXT1
For KDE users, and probably Gnome users as well, this is already enough, it should automount on
insertion to the same mount point every time. If you are using a window manager with fewer
bells'n'whistles, you probably need to explicitly specify the mount point. There are two ways to set up
/etc/fstab. Edit /etc/fstab to contain ONE of the following lines:
LABEL=USBFAT1 /mnt/usbfat vfat user,exec,dev,suid,rw,umask=0000 0 0
OR
/dev/disk/by-label/USBFAT1 /mnt/usbfat vfat user,exec,dev,suid,rw,umask=0000 0 0
Unplug your USB drive, wait a few seconds, then plug it back in. Now
type:
mount /mnt/usbfat
References:
http://wiki.archlinux.org/index.php/Persistent_block_device_naming
http://reactivated.net/writing_udev_rules.html
posted at: 05:51 | path: /Linux/misc | permanent link to this entry
Thu, 16 Apr 2009
/Linux/misc:
101 Things You Can Do On Linux But Not on Microsoft Windows
I might not make it all the way to 101, but I will give it a go:
- You can update almost all system software (except for the kernel)
without rebooting.
- In fact, Linux can be kept running for months through many updates,
without a single shutdown or reboot or system crash. Server
administrators literally do this all the time.
- Go for years without having to re-install your computer. "Bit rot"
does not exist in Linux. It will keep booting and working without
deterioration through an endless succession of minor and major software
updates, until your hard drive finally fails (don't forget to make
periodic backups!!).
- Take no specific precautions against viruses / trojans / worms /
malware, and go for years without seeing one infect your computer. (I
have gone ten years, most of that a full-time Linux user.)
- If your screen is locked-up, your system is not necessarily crashed.
It might be just the X-Window Server that is hosed. First try to restart
the X-server with Ctrl-Shift-BackSpace. If the keyboard is not
responding, try to login to the machine from another computer with
SSH[1] and restart the Window manager (kill the "X" process). Either of
these options would be better for your hard drive then killing the
power.
- Not enough memory to run everything you want to run at the same
time? Run a piece of software on another (UNIX / Linux) computer and
display its window on the computer you are sitting at. Just login to the
other computer from a terminal using "ssh -X", start the program from
the command line of the terminal that is now talking to the other
computer, and its window will pop up right where you are
sitting.
- Trivially run a web server or e-mail server on your desktop. Most
Linux distributions install most servers with defaults that have it
running almost instantly, out of the box. Little or no configuration
required.
- If you are experiencing system problems, see the low-level error
logs that your system is producing (and Microsoft Windows invariably
hides) in the files contained within the /var/log/ directory.
- Trivially get the source code for any sofware running on your
computer, and (non-trivially) fix / change it, if you so desire.
- Have a complete functioning computer system that will do most of
what most people need, where all installed (Open Source[2]) software is
completely free, and legally so.
- (For common Linux distributions[3]) Install and update all of the
above software, both system AND USER PROGRAMS, from one single unified
software archive. (No chasing all over the internet to find
software....)
- For software that is not available in the free archives, find
almost anything else you want, also for free, in other archives that may
or not be legal in the jurisdiction where you live. Add these to your
list of archives, and updating all installed software continues to be a
simple one-step process.
- If you have problems with a given piece of software, usually it is
easy to find and send a bug report to the programmers who work on it. If
the problem you are reporting is serious, or the fix very simple, they
will probably give you a quick reply.
- Have your main computer be a zippy Linux install, that the latest
bloated version of Microsoft Windows cannot even be installed on, let
alone run on. In 2008, my fastest machine is a Pentium III 1.1 GHz with
256M of memory. I am a power user so the memory is a bit light, I need
to spend some more money on this machine that I bought for just over
US$200.
- Build
your own Linux router[4] (wired, wireless, or both, just need to
somehow provide the requisite number of network cards) with the latest
and greatest up-to-date software using an almost worthless Pentium One
laptop. All you need are two PCMCIA card slots so that you can plug in
two network cards.
- Have multiple IDENTICAL copies of files or directories in different
places. Edit one copy and all are changed, because all the copies are
POINTING TO THE SAME CONTENT on the disk. In the Unix world, there are
actually two slightly different ways to do this: "symbolic" links and "hard"
links.
- Choice: choose and install different "kinds" (distributions[5][6][7]) of
Linux specializing in special needs: speed, mimimum use of disk space,
"bleeding edge" vs. stable software, education, etc....
- More choice: from within any installed Linux distribution, choose from a
long list of different window managers, allowing one to choose between
desktops that are radically different in appearance and function.
[1] http://www.openssh.com/
[2] http://en.wikipedia.org/wiki/Open_source_software
[3] http://distrowatch.com/
[4] http://blog.langex.net/index.cgi/Linux/router-bridge/build-your-own-router.html
[5] http://en.wikipedia.org/wiki/List_of_Linux_distributions
[6] http://www.linux.org/dist/list.html
[7] http://distrowatch.com/
posted at: 04:54 | path: /Linux/misc | permanent link to this entry
Wed, 08 Oct 2008
/Linux/misc:
Linux Desktop Memory Requirements Still Very Light
For the vast majority of Linux software, 256 Meg is RAM is quite
sufficient, and memory is not a bottleneck.
However, I find myself using at least three pieces of software that
are outrageous memory hogs, and in fact having any two of them running
at the same time causes swapping and brings my 256 Meg machine to its
knees. Unfortunately, all three are essential applications, so I just
spent a few dollars to upgrade to 640 Meg (which so far seems to be
enough to 100% avoid noticeable swapping).
The three offenders are:
- Firefox[1]: Due to its good multimedia support and
many useful plugins, Firefox is the current de facto standard browser in
the Linux world. I keep trying to move to other browsers, but I always
end up coming back to Firefox.
- Miro[2]: the best internet television / download
client / video library I can find. I look forward to seeing 2.0, and
hope it will be less of a resource hog.
- Trader Workstation[3]: Interactive Brokers proprietary
Java trading app. I am just thankful they are providing a good
multi-platform piece of software, and do not plan on giving them a hard
time because it just happens to be a bloated and memory-hungry Java app.
I wish all banks and brokerages were so friendly towards non-Micro$oft
users.
[1] http://www.mozilla.com/en-US/firefox/
[2] http://www.getmiro.com/
[3] http://www.interactivebrokers.com/en/p.php?f=tws&ib_entity=llc
posted at: 14:53 | path: /Linux/misc | permanent link to this entry