Re: Low Level read/Write code for USB storage device
Jim Wagner <[email protected]> Fri, 14 Dec 2018 08:04:44 -0800
| Newsgroups | gmane.comp.lang.realbasic.user |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_DEB4CF3C-571A-4EDC-9D47-80A4AD62A09F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello, Jean-Luc I do not think that you should try to =E2=80=9Cclone=E2=80=9D a USB = stick at =E2=80=9Clow level=E2=80=9D, that is, at the sector or block = level. That is because of a process used on solid-state memories (such = as USB stick); this is called =E2=80=9Cwear leveling=E2=80=9D. For = example, if you change a document on such memory, it will actually move = it to a new place so that the different parts of the memory all have a = chance to be written and no part gets written too many times. Certainly, you can reconstruct partitions and such, but you need to do = it at a file-system level. Perhaps, this is what you are calling =E2=80=9C= low level=E2=80=9D? Jim James Wagner Oregon Research Electronics http://www.orelectronics.net <http://www.orelectronics.net/> > On Dec 14, 2018, at 1:56 AM, Jean-Luc Arnaud = <jean-luc-E/[email protected]> wrote: >=20 > Hi all, >=20 > I plan to code for a kind of "USB Stick cloner" running on Windows, = that is to make an > image of the entire content of a USB Storage device, in order to copy = it > to another USB stick. >=20 > I'd like to read low level information about partition table, > catalog, etc.. and of course, to copy this information to another = stick. >=20 > I didn't find nothing useful in the Xojo forum nor in MBS samples. >=20 > After a lot of searches on Internet (information like APIs, Command = Line tools, shared code, ...), I'm now interested in an open-source = utility, Clonezilla, which does all I need. >=20 > Does someone know and/or use this utility? > My goal is to adapt its source for my own needs, including it in a = Xojo app. >=20 > Thanks for any help. >=20 > --=20 > Jean-Luc Arnaud >=20 --Apple-Mail=_DEB4CF3C-571A-4EDC-9D47-80A4AD62A09F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D"">Hello, Jean-Luc<div class=3D""><br class=3D""></div><div = class=3D"">I do not think that you should try to =E2=80=9Cclone=E2=80=9D = a USB stick at =E2=80=9Clow level=E2=80=9D, that is, at the sector or = block level. That is because of a process used on solid-state memories = (such as USB stick); this is called =E2=80=9Cwear leveling=E2=80=9D. For = example, if you change a document on such memory, it will actually move = it to a new place so that the different parts of the memory all have a = chance to be written and no part gets written too many = times.</div><div class=3D""><br class=3D""></div><div = class=3D"">Certainly, you can reconstruct partitions and such, but you = need to do it at a file-system level. Perhaps, this is what you are = calling =E2=80=9Clow level=E2=80=9D?</div><div class=3D""><br = class=3D""></div><div class=3D"">Jim</div><div class=3D""><br = class=3D""><div class=3D""> <span class=3D"Apple-style-span" style=3D"border-collapse: separate; = color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; = font-variant-ligatures: normal; font-variant-position: normal; = font-variant-caps: normal; font-variant-numeric: normal; = font-variant-alternates: normal; font-variant-east-asian: normal; = font-weight: normal; letter-spacing: normal; line-height: normal; = orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: = none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: = 0px; -webkit-text-decorations-in-effect: none; = -webkit-text-stroke-width: 0px;"><div style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><div class=3D"">James Wagner</div><div class=3D"">Oregon = Research Electronics</div><div class=3D""><a = href=3D"http://www.orelectronics.net" = class=3D"">http://www.orelectronics.net</a></div><div class=3D""><br = class=3D""></div></div></span><br class=3D"Apple-interchange-newline"><br = class=3D"Apple-interchange-newline"> </div> <br class=3D""><div><blockquote type=3D"cite" class=3D""><div = class=3D"">On Dec 14, 2018, at 1:56 AM, Jean-Luc Arnaud <<a = href=3D"mailto:jean-luc-E/[email protected]" = class=3D"">jean-luc-E/[email protected]</a>> wrote:</div><br = class=3D"Apple-interchange-newline"><div class=3D""><div class=3D"">Hi = all,<br class=3D""><br class=3D"">I plan to code for a kind of "USB = Stick cloner" running on Windows, that is to make an<br class=3D"">image = of the entire content of a USB Storage device, in order to copy it<br = class=3D"">to another USB stick.<br class=3D""><br class=3D"">I'd like = to read low level information about partition table,<br = class=3D"">catalog, etc.. and of course, to copy this information to = another stick.<br class=3D""><br class=3D"">I didn't find nothing useful = in the Xojo forum nor in MBS samples.<br class=3D""><br class=3D"">After = a lot of searches on Internet (information like APIs, Command Line = tools, shared code, ...), I'm now interested in an open-source utility, = Clonezilla, which does all I need.<br class=3D""><br class=3D"">Does = someone know and/or use this utility?<br class=3D"">My goal is to adapt = its source for my own needs, including it in a Xojo app.<br class=3D""><br= class=3D"">Thanks for any help.<br class=3D""><br class=3D"">-- <br = class=3D"">Jean-Luc Arnaud<br class=3D""><br = class=3D""></div></div></blockquote></div><br = class=3D""></div></body></html>= --Apple-Mail=_DEB4CF3C-571A-4EDC-9D47-80A4AD62A09F--