SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2011-08-20 14:26:20

hhh
Caught in the Vortex
From: Port Salerno
Registered: 2010-08-04
Posts: 1,479

Debian Net Install Over WPA Encrypted Wireless via a USB Drive

By sort-of request from my friend Koleoptero.

http://crunchbanglinux.org/forums/post/139182/#p139182

tYTAxZw

koleoptero wrote:

@hhh: I wish I had that patience to do what you did with the netinstall. I have a partition waiting for debian w xfce. It's just that the modem/router is in the kitchen. sad

Most of this I learned straight from the Debian Wiki...
http://wiki.debian.org/WiFi/HowToUse

This tutorial is going to be hand-holdy, because I've followed too many tutorials only to get to Step 17 and suddenly go "Zuh???". I hate that crap, so if you run into a Zuh moment, post a question here and I or someone else will gladly clear it up. As a result of not wanting to assume very much, this post will be long. I'm sorry for that, but I'm sure experienced users can skim through and quickly pick out the relevant bits they need. Yes, this guide is dumbed down, but I don't understand the GNU/Linux position of "This is the year of the Linux desktop! But I figured it out myself after years of hunching over a keyboard, so you can too, n00b!" If I've made a mistake in my instructions, please post here or PM me so I can fix it. Thanks.

I'll divide this up into the following sections...
1) Prepare
2) Notes on the Minimum Install
3) Get the Wireless Files
4) Install the Wireless Files
5) Essentials
6) Xfce Setup (skip this if you just want Openbox)
7) Openbox Setup
glasses Notes on Network Manager and Compiling

*****************************
1) PREPARE

You'll need...
~a USB drive (the net.iso image is under 200MB and the wireless files are under 1MB, so you can do the entire process with a single 256MB drive).
~ how your computer identifies that drive (such as /dev/sdb1, a link for help with that is coming up in a minute)
~the module file, such as rt73usb, for your wireless device. Usually this is part of a firmware package, such as firmware-ralink, but you'll still need the name of the specific enclosed module file your driver uses so you can bring the network up when the time comes.
~the name and WPA passkey of your wireless network
~a free partition and the Debian netinst.iso...
~a Debian source (and maybe a backup in case the mirror is being synced when you are doing this) such as...

deb http://mirror.anl.gov/debian/ squeeze main contrib non-free

Debian mirrors...
http://www.debian.org/mirror/list

For the i386 ISO torrent...
http://cdimage.debian.org/debian-cd/6.0 … so.torrent

For the amd64 ISO torrent...
http://cdimage.debian.org/debian-cd/6.0 … so.torrent

For non-torrent and other architectures...
http://www.debian.org/CD/netinst/

For instructions on how your computer identifies your USB drive and transferring the ISO to USB...
http://crunchbanglinux.org/wiki/statler … stallation

To revive your USB after it's been overwritten by dd you can use Gparted to create a new partition table (under the Device menu in Gparted) and then reformat it to Fat32.

**********************************
2) NOTES on the Minimum Install

I'll briefly cover the netinst.iso base install and then you can grab the files for wireless, in case you're using just one USB drive...

Install the netinst.iso image onto a partition. When it gets to "Configuring the network with DHCP" choose Cancel (or just let it run and fail) and choose "Configure the network at a later time". Later in the install you'll be asked if you want to install SSH. If you don't know what SSH is just leave the default settings (SSH unselected, the other check-box selected). Install Grub, finish the installation and return to your previous OS to get the needed wireless packages.

Reformat your USB to Fat32 using Gparted if you're using the same drive for the next section.

*******************************
3) GET the Wireless Files

You'll need the following 6 .deb files. Scroll down to the bottom of the linked pages, choose your architecture and on the page it brings you to right-click a mirror link and save the file...

wpasupplicant
wireless-tools
libdbus-1-3
libiw30
libnl1
libpcsclite1

You'll also need to create a text file named "interfaces" (without quotes) and add the following to it (replace mynetworkname/mysecretpassphrase with your network's name/passphrase.)...

auto wlan0
iface wlan0 inet dhcp
    wpa-ssid mynetworkname
    wpa-psk mysecretpassphrase

NOTE: I'm unclear about wireless network labels, you may need to replace the two wlan0 labels here, with eth0 for example, and in the upcoming "bring up the network" step.


Finally, you'll need your wireless firmware, such as firmware-ralink, or the individual module file, such as rt73usb. For simplicity, remove any files from the USB drive you'll use in the next step. Then transfer the 8 files (the 6 .deb files above, "interfaces" and your wireless firmware/driver) to your USB and you're ready.

**********************************
4) INSTALL the Wireless Files

In the "identify USB/transfer ISO" link above, there was this line...

Replace /dev/sdX with the actual hard disk device learned from the command above. In this example /dev/sdb NOT /dev/sdb1

We're not using dd any more, so this time you'll need the full path, /dev/sdb1 in this example.

When you reboot into your new install, at the Grub screen you'll probably want to hit "e" to temporarily add vga=791 to your boot options so the console text isn't so honking large (and to add nomodeset if you lose the screen because your graphics drivers aren't installed yet). For the truly novice, that means arrow down to the line just past where it says "ro quiet", arrow back once, add a space and add your temporary boot option(s).

Proceed with the boot and you should arrive at a console prompt. Login as root. Insert the USB drive and wait a few seconds for the drive to be recognized. I got a UTF8 warning, you can just continue typing or you can hit [Ctrl+c] for a new console prompt. Usually you create a directory before you mount a drive, but /mnt is empty right now so I'm just using that. Mount the drive, replacing /dev/sdb1 with your drive path if it's different...

mount /dev/sdb1 /mnt

Switch to the USB directory...

cd /mnt

Install the .deb files (the * is a wildcard, all .deb files on the drive will be installed)...

dpkg -i *.deb

If your wireless driver was in a deb package, it's now installed to /lib/firmware. If it was a single file, copy it to /lib/firmware (replace rt73usb with your file name yadda yadda yadda)...

cp rt73usb /lib/firmware

Copy "interfaces" to /etc/network...

cp interfaces /etc/network

Restrict the permissions of "interfaces"...

chmod 0600 /etc/network/interfaces

Activate the wireless module...

modprobe rt73usb

Bring up the network while crossing your fingers, holding your breath and praying to Shiva and Zeus (ignore the resolv.conf warnings, that file will automatically be created)...

ifup wlan0

*NOTE: As mentioned earlier, your wireless label may be different than wlan0, for instance eth0.*

Leave the USB directory...

cd

Unmount the drive and remove it...

umount /dev/sdb1

Just one more pain in the butt step now, if you're like me and hate Vi as much as I hate Randy Newman's singing/songwriting (thank you for making fun of him, Family Guy). You need to fix  /etc/apt/sources.list with Vi. Vi is a console text editor that I hate. I hate it. I hate it...

vi /etc/apt/sources.list

Delete the first line, arrow down to the next line to delete that, and keep deleting them one-by one till you have an empty file except for squiggly lines. Now go to an empty line, press "i" (for "insert) and carefully type in your mirror...

deb http://mirror.anl.gov/debian/ squeeze main contrib non-free

Hit [Esc] to leave "insert" mode. To save the file, hit :x a.k.a. [Shift+;]  ... I hate it.

The moment of truth...

apt-get update

If there are no errors, HOOZAAH!

For good measure (and definitely if you used a wheezy or sid mirror instead of squeeze)...

apt-get dist-upgrade

You're now connected to your network via wpa_supplicant. If you later install wicd or network-manager you'll need to change the "interfaces" file, see section 8.

One more thing, in my /etc/fstab file I commented out (put a # in front of) the following lines at the end of the file. You may see something similar, depending on what media you installed the netinst.iso from and what drives your computer has...

#/dev/sdb        /media/cdrom0   udf,iso9660 user,noauto     0       0
#/dev/scd0       /media/cdrom1   udf,iso9660 user,noauto     0       0
#/dev/sdb1       /media/usb0     auto    rw,user,noauto  0       0

If you're comfortable with Vi you can do that now, or just wait till you have a working desktop and can use the editor of your choice.

********************************
5) ESSENTIALS

OK, nothing is really "essential", but now what? A window server and sound...

apt-get install xorg alsa-base oss-compat

And some basic security tools...

apt-get install sudo gksu

Set up sudo...

visudo

Arrow down to right below the line that says "root   ALL=(ALL) ALL" and type the same, only replace "root" with your user name...

hhh      ALL=(ALL) ALL

type [Ctrl+o], type [Backspace] 4 times so the file name is "/etc/sudoers", type [Enter], type "y" (ignore the message about sudoers.tmp being unchanged), type [Ctrl+x].

Last edited by hhh (2011-08-22 02:59:29)

Offline

Help fund CrunchBang, donate to the project!

#2 2011-08-20 14:27:28

hhh
Caught in the Vortex
From: Port Salerno
Registered: 2010-08-04
Posts: 1,479

Re: Debian Net Install Over WPA Encrypted Wireless via a USB Drive

**********************
6) XFCE SETUP (skip this if you just want Openbox)

If you want to install Xfce...

apt-get install xfce4 xfce4-goodies gdm gnome-icon-theme

Additionally, I'd install a browser, some fonts to make the web look better, and plugins to play media from the web. *Note* gecko-mediaplayer also pulls in gnome-mplayer which can play both audio and video files from your hard drive, but the default mediaplayer for Crunchbang is VLC (apt-get install vlc)...

apt-get install iceweasel msttcorefonts unifont flashplugin-nonfree gecko-mediaplayer

*Note* Sometimes flashplugin-nonfree won't install, I think because it's getting updated. If that happens, just run the command without that package, you can install it later or enable the Debian Multimedia repository and install flashplayer-mozilla instead.

If you want a GUI for package management...

apt-get install synaptic

This GUI tool makes installing .deb packages easy...

apt-get install gdebi

These gtk2 engines will make quite a few themes look better...

apt-get install gtk2-engines-murrine gtk2-engines-pixbuf

These are the Crunchbang-specific packages, you may want a few from there (maybe notify-osd instead of Xfce's built-in xfce4-notifyd)...
http://packages.crunchbanglinux.org/statler/pool/main/

-edit- I think Xfce's archiver, squeeze (found in xfce4-goodies) doesn't handle very many formats by default, so either install p7zip-full, zip, unzip and unrar or remove squeeze and install file-roller and unrar (my preference) or xarchiver and unrar. -end edit-

Reboot, you should see the Debian Spacefun login screen.

*************************
7) OPENBOX SETUP

There are a lot of options here, since you are putting together a desktop setup piece by piece, so I'll just show you what I did to get the setup in the opening screenshot and offer alternatives where I know what I'm talking about (in parenthesis, before the apt-get install code). I chose what I thought were the lightest and/or most intuitive programs. I used the --no-install-recommends option for a few applications to keep the setup smaller, I did those lines by themselves since I don't know if that switch effects every package named on the same line as it or not. You'll probably want...

Openbox...

apt-get install openbox obconf

A file manager (thunar is the Crunchbang file manager, you could install that instead)...

apt-get install pcmanfm --no-install-recommends

A basic icon set so your file manager doesn't look broken...

apt-get install gnome-icon-theme

A text editor (mousepad, gedit)...

apt-get install leafpad

A terminal-emulator (xterm, terminator, many others)...

apt-get install xfce4-terminal --no-install-recommends

A browser (chromium)...

apt-get install iceweasel

Fonts to make the web look better...

apt-get install msttcorefonts unifont

Plugins to play media in your browser (are these for Iceweasel only? I don't know, I don't use Chromium). *Note* gecko-mediaplayer also pulls in gnome-mplayer which can play both audio and video files from your hard drive, but the default mediaplayer for Crunchbang is VLC (apt-get install vlc)...

apt-get install flashplugin-nonfree gecko-mediaplayer

*Note* Sometimes flashplugin-nonfree won't install, I think because it's getting updated. If that happens, just run the command without that package, you can install it later or enable the Debian Multimedia repository and install flashplayer-mozilla instead.

A login manager (slim)...

apt-get install gdm

If you want a GUI for package management...

apt-get install synaptic

This GUI tool makes installing .deb packages easy...

apt-get install gdebi

These gtk2 engines will make quite a few themes look better...

apt-get install gtk2-engines-murrine gtk2-engines-pixbuf

A panel...

apt-get install tint2

A file archiver (file-roller+unrar)...

apt-get install xarchiver unrar

A Run dialog (bind it to a keyboard shortcut/menu entry, the command is xfrun4, gmrun is an alternative)...

apt-get install xfce4-utils

An image viewer (viewnior, ristretto)...

apt-get install gpicview

A task manager (htop)...

apt-get install xfce4-taskmanager

Conky (not shown in the screenshot, I don't use it)...

apt-get install conky

An image viewer that will set an image as your wallpaper...

apt-get install feh

*Note* Right-click an image and Open with Feh, right-click the image in Feh and choose "Image>Background>Scaled (or something, I'm going by memory on this). Close Feh. Now add the following to Openbox's autostart.sh so the wallpaper will still be there for your next session...

sh ~/.fehbg &

More info on Feh...
https://wiki.archlinux.org/index.php/Fe … er_manager

Popup notifications...

apt-get install xfce4-notifyd

These are the Crunchbang-specific packages, you may want a few from there, such as volumeicon, cairo-compmgr OR xcompmgr-dana for compositing (shadows), notify-osd instead of xfce4-notifyd...
http://packages.crunchbanglinux.org/statler/pool/main/

Reboot, you should see the Debian Spacefun login screen.

For info on configuring Openbox...
http://openbox.org/wiki/Help:Getting_st … pproach.29
http://urukrama.wordpress.com/openbox-guide/
https://wiki.archlinux.org/index.php/Openbox

*****************************************
glasses NOTES on Network Manager and Compiling

If  you want to manage more than one network connection, you'll want to install Network Manager...

apt-get install network-manager-gnome

... or Wicd...

apt-get install wicd

If you do, you will need to edit /etc/network/interfaces...
-edit- *to be clear, I mean replace what you put in this file before with the following*

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

If you plan to compile packages, I believe this will get you started...

apt-get install libgtk2.0-dev

-edit- DON'T use the --no-install-recommends option here or I believe build-essential won't get installed. -end edit-

I think that's everything. I hope that helps and post or PM if I messed anything up.

-edit- For mp3 and DVD playback, enable the Debian Multimedia repository for your Debian version and install lame and libdvdcss2.

Last edited by hhh (2011-08-20 21:36:51)

Offline

#3 2011-08-20 14:58:30

machinebacon
#! unstable
From: PRC
Registered: 2009-07-02
Posts: 6,212
Website

Re: Debian Net Install Over WPA Encrypted Wireless via a USB Drive

Standing ovations! You did a great job, thank you! I haven't read all of it in detail yet, but it looks thorough. smile

BTW I think this should definitely be in " Tips & Tricks! "

Last edited by machinebacon (2011-08-20 16:18:18)


Start Distrohopping here! -> Break your own... cool  VSIDO  cool LinuxCNC  kiss Frugalware <- It's all just a kernel.

Offline

#4 2011-08-20 15:03:00

hhh
Caught in the Vortex
From: Port Salerno
Registered: 2010-08-04
Posts: 1,479

Re: Debian Net Install Over WPA Encrypted Wireless via a USB Drive

Thanks! We'll see what anonymous says about moving it (maybe WM/DE?).

Offline

#5 2011-08-20 15:59:57

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 8,899

Re: Debian Net Install Over WPA Encrypted Wireless via a USB Drive

Already moved smile


Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Offline

#6 2011-08-20 16:50:31

koleoptero
#! Junkie
From: Athens, Greece
Registered: 2011-03-03
Posts: 401

Re: Debian Net Install Over WPA Encrypted Wireless via a USB Drive

Holy sh..... that's lengthy mate. big_smile I'll get to it tomorrow (too late now) and post my results.


I Can't Sing

Offline

#7 2011-08-20 16:56:38

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 8,899

Re: Debian Net Install Over WPA Encrypted Wireless via a USB Drive

Some suggestions and comments:

  • For compiling you may also want build-essential.

  • For archiving, you may also want p7zip-full

  • Doesn't #! Openbox use gmrun instead of xfrun4?

  • Why do you suggest installing gnome-keyring?


Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Offline

#8 2011-08-20 20:10:44

hhh
Caught in the Vortex
From: Port Salerno
Registered: 2010-08-04
Posts: 1,479

Re: Debian Net Install Over WPA Encrypted Wireless via a USB Drive

@anonymous, thanks for moving this and checking it over...

  • I could have sworn that libgtk2.0-dev pulled in build-essential if you don't use  the --no-install-recommends switch.

  • Ditto xarchiver/squeeze and p7zip-full. File-roller pulls it in for sure.

  • I don't think so, though #! uses gmrun. I like xfrun4 better because you type in 1 letter and a dropdown-list of previous programs you've run starting with that letter appears. The list is stored in ~/.cache/xfce4/xfrun4/history. Of course, gmrun is an option.

  • gnome-keyring will hold your password (for gksu, for example) till the end of your session so you only have to enter it once. Doesn't #! use gnome-keyring?

I thought the packages I suggested gave me a functional desktop pretty similar to #!. I'll double check the issues you mentioned today and make the fixes necessary.

Thanks again! smile

-edit- OK, I was right, libgtk2.0-dev (when installed  WITHOUT --no-install-recommends) installs 84 packages including build-essential, build-essential installs 22. I'll make a note in the OP.

xarchiver and file-roller both pull in p7zip-full, zip and unzip. Squeeze does not, I'll make a note.

gksu pulls in gnome-keyring no matter what, so apt-get install gksu gnome-keyring is redundant.

Last edited by hhh (2011-08-20 21:05:39)

Offline

#9 2011-08-20 21:43:03

MrPink
#! CrunchBanger
From: .dk
Registered: 2011-06-28
Posts: 210

Re: Debian Net Install Over WPA Encrypted Wireless via a USB Drive

Excellent walkthrough. I did this yesterday, but in a slightly different way.

I made a Sid Netinstall usb stick with Unetbootin, plugged it in, and installed the base system with no DE. When the installer asked for wifi firmware, I had it ready on a separate usb stick.

After the install, I added the Crunchbang repo to sources.list and then apt-get install xorg crunchbang-openbox-packages. After copying the config files from /etc/skel/ to /home/$user I got the standard Statler Openbox desktop.

If you want Xfce, you can set desktop=xfce as boot parameter, and mark Desktop Environment for installation. The installer will then do the work for you.

Offline

#10 2011-08-20 22:00:00

gurtid
#! Junkie
From: NEW ZEALAND
Registered: 2011-04-07
Posts: 360

Re: Debian Net Install Over WPA Encrypted Wireless via a USB Drive

thank you.


all your Base are belong to us

Offline

#11 2011-08-20 22:03:48

hhh
Caught in the Vortex
From: Port Salerno
Registered: 2010-08-04
Posts: 1,479

Re: Debian Net Install Over WPA Encrypted Wireless via a USB Drive

@Mr. Pink, nice. I couldn't get the netinst.iso to transfer to USB via unetoobtin. Also, although I've transferred the firmware to the standard installer before, it wouldn't allow WPA encryption, only WEP or an open network.

@gurtid, thank you for the thanks!

Offline

#12 2011-08-20 23:07:11

MrPink
#! CrunchBanger
From: .dk
Registered: 2011-06-28
Posts: 210

Re: Debian Net Install Over WPA Encrypted Wireless via a USB Drive

Instead of downloading an .iso, I chose Debian unstable in the menu at the top. Unetbootin will download the files for you.

Offline

#13 2011-08-21 00:24:56

hhh
Caught in the Vortex
From: Port Salerno
Registered: 2010-08-04
Posts: 1,479

Re: Debian Net Install Over WPA Encrypted Wireless via a USB Drive

@MrPink, gotcha. That explains why you were prompted for missing firmware too, the installer for the ISOs I linked to don't offer that option.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo