Re: DD bs=4M option on USB mem-stick creates false format

2017-03-29 Thread Thomas Schmitt
Hi, kAt wrote: > I am trying to find out > what firmware works with this medium and what it really does. It's a little computer which implements USB bus operation, and a subset of the SCSI command protocol, and also manages the mapping from logical addresses (LBA) to physical addresses. What it d

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-29 Thread kAt
Thomas Schmitt: > Hi, > > kAt wrote: >> All I can say is that I feel honored that some useful code was produced >> with my problem statement as an inspiration. > > Whether it's useful will still have to turn out. :) > Up to now it has one happy user. I think being able to use a thumb-stick as a

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-29 Thread Curt
On 2017-03-28, kAt wrote: > All I can say is that I feel honored that some useful code was produced > with my problem statement as an inspiration. That's like some befuddled bumpkin down in North Carolina saying he's proud to find a portrait of himself in one of Thomas Wolfe's books. Actually i

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-29 Thread Thomas Schmitt
Hi, now i have spoiled the wet run messages. "Wrote" rather than "Removed" in the messages agout APM and GPT. Gr. New source: http://scdbackup.webframe.org/make_isombr_part.c MD5 34aa900801f65955a61cebf0280eeb3b Compile by cc -g -Wall -o make_isombr_part make_isombr_part.c New amd6

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-29 Thread Thomas Schmitt
Hi, i adopted the idea of a dry run for educational purposes. It demonstrates in detail what make_isombr_part would do to the storage device. With debian-8.7.1-i386-xfce-CD-1.iso on /dev/sdc: - $ ./make_isombr_part /dev/sdc a

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-29 Thread Thomas Schmitt
Hi, isongbird wrote: > also, consider that bugs do happen and sometimes > a dry run switch will discover them before it does > the actual write to the device. The code still contains a conditional part which i used with the initial tests. If you change /* # def ine Make_isombr_part_dummY yes

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-29 Thread Thomas Schmitt
Hi, kAt wrote: > All I can say is that I feel honored that some useful code was produced > with my problem statement as an inspiration. Whether it's useful will still have to turn out. :) Up to now it has one happy user. I am pondering about the partition table mess since quite a while. On the o

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread songbird
Thomas Schmitt wrote: > songbird wrote: >> always give an option to do a dry run without any actual changes >> being made > > But what difference would that make ? just me and a preference to err on the side of caution when dealing with devices that might alter a very basic thing. > If the pr

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread songbird
kAt wrote: > All I can say is that I feel honored that some useful code was produced > with my problem statement as an inspiration. > I am doing research on the topic trying to learn all that feels like a > huge gap of how disks and data relate. > > Have a nice day Thomas it is very useful to th

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread kAt
All I can say is that I feel honored that some useful code was produced with my problem statement as an inspiration. I am doing research on the topic trying to learn all that feels like a huge gap of how disks and data relate. Have a nice day Thomas kAt Thomas Schmitt: > Hi, > > i wrote a small

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread Thomas Schmitt
Hi, songbird wrote: > always give an option to do a dry run without any actual changes > being made But what difference would that make ? If the program thinks it's not ok, then it will refuse. If it thinks it's ok, then shall the user refrain nevertheless ? Of course it's safer to know what is

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread songbird
Thomas Schmitt wrote: ... > > > See a test run with rescatux ISO on /dev/sdc (any current Debian i386 > or amd64 ISO would be suitable, too). > > Still less dangerous than manipulating /dev files as superuser is > to give the

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread Thomas Schmitt
Hi, i wrote: > > One may well try to manage the stick by a partition editor. Richard Owlett wrote: > Appropriate search terms that would lead to learning "howto"? "linux"-or-"yourdesktop" together with "partition editor". The reason to start this thread was about "gparted". We saw output of "f

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread Richard Owlett
On 03/28/2017 09:20 AM, Thomas Schmitt wrote: Hi, Richard Owlett wrote: /dev/sdb3 1140736 15130623 13989888 6.7G 83 Linux For the records (as Richard obviously knew it already): If you believe that line, would you like to by a Brooklyn Bridge? It was legitimately for sale in late 196

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread Thomas Schmitt
Hi, Richard Owlett wrote: > /dev/sdb3 1140736 15130623 13989888 6.7G 83 Linux For the records (as Richard obviously knew it already): After the run of make_isombr_part, the new partition has no filesystem. The commands mkfs or mkdosfs would be the next step, or some GUI tool for managing

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, Mar 28, 2017 at 08:41:52AM -0500, Richard Owlett wrote: > On 03/28/2017 07:17 AM, to...@tuxteam.de wrote: > >[snip] > > > >I'd guess there's a difference between Thomas's processor architecture > >and yours. [snip] > > Recompiled for my archit

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread Richard Owlett
On 03/28/2017 07:17 AM, to...@tuxteam.de wrote: [snip] I'd guess there's a difference between Thomas's processor architecture and yours. [snip] Recompiled for my architecture successfully. Did a successful minimal install from my modified flash drive. Operator error or other? It's always

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread Richard Owlett
On 03/28/2017 07:16 AM, Thomas Schmitt wrote: [snip] To build your own binary, do in the directory where you have the file make_isombr_part.c : cc -g -Wall -o make_isombr_part make_isombr_part.c This command should end quickly without any messages. If messages appear, then please show them.

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread Richard Owlett
On 03/28/2017 07:16 AM, Thomas Schmitt wrote: Hi, Richard Owlett wrote: I am running Debian 8.6.0 with MATE desktop. ... bash: /home/richard/Downloads/make_isombr_part: cannot execute binary file: Exec format error Can it be your system is equipped with Debian for architecture i386 ? Yepp ;

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, Mar 28, 2017 at 02:16:24PM +0200, Thomas Schmitt wrote: [...] > http://scdbackup.webframe.org/make_isombr_part.c Yummy source. Now we're talking :-) (trapped at work ATM. But I'll sure look into that) regards - -- t -BEGIN PGP SIGNAT

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, Mar 28, 2017 at 06:53:08AM -0500, Richard Owlett wrote: > On 03/28/2017 05:10 AM, Thomas Schmitt wrote: > >[snip] > > > >It would be interesting to see how various partition editors react on > >this state of the USB stick. Can they reduce the s

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread Thomas Schmitt
Hi, Richard Owlett wrote: > I am running Debian 8.6.0 with MATE desktop. > ... > bash: /home/richard/Downloads/make_isombr_part: cannot execute binary file: > Exec format error Can it be your system is equipped with Debian for architecture i386 ? I forgot to mention that my system is amd64. > O

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread Richard Owlett
On 03/28/2017 05:10 AM, Thomas Schmitt wrote: [snip] It would be interesting to see how various partition editors react on this state of the USB stick. Can they reduce the size of partition 3 ? Can they remove partition 3 and add on new one ? That looked interesting. As I had a flash drive wi

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-28 Thread Thomas Schmitt
Hi, i wrote a small program which shall make a USB stick with isohybrid ISO more digestible for partition editors by removing all partition tables except MBR partitions. It then creates a new partition in the first MBR partition slot which is found with block count 0. usage: ./make_isombr_part

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-27 Thread Pascal Hambourg
Le 27/03/2017 à 20:11, David Christensen a écrit : For example, here is an ADATA 4 marketing-GB USB flash drive: (...) Burning 10 MB using 'bs=1M': 2017-03-27 11:01:23 root@jesse ~ # time dd if=/dev/urandom of=/dev/sdb seek=3000 count=10 bs=1M && sync 10+0 records in 10+0 records out 10485760

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-27 Thread Thomas Schmitt
Hi, i wrote: > > - APM partition table with block size 2048 (look here for a suspect !) Pascal Hambourg wrote: > For whatever reason, libarted-based tools choose to consider that bogus > Apple partition table. > Bottom line : libparted-based tools do not handle ISO-hybrid images > correctly. Do n

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-27 Thread Pascal Hambourg
Le 27/03/2017 à 14:11, Thomas Schmitt a écrit : - APM partition table with block size 2048 (look here for a suspect !) Right. For whatever reason, libarted-based tools choose to consider that bogus Apple partition table. Unlike fdisk, you cannot force it to use another format. Bottom line

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-27 Thread David Christensen
On 03/27/2017 05:38 AM, Greg Wooledge wrote: ... the bs= option in dd. All that does is make the dd command run a tiny bit faster or slower. As I understand it, writes smaller than a flash page size cause the flash drive firmware to fetch or erase an available page of flash, combine the unmo

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-27 Thread David Christensen
On 03/27/2017 04:45 AM, kAt wrote: David Christensen: Understand that many memstick images change once they have been booted, so you must checksum them immediately after burning. (Thankfully, debian-8.7.1-i386-xfce-CD-1.iso doesn't, so I can verify my USB flash drive at any time.) I have done

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-27 Thread Thomas Schmitt
Hi, Greg Wooledge wrote: > If the disk-image came > from a 4 GB disk, and you write it onto an 8 GB disk, then the 8 GB > disk will *believe* that it is a 4 GB disk, because it has the metadata > from a 4 GB disk. The device size is not determined by the image data which get written to it. I assu

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-27 Thread Greg Wooledge
On Mon, Mar 27, 2017 at 11:45:00AM +, kAt wrote: > Yes, all this was done, the image on the stick is fine and functional! > I did not say there was a problem with it, but the rest of the unused > space ob the disk/mem-stick When you write a disk-image onto a "disk" (in this case, a USB mass st

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-27 Thread Thomas Schmitt
Hi, my hand made partition 3 fell victim to the deceptions of nested partitions. It starts inside the ISO after the end of partition 2. It should of course start after the end of partition 1. So this is not the right start of partition 3: > Device Boot Start End Sectors Size Id Typ

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-27 Thread rhkramer
On Monday, March 27, 2017 07:45:00 AM kAt wrote: > Again the question is not so much at the vendor's magic system but why > would a 0.6G image rent the rest of the disk useless for copying stuff > in and out, which I have done with many live systems. To me this is not an unexpected result. I don'

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-27 Thread Thomas Schmitt
Hi, kAt wrote: > >> Disk /dev/sdb: 7.2 GiB, 7751073792 bytes, 15138816 sectors > [...] > I suppose this is normal for an 8Gb usb stick. 249Mb go to firmware that > operates the stick Hardly. Unless it is an operating-system-on-a-stick. The habit on the storage sector is to count by SI compli

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-27 Thread kAt
David Christensen: > uname -a >Always start a new thread with these: 2017-03-26 19:50:42 dpchrist@jesse ~ $ cat /etc/debian_version 9.0 $ uname -a Linux debian9 4.9.0-2-amd64 #1 SMP Debian 4.9.13-1 (2017-02-27) x86_64 GNU/Linux >Also, please post the URL for image.iso/Rescatux 4.0beta. http://ww

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-27 Thread kAt
Thomas Schmitt: > Hi, > > kAt wrote: >>> /sbin/fdisk -l /dev/sdb >> Disk /dev/sdb: 7.2 GiB, 7751073792 bytes, 15138816 sectors > > Is this about the correct size of the stick ? I suppose this is normal for an 8Gb usb stick. 249Mb go to firmware that operates the stick I wouldn't know. >> U

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-27 Thread kAt
Thomas Schmitt: > Hi, > > kAt wrote: >>> /sbin/fdisk -l /dev/sdb >> Disk /dev/sdb: 7.2 GiB, 7751073792 bytes, 15138816 sectors > > Is this about the correct size of the stick ? I suppose this is normal for an 8Gb usb stick. 249Mb go to firmware that operates the stick I wouldn't know. >> Uni

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-26 Thread David Christensen
On 03/26/2017 10:18 AM, kAt wrote: dd if=/media/--/image.iso of=/dev/sdb bs=4M; sync the image works but the format of the drive seems false gparted when starting says that linux thinks it is a 256k block and not the 4m it indicates. It shows on an 8G drive an empty space of 28G Is it the

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-26 Thread Thomas Schmitt
Hi, kAt wrote: > > /sbin/fdisk -l /dev/sdb > Disk /dev/sdb: 7.2 GiB, 7751073792 bytes, 15138816 sectors Is this about the correct size of the stick ? > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 512 bytes / 512 byt

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-26 Thread Thomas Schmitt
Hi, kAt wrote: > dd if=/media/--/image.iso of=/dev/sdb bs=4M; sync > the image works but the format of the drive seems false The dd option "bs=" has no influence on the block size or other drive properties as perceived by a partition editor. > gparted when starting says that linux thinks it

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-26 Thread kAt
kAt: > dd if=/media/--/image.iso of=/dev/sdb bs=4M; sync > > the image works but the format of the drive seems false > gparted when starting says that linux thinks it is a 256k block and not > the 4m it indicates. It shows on an 8G drive an empty space of 28G > > Is it the option of bs=4M

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-26 Thread Richard Owlett
On 03/26/2017 12:18 PM, kAt wrote: dd if=/media/--/image.iso of=/dev/sdb bs=4M; sync the image works but the format of the drive seems false gparted when starting says that linux thinks it is a 256k block and not the 4m it indicates. It shows on an 8G drive an empty space of 28G Is it the

Re: DD bs=4M option on USB mem-stick creates false format

2017-03-26 Thread Darac Marjal
"dd ... bs=4M" doesn't change the block size of the underlying device. All it does is say that dd should copy in chunks of 4Mb. If the buffer size is bigger, then dd spends more time copying and less time telling the kernel to copy. On 26/03/17 18:18, kAt wrote: > dd if=/media/--/image.iso of

DD bs=4M option on USB mem-stick creates false format

2017-03-26 Thread kAt
dd if=/media/--/image.iso of=/dev/sdb bs=4M; sync the image works but the format of the drive seems false gparted when starting says that linux thinks it is a 256k block and not the 4m it indicates. It shows on an 8G drive an empty space of 28G Is it the option of bs=4M that creates this pro