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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
01-24-2017, 05:45 PM
|
#1
|
LQ Newbie
Registered: Jan 2017
Posts: 23
Rep: 
|
Kali Linux 'dd: error writing /dev/sdb: no space left'
Hello,
So I'm trying to make a live USB for Kali Linux and I was just about to put the ISO for Kali on the USB until I got this error.
"dd: error writing '/dev/sdb:': No space left on device
1978+0 records in
1977+0 records out
1036660736 bytes (1.0 GB, 989 MiB) copied, 27.7732 s, 37.3 MB/s"
My USB is 16 GB and the Kali ISO is only 3. Is there anyway to fix this?
I'm very new to this, so please explain it in as much detail as you can while still remaining in Layman's terms.
Thank you,
Michael
|
|
|
01-24-2017, 06:02 PM
|
#2
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
Please post the output of "fdisk -l" as root.
Also, what was the dd command that you used?
Also, if you're new to Linux, you shouldn't be using Kali. Even Kali's developers say that it's not for people new to Linux. It's for security professionals who already know exactly what they're doing.
Last edited by suicidaleggroll; 01-24-2017 at 06:03 PM.
|
|
|
01-24-2017, 06:02 PM
|
#3
|
Senior Member
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
|
Can you post the output of What was the exact command you used?
|
|
|
01-24-2017, 06:27 PM
|
#4
|
LQ Newbie
Registered: Jan 2017
Posts: 23
Original Poster
Rep: 
|
Quote:
Originally Posted by suicidaleggroll
Please post the output of "fdisk -l" as root.
Also, what was the dd command that you used?
Also, if you're new to Linux, you shouldn't be using Kali. Even Kali's developers say that it's not for people new to Linux. It's for security professionals who already know exactly what they're doing.
|
Yes I know that its very difficult, but I only have one specific thing I have to do on it and then I wont use it again. But thats not important, the output i got was
"Disk /dev/sda: 40 GiB, 42949672960 bytes, 83886080 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: 0xbecf30ae
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 79691775 79689728 38G 83 Linux
/dev/sda2 79693822 83884031 4190210 2G 5 Extended
/dev/sda5 79693824 83884031 4190208 2G 82 Linux swap / Solaris"
The EXACT command i used was dd if=Desktop/kali-linux-2016.2-amd64.iso of=/dev/sdb: bs=512k
|
|
|
01-24-2017, 06:28 PM
|
#5
|
LQ Newbie
Registered: Jan 2017
Posts: 23
Original Poster
Rep: 
|
Quote:
Originally Posted by goumba
Can you post the output of What was the exact command you used?
|
This was the output:
"fdisk: cannot open /dev/sdb: No medium found"
This was the command I used:
The EXACT command i used was dd if=Desktop/kali-linux-2016.2-amd64.iso of=/dev/sdb: bs=512k
Last edited by SilentJustice; 01-24-2017 at 06:30 PM.
Reason: I posted the wrong output
|
|
|
01-24-2017, 06:33 PM
|
#6
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
Your USB drive needs to be plugged in when you run fdisk
|
|
|
01-24-2017, 06:34 PM
|
#7
|
LQ Newbie
Registered: Jan 2017
Posts: 23
Original Poster
Rep: 
|
Quote:
Originally Posted by suicidaleggroll
Your USB drive needs to be plugged in when you run fdisk
|
It is plugged in
|
|
|
01-24-2017, 06:56 PM
|
#8
|
Member
Registered: Nov 2012
Posts: 300
Rep: 
|
If it is plugged in, it's either not sdb (maybe that's your DVD drive?) or it's gone wrong.
You also have an extra : when setting the output file on the dd command
Quote:
The EXACT command i used was dd if=Desktop/kali-linux-2016.2-amd64.iso of=/dev/sdb: bs=512k
|
should be
Code:
The EXACT command i used was dd if=Desktop/kali-linux-2016.2-amd64.iso of=/dev/sdb bs=512k
That means your dd command probably created a new file in /dev called sdb: and filled it up until your /dev ran out of free space.
Try unplugging your USB drive then running 'dmesg -c' to print and clear dmesg. Then plug the USB drive back in and run 'dmesg' and see what it says. It should show that you have plugged in a USB storage device and tell you what partitions are on it.
Last edited by af7567; 01-24-2017 at 07:00 PM.
Reason: the bold : didn't really stand out in the quote
|
|
|
01-24-2017, 07:41 PM
|
#9
|
LQ Newbie
Registered: Apr 2001
Location: Romania
Distribution: Mandriva Spring 2007
Posts: 29
Rep:
|
sounds like the drive is not formatted properly, and the system cannot see the actual size of it. have you used this device for another ISO? if so, then you need to format it again, double check that it reports the correct size then try the command again
|
|
|
01-24-2017, 08:26 PM
|
#10
|
LQ Newbie
Registered: Jan 2017
Posts: 23
Original Poster
Rep: 
|
Quote:
Originally Posted by af7567
If it is plugged in, it's either not sdb (maybe that's your DVD drive?) or it's gone wrong.
You also have an extra : when setting the output file on the dd command
should be
Code:
The EXACT command i used was dd if=Desktop/kali-linux-2016.2-amd64.iso of=/dev/sdb bs=512k
That means your dd command probably created a new file in /dev called sdb: and filled it up until your /dev ran out of free space.
Try unplugging your USB drive then running 'dmesg -c' to print and clear dmesg. Then plug the USB drive back in and run 'dmesg' and see what it says. It should show that you have plugged in a USB storage device and tell you what partitions are on it.
|
Well, how could i check if its my dvd drive? And Im not sure how it could have gone wrong, i followed the instructions to the tee without error. And how can i delete that file? I also cleared all the partitions on it before this. Thats what the instructions said to do. Ill let you know what happens when i run dmesg.
|
|
|
01-24-2017, 08:27 PM
|
#11
|
LQ Newbie
Registered: Jan 2017
Posts: 23
Original Poster
Rep: 
|
Quote:
Originally Posted by morbius
sounds like the drive is not formatted properly, and the system cannot see the actual size of it. have you used this device for another ISO? if so, then you need to format it again, double check that it reports the correct size then try the command again
|
No, I have not. And how can I format it properly?
|
|
|
01-24-2017, 08:29 PM
|
#12
|
Senior Member
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
|
Quote:
Originally Posted by SilentJustice
No, I have not. And how can I format it properly?
|
Formatting a device has nothing to do with what you want to do. What you get that chance, run dmesg as described above. The device name (be it sdb, sdc, whatever) will be shown, for example, if I plug a drive into my port:
Code:
[20808.473092] scsi 2:0:0:0: Direct-Access Lexar USB Flash Drive 1100 PQ: 0 ANSI: 6
[20808.475187] sd 2:0:0:0: Attached scsi generic sg1 type 0
[20808.477468] sd 2:0:0:0: [sdb] 250068992 512-byte logical blocks: (128 GB/119 GiB)
[20808.477988] sd 2:0:0:0: [sdb] Write Protect is off
[20808.477998] sd 2:0:0:0: [sdb] Mode Sense: 43 00 00 00
[20808.480302] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[20808.493051] sdb: sdb1 sdb2 sdb3
[20808.495726] sd 2:0:0:0: [sdb] Attached SCSI removable disk
so, sdb is the device name I'd use with the dd command. Yours will likely be different.
Last edited by goumba; 01-24-2017 at 08:32 PM.
|
|
|
01-24-2017, 08:52 PM
|
#13
|
LQ Newbie
Registered: Jan 2017
Posts: 23
Original Poster
Rep: 
|
Quote:
Originally Posted by af7567
If it is plugged in, it's either not sdb (maybe that's your DVD drive?) or it's gone wrong.
You also have an extra : when setting the output file on the dd command
should be
Code:
The EXACT command i used was dd if=Desktop/kali-linux-2016.2-amd64.iso of=/dev/sdb bs=512k
That means your dd command probably created a new file in /dev called sdb: and filled it up until your /dev ran out of free space.
Try unplugging your USB drive then running 'dmesg -c' to print and clear dmesg. Then plug the USB drive back in and run 'dmesg' and see what it says. It should show that you have plugged in a USB storage device and tell you what partitions are on it.
|
When I ran the revised command I should have done, it just says that directory doesnt exist.
|
|
|
01-24-2017, 09:02 PM
|
#14
|
Senior Member
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
|
Quote:
Originally Posted by SilentJustice
When I ran the revised command I should have done, it just says that directory doesnt exist.
|
Because it's likely not sdb you want. See my previous post.
|
|
|
01-24-2017, 09:08 PM
|
#15
|
LQ Newbie
Registered: Jan 2017
Posts: 23
Original Poster
Rep: 
|
Quote:
Originally Posted by af7567
If it is plugged in, it's either not sdb (maybe that's your DVD drive?) or it's gone wrong.
You also have an extra : when setting the output file on the dd command
should be
Code:
The EXACT command i used was dd if=Desktop/kali-linux-2016.2-amd64.iso of=/dev/sdb bs=512k
That means your dd command probably created a new file in /dev called sdb: and filled it up until your /dev ran out of free space.
Try unplugging your USB drive then running 'dmesg -c' to print and clear dmesg. Then plug the USB drive back in and run 'dmesg' and see what it says. It should show that you have plugged in a USB storage device and tell you what partitions are on it.
|
I couldnt post the output i got the first time I ran dmesg -c because it exceeded the amount of characters, but this was the output I got with the USB plugged in using dmesg.
Code:
[ 388.508243] usb 1-1: new high-speed USB device number 2 using ehci-pci
[ 388.841175] usb 1-1: New USB device found, idVendor=0781, idProduct=5575
[ 388.841183] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 388.841187] usb 1-1: Product: Cruzer Glide
[ 388.841190] usb 1-1: Manufacturer: SanDisk
[ 388.841192] usb 1-1: SerialNumber: 20043512301B01803B24
[ 388.978711] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 388.981028] scsi host3: usb-storage 1-1:1.0
[ 388.981278] usbcore: registered new interface driver usb-storage
[ 388.996652] usbcore: registered new interface driver uas
[ 389.994105] scsi 3:0:0:0: Direct-Access SanDisk Cruzer Glide 1.27 PQ: 0 ANSI: 6
[ 389.996103] sd 3:0:0:0: Attached scsi generic sg2 type 0
[ 390.018961] sd 3:0:0:0: [sdb] 30316544 512-byte logical blocks: (15.5 GB/14.5 GiB)
[ 390.033505] sd 3:0:0:0: [sdb] Write Protect is off
[ 390.033515] sd 3:0:0:0: [sdb] Mode Sense: 43 00 00 00
[ 390.051196] sd 3:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 390.144847] sdb:
[ 390.212902] sd 3:0:0:0: [sdb] Attached SCSI removable disk
Last edited by SilentJustice; 01-24-2017 at 09:10 PM.
|
|
|
All times are GMT -5. The time now is 02:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|