Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to write live image to usb stick

743 views
Skip to first unread message

Gerardo Ballabio

unread,
Sep 13, 2015, 11:40:06 AM9/13/15
to
Hello,
I'm trying to write a bootable iso image (jessie live dvd) to a USB stick. I'm running jessie with Gnome.

This page: <https://www.debian.org/releases/jessie/i386/ch04s03.html.en> says that I should first make sure what the correct device name is (done -- df lists the stick as /dev/sdb1), then unmount the stick (done), then "cp image.iso /dev/sdb" (I suppose as root, so I used sudo).

That fails with this error:

cp: cannot create regular file ‘/dev/sdb’: No medium found

"ls -l /dev/sdb" shows this:
brw-rw---- 1 root disk 8, 16 Sep 13 16:53 /dev/sdb

Can you please help me?

Thank you in advance
 Gerardo

Himanshu Shekhar

unread,
Sep 13, 2015, 12:00:05 PM9/13/15
to
Simply extract the iso image to the usb drive. You should right click on the iso image and the open it with disk image writer. For Debian, this works fine. However, if your pen-drive size is much larger than the iso size, additional partitions may be created on the drive which could be deleted after the installation is complete.
Good luck!
--
Himanshu Shekhar
IIIT-Allahabad
IRM2015006

Thomas Schmitt

unread,
Sep 13, 2015, 1:10:06 PM9/13/15
to
Hi,

Gerardo Ballabio wrote:
> then "cp image.iso /dev/sdb" (I suppose as root, so I used sudo).

It depends on the write permissions of /dev/sdb.


> cp: cannot create regular file ‘/dev/sdb’: No medium found

Strange error message.
Do you see fresh messages in the system log after this has
happened ?

I just tried (Jessie 8.1 with fvwm and no sudo)

cp debian-8.1.0-amd64-netinst.iso /dev/sdc

as normal user "thomas" in group "thomas" with

brw-rw---- 1 root thomas 8, 32 Sep 13 18:48 /dev/sdc

(I have a script which opens access to "disks" except sda and sdb.)

All is normal. Inspection of the stick yields the expected
ISO filesystem with boot equipment and the usual nested
partitions (which partition editors dislike).

Without write permission i get
cp: unwritable ‘/dev/sdc’ (mode 0660, rw-rw----); try anyway? y
cp: cannot create regular file ‘/dev/sdc’: Permission denied

So this is not the reason for "No medium found".


What happens if you try to read from whole device or partition 1 ?

dd if=/dev/sdb bs=1M count=1 of=/dev/null

dd if=/dev/sdb1 bs=1M count=1 of=/dev/null

Any error messages to see?

The normal messages look like
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0580627 s, 18.1 MB/s


Have a nice day :)

Thomas

Brian

unread,
Sep 13, 2015, 1:20:04 PM9/13/15
to
Plug the device in. What does 'dmesg' give as the device file name?

Charlie Kravetz

unread,
Sep 13, 2015, 2:00:05 PM9/13/15
to
Having just done this, and my install is running as I type this on a
different system, you have to unmount the usb drive before it works.
WARNING: it destroys anything on the drive when it writes the image.

Don't forget the "sudo sync" command when it finishes writing. It took
quite a while to get the image written here.


--
Charlie Kravetz
Linux Registered User Number 425914
[http://linuxcounter.net/user/425914.html]
Never let anyone steal your DREAM. [http://keepingdreams.com]

Gerardo Ballabio

unread,
Sep 13, 2015, 3:40:05 PM9/13/15
to
Thanks for your suggestion.
In fact, I discovered that the error occurred after I unmounted the usb stick from Nautilus. After I tried running "umount" from the shell, "cp image.iso /dev/sdb" did work.

Gerardo

0 new messages