Login (generic cert)
Logout
Guests 25
If you can walk and chew gum at the same time, you can run GNU/Linux
Blog Pushes

debian tutorials
debiantutorials.org is built on and runs on Debian.

 

Creative Commons License
Debian lenny live on your Flash Drive
Boot Debian live from a flash drive Print E-mail
Written by machiner   
Tuesday, 03 March 2009 09:37

...All the cool kids are doing it. If you have a minute and a spare 2Gb or > flash drive laying around, this is how you can load Debian on it.

Get yourself an image: pick one (here is the Xfce4 live image.), plug in your flash drive, memory stick, usb drive, whatever you call it...

You'll need to know the device address of your drive and you can find this out quickly by checking with any number of utilities that will reveal the address of your drive:

Some example commands to get the device address you need include the following:

  • fdisk -l will list your drives including the one you just plugged in. Run it as root.
  • ls -la /dev/disk/by-id/usb-* will show you a listing
  • dmesg | grep SCSI will show you devices
  • tail -f /var/log/messages will show you the address of the new drive you just plugged in

..There are myriad ways to get the dev address that you need.

Before you install Debian live on your flash drive make sure that you have formatted the drive. I normally fire-up gparted (partition editor in your menu) and format my flash drive as one 4Gb ext3 partition. Then, it's important to make the drive bootable. Choose the boot flag from a menu in gparted. Make sure the drive stays unmounted when you finish with gparted. That's it and now you're ready to install Debian live on it. You may close gparted.

Now, in your terminal you use dd to "install" the image to your drive.

# dd if=debian-live-500-i386-xfce-desktop.img of=$USBDRV

where $USBDRV is the dev address of your drive. For example: /dev/sdb or similar.

this is what I just did:

lapbox:/home/machiner/Desktop# fdisk -l

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x475d475c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         742     5960083+  83  Linux
/dev/sda2             743        1107     2931862+  82  Linux swap / Solaris
/dev/sda3            1108       14602   108398587+  83  Linux
/dev/sda4           14603       38913   195278107+  83  Linux

Disk /dev/sdb: 4102 MB, 4102887936 bytes
255 heads, 63 sectors/track, 498 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00030040

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1         498     4000153+  83  Linux

#dd if=debian-live-500-i386-xfce-desktop.img of=/dev/sdb

1079296+0 records in
1079296+0 records out
552599552 bytes (553 MB) copied, 62.0236 s, 8.9 MB/s
lapbox:/home/machiner/Desktop# 

All finished. Of course, we could get very detailed with an article like this, but it's very simple and if you have issue we do have a forum where problems are solved.

--machiner 3mar09

Comments
Add New
+/-
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:angry::0:confused::cheer:B):evil::silly:
:dry::lol::kiss::D:pinch::(:shock:
:X:side::):P:unsure::woohoo::huh:
:whistle:;):s:!::?::idea::arrow:
 
bibimidi  - Re: Boot Debian Live   |198.36.32.xxx |2009-04-10 19:18:21
Hey machiner!

Been lurking around here and glad to find your site. Overall very informative, helpful and it
*ROCKS*!

Where do you put location of iso.img during the dd exercise? I *think* in the current directory
you are executing the command?

Keep it up!
O'Rly Factor  - Why do you smash the partition table?   |71.43.53.xxx |2011-04-01 03:59:03
Why do you dd the ISO to /dev/sdb after writing a partition table to it? That blows away your /dev/sdb1
partition because it overwrites the partition table you made with gparted!
machiner  - I do a lot of redundant things   |75.138.188.xxx |2011-04-01 05:17:40
Thanks for your comment. Of course you're right. But there is a method to my madness.

I have found that
throwing tasks in anywhere, even if they are redundant to whatever particular task is at hand, is helpful to
new learners.

If you look around you will see that I add in extra steps or redundant or sometimes
unnecessary steps. It's like advertising, I want that reader to remember the fundamentals so I throw them in
everywhere.

Maybe it helps, maybe it makes me look inefficient or ignorant. I dunno. It seems to work
with my kids.

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated on Thursday, 02 April 2009 18:35