PDA

View Full Version : How to install BackTrack 3 Final from the shell, dual boot Win XP


goodgirl
06-21-2008, 12:17 PM
I managed to install Back|Track 3 Final

- in a dual boot configuration with Win XP
- without touching my existing MBR
- on an IBM Thinkpad X41, keeping the IBM recovery partition functional
- installing Grub boot loader on the boot partition, not the MBR

This is a hard disk install, not a live install of Backtrack, for those who do not want to run BackTrack from a CD or USB device.

In this Howto the 60 GB hard disk has got two existing partitions, the Win XP ntfs partition and the IBM recovery partition:
/dev/sda1 HPFS/NTFS
/dev/sda2 Compaq diagnostics

If you are following this Howto on a Win XP machine that is not a Thinkpad, you might only have one existing NTFS partition and your Devices (sda2, sda3, ...) will be different, so you need to adjust the commands accordingly.

What you need
Computer with Win XP installed
BackTrack 3 Final iso on a CD or DVD or USB stick to boot from
Internet connection to download Grub

Backup
Back up your entire system, there is no guarantee that it will not break.

Defrag your XP NTFS partition
While still in Win XP, defrag your NTFS drive. You will resize it to make space for the BackTrack partitions.

Boot BackTrack live from CD, DVD or USB device

Unmount the existing partitions, the BackTrack Live has automatically mounted them.
umount /dev/sda1
umount /dev/sda2

Run QTParted to resize the NTFS partition
KDE menu > System > QTParted
Resize sda1 to make free space for BackTrack and save changes. Exit QTParted.
Note: On this 60 GB drive I reduced the Win XP partition to about 10 GB, leaving enough space for a BackTrack, a /boot, a swap and a data partition.
The data partition would this way be able to hold for example some wordlists for WPA cracking.

Create Linux partitions for BackTrack
fdisk /dev/sda
Create a primary partition number sda3 1 GB in size, this will be swap
change type of primary partition sda3 to 82
Create an extended partition number sda4, use rest of free disk space
Create a new partition sda5 100 MB, this will be for /boot
Create a new partition sda6 9 GB, this will be for Backtracks root file system /
Create a new partition sda7 of remaining space, this will be for data like WPA wordlists
write partition table
quit fdisk

Format the new partitions
mkswap /dev/sda3
swapon /dev/sda3
mkfs.ext3 /dev/sda5
mkfs.ext3 /dev/sda6
mkfs.vfat /dev/sda7

Mount the new partitions so you can install BackTrack on them
mkdir /mnt/backtrack
mount /dev/sda6 /mnt/backtrack/
mkdir /mnt/backtrack/boot/
mount /dev/sda5 /mnt/backtrack/boot/
mkdir /mnt/bacltrack/boot/boot
mkdir /mnt/sda7
mount /dev/sda7 /mnt/sda7

Install BackTrack files
cp /boot/vmlinuz /mnt/backtrack/boot/boot/
cp --preserve -R /{bin,dev,home,pentest,root,usr,etc,lib,opt,sbin,va r} /mnt/backtrack/
mkdir /mnt/backtrack/{mnt,proc,sys,tmp}
mount --bind /dev/ /mnt/backtrack/dev/
mount -t proc proc /mnt/backtrack/proc/

Connect to the Internet
Using for example KDE menu > Internet > Wireless Assistant

Download and install Grub on the /boot partition and configure the menu.lst
cd /mnt/sda7
wget ftp://ftp.slackware.com/pub/slackware/slackware-current/extra/grub/grub-0.97-i486-6.tgz
installpkg grub-0.97-i486-6.tgz
grub-install --root-directory=/mnt/backtrack/root/ /dev/sda5

vi /mnt/backtrack/boot/grub/menu.lst

default 1
timeout 30

title Backtrack 3 KDE
rootnoverify (hd0,4)
kernel /boot/vmlinuz vga=791 root=/dev/sda6 ro autoexec=xconf;kdm
boot

title Backtrack 3
rootnoverify (hd0,4)
kernel /boot/vmlinuz vga=791 root=/dev/sda6 ro
boot



Making the Dual Boot
I'm using a USB stick mounted on /mnt/sdb1 to transfer the following file to Win XP. But you could also mount sda1 or sda7 and creat the .mbr file there.
dd if=/dev/sda5 of=/mnt/sdb1/backtrack3.mbr bs=512 count=1

Now reboot into Win XP and copy the backtrack3.mbr file in the root of your c:\ drive.
Now clear the read-only attribute of c:\boot.ini to be able to edit this file in notepad.
In notepad add the following line at the end of the boot.ini file:
c:\backtrack3.mbr="Backtrack 3"
Now you can activate the read-only attribute of c:\boot.ini again.

Reboot into your new BackTrack 3 Final
When you reboot now you can check that pressing your blue Access IBM button will still boot you into the IBM Recovery console.
Otherwise you will now have two boot options given by boot.ini, Win XP and BackTrack 3. Select BackTrack 3 and this will bring up the Grub boot menu, now boot into BackTrack 3 KDE.

king sabri
06-21-2008, 10:19 PM
Back GoodGirl

There was My Old Email and I forget to change my Old email to my new email to receive activation

and thank you my sistar for your interesting

Ok ....

Now what did I Mus do to install my backtrack

Parition lable format
-----------------------------------
/dev/sda1 (xp) ntfs
/dev/sda2 (linux) EXT3
/dev/sda3 (swap) swap
/dev/sda5 (work) ntfs
/dev/sda6 (Others) ntfs
/dev/sda7 (MySpace) ntfs


then how i can install the backtrack3 on ext3 directly without creat all partitions that you are tell us about its


thank you my sister

The_Denv
06-22-2008, 03:10 AM
Hey goodgirl, Welcome to the forums!
This is fantastic for your first post. I wish there were more people that did this for their first post.

Good work and enjoy your stay lassie :cool:

Ethical
06-22-2008, 08:07 AM
Thank you - for the time you put all this in such nice way .

versus
06-22-2008, 10:43 AM
i know i'm a newbie in linux stuff. I just wanted to install backtrack on dual boot with xp. i was following this tutorial until i stucked with:

bt ~ # grub-install --root-directory=/mnt/backtrack/root /dev/sda7
The file /mnt/backtrack/root/boot/grub/stage1 not read correctly.

i've tried to find the solution in the documentation but it only made me more confused while i've heard its a simple problem to fix:S

What should I do? thanks for ur patientence in advance

huatux
06-22-2008, 09:34 PM
To versus

why not use lilo ^_^
root@bt#vi /etc/lilo.conf ---configure the lilo
lba32
boot = /dev/sda5 ---notice to change the sda5 to your /boot partition
prompt
timeout = 100
change-rules
reset
vga = normal
image = /boot/vmlinuz
root = /dev/sda6 ---notice to change the sda5 to your /root partition
label = BackTrack3Final
read-only

and then
root@bt#lilo -v
root@bt#dd if=/dev/sda5 of=bt3final.mbr bs=446 count=1 ---notice to change the sda5 to your /boot partition

hope helps

ChuckHL
06-23-2008, 01:10 AM
To versus

I had the same problem after running the following code



wget ftp://ftp.slackware.com/pub/slackware/slackware-current/extra/grub/grub-0.97-i486-6.tgz
installpkg grub-0.97-i486-6.tgz
grub-install --root-directory=/mnt/backtrack/root/ /dev/sda5 <-- same faulty line issue.


The way i solved it was by running the grubconfig command (after you ran the "installpkg grub..." command, the results should have said something about using that command. I just ran the "grubconfig" command, and used that tool to set up my boot partitions correctly.

Be sure NOT to select the third option on that tool to write to the MBR (unless you really want to have grub as your main boot manager. if you do set it on your MBR, be aware there will be more configuration to be done to in order to boot in windows.

After you set the grub boot manager in the partition sda5, go to "/mnt/backtrack/boot/grub/menu.lst" OR the directory specified by the configuration tool at the end and modified the menu.lst file with the right settings.

versus
06-23-2008, 10:58 AM
thanks both of u for the help.

Edit: It's working all good:) thanks for the tutorial :)

mycr0ft
06-25-2008, 06:55 AM
i've follow almost your installing guide...
but i tried to run that LILO...
i've been edit that lilo.conf to startup...the LILO is running almost correctly,but when the BT3 is boot up,kernel panic error message shown...
is there any idea?

ozzieH4ck3r
06-26-2008, 11:03 PM
I did it... yay!!! a few hick ups as a couple of people witnessed
like:
1-
grub-install --root-directory=/mnt/backtrack/root/ /dev/sda5
The file /mnt/backtrack/root/boot/grub/stage1 not read correctly.
2 -
Coding where the "vi /mnt/backtrack/boot/grub/menu.lst" was talking about

default 1
timeout 30

title Backtrack 3 KDE
rootnoverify (hd0,4)
kernel /boot/vmlinuz vga=791 root=/dev/sda6 ro autoexec=xconf;kdm
boot

title Backtrack 3
rootnoverify (hd0,4)
kernel /boot/vmlinuz vga=791 root=/dev/sda6 ro
boot

But yep.. all good.. thanks! guys! Wicked... :D

alexsys
07-08-2008, 09:36 AM
Hello people,

I have been trying to install BT3 Final on HDD, and I followed this and other tuts. However, I still get the Kernel panic error message common to the other guys in this thread.
My configuration is:
/dev/sda1 Windows Vista Recovery partition.
/dev/sda2 Windows Vista
/dev/sda3 Linux partition (boot)
/dev/sda4 Linux partition (install)

Grub and Lilo.conf are configured to point to /dev/sda3.

When I reboot the machine, I get the grub window. Windows Vista boots up fine, but Linux throws up the usual message: kernel panic. no init found.

Any suggestions?

Thanks in advance

hell333
07-08-2008, 04:13 PM
Why do u need sda3(boot partition)? Cant u install boot and install on same partition? Just a question..

alexsys
07-08-2008, 06:11 PM
Why do u need sda3(boot partition)? Cant u install boot and install on same partition? Just a question..


To answer to your question......i don't know why you need sda3 x boot.
In the meanwhile, I just re ran the install, and did all the steps "as they are in the tutorial".
Create sda3(primary) formatted ext3,sda4 formatted ext3(extended),and sda5,sda6,sda7. Every step i have taken it's as is in the tutorial.
I still get the same error message: Kernel panic.Init not found.
I also tried all the other workarounds suggested by others, e.g. modify LILO config file, GRUB config tool, etc....
I now ran out of options. Any other suggestions of what I could do to make it work?

Thanks for your help in advance.

hell333
07-09-2008, 05:01 AM
Even i dont have any suggestion bec i am learning this things.. but here is the link by which u can learn basics and i figured out why u need boot partition..

http://forums.remote-exploit.org/showthread.php?t=7180

alexsys
07-09-2008, 05:41 AM
Even i dont have any suggestion bec i am learning this things.. but here is the link by which u can learn basics and i figured out why u need boot partition..


Hi Hell333,

And thanks for your interest.
I managed to solve the problem. The issue was in the mapping of the boot partition in lilo.conf file.
I reconfigured lilo, and got rid of GRUB. It is now working fine!
Cheers

akd110
07-17-2008, 03:16 PM
I followed the tutorial, and everything seemed fine...
Obviusly I had that error on grub settings, but I managed to solve it with grubconfig.
On loading,nevertheless, it loads but it says

Kernel panic - not syncing: No init found. Try passing init=option to kernel.

What should I do? (I'm a quite newbie of linux) :confused:

mahabad1972
08-12-2008, 12:13 AM
HI GOOD GIRL
I got lenevo 3000 n200 with 120 GB i tried to do partition but it won't let me make sda5 and sda6 and sda7 it said out of range how am i suppose to do that please help thank you

=Tron=
08-12-2008, 04:04 AM
HI GOOD GIRL
I got lenevo 3000 n200 with 120 GB i tried to do partition but it won't let me make sda5 and sda6 and sda7 it said out of range how am i suppose to do that please help thank youYou can only have 4 primary partitions on your HDD, or 3 primary plus one extended which you can divide into as many logical partitions as you wish. In other words, you need to convert one of your existing partitions into an extended and then you will be able to create sda5, sda6 and sda7 as logical partitions.

spayre
08-14-2008, 05:47 AM
not to take anything from the TS, but just want to clarify one thing from you guys..

for those who successfully followed the tutorial (minus the grub part), your kismet.conf that you edit is at

/pentest/svn/kismet-devel/conf/kismet.conf

or

/usr/local/etc/kismet.conf

??? cause i tried both but the first one allows the source changes to be permenantly stored....

=Tron=
08-14-2008, 05:56 AM
for those who successfully followed the tutorial (minus the grub part), your kismet.conf that you edit is at

/pentest/svn/kismet-devel/conf/kismet.conf

or

/usr/local/etc/kismet.conf

??? cause i tried both but the first one allows the source changes to be permenantly stored....Editing the first one will do you no good, and I can't really see why the second one would not allow you to save the changes unless you are running kismet at the same time. But what does editing the kismet.conf file have to do with a thread explaining how to install BT3F? :confused:

spayre
08-14-2008, 08:14 PM
Editing the first one will do you no good, and I can't really see why the second one would not allow you to save the changes unless you are running kismet at the same time. But what does editing the kismet.conf file have to do with a thread explaining how to install BT3F? :confused:

true... but the scenario is that

on my live changes usb, the file that i edited was /usr/local/etc/kismet.conf and it did allow changes to be stored.

but following this guide, if you go to /usr/local/etc/kismet.conf , you wont find the place to configure your sources, instead the place to configure sources was at /pentest/svn/kismet-devel/conf/kismet.conf

so i find it weird that two diff installation method yield in two diff places to configure in order to run kismet...

=Tron=
08-15-2008, 04:36 AM
but following this guide, if you go to /usr/local/etc/kismet.conf , you wont find the place to configure your sources, instead the place to configure sources was at /pentest/svn/kismet-devel/conf/kismet.conf

so i find it weird that two diff installation method yield in two diff places to configure in order to run kismet...Even though I have not actually followed this tutorial for my HDD installation of BT3F I can tell by looking at it that there should be nothing resulting in a difference of the sort that you are mentioning. Make sure that your permissions for the /usr/local/etc/kismet.conf file are set so that you are able to modify it, as this should be the only potential thing keeping you from editing it.

However, did kismet actually work after editing the file at the other location, since as far as I am concerned it should not help you to achieve the required result?

spayre
08-15-2008, 05:02 AM
Even though I have not actually followed this tutorial for my HDD installation of BT3F I can tell by looking at it that there should be nothing resulting in a difference of the sort that you are mentioning. Make sure that your permissions for the /usr/local/etc/kismet.conf file are set so that you are able to modify it, as this should be the only potential thing keeping you from editing it.

However, did kismet actually work after editing the file at the other location, since as far as I am concerned it should not help you to achieve the required result?

if i edited /usr/local/etc/kismet.conf and run kismet, it works. But if i want to run kismet again, the file at /usr/local/etc/kismet.conf has changed back to default! permission i tried already...

the funny thing is that i edited /pentest/svn/kismet-devel/conf/kismet.conf and it works! plus, if i try to re-run kismet, the changes are still there! weird, huh....

=Tron=
08-15-2008, 05:42 AM
if i edited /usr/local/etc/kismet.conf and run kismet, it works. But if i want to run kismet again, the file at /usr/local/etc/kismet.conf has changed back to default! permission i tried already...

the funny thing is that i edited /pentest/svn/kismet-devel/conf/kismet.conf and it works! plus, if i try to re-run kismet, the changes are still there! weird, huh....Sounds weird indeed, but if it is working now I guess everything is just fine and dandy. :)