LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 07-24-2016, 11:08 PM   #1
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 36

Rep: Reputation: Disabled
USB pen drive turned into two partitions in kali linux


Hello everyone
I have been using Kali Linux for more than three months. One day, I inserted my pen drive and it showed two partitions of itself. I don't what I did that screwed up my usb drive. I had used the dd command to make a bootable usb drive. Maybe I used the command incorrectly.
If anybody has any suggestions please reply.
 
Old 07-25-2016, 05:03 AM   #2
hydrurga
Senior Member
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 18.2 MATE
Posts: 3,491
Blog Entries: 2

Rep: Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196
If you do not need any data on the pen drive, you can repartition and format it using gparted or similar.
 
Old 07-25-2016, 05:14 AM   #3
hudsontom1956
LQ Newbie
 
Registered: Jul 2016
Location: 1440 Fuller Ave SE Apt 114
Distribution: Slackware 14.2
Posts: 11

Rep: Reputation: Disabled
i am not sure

Sorry if this does not belong here but you mentioned {dd} I hae thatand do not have a clue what it is for or how to use it
 
Old 07-25-2016, 05:23 AM   #4
hydrurga
Senior Member
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 18.2 MATE
Posts: 3,491
Blog Entries: 2

Rep: Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196
Quote:
Originally Posted by hudsontom1956 View Post
Sorry if this does not belong here but you mentioned {dd} I hae thatand do not have a clue what it is for or how to use it
Tom, I hope you don't mind me saying so, but if everyone were to post to threads just to say that they didn't know the answer then we would have threads packed full of non-useful posts. Given your lack of knowledge of dd, and your current questions on other threads about Slackware, and with no disrespect to that esteemed distribution, I would highly recommend that you start your journey into Linux by installing a distribution more geared for beginners and learn how to use the operating system on a more shallow curve.
 
Old 07-25-2016, 08:35 AM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,333

Rep: Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407
If you have Kali on a partition on your hard drive and just had data on the pen drive then used dd to make a bootable pendrive, exactly what command did you use? Generally using dd used in this manner will overwrite everything. What's the problem? Does whatever you created boot? Why not post the partition information with fdisk so someone can look at the output?
 
Old 07-26-2016, 11:29 AM   #6
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 36

Original Poster
Rep: Reputation: Disabled
Sorry guys for the late reply
what I meant by "used dd command incorrectly" is I had used dd to create a bootable usb drive but after dd command completed, I couldn't see any files in my drive. So, I thought I used dd command incorrectly and used it again on the same drive which I think might have wrecked my pen drive.
 
Old 07-26-2016, 11:32 AM   #7
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 36

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
If you have Kali on a partition on your hard drive and just had data on the pen drive then used dd to make a bootable pendrive, exactly what command did you use? Generally using dd used in this manner will overwrite everything. What's the problem? Does whatever you created boot? Why not post the partition information with fdisk so someone can look at the output?
Thanks for the reply.
Yeah I could boot from my pen drive successfully.
Here's the output of fdisk -l
Code:
root@dhcppc1:~# fdisk -l
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x7418a1a5

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1            2048    206847    204800   100M  7 HPFS/NTFS/exFAT
/dev/sda2          206848 163842047 163635200    78G  7 HPFS/NTFS/exFAT
/dev/sda3       163842048 788024439 624182392 297.6G  7 HPFS/NTFS/exFAT
/dev/sda4       788025281 976771071 188745791    90G  f W95 Ext'd (LBA)
/dev/sda5       788025344 850939903  62914560    30G  7 HPFS/NTFS/exFAT
/dev/sda6       850941952 976771071 125829120    60G 83 Linux

Partition 4 does not start on physical sector boundary.


Disk /dev/sdb: 3.8 GiB, 4041211904 bytes, 7892992 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x266d6640

Device     Boot   Start     End Sectors  Size Id Type
/dev/sdb1            64 5679359 5679296  2.7G  c W95 FAT32 (LBA)
/dev/sdb2  *    5679360 5859071  179712 87.8M  6 FAT16
 
Old 07-26-2016, 11:42 AM   #8
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 36

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
If you do not need any data on the pen drive, you can repartition and format it using gparted or similar.
As the screenshot I have posted there is no option for repartition or format:
Attached Thumbnails
Click image for larger version

Name:	fix.png
Views:	10
Size:	64.4 KB
ID:	22569  
 
Old 07-26-2016, 12:13 PM   #9
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,552

Rep: Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112
I don't understand the problem. dd, among other things, is used to write an image to a drive. That image will likely contain its own partition table and filesystem(s). When you use dd to dump the image to the drive, it will cause the drive to be repartitioned to match the image. This could include one partition, or two, or ten. Does it boot? Does it do what you want it to do? Do you have any reason to suspect there is a problem, or are you just confused why it has two partitions now?

You've also told us that you suspect you used dd wrong, but you never told us how you ran it, so it's impossible for us to say.
 
Old 07-26-2016, 12:14 PM   #10
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,552

Rep: Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112
Quote:
Originally Posted by bikal View Post
As the screenshot I have posted there is no option for repartition or format:
Because both partitions are currently mounted. You can't reformat a drive while it's mounted.

That partition scheme seems perfectly valid though. As I said before, I don't understand the problem.

Last edited by suicidaleggroll; 07-26-2016 at 12:15 PM.
 
Old 07-26-2016, 02:25 PM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,333

Rep: Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407
Quote:
As the screenshot I have posted there is no option for repartition or format:
Yes there is but it is greyed out and the reason for that is because it is mounted. If the partition were not mounted you would not see "Unmount" but rather "Mount" in the drop down list. So as stated above, click on Unmount and the actions will be available and you would simply click on the partition to highlight it then select Format to and the filesystem type. The GParted Manual is available online.

http://gparted.org/display-doc.php%3Fname%3Dhelp-manual
 
Old 07-26-2016, 10:46 PM   #12
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 36

Original Poster
Rep: Reputation: Disabled
Thanks guys for all your replies I was successfully able to combine all my drive partitions and form a single 3.75 GIB drive.
Attached Thumbnails
Click image for larger version

Name:	fix-2.png
Views:	4
Size:	31.2 KB
ID:	22574  
 
  


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
Merging the two partitions in my pen drive mohitdaksh Linux - Hardware 5 07-13-2010 01:17 AM
Looking for Pen-Drive Linux capable of scanning NTFS partitions BlackSheep024 Linux - General 3 04-06-2009 07:54 AM
usb pen drive with REDHAT linux sunlinux Linux - Hardware 2 12-13-2006 11:07 AM
install linux on usb pen drive: knoppix padmaraj Linux - General 2 09-08-2006 12:06 PM
Trouble with USB pen drive in Linux abhishek_p Linux - Hardware 1 12-02-2005 02:01 AM

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

All times are GMT -5. The time now is 07:28 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration