Re: Problem with flash drive

2013-06-23 Thread Klaus

On 23/06/13 04:56, Ethan Rosenberg, PhD wrote:


rosenberg:/media/bkup# fdisk -l /dev/sdc

Disk /dev/sdc: 4051 MB, 4051697664 bytes
64 heads, 32 sectors/track, 3864 cylinders, total 7913472 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: 0x00077d8f

Device Boot  Start End  Blocks   Id  System
/dev/sdc1   *  32   63487   31728e  W95 FAT16 (LBA)

I now add a Linux partition... then..

rosenberg:/media/usbdrive# fdisk -l /dev/sdc

Disk /dev/sdc: 4051 MB, 4051697664 bytes
64 heads, 32 sectors/track, 3864 cylinders, total 7913472 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: 0x00077d8f

Device Boot  Start End  Blocks   Id  System
/dev/sdc1   *  32   63487   31728e  W95 FAT16 (LBA)
/dev/sdc2   63488 7913471 3924992   83  Linux

Now create file system 

/dev/sdc2   63488 7913471 3924992   83  Linux
rosenberg:/media/usbdrive# mkfs -t ext2 /dev/sdc2
mke2fs 1.42.5 (29-Jul-2012)
Could not stat /dev/sdc2 --- No such file or directory

???

What did I do wrong??

TIA

Ethan

After setting up the DOS partition, I also need a Linux partitionso


It couldn't be the same again? Did you un-plug -- re-plug the stick in 
between creating the partition and trying to make a filesystem on it?


--
Klaus


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/51c6aca4.9010...@gmail.com



Re: Problem with flash drive - SUCCESS!!!!!!!!!!!!!!!!!

2013-06-23 Thread Ethan Rosenberg, PhD

n 06/22/2013 11:56 PM Ethan Rosenberg, PhD wrote:

On 06/21/2013 04:00 AM, Klaus wrote:

Ethan,

when you create a new partition table on the device, then the kernel
needs to know about it. With a flash memory card, just unplug and
re-plug it.
You don't need to run fdisk first, since you copy an entire disk
image, this comes with partition table and all.
Is your mounting read-only intended?

$ bunzip2  FreeDOS-1.1-USB-Boot.img.bz2

$ ls -l FreeDOS-1.1-USB-Boot.img
-rw-r- 1 klaus klaus 32505856 Jun 21 08:38 FreeDOS-1.1-USB-Boot.img

$ dd if=FreeDOS-1.1-USB-Boot.img of=/dev/sdb
63488+0 records in
63488+0 records out
32505856 bytes (33 MB) copied, 5.38615 s, 6.0 MB/s
$ sudo fdisk -l /dev/sdb

Disk /dev/sdb: 2017 MB, 2017459712 bytes
64 heads, 32 sectors/track, 1923 cylinders, total 3940351 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: 0x00077d8f

   Device Boot  Start End  Blocks   Id  System
/dev/sdb1   *  32   63487   31728e  W95 FAT16 (LBA)

$ sudo mount -t vfat /dev/sdb1 mnt/
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
   missing codepage or helper program, or other error
   In some cases useful info is found in syslog - try
   dmesg | tail  or so

-  DISCONNECTED DEVICE, THEN PLUGGED BACK IN
-  GETS AUTOMATICALLY MOUNTED IN /MEDIA/$username/$disk-id


$ ls -l /media/klaus/FREEDOS1~1A/
total 111
-rwxr-xr-x 1 klaus klaus 66945 Jan 17  2012 command.com
-rw-r--r-- 1 klaus klaus 45344 Jan 17  2012 kernel.sys

$ cp test.txt /media/klaus/FREEDOS1~1A/

$ ls -l /media/klaus/FREEDOS1~1A/
total 112
-rwxr-xr-x 1 klaus klaus 66945 Jan 17  2012 command.com
-rw-r--r-- 1 klaus klaus 45344 Jan 17  2012 kernel.sys
-rw-r--r-- 1 klaus klaus36 Jun 21 08:48 test.txt


On 21/06/13 05:29, Ethan Rosenberg, PhD wrote:

Ken -

Tried what you said, but I cannot make it work.

Here is what I did:

fdisk /dev/sdb

Command (m for help): d
Selected partition 1

Command (m for help):
Command (m for help): p

Disk /dev/sdb: 4051 MB, 4051697664 bytes
64 heads, 32 sectors/track, 3864 cylinders, total 7913472 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: 0x00077d8f

Device Boot  Start End  Blocks   Id  System

Command (m for help): n
Partition type:
p   primary (0 primary, 0 extended, 4 free)
e   extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-7913471, default 2048): 0
Value out of range.
First sector (2048-7913471, default 2048): 1
Value out of range.
First sector (2048-7913471, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-7913471, default 7913471):
989184

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): e
Changed system type of partition 1 to e (W95 FAT16 (LBA))

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or
resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)

dd if=/home/ethan/DOSutil/FreeDOS-1.1-USB-Boot.img of=/dev/sdb
63488+0 records in
63488+0 records out
32505856 bytes (33 MB) copied, 0.447414 s, 72.7 MB/s

rosenberg:/media# fdisk -l
Disk /dev/sdb: 4051 MB, 4051697664 bytes
64 heads, 32 sectors/track, 3864 cylinders, total 7913472 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: 0x00077d8f

Device Boot  Start End  Blocks   Id  System
/dev/sdb1   *  32   63487   31728e  W95 FAT16 (LBA)

rosenberg:/media# mount
/dev/sdb1 on /media/bkup type vfat
(ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)



rosenberg:/media# cd /media/bkup
rosenberg:/media/bkup# ls
64k of m.emo  conditio.n i = (eq.ual  in a bat.ch %lukb?.ree
ng used.inpt to th.e d  sage.??P.AUStell you. if tring].?.?/U
able to.the   ctive.?.Sea   es curre.nt   ings res.ourmand as.if
n if the. sp  racter)?.  $  s and di.rect enter.tot]?? te.xt
ame?  D   Curr.ent  exists..the   in the e.nvime?
no para.met  rd outpu.t o  seems to. beters to.dis tting.?I.f a
and for.tha   debug [o.N |  fied com.man  into fre.eDOmes a fi.le/
not to e.xec  rectory.offsets, o.r rthan sig.n)?  umber of. th
ariable..??/  DEBUG wi.tho  %f IN (-.--s  ions as.youmeters i.n a
nsize2]]  rectory.sta  shows. kethan the.? while t.he
ariable.nam   director.y s f.ree  irectory.nam minimum.?

Re: Problem with flash drive

2013-06-22 Thread Ethan Rosenberg, PhD

  
  
On 06/21/2013 04:00 AM, Klaus wrote:

Ethan,
  
  
  when you create a new partition table on the device, then the
  kernel needs to know about it. With a flash memory card, just
  unplug and re-plug it.
  
  You don't need to run fdisk first, since you copy an entire disk
  image, this comes with partition table and all.
  
  Is your mounting read-only intended?
  
  
  $ bunzip2  FreeDOS-1.1-USB-Boot.img.bz2
  
  
  $ ls -l FreeDOS-1.1-USB-Boot.img
  
  -rw-r- 1 klaus klaus 32505856 Jun 21 08:38
  FreeDOS-1.1-USB-Boot.img
  
  
  $ dd if=FreeDOS-1.1-USB-Boot.img of=/dev/sdb
  
  63488+0 records in
  
  63488+0 records out
  
  32505856 bytes (33 MB) copied, 5.38615 s, 6.0 MB/s
  
  $ sudo fdisk -l /dev/sdb
  
  
  Disk /dev/sdb: 2017 MB, 2017459712 bytes
  
  64 heads, 32 sectors/track, 1923 cylinders, total 3940351 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: 0x00077d8f
  
  
     Device Boot  Start End  Blocks   Id  System
  
  /dev/sdb1   *  32   63487   31728    e  W95 FAT16
  (LBA)
  
  
  $ sudo mount -t vfat /dev/sdb1 mnt/
  
  mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
  
     missing codepage or helper program, or other error
  
     In some cases useful info is found in syslog - try
  
     dmesg | tail  or so
  
  
  -  DISCONNECTED DEVICE, THEN PLUGGED BACK IN
  
  -  GETS AUTOMATICALLY MOUNTED IN
  /MEDIA/$username/$disk-id
  
  
  
  $ ls -l /media/klaus/FREEDOS1~1A/
  
  total 111
  
  -rwxr-xr-x 1 klaus klaus 66945 Jan 17  2012 command.com
  
  -rw-r--r-- 1 klaus klaus 45344 Jan 17  2012 kernel.sys
  
  
  $ cp test.txt /media/klaus/FREEDOS1~1A/
  
  
  $ ls -l /media/klaus/FREEDOS1~1A/
  
  total 112
  
  -rwxr-xr-x 1 klaus klaus 66945 Jan 17  2012 command.com
  
  -rw-r--r-- 1 klaus klaus 45344 Jan 17  2012 kernel.sys
  
  -rw-r--r-- 1 klaus klaus    36 Jun 21 08:48 test.txt
  
  
  
  On 21/06/13 05:29, Ethan Rosenberg, PhD wrote:
  
  Ken -


Tried what you said, but I cannot make it work.


Here is what I did:


fdisk /dev/sdb


Command (m for help): d

Selected partition 1


Command (m for help):

Command (m for help): p


Disk /dev/sdb: 4051 MB, 4051697664 bytes

64 heads, 32 sectors/track, 3864 cylinders, total 7913472
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: 0x00077d8f


    Device Boot  Start End  Blocks   Id  System


Command (m for help): n

Partition type:

    p   primary (0 primary, 0 extended, 4 free)

    e   extended

Select (default p):

Using default response p

Partition number (1-4, default 1):

Using default value 1

First sector (2048-7913471, default 2048): 0

Value out of range.

First sector (2048-7913471, default 2048): 1

Value out of range.

First sector (2048-7913471, default 2048):

Using default value 2048

Last sector, +sectors or +size{K,M,G} (2048-7913471, default
7913471):

989184


Command (m for help): t

Selected partition 1

Hex code (type L to list codes): e

Changed system type of partition 1 to e (W95 FAT16 (LBA))


Command (m for help): w

The partition table has been altered!


Calling ioctl() to re-read partition table.


WARNING: Re-reading the partition table failed with error 16:
Device or

resource busy.

The kernel still uses the old table. The new table will be used
at

the next reboot or after you run partprobe(8) or kpartx(8)


dd if=/home/ethan/DOSutil/FreeDOS-1.1-USB-Boot.img of=/dev/sdb

63488+0 records in

63488+0 records out

  

Re: Problem with flash drive

2013-06-21 Thread Klaus

Ethan,

when you create a new partition table on the device, then the kernel 
needs to know about it. With a flash memory card, just unplug and 
re-plug it.
You don't need to run fdisk first, since you copy an entire disk image, 
this comes with partition table and all.

Is your mounting read-only intended?

$ bunzip2  FreeDOS-1.1-USB-Boot.img.bz2

$ ls -l FreeDOS-1.1-USB-Boot.img
-rw-r- 1 klaus klaus 32505856 Jun 21 08:38 FreeDOS-1.1-USB-Boot.img

$ dd if=FreeDOS-1.1-USB-Boot.img of=/dev/sdb
63488+0 records in
63488+0 records out
32505856 bytes (33 MB) copied, 5.38615 s, 6.0 MB/s
$ sudo fdisk -l /dev/sdb

Disk /dev/sdb: 2017 MB, 2017459712 bytes
64 heads, 32 sectors/track, 1923 cylinders, total 3940351 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: 0x00077d8f

   Device Boot  Start End  Blocks   Id  System
/dev/sdb1   *  32   63487   31728e  W95 FAT16 (LBA)

$ sudo mount -t vfat /dev/sdb1 mnt/
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
   missing codepage or helper program, or other error
   In some cases useful info is found in syslog - try
   dmesg | tail  or so

-  DISCONNECTED DEVICE, THEN PLUGGED BACK IN
-  GETS AUTOMATICALLY MOUNTED IN /MEDIA/$username/$disk-id


$ ls -l /media/klaus/FREEDOS1~1A/
total 111
-rwxr-xr-x 1 klaus klaus 66945 Jan 17  2012 command.com
-rw-r--r-- 1 klaus klaus 45344 Jan 17  2012 kernel.sys

$ cp test.txt /media/klaus/FREEDOS1~1A/

$ ls -l /media/klaus/FREEDOS1~1A/
total 112
-rwxr-xr-x 1 klaus klaus 66945 Jan 17  2012 command.com
-rw-r--r-- 1 klaus klaus 45344 Jan 17  2012 kernel.sys
-rw-r--r-- 1 klaus klaus36 Jun 21 08:48 test.txt


On 21/06/13 05:29, Ethan Rosenberg, PhD wrote:

Ken -

Tried what you said, but I cannot make it work.

Here is what I did:

fdisk /dev/sdb

Command (m for help): d
Selected partition 1

Command (m for help):
Command (m for help): p

Disk /dev/sdb: 4051 MB, 4051697664 bytes
64 heads, 32 sectors/track, 3864 cylinders, total 7913472 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: 0x00077d8f

Device Boot  Start End  Blocks   Id  System

Command (m for help): n
Partition type:
p   primary (0 primary, 0 extended, 4 free)
e   extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-7913471, default 2048): 0
Value out of range.
First sector (2048-7913471, default 2048): 1
Value out of range.
First sector (2048-7913471, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-7913471, default 7913471):
989184

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): e
Changed system type of partition 1 to e (W95 FAT16 (LBA))

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or
resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)

dd if=/home/ethan/DOSutil/FreeDOS-1.1-USB-Boot.img of=/dev/sdb
63488+0 records in
63488+0 records out
32505856 bytes (33 MB) copied, 0.447414 s, 72.7 MB/s

rosenberg:/media# fdisk -l
Disk /dev/sdb: 4051 MB, 4051697664 bytes
64 heads, 32 sectors/track, 3864 cylinders, total 7913472 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: 0x00077d8f

Device Boot  Start End  Blocks   Id  System
/dev/sdb1   *  32   63487   31728e  W95 FAT16 (LBA)

rosenberg:/media# mount
/dev/sdb1 on /media/bkup type vfat
(ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)


rosenberg:/media# cd /media/bkup
rosenberg:/media/bkup# ls
64k of m.emo  conditio.n i = (eq.ual  in a bat.ch%lukb?.ree
ng used.inpt to th.e d  sage.??P.AUStell you. if  tring].?.?/U
able to.the   ctive.?.Sea   es curre.nt   ings res.ourmand as.if
n if the. sp  racter)?.  $  s and di.rect enter.tot]??  te.xt
ame?  D   Curr.ent  exists..the   in the e.nvime?
no para.met  rd outpu.t o  seems to. beters to.dis   tting.?I.f a
and for.tha   debug [o.N |  fied com.man  into fre.eDOmes a fi.le/
not to e.xec  rectory.offsets, o.r rthan sig.n)?  umber of. th
ariable..??/  DEBUG wi.tho  %f IN (-.--s  ions as.youmeters i.n a
nsize2]]  rectory.sta  shows. kethan the.? while t.he
ariable.nam   director.y s f.ree  irectory.nam minimum.?
o?change. cu  reeCOM o.r o  sign to.the?  The '.*'   window t.owa
ar sign).?

Re: Problem with flash drive

2013-06-21 Thread ken



On 06/21/2013 12:29 AM Ethan Rosenberg, PhD wrote:

Ken -

Tried what you said, but I cannot make it work.



dd if=/home/ethan/DOSutil/FreeDOS-1.1-USB-Boot.img of=/dev/sdb
63488+0 records in
63488+0 records out
32505856 bytes (33 MB) copied, 0.447414 s, 72.7 MB/s


At this point you can try to reboot into FreeDOS.  That is, with the 
flash drive inserted, do a shutdown and then restart the computer again. 
 (Many Linuxes have a 'reboot' command you can run as root.  You may 
also have a menu item in your GUI for shutting down and/or rebooting.)


During the reboot process, you'll want to check the computer's BIOS to 
make sure that whatever the flashdrive is plugged into (USB, I assume) 
is an acceptable boot device and that it is checked before your normal 
boot device (which, I'm assuming is your hard drive).  If you don't know 
or are unsure about how to do settings in your BIOS, then please read up 
on that before changing anything.  You should have gotten a manual with 
your computer-- or perhaps you can download the manual from the web.





rosenberg:/media# fdisk -l
Disk /dev/sdb: 4051 MB, 4051697664 bytes
64 heads, 32 sectors/track, 3864 cylinders, total 7913472 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: 0x00077d8f

Device Boot  Start End  Blocks   Id  System
/dev/sdb1   *  32   63487   31728e  W95 FAT16 (LBA)



You didn't have to do the step above, but it doesn't hurt anything.  In 
this case, it's good that you did it, only because it shows that the 'dd 
...' command did its work properly.


Is 'fdisk -l' really the entire command you typed in to get the above 
output?




Was there another command you ran prior to running the one below?  If 
not, perhaps there's some automount script which ran in invisibly in 
background.  In any event, the output from the command below shows a 
valid vfat system written to /dev/sdb1... also a good sign.  But as said 
above, you should try to reboot into FreeDOS to test the image you put 
on your flashdrive.



rosenberg:/media# mount
/dev/sdb1 on /media/bkup type vfat
(ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)





Since we don't know what was mounted, it's hard to know what to say 
about the below.



rosenberg:/media# cd /media/bkup
rosenberg:/media/bkup# ls
64k of m.emo  conditio.n i = (eq.ual  in a bat.ch%lukb?.ree
ng used.inpt to th.e d  sage.??P.AUStell you. if  tring].?.?/U
able to.the   ctive.?.Sea   es curre.nt   ings res.ourmand as.if
n if the. sp  racter)?.  $  s and di.rect enter.tot]??  te.xt
ame?  D   Curr.ent  exists..the   in the e.nvime?
no para.met  rd outpu.t o  seems to. beters to.dis   tting.?I.f a
and for.tha   debug [o.N |  fied com.man  into fre.eDOmes a fi.le/
not to e.xec  rectory.offsets, o.r rthan sig.n)?  umber of. th
ariable..??/  DEBUG wi.tho  %f IN (-.--s  ions as.youmeters i.n a
nsize2]]  rectory.sta  shows. kethan the.? while t.he
ariable.nam   director.y s f.ree  irectory.nam minimum.?
o?change. cu  reeCOM o.r o  sign to.the?  The '.*'   window t.owa
ar sign).??DIRS?.emo Fre.eDO   is remo.ved minsize.2 s
?.oderiables..??s  sion:?%s.?the comm.and   within.the
ason: %u. (%  DOWN]??D.own  g1==stri.ng2  istory b.uffmmand pr.omp
ommand [.arg  rnal com.man Speci.fie the con.ten  y out if. th
  assigns. th  drive an.d p  ge:?pre.ss   istribut.ionm, speci.fy
ontents.ofrogram.. Respecify. asthe path. sp  ype veri.FY
ation an.d n  eater-th.an   he for c.omm  ?  labeln?
ORLEVEL.num   rrent ti.me   splay th.e vthout a.par
ays the.Fre   ectory.?.Typ  hrinks a. UM  lays or.setname2]??.Not
os comma.nd   r [/r] [./w]  ST filen.ametical Er.ror
   backsp.ace  edirect.the   h you wi.sh   le; by d.efan and li.nef
our file.s a  rsion an.d o  ST filen.ameTIME fro.m b
ber spec.ifi  e [drive.:]p  ibutors..?  lename [.parnded
to.the   out para.met  rwise?th.e c  [string]. totime [/t.] [
cify a n.ew   eep the.sam   I code 2.7)?  line by.itsne histo.ry?
plays or. se  ry [size.]??   system.wheting.?.f d
  colon.?  e execut.abl  ies a se.rie  ll debug. oun exit c.ode
play the. cu  ?.s a  t and .stdto that.fil
conditio.n i  e follow.ing  ilename1.] [  Loads a.pro?.ng
prompt t.he   sage pa.cke  tch prog.ramtring is. sp

Thanks for everything, but I am still stuck.

Ethan
=
On 06/20/2013 07:22 PM Ethan Rosenberg, PhD wrote:

Dear list -

I am trying to copy FreeDOS to a flash drive.  I can't make it work.

This is what I have done -

Command (m for help): p

Disk /dev/sdb: 4051 MB, 4051697664 bytes
125 heads, 62 sectors/track, 1021 cylinders, total 7913472 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector 

Re: Problem with flash drive

2013-06-21 Thread Linux-Fan
On 06/21/2013 01:22 AM, Ethan Rosenberg, PhD wrote:
 Dear list -
 
 I am trying to copy FreeDOS to a flash drive.  I can't make it work.

[...]

 Copy FreeDOS:
 
 dd if=/home/ethan/Downloads/FreeDOS-1.1-USB-Boot.img of=/dev/sdb1
 63488+0 records in
 63488+0 records out
 32505856 bytes (33 MB) copied, 1.30864 s, 24.8 MB/

Was your device mounted while you copied the image with dd? Because this
would clearly result in output similar to yours listed further down.

 Check Mount:
 
 /dev/sdb1 on /media/bkup type vfat
 (ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)
 
 Check Contents:
 
 rosenberg:/media# ls -la bkup
 ls: cannot access bkup/%f IN (-.--s: Input/output error
 ls: cannot access bkup/in a bat.ch: Input/output error
 ls: cannot access bkup/
   label: Input/output error
 ls: cannot access bkup/ng used.in: Input/output error
 ls: cannot access bkup/ colon.
 : Input/output error
 ls: cannot access bkup/ry [size.]

[...]

As you did not write you did this and nobody suggested it yet: Do not
use dd while your image is mounted. (I hope you do not find this hint
useless as you probably did so anyway...)

HTH
Linux-Fan

-- 
http://masysma.ohost.de/



signature.asc
Description: OpenPGP digital signature


Re: Problem with flash drive

2013-06-20 Thread Ralf Mardorf
 Input/output error

It might be a software issue only. I don't remember the messages I got,
when an USB stick was borked.

A long time ago, when I formatted a new INTENSO USB stick, it gets
broken. They said the controller gets broken, because I kept it
connected, while turning the computer on and off *lol*, possible but
unlikely, I guess nobody disconnects mouse, keyboard or printer. I got a
new one and never formatted/partitioned it, now it's very old and still
working.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1371772604.644.130.camel@archlinux



Re: Problem with flash drive

2013-06-20 Thread ken



On 06/20/2013 07:22 PM Ethan Rosenberg, PhD wrote:

Dear list -

I am trying to copy FreeDOS to a flash drive.  I can't make it work.

This is what I have done -

Command (m for help): p

Disk /dev/sdb: 4051 MB, 4051697664 bytes
125 heads, 62 sectors/track, 1021 cylinders, total 7913472 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: 0x00077d8f

Device Boot  Start End  Blocks   Id  System
/dev/sdb12048  989184  493568+   c  W95 FAT32 (LBA)
/dev/sdb2  989185 7913471 3462143+  83  Linux


Notice that sdb1 doesn't start at the beginning of the media, but rather 
2048 sectors in.  If your FreeDOS image is really a boot image (as the 
name of the file suggests), then you need to start the copy at the very 
beginning of the media, i.e., sector 0.  So I would try:


dd if=/home/ethan/Downloads/FreeDOS-1.1-USB-Boot.img of=/dev/sdb





I then delete the DOS partition since it seems to be corrupted and add
regenerate the  FAT Partition, and write it out.

Make file system:

mkfs.vfat /dev/sdb1
mkfs.vfat 3.0.16 (01 Mar 2013)


No sense making a file system because 'dd' is going to overwrite it.




Check file system:

fsck.vfat /dev/sdb1
dosfsck 3.0.16, 01 Mar 2013, FAT32, LFN
/dev/sdb1: 0 files, 0/61661 clusters

Copy FreeDOS:

dd if=/home/ethan/Downloads/FreeDOS-1.1-USB-Boot.img of=/dev/sdb1
63488+0 records in
63488+0 records out
32505856 bytes (33 MB) copied, 1.30864 s, 24.8 MB/

Check Mount:

/dev/sdb1 on /media/bkup type vfat
(ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)


After you do the 'dd' command I suggested above, then do

fdisk -l /dev/sdb

to see what partitions are listed.  There will likely be just one.  You 
can add more later.  Best anyway to see what the 'dd' command leaves you.







Check Contents:

rosenberg:/media# ls -la bkup
ls: cannot access bkup/%f IN (-.--s: Input/output error
ls: cannot access bkup/in a bat.ch: Input/output error
ls: cannot access bkup/
   label: Input/output error
ls: cannot access bkup/ng used.in: Input/output error
ls: cannot access bkup/ colon.
: Input/output error
ls: cannot access bkup/ry [size.]




hth,
ken


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/51c398ce.5040...@mousecar.com



Re: Problem with flash drive

2013-06-20 Thread Ethan Rosenberg, PhD

Ken -

Tried what you said, but I cannot make it work.

Here is what I did:

fdisk /dev/sdb

Command (m for help): d
Selected partition 1

Command (m for help):
Command (m for help): p

Disk /dev/sdb: 4051 MB, 4051697664 bytes
64 heads, 32 sectors/track, 3864 cylinders, total 7913472 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: 0x00077d8f

   Device Boot  Start End  Blocks   Id  System

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-7913471, default 2048): 0
Value out of range.
First sector (2048-7913471, default 2048): 1
Value out of range.
First sector (2048-7913471, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-7913471, default 7913471): 
989184


Command (m for help): t
Selected partition 1
Hex code (type L to list codes): e
Changed system type of partition 1 to e (W95 FAT16 (LBA))

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or 
resource busy.

The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)

dd if=/home/ethan/DOSutil/FreeDOS-1.1-USB-Boot.img of=/dev/sdb
63488+0 records in
63488+0 records out
32505856 bytes (33 MB) copied, 0.447414 s, 72.7 MB/s

rosenberg:/media# fdisk -l
Disk /dev/sdb: 4051 MB, 4051697664 bytes
64 heads, 32 sectors/track, 3864 cylinders, total 7913472 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: 0x00077d8f

   Device Boot  Start End  Blocks   Id  System
/dev/sdb1   *  32   63487   31728e  W95 FAT16 (LBA)

rosenberg:/media# mount
/dev/sdb1 on /media/bkup type vfat 
(ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)


rosenberg:/media# cd /media/bkup
rosenberg:/media/bkup# ls
64k of m.emo  conditio.n i = (eq.ual  in a bat.ch	%lukb?.reeng 
used.inpt to th.e d  sage.??P.AUS	tell you. if  tring].?.?/U
able to.the   ctive.?.Sea   es curre.nt   ings res.our	mand as.ifn 
if the. sp  racter)?.  $  s and di.rec	t enter.tot]??  te.xt
ame?	  D   Curr.ent  exists..the   in the e.nvi	me?	   no 
para.met  rd outpu.t o  seems to. be	ters to.dis   tting.?I.f a
and for.tha   debug [o.N |  fied com.man  into fre.eDO	mes a fi.le/  not 
to e.xec  rectory.offsets, o.r r	than sig.n)?  umber of. th
ariable..??/  DEBUG wi.tho  %f IN (-.--s  ions as.you	meters i.n a 
nsize2]]  rectory.sta  shows. ke	than the.? while t.he
ariable.nam   director.y s f.ree  irectory.nam	 minimum.? 
o?change. cu  reeCOM o.r o  sign to.the	?  The '.*'   window t.owa
ar sign).??DIRS?.emo Fre.eDO   is remo.ved	 minsize.2 s 
?.ode	riables..??s  sion:?%s.?	the comm.and   within.the
ason: %u. (%  DOWN]??D.own  g1==stri.ng2  istory b.uff	mmand pr.omp 
ommand [.arg  rnal com.man Speci.fie	 the con.ten  y out if. th
 assigns. th  drive an.d p  ge:?pre.ss   istribut.ion	m, speci.fy 
ontents.ofrogram.. Respecify. as	the path. sp  ype veri.FY
ation an.d n  eater-th.an   he for c.omm  ?  label	n?	  ORLEVEL.num 
  rrent ti.me   splay th.e v	thout a.par
ays the.Fre   ectory.?.Typ  hrinks a. UM  lays or.set	name2]??.Not  os 
comma.nd   r [/r] [./w]  ST filen.ame	tical Er.ror
  backsp.ace  edirect.the   h you wi.sh   le; by d.efa	n and li.nef 
our file.s a  rsion an.d o  ST filen.ame	TIME fro.m b
ber spec.ifi  e [drive.:]p  ibutors..?	  lename [.par	nded to.the   out 
para.met  rwise?th.e c  [string]. to	time [/t.] [
cify a n.ew   eep the.sam   I code 2.7)?  line by.its	ne histo.ry? 
plays or. se  ry [size.]??   system.whe	ting.?.f d
 colon.?  e execut.abl  ies a se.rie  ll debug. ou	n exit c.ode 
play the. cu  ?.s a	  t and .std	to that.fil
conditio.n i  e follow.ing  ilename1.] [  Loads a.pro	?.ng	  prompt 
t.he   sage pa.cke  tch prog.ram	tring is. sp


Thanks for everything, but I am still stuck.

Ethan
=
On 06/20/2013 07:22 PM Ethan Rosenberg, PhD wrote:

Dear list -

I am trying to copy FreeDOS to a flash drive.  I can't make it work.

This is what I have done -

Command (m for help): p

Disk /dev/sdb: 4051 MB, 4051697664 bytes
125 heads, 62 sectors/track, 1021 cylinders, total 7913472 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: 0x00077d8f

Device Boot  Start End  Blocks   Id  System
/dev/sdb12048  989184  493568+   c  W95