LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-20-2014, 05:17 PM   #1
Monk Tea
Member
 
Registered: Apr 2014
Location: New Delhi
Distribution: Slackware
Posts: 39

Rep: Reputation: 2
USB drive reduced to 1.8g from 8g after using DD command.


Hi.

I used a dd command to write and iso image of some distro having 1.8g iso image onto 8gb pendrive. And it worked but I didn't notice that the pen drive now only shows 1.8gb.

Here are the messages from the command line:

Code:
root@her:~# fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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
Disk identifier: 0xc2966b58

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    40001849    20000893+  83  Linux
/dev/sda2        40001850   312581807   136289979    5  Extended
/dev/sda5        40001913    48002219     4000153+  82  Linux swap
/dev/sda6        48002283   312581807   132289762+  83  Linux

Disk /dev/sdb: 8004 MB, 8004304896 bytes
247 heads, 62 sectors/track, 1020 cylinders, total 15633408 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
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System

dmesg shows this:

Code:
[    9.114912] usb 1-1.4: Product: Cruzer Blade
[    9.125232] usb 1-1.4: Manufacturer: SanDisk
[    9.135204] usb 1-1.4: SerialNumber: 20054963931175A206C1
[    9.170178] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[    9.180131] scsi8 : usb-storage 1-1.4:1.0
[    9.189680] usbcore: registered new interface driver usb-storage
[    9.201031] hidraw: raw HID events driver (C) Jiri Kosina
[    9.247017] usbcore: registered new interface driver usbhid
[    9.256465] usbhid: USB HID core driver
gdisk shows this:
Code:
root@her:~# gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.7

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************


Command (? for help):
Please tell me if I need to run more commands for troubleshooting.

Thanks.

Last edited by Monk Tea; 09-20-2014 at 05:24 PM. Reason: Solved after running gdisk itself.
 
Old 09-20-2014, 05:21 PM   #2
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Disk /dev/sdb: 8004 MB, 8004304896 bytes
That doesn't look like 1.8 GB to me.
 
1 members found this post helpful.
Old 09-20-2014, 05:25 PM   #3
linuxtinker
Member
 
Registered: Dec 2013
Location: NJ / USA
Distribution: Slackware 64 -Current
Posts: 232

Rep: Reputation: 99
you wrote a 1.8gb table on a 8gb pen when you used the dd command...( I assume) .. What was the command you entered...
 
Old 09-20-2014, 05:26 PM   #4
Monk Tea
Member
 
Registered: Apr 2014
Location: New Delhi
Distribution: Slackware
Posts: 39

Original Poster
Rep: Reputation: 2
Hi.

Yeah. I noticed that just now. Just too hung up after too much troubleshooting. I ran gdisk and that solved it. Using dd deleted the GPT I guess. Its fine now.

Sorry for the trouble.
 
Old 09-21-2014, 04:58 AM   #5
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,568

Rep: Reputation: Disabled
Just for interest, when using 'dd' you copy an 'image' of a drive, not files, so your drive will appear to have that capacity if you 'ls' its contents, but the drive itself is still whatever it was.
 
2 members found this post helpful.
  


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
Command Line Access to USB NAS Drive mattz40 Linux - Newbie 9 02-27-2013 01:42 PM
how to safe remove usb drive in command? shibir Linux - Hardware 3 12-19-2012 06:52 AM
The 'dd' command writing to usb pen drive at only 2.5mb/s clifford227 Linux - Hardware 11 05-13-2011 02:28 AM
how to mount usb drive in command line IN UBUNTU linux.ab Linux - Newbie 1 03-15-2010 12:57 AM
Mount USB drive from command line rcrummett Linux - Newbie 10 09-25-2008 05:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:43 PM.

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