Thursday, May 12, 2011

Debian Live

Debian Live is pretty mature with the squeeze release. I downloaded an image to copy to a usb flash drive. Had to make a few tweaks to get it working the way I wanted. With my first post on this blog, I'm going to attempt a brief walkthrough (assuming you already run GNU/Linux):

Step 1
Download an *.img file from
http://cdimage.debian.org/cdimage/release/current-live/i386/usb-hdd/
(assuming you plan to use a computer with an intel processor)

The LXDE version is the smallest. That version and the XFCE version can fit on a 1GB usb drive. The GNOME and KDE versions require a 2GB or larger drive.

Step 2
Follow the manual below, but there are extra steps I needed.
http://live.debian.net/manual/en/html/the-basics.html

(a) Use "dmesg" or "ls -l /dev/disk/by-id" to identify your usb drive. Suppose your drive is "/dev/sdc". Be paranoid in ensuring you have the right identification or risk wiping out a hard disk later!

(b) What you need to do is then unmount the usb drive (assuming it has existing partitions already), without "safely ejecting" it.

So run "umount /dev/sdc1" and "umount /dev/sdc2", etc. as necessary.

(c) Now you are ready to wipe out the contents of the usb drive and load the Debian Live system onto the drive. This will override all contents on the device you indicate below!

Example: "dd if=debian-live-6.0.1-i386-gnome-desktop.img of=/dev/sdc"
The image must be written to the device, not a partition on the device.

Step 3
The next thing is to use the rest of the space on the usb drive to contain your files, which is known as "persistence". I think I had some trouble the first few times because I immediately tried to create a partition out of the remaining space after Step 2.

So, what you should do is "safely eject" the usb drive first, then plug it back in again. Use "palimpsest" or "gparted" or similar disk utilities to create an ext4 partition out of the remaining space, and give the partition the label "home-rw".

This label name for the partition is special, and Debian Live will know to automagically mount it as the "/home" partition and fold it seamlessly into the filesystem.

Step 4
The final step is to enable persistence as a default. When you plug in the usb drive into a running Linux system (or even a Windows system, since the partition containing the Debian Live image is a FAT partition), go into the "syslinux" folder and edit the text file "live.cfg". Add the word "persistent" (without the quotes) to the end of the last line in the code blocks for the labels "Live" and "Live 686". Save the file and you're done!

Testing
To use or test your Debian Live, plug it in to a computer before switching it on. You'll need a computer that allows you to choose to boot from the usb drive. Once you do that, everything should work when you choose either the "Live" or the "Live 686" option in the graphical Debian boot prompt. In case you're wondering, "686" is for dualcore and more advanced processors. Enjoy!

[posting from Debian Live]

1 comment: