PDA

View Full Version : Changing default keyboard without persistent changes


Niros
07-14-2008, 06:44 AM
This is a mini guide on changing the default keyboard layout, that will also serve as the point I stop lurking and start contributing.

Sample file (http://www.load.to/?d=fSY6Uzh3rf) (British Layout) Simply put in /BT3/modules/
(The file is deleted if its inactive for 30 days, PM me if its gone)

---You will require:---
Backtrack 3 beta or 3 final
Removable media (If Backtrack is booting from a flash drive/external hard drive its fine to use that)
Another blank CD if you run Backtrack from CD

--Stage 1--

Get yourself booted into Backtrack KDE. Simple enough.

--Stage 2--

In the bottom right beside the clock should be the keyboard language selection panel

Right click on the panel, if your layout is shown select it and move to stage 3

If your layout is not shown, choose the "configure" option. In the new window browse through the list for your layout and then click the "add" button

Confirm with the "OK" button then Right click on the panel, select your layout and move to stage 3

--Stage 3--

Ensure the correct layout and corresponding image is displayed.

Open up terminal, (The black icon that looks like a computer screen)

Type, (Replace yourlayoutnamehere with whatever you deem suitable)
dir2lzm /mnt/live/memory/changes yourlayoutnamehere.lzm
This may take a while to complete, or it could be instant.

NOTE: As you may have realized, this saves all changes you have made. Make sure you ONLY alter your keyboard layout.

--Stage 4--

Open up your "Home" directory, (This should be an icon on your desktop)

You should see your newly created lzm this is a module that effectivly tells Backtrack to change your layout when you boot.

You will need to store this file,

If you are running Backtrack from CD you will need to put it on some removable media (Don't forget to unmount the drive otherwise it might not write properly)
Then you need to add yourlayoutnamehere.lzm to
/BT3/modules
(on the CD) this will likely have to be done within another operating system and a new CD burnt

If you are running Backtrack from USB drive you simply need to copy the file from your home directory to your drive. This is usually found in
/mnt/
Have a check through the available drives to see which is the correct one.

Once it is copied, ensure the computer is shut down properly and not just powered off (I don't think Backtrack will let you unmount the location its booting from)

--Stage 5--

Reboot and enjoy

-Final Notes
It is possible for this to be applied in many ways, resolution changes, new applications and even newly created files.

Any issues/amendments feel free to PM

wyze
07-14-2008, 08:05 AM
Thanks for posting this as I see people wanting this very information often. Also if you can possibly check/add this to the official wiki (http://www.google.com/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Fbacktrack.offensive-security.com%2F&ei=vEJ7SNCxMZnysAPGnJWNDw&usg=AFQjCNGjTzw6HY_gofihO6Oq28JGP3YtiQ&sig2=529hLclzIvQTE2-Fvf8rdg).

calypso
07-24-2008, 02:57 PM
Sorry so I have created this module using the commands in the turoial and have saved it to a safe place. Where do I place this module on my hd install, so that everytime I log on it has the correct keymap

Calpyso

calypso
08-23-2008, 04:55 PM
Ok my BT3 install screwed up the other day so i decided it was time for a reinstall and i thought i would give this a try again,

1. I put the .lzm file i created in BT3/modules and then burnt the iso using poweriso to a disk, but when i boot it up i get the following error:-

Boot failed press any key to rety
ISOLINUX 3.36 2007-02-10 isolinux: image checksum error, sorry...


2. I want a hd install so, if i mange to boot up this modified iso image, do i need to change of my below bt3 install script




#!/bin/bash
# make sda3 ext3

echo "installing Backtrack3"

echo "mkswap /dev/sda4"
mkswap /dev/sda4

echo "swapon /dev/sda4"
swapon /dev/sda4

echo "mkdir /mnt/backtrack"
mkdir /mnt/backtrack

echo "/dev/sda3 /mnt/backtrack/"
mount /dev/sda3 /mnt/backtrack/

echo "/mnt/backtrack/boot/"
mkdir /mnt/backtrack/boot/

echo "/dev/sda3 /mnt/backtrack/boot/ "
mount /dev/sda3 /mnt/backtrack/boot/

echo "cp --preserve -R /{bin,dev,home,pentest,root,usr,etc,lib,opt,sbin,va r} /mnt/backtrack/ "
cp --preserve -R /{bin,dev,home,pentest,root,usr,etc,lib,opt,sbin,va r} /mnt/backtrack/

echo "mkdir /mnt/backtrack/{mnt,proc,sys,tmp}"
mkdir /mnt/backtrack/{mnt,proc,sys,tmp}

echo "mount --bind /dev/ /mnt/backtrack/dev/"
mount --bind /dev/ /mnt/backtrack/dev/

echo "mount -t proc proc /mnt/backtrack/proc/"
mount -t proc proc /mnt/backtrack/proc/

echo "cp /boot/vmlinuz /mnt/backtrack/boot/"
cp /boot/vmlinuz /mnt/backtrack/boot/

echo "Install finished"
echo "Configuring Lilo"

echo "chroot /mnt/backtrack/ /bin/bash"
chroot /mnt/backtrack/ /bin/bash

echo "splash -s -f /etc/bootsplash/themes/Linux/config/bootsplash-1024x768.cfg >> /boot/splash.initrd"
splash -s -f /etc/bootsplash/themes/Linux/config/bootsplash-1024x768.cfg >> /boot/splash.initrd

echo "nano /etc/lilo.conf"
nano /etc/lilo.conf


#Also, before the line #Linux bootable partition config ends line, like-- right above it you are going to add this line:
#initrd = /boot/splash.initrd


3. anyone know any command to echo every command instead of manually writing it in?

Cheers Calypso

calypso
08-26-2008, 05:22 AM
Ok figured out my problems here is a quick guide which I think finishes off the tutorial:-


mkdir /tmp/INSTALL //makes directory
mkdir /mnt/iso //makes directory
mount -o loop -t iso9660 path_of_your_iso /mnt/iso //mounts all files from your .iso
cp -rf /mnt/iso/* /tmp/INSTALL/ //copies iso files to INSTAL dir
cp myModule.lzm /tmp/INSTALL/BT3/modules/
cd INSTALL/BT/
./make_iso.sh //makes a new iso image

//now all you need to do is burn your new iso image to a disk using a program such a nero

ref: http://backtrack.offensive-security.com/index.php/Howto:Mod_Linux

pureh@te
08-26-2008, 06:44 AM
Or you could have just used the reverse command of dir2lzm.

b~#lzm2dir (filename).lzm /


That command will install a .lzm to a hard drive install