LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-17-2009, 04:22 AM   #1
vin_akleh
LQ Newbie
 
Registered: Sep 2009
Posts: 19

Rep: Reputation: 0
Question partition usb flash disk


i made 2 partitions using backtrack for my flash drive and i cant seem to restore it without partitions, need help
"bt ~ # fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 9 72261 83 Linux
/dev/sda2 10 134 1004062+ 82 Linux swap
/dev/sda3 135 1044 7309575 83 Linux

Disk /dev/sdb: 2097 MB, 2097152000 bytes
2 heads, 63 sectors/track, 32507 cylinders
Units = cylinders of 126 * 512 = 64512 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1500 94468+ b W95 FAT32
/dev/sdb2 1501 2000 31500 83 Linux"
 
Old 09-17-2009, 04:30 AM   #2
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by vin_akleh View Post
i made 2 partitions using backtrack for my flash drive and i cant seem to restore it without partitions, need help
Could you explain the problem you are having? Is the drive partitioned, or not partitioned? You say both.
 
Old 09-17-2009, 04:35 AM   #3
vin_akleh
LQ Newbie
 
Registered: Sep 2009
Posts: 19

Original Poster
Rep: Reputation: 0
i think it is partitioned because windows cant see the other partition and it says that it is less than 2GB when in fact it is 2GB even, ubuntu can't mount that flash drive so i need to restore it because know it is useless to me.
thanks in advanced.
 
Old 09-17-2009, 04:52 AM   #4
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by vin_akleh View Post
i think it is partitioned because windows cant see the other partition and it says that it is less than 2GB when in fact it is 2GB even, ubuntu can't mount that flash drive so i need to restore it because know it is useless to me.
thanks in advanced.
Please define "restored." Do you want to:

1. Recover data from the drive?
2. Make it bootable as a Linux installation?
3. Turn it into a Windows -formatted drive for temporary storage?
4. Erase it and start over?

Please ... say clearly what you want.
 
Old 09-17-2009, 04:54 AM   #5
vin_akleh
LQ Newbie
 
Registered: Sep 2009
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by lutusp View Post
please define "restored." do you want to:

1. Recover data from the drive?
2. Make it bootable as a linux installation?
3. Turn it into a windows -formatted drive for temporary storage?
4. Erase it and start over?

Please ... Say clearly what you want.
i want to make it all 1 partition fat32 or ext2
 
Old 09-17-2009, 03:22 PM   #6
vin_akleh
LQ Newbie
 
Registered: Sep 2009
Posts: 19

Original Poster
Rep: Reputation: 0
Exclamation

Quote:
Originally Posted by lutusp View Post
Please define "restored." Do you want to:

1. Recover data from the drive?
2. Make it bootable as a Linux installation?
3. Turn it into a Windows -formatted drive for temporary storage?
4. Erase it and start over?

Please ... say clearly what you want.
all those questions and u dont have any answer!!!
any body can help???
 
Old 09-17-2009, 03:28 PM   #7
j_jerry
Member
 
Registered: Sep 2009
Distribution: fedora 11
Posts: 318

Rep: Reputation: 46
vin_akleh,

As said above its not clear from your question, what you're trying to do.

Please explain it clearly and we'll try to help you
 
Old 09-17-2009, 03:30 PM   #8
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Did you tried gparted to reformat the drive ?
If you plug the drive in windows, can't you reformat the drive?


Quote:
all those questions and u dont have any answer!!!
What if you answered the questions
 
Old 09-17-2009, 03:48 PM   #9
vin_akleh
LQ Newbie
 
Registered: Sep 2009
Posts: 19

Original Poster
Rep: Reputation: 0
[QUOTE=repo;3687439]Did you tried gparted to reformat the drive ?
If you plug the drive in windows, can't you reformat the drive?

were can i fined gparted on backtrack or how to downlaod it??
when i plug it in windows it only sees the fat fromated partition and only formats that part.
 
Old 09-17-2009, 03:53 PM   #10
j_jerry
Member
 
Registered: Sep 2009
Distribution: fedora 11
Posts: 318

Rep: Reputation: 46
In Windows xp goto Start > settings > control panel > Administrative settings > computer management > disk management , then select your flash disk you'd be able to see all of your partitions
 
Old 09-17-2009, 03:53 PM   #11
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
I would suggest to download the gparted live cd and boot from it.

http://gparted.sourceforge.net/livecd.php
 
Old 09-17-2009, 05:02 PM   #12
vin_akleh
LQ Newbie
 
Registered: Sep 2009
Posts: 19

Original Poster
Rep: Reputation: 0
1- windows disk manager sees it but cant format it
2- gparted cant see it at all
3- gnome "Error opening /dev/sdb: Permission denied"
4- double clicking on the drive (ubuntu) "Unable to mount location - Can't mount file"
any other sudgestions??

Last edited by vin_akleh; 09-17-2009 at 05:06 PM.
 
Old 09-17-2009, 05:17 PM   #13
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by vin_akleh View Post
1- windows disk manager sees it but cant format it
2- gparted cant see it at all
any other sudgestions??
From Linux, open a root shell. Plug in the USB stick. Then:

Code:
# fdisk -l
The above command will list available drives and partitions on drives. Be careful -- choose the device from the list that represents the drive you want to erase and format. If you have any doubt in your mind about which it is, unplug the USB device and see which entry disappears from the above listing.

Okay. Assuming you have correctly identified the device of interest (let's say for this example that it is /dev/sdg1), do this:

Code:
# fdisk /dev/sdg
Enter fdisk, remove the existing partitions and replace them with one big partition (this is what you want, yes?). Save your changes and exit fdisk.

Now:

Code:
# mkfs.vfat /dev/sdg1
The above command will create a VFAT filesystem on the one partition you created above.

It's been very difficult to figure out what you want to do, but this is my best guess. Remember that these actions cannot be undone.
 
Old 09-17-2009, 05:37 PM   #14
vin_akleh
LQ Newbie
 
Registered: Sep 2009
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by lutusp View Post
Enter fdisk, remove the existing partitions and replace them with one big partition (this is what you want, yes?). Save your changes and exit fdisk.
fdisk -l :-
Code:
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xfd62fd62

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       12971   104189526    7  HPFS/NTFS
/dev/sda2           12972       27283   114961140    f  W95 Ext'd (LBA)
/dev/sda3           27284       38913    93417975    7  HPFS/NTFS
/dev/sda5           12972       25942   104189526    7  HPFS/NTFS
/dev/sda6           25943       27283    10771551   83  Linux

Disk /dev/sdb: 2097 MB, 2097152000 bytes
65 heads, 62 sectors/track, 1016 cylinders
Units = cylinders of 4030 * 512 = 2063360 bytes
Disk identifier: 0xffffffff

Disk /dev/sdb doesn't contain a valid partition table
root@waleed-laptop:~# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x4961decd.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
can u tell me what to do from there to make it one partition??
i think that the usb drive is sdb

Last edited by vin_akleh; 09-17-2009 at 05:49 PM.
 
Old 09-17-2009, 06:27 PM   #15
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by vin_akleh View Post
fdisk -l :-
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xfd62fd62

Device Boot Start End Blocks Id System
/dev/sda1 * 1 12971 104189526 7 HPFS/NTFS
/dev/sda2 12972 27283 114961140 f W95 Ext'd (LBA)
/dev/sda3 27284 38913 93417975 7 HPFS/NTFS
/dev/sda5 12972 25942 104189526 7 HPFS/NTFS
/dev/sda6 25943 27283 10771551 83 Linux

[ snip ]

can u tell me what to do from there to make it one partition??
Sure! Here:

Code:
$ man fdisk
And here:

Partitioning with fdisk

And many other places.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting a USB Flash Disk jnbalneg Linux - General 1 04-18-2006 07:50 PM
USB flash disk taoweijia Linux - Hardware 2 12-28-2005 05:30 AM
USB flash disk help bakazer Solaris / OpenSolaris 1 06-24-2005 10:30 AM
USB Flash Disk zillah Fedora 3 05-22-2005 04:25 AM
USB flash disk. ValidiusMaximus Linux - Software 0 12-30-2004 03:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration