Friday, November 27, 2009

What If boot USB stick doesn't boot because of bios. Make a special boot cdrom

Make a USB Boot CD for CrunchBang Linux

The following tutorial will enable you to create a USB Boot CD that can be used to Boot CrunchBang Linux from a USB Flash Drive on systems that do not natively support booting from USB. The USB Boot CD uses a grub bootloader to launch the vmlinuz kernel and initrd from the CD, loading the necessary USB drivers, and then proceeds to locate and extract the compressed filesystem from the flash drive. CrunchBang Linux is a unique remix based on Ubuntu.

USB Boot CD for CrunchBang Linux creation essentials:

* PC with a BIOS that does not support booting from USB
* CrunchBang Live CD
* Working CD Drive and USB Port
* Flash drive with CrunchBang preinstalled (see earlier article below)

How to Create a CD to Boot CrunchBang from USB

1. Insert the CrunchBang Live CD and restart, booting from the CD
2. Open a terminal and type mkdir -p usbcdcb/boot/grub
3. Type cp /usr/lib/grub/i386-pc/stage2_eltorito usbcdcb/boot/grub
4. Type gedit usbcdcb/boot/grub/menu.lst
5. Add the following information to your menu.lst file and save it

title Run CrunchBang from USB DISK
root (cd)
kernel /boot/vmlinuz file=/cdrom/preseed/custom.seed boot=casper noprompt cdrom-detect/try-usb=true persistent quiet splash
initrd /boot/initrd.gz

6. Type cp /cdrom/casper/initrd.gz ~/usbcdcb/boot
7. Type cp /cdrom/casper/vmlinuz ~/usbcdcb/boot
8. Type mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o usbcdcb.iso usbcdcb
9. Burn the usbcdcb.iso to a CD

Booting from the USB Boot CD for CrunchBang

  1. Shutdown your computer
  2. Insert the USB Boot CD and your CrunchBang USB drive
  3. Set your BIOS or Startup Menu to boot from CD
  4. Start your computer (booting from the CD)

The USB Boot CD should load the necessary USB drivers, locate filesystem.squashfs on your flash drive, and then proceed to boot CrunchBang from the USB device.

This works like a charm.


Persistent USB drive CrunchBang install

This means you can save your settings an have a system going.

The following tutorial covers the process of installing CrunchBang Linux to a USB Flash Drive via the CrunchBang Live CD. In addition, the casper persistence feature will be utilized to allow a user to save and restore changes automatically. CrunchBang Linux is based on Ubuntu, featuring a lightweight Openbox window manager.


Creating a CrunchBang Persistent Flash Drive from the Live CD

  1. Download the CrunchBang 8.10.01 ISO and burn it to a CD ( I used 9.04 Jaunty Jackalope)
  2. Reboot your PC from the CrunchBang Live CD
  3. Insert your USB flash drive
  4. Open "terminal emulator" and type sudo su
  5. Now type fdisk -l to list available drives/partitions (note which device is your flash drive Example: /dev/sdb). Throughout this tutorial, replace all instances of x with your flash drive letter. For example, if your flash drive is sdb, replace x with b. The following step 6 I did with Gparted
  6. Type fdisk /dev/sdx
    • type p to show the existing partition and d to delete it
    • type p again to show any remaining partitions (if partitions exist, repeat the previous step)
    • type n to make a new partition
    • type p for primary partition
      • type 1 to make this the first partition
      • hit enter to use the default 1st cylinder
      • hit enter again to use the default last cylinder
      • type a to make this partition active
      • type 1 to select partition 1
      • type t to change the partition filesystem
      • type 6 to select the fat16 file system
      • type w to write the new partition table
  7. Remove and reinsert your flash drive
  8. Type umount /dev/sdx1
  9. Type mkfs.vfat -F 32 -n CrunchBang /dev/sdx1 ( I kept the usb drive on fat16 because I read somewhere Fat32 could lead to problems )
If you have problems giving the usb drive a label see here:

I use this:
sudo mlabel -i bracket_device_bracket ::bracket_label_bracket

got this error

If you get a message like this: Total number of sectors (7831520) not a multiple of sectors per track (63)!

You can easily ignore the check by running this command:

echo mtools_skip_check=1 >> ~/.mtoolsrc

This instruction supposes your pc can boot from an USB stick. My bios made that impossible. In the next story howto boot a boot USB with a boot cdrom and how to make a boot cdrom like that

Thursday, November 26, 2009

How do I format a USB stick

1) If not already installed,use synaptic to install gparted

2) umount usb drive

3) use gparted to format the drive

4) remount usb stick

Friday, November 13, 2009

Problems with multiple sound sources

I had problems with playing mp3 after a watching a youtube movie.
Found this solution:

Sound problems in Hardy? Multiple sources not working?

Hardy now uses Pulseaudio as the default sound backend in Gnome. Though this is a good development (esd wasn't maintained anymore, various apps use different sound backends), this also creates a lot of problems.

For me, the situation was as follows: I have an Intel HDA sound chip on my mainboard. Very low tech by today's standards, but otherwise works fine. My sound setup was the default as I had done a fresh install Hardy. This gave me a sound setup that either work for Pulseaudio (which is a drop-in for esd), so I had Rhythmbox working, or worked for Firefox (Flash), depending on which I started first. That sucks. Sometimes you want both at the same time, or just pause on to run the other, not closing it completely.

I think I have that working now pretty well. This is how it goes:

First, install some extras: libflashsupport [this I skipped having the latest flash], libasound2-plugins and libsdl1.2debian-pulseaudio. These are libs to support Pulseaudio for Adobe's Flash, for Alsa and for SDL. The SDL lib will replace the default Alsa backend for SDL.
This is what goes into your /etc/asound.conf or .asoundrc in your home folder:
pcm.pulse {
type pulse
ctl.pulse {
type pulse
pcm.!default {
type pulse
ctl.!default {
type pulse

Then run "asoundconf set-pulseaudio" to fix up your personal Alsa configuration to redirect to Pulseaudio.

Thursday, November 12, 2009

Dmenu in Gnome

Using Openbox I liked the Dmenu program very much.
You can also use in Gnome though.
First install dwm-tools via synaptic or with sudo apt-get install dwm-tools in terminal.
If you don't like the grey color change in
/usr/bin (for instance via Nautilus as root gksudo nautilus) and put in the following script:
$(dmenu_path | dmenu -fn '-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859-*' -nb '#000000' -nf '#FFFFFF' -sb '#0066ff')

In newer versions dmenu_run is what was before.

So in terninal do dmenu_run to activatie the program.
Of course that makes no sense; we have to make a keybinding.
Standard keybinding is alt+f4; if you want to change that:
we change a keybinding with metacity:

If it is a new command or you want to check the command number: Open GConf editor (Applications -> System Tools -> Configuration Editor), go to apps -> metacity -> keybinding_command; choose a command for instance command_2

Now go to Navigate to:
and change the keybinding of the dmenu command number by selecting it and typing the new value.
and give it this value: /usr/bin/ or /usr/bin/dmenu_run

Wednesday, November 4, 2009

unp for fast unpacking of multiple zip or rar files

If you want to extract multiple packed files at once unp is a nice option:
unp is a small perl script which makes extraction of any archive files a bit easier. It support several compressors and archiver programs, chooses the right one(s) automatically and extracts one or more files in one go.

You may also want to install some non-free packages like “unace-nonfree”, “unrar-nonfree” and “lha” to extract archives of these types.

Install unp in ubuntu

sudo apt-get install unp

When you unrar multiple different rar files, put them in the same directory and , open the terminal there and do
unp *.part1.rar
unp is a small script with only one goal: Extract as many archives as possible, of any kind and from any path to the current directory, preserving the subdirectory structure where needed. Is a Do-What-I-Want utility and helps managing several extraction programs without looking for needed options for the particular tool or worrying about the installation of the needed program.

In contrary to gunzip which decompresses the file in the target directory of the source file,unp will use current directory for output.

  • Share/Bookmark

Blog Archive

About Me

Exclusion of liability Regarding StillStupid: The use you make of the guides, tips and downloads that you listed on this web site or on another website to which I refer is entirely at your own risk. In no way can I be held liable for damage or consequential damages of any kind, which occurs as a result of that use.