Last revision : February 18th, 2007
Perhaps you've run into this situation before : what to do with a machine that has no CD reader ? Or maybe you have simply no mean of getting your hands on a Ubuntu CD ?
Now you can install Ubuntu Edgy (or any other Ubuntu version) on it using a USB key as small as 64 mb.
Debian users had a method for installing from USB that worked very well (here it is). But this it new to Ubuntu.
Here is how to do it.
You'll need a USB key (of at least 64mb). Beware that all previous data on this key will be lost.
Then you have to install some packages.
sudo apt-get install lilo dosfstools util-linux syslinux mtools
A word of caution :
Yes, we install lilo, but there is no harm in doing that, we'll only use it on the USB key : so do not follow lilo's instructions (otherwise it will overwrite GRUB and install itself on the MBR).
Now plug in the USB stick and issue that command :
dmesg | grep -C6 "USB Mass Storage"
Which should output something like that :
[17182459.364000] usb 5-7: new high speed USB device using ehci_hcd and address 5
[17182459.576000] Initializing USB Mass Storage driver...
[17182459.576000] scsi4 : SCSI emulation for USB Mass Storage devices
[17182459.576000] usb-storage: device found at 5
[17182459.576000] usb-storage: waiting for device to settle before scanning
[17182459.576000] usbcore: registered new driver usb-storage
[17182459.576000] USB Mass Storage support registered.
[17182464.580000] Vendor: Flash Model: Drive UT_USB20 Rev: 0.00
[17182464.580000] Type: Direct-Access ANSI SCSI revision: 02
[17182464.580000] SCSI device sdb: 128000 512-byte hdwr sectors (66 MB)
[17182464.580000] sdb: Write Protect is off
[17182464.580000] sdb: Mode Sense: 00 00 00 00
[17182464.580000] sdb: assuming drive cache: write through
In this case, that means /dev/sdb is the USB key, which is the one I'll be using from now on.
First make sure that the key is unmounted :
sudo umount /dev/sdb
Then partition the USB stick :
sudo cfdisk /dev/sdb
Make one primary partition, which includes the whole drive. This partition must be made bootable, and must be of type FAT16 (so type 06 in cfdisk). In the end, don't forget to write those changes to disk !
Finally you must format the drive in FAT16 :
sudo mkdosfs -n "Edgy" /dev/sdb1
Actually putting an Edgy installer on the USB stick can be done following these steps .
First, download the installer :
Of course, you can replace edgy with any other Ubuntu version, like the upcoming feisty for example (by downloading this installer instead).
Then you can proceed with the rest and uncompress the installer on the USB key :
sudo mount -o loop boot.img /mnt
sudo mount /dev/sdb1 /media/Edgy
sudo cp -r /mnt/* /media/Edgy/
sudo umount /dev/sdb1
sudo syslinux /dev/sdb1
sudo lilo -M /dev/sdb mbr
That's it !
Now you simply have to boot from that USB key, and you are good to go.
My source :
Monday, November 27, 2006
Last revision : February 18th, 2007
Thursday, November 23, 2006
Last revision : March 29th, 2007
Firefox 2.0 has been out for quite some time now.
You can install an updated version of Firefox quite easily in Debian or Ubuntu. Here is how.
First, download your Firefox version of choice. We'll use Firefox 2.0 (126.96.36.199 in fact) for this tutorial :
You can also use the latest Seamonkey if you want a full featured Internet suite (browser and email client).
Once you have Firefox, choose a place to install it. I'll install it in ~/apps/firefox/ :
mkdir -p ~/apps/
which is in fact /home/<your_user>/apps/.
Then put Firefox in that directory :
tar zxf firefox-188.8.131.52.tar.gz ~/apps/
Once uncompressed, we need to configure the plugins.
Delete the default (empty) Firefox 2.0 plugins directory :
rm -r plugins
Then make a link from your old browser plugins directory :
ln -s /usr/lib/mozilla/plugins/
ln -s /usr/lib/firefox/plugins/
Of course, this new Firefox will use any plugins already present in ~/.mozilla/plugins/.
That's it, the executable for the new Firefox is /home/<your_user>/apps/firefox/firefox, so make a shortcut for it and start using it.
Any plugins installed with your old browser will work just as well in Firefox 2.0. If the Flash and Java plugins weren't already installed, take a look at these tutorials, on Flash 9 and Java.
Tuesday, November 14, 2006
Last revision : April 24th, 2007
A quick and easy tutorial about how to install NVIDIA drivers as simply as possible.
In this tutorial, I use sudo to get root privileges. Check out this tutorial if you need help in configuring sudo.
As a starting point, download the latest stable drivers.
Then you'll need to install a few packages :
sudo apt-get install build-essential linux-headers-$(uname -r)
Debian Sarge users have to replace linux-headers with kernel-headers.
First you'll need to kill the X server. You can do that by switching to console #1 : press CTRL-ALT-F1 simultaneously.
Once there, log in with your username and password.
Stop the graphical login manager :
sudo /etc/init.d/gdm stop
Then install the drivers :
sudo sh NVIDIA-Linux-x86-1.0-9755-pkg1.run
and follow the installation process.
Make sure you tell the installer to automatically modify your /etc/X11/xorg.conf file so you'll end up using the NVIDIA drivers.
If you haven't, then you simply have to make a few changes to your /etc/X11/xorg.conf file. Here they are. Debian Sarge users have to modify /etc/X11/XF86Config-4 instead.
In Section "Modules" comment the dri and GLcore modules :
In Section "Device" make sure you use the NVIDIA driver :
And finally comment the whole Section "DRI" :
# Mode 0666
Here is an example xorg.conf file with the proper changes made.
Once done, load the NVIDIA module :
sudo modprobe nvidia
And restart the graphical login manager, which will bring back X :
sudo /etc/init.d/gdm start
If you happen to update your kernel, then you don't need to reinstall the whole NVIDIA driver, but only the kernel module. So running this command will do the trick :
sudo sh NVIDIA-Linux-x86-1.0-9755-pkg1.run -K
Thursday, November 02, 2006
You like Linux a lot, but you miss the old time CTRL-ALT-DEL feature ? Pressing CTRL-ALT-DEL in this famous OS called Windows brings a very handy task manager, opening a world of new possibilities : it informs you on ressources consumption of all running processes, it allows you to kill an unresponsive process, etc.
With minimal tweaking, you can get this neat tool in Linux too.
These instructions will work on any Linux distributions running the GNOME desktop environment (default in Debian and Ubuntu).
KDE users can simply press CTRL + ESC to bring the task manager, and skip this HOW-TO.
Make sure you have gnome-system-monitor installed (this will be our "task manager"). In Debian or Ubuntu :
sudo apt-get install gnome-system-monitor
will install it.
Then, instructions will differ depending on the windows manager you use : Metacity or Compiz. If you don't know, just do both parts, it will work just as well. Note that all commands below are to be run without root privileges, so just do it as a normal user.
Simply typing those 2 lines in a terminal will do it :
gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_9 "<control><alt>Delete"
gconftool-2 -t str --set /apps/metacity/keybinding_commands/command_9 "gnome-system-monitor"
The commands are similar, and still 2 lines :
gconftool-2 -t str --set /apps/compiz/general/allscreens/options/run_command9_key "<control><alt>Delete"
gconftool-2 -t str --set /apps/compiz/general/allscreens/options/command9 "gnome-system-monitor"
If you are feeling lazy, just run this small script I prepared. Of course, read it before you execute it (don't trust anyone). Then simply typing:
will do the trick.
That's it, just press CTRL-ALT-DEL and feel the magic !
Wednesday, November 01, 2006
Last revision : April 29th, 2007
On July 14th, Szakacsits Szabolcs, a developer for the Linux-NTFS project published a major update of the Linux NTFS driver. It is now possible to write to an NTFS partition in a safe manner.
I've tested it for months now and I have yet to report any issue. In fact, I have had more troubles with the old NTFS driver which allowed read-only operations on NTFS partitions. On February 21th, 2007, the first stable release of NTFS-3G was released as version 1.0.
So here we go...
First, download NTFS-3g. 2 packages are needed here: ntfs-3g and libntfs-3g. You can use wget to download them:
Then install the dependencies:
sudo apt-get install fuse-utils libfuse2
Finally you can install ntfs-3g (using the 2 Debian packages you just downloaded):
sudo dpkg -i libntfs-3g0_0.0.0+20061031-6_i386.deb
sudo dpkg -i ntfs-3g_0.0.0+20061031-6_i386.deb
No need to download anything, nor to install any dependencies. Simply typing:
sudo apt-get install ntfs-3g
will do the trick.
Mounting partition is done quite simply. For example, this command (one line):
sudo mount -t ntfs-3g /dev/sda1 /mnt/windows -o umask=0,nls=utf8
will mount a partition (/dev/sda1 in that case, replace with your actual windows partition) on the /mnt/windows directory (which must exist and be empty), using the utf8 character set (for maximum compatibility with foreign languages) and giving read/write/execute permissions to everyone.
Once you have established that this command work fine on your system, you can add an entry for it in /etc/fstab:
/dev/sda1 /mnt/windows ntfs-3g umask=0,nls=utf8 0 0
If you wish, you can unmount that partition in the standard way:
sudo umount /dev/sda1
The output of
sudo fdisk -l | grep -i ntfs
will tell you the location of your windows partition.