Solved

BT3 not working with Linux partition on USB drive

Posted on 2009-07-09
6
395 Views
Last Modified: 2013-12-15
I'm in process of creating a bootable BackTrack 3 USB drive. From this link...

http://wirelessdefence.org/Contents/Backtrack3_USB_Howto.htm

...I have successfully created two partitions as confirmed from the shell window using fdisk (code below)  
please note USB drive listed as sdb

______________________

bt ~ # fdisk /dev/sdb

The number of cylinders for this disk is set to 7228.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdb: 2013 MB, 2013265920 bytes
17 heads, 32 sectors/track, 7228 cylinders
Units = cylinders of 544 * 512 = 278528 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        3677     1000128    b  W95 FAT32
/dev/sdb2            3678        7228      965872   83  Linux

______________________

...I then proceed to the mkdir command...(code below)

_____________________

bt ~ # mkdir /usb
bt ~ # mkdir /usb1
bt ~ # mount /dev/sdb1 /usb
bt ~ # mount /dev/sdb2 /usb1
mount: No such file or directory

______________________


...fsck is unsuccessful thus far (code below)


______________________

bt ~ # fsck -a /dev/sdb2
fsck 1.39 (29-May-2006)
/sbin/e2fsck: Bad magic number in super-block while trying to open /dev/sdb2
/dev/sdb2:
The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

bt ~ # e2fsck -b 8193 /dev/sdb2
e2fsck 1.39 (29-May-2006)
e2fsck: Bad magic number in super-block while trying to open /dev/sdb2

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

______________________

It looks like I will need to delete and recreate the partition since repairing it
doesn't look like an option.


Help!
0
Comment
Question by:Tech_20
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 7

Expert Comment

by:unSpawn
ID: 24821807
Short answer: see 'mkfs'. Long answer: 'fdisk' preps your medium and divides it partitions. The Id "(0x)83" just marks the partition in the partition table as being of type "Linux". It doesn't format the partition to have a filesystem. So between 'fdisk' and and 'mount' the HOWTO missed the 'mkfs' command (you could email 'em that if you care).
0
 

Author Comment

by:Tech_20
ID: 24835670
unSpawn,

Can you reply with an example of using the mkfs command in this context?
0
 

Author Comment

by:Tech_20
ID: 24835708
Better yet, unSpawn, please confirm if this link below provides the proper syntax (along with any other updates). Thanks.

http://www.linfo.org/mkfs.html
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 7

Accepted Solution

by:
unSpawn earned 500 total points
ID: 24836034
>Can you reply with an example
Tweaking any settings seems not necessary, so: for ext2: 'mkfs /dev/sdb2' and for ext3: 'mkfs.ext3 /dev/sdb2' (but you don't really need journalling me thinks).

>please confirm if this link below
I'd rather use something like "http://linux.die.net/man/8/mkfs.ext3" or "http://linux.die.net/man/8/mke2fs".

Have fun!
0
 

Author Comment

by:Tech_20
ID: 24858282
I'll try that. Thanks.
0
 

Author Comment

by:Tech_20
ID: 24874803
it worked! see code below!!


_________________________

bt ~ # mke2fs /dev/sdb2
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
120832 inodes, 241468 blocks
12073 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=247463936
8 block groups
32768 blocks per group, 32768 fragments per group
15104 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question