9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Q: checking CD vs. iso image
@ 2005-08-22 12:08 pac7
  2005-08-22 12:38 ` Russ Cox
  2005-08-22 12:46 ` Uriel
  0 siblings, 2 replies; 8+ messages in thread
From: pac7 @ 2005-08-22 12:08 UTC (permalink / raw)
  To: 9fans

hi,
how do i check content of a CD versus an iso image from which it
was burnt (using md5sum and cmp, perhaps)?

thanks, cheers,
++pac


-- 
Ziskejte trvale pripojeni k internetu VOLNY ADSL za nizky mesicni
pausalni poplatek 349,- Kc mesicne. Revoluce na internetu jiz
zacala! Vice informaci ziskate na http://adsl.volny.cz/



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Q: checking CD vs. iso image
  2005-08-22 12:08 [9fans] Q: checking CD vs. iso image pac7
@ 2005-08-22 12:38 ` Russ Cox
  2005-08-22 12:46 ` Uriel
  1 sibling, 0 replies; 8+ messages in thread
From: Russ Cox @ 2005-08-22 12:38 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> how do i check content of a CD versus an iso image from which it
> was burnt (using md5sum and cmp, perhaps)?

md5sum original.iso
md5sum /dev/sdD0/data

you may have to eject the disk and put it back in to
make plan 9 realize the cd has changed underfoot.

russ


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Q: checking CD vs. iso image
  2005-08-22 12:08 [9fans] Q: checking CD vs. iso image pac7
  2005-08-22 12:38 ` Russ Cox
@ 2005-08-22 12:46 ` Uriel
  2005-08-22 12:55   ` Russ Cox
  1 sibling, 1 reply; 8+ messages in thread
From: Uriel @ 2005-08-22 12:46 UTC (permalink / raw)
  To: 9fans

Having a way to identify the build date of ISO images would be very
nice(like what VN does for Inferno images).

Also having the .iso images files accessible with date-based names would
make it easier to maintain mirrors and point people to known "good"
images if they have problems with the installation.

uriel

On Mon, Aug 22, 2005 at 02:08:29PM +0200, pac7@post.cz wrote:
> hi,
> how do i check content of a CD versus an iso image from which it
> was burnt (using md5sum and cmp, perhaps)?
> 
> thanks, cheers,
> ++pac
> 
> 
> -- 
> Ziskejte trvale pripojeni k internetu VOLNY ADSL za nizky mesicni
> pausalni poplatek 349,- Kc mesicne. Revoluce na internetu jiz
> zacala! Vice informaci ziskate na http://adsl.volny.cz/
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Q: checking CD vs. iso image
  2005-08-22 12:46 ` Uriel
@ 2005-08-22 12:55   ` Russ Cox
  2005-08-22 15:05     ` Gorka guardiola
  0 siblings, 1 reply; 8+ messages in thread
From: Russ Cox @ 2005-08-22 12:55 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> Having a way to identify the build date of ISO images would be very
> nice(like what VN does for Inferno images).
> 
> Also having the .iso images files accessible with date-based names would
> make it easier to maintain mirrors and point people to known "good"
> images if they have problems with the installation.

You only need a "good" list if "bad" is the norm.
If "bad" is the norm, let's address that instead.

I don't want to save every CD image (they change almost
nightly).  It's a waste of disk space (Venti doesn't help
because the images are compressed and thus share
no common blocks).  VN updates their CDs much less
frequently than we do, so it's not as big a deal for them.

If you're dying to identify an old image, use
http://plan9.bell-labs.com/plan9checksums.txt.

Russ


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Q: checking CD vs. iso image
  2005-08-22 12:55   ` Russ Cox
@ 2005-08-22 15:05     ` Gorka guardiola
  0 siblings, 0 replies; 8+ messages in thread
From: Gorka guardiola @ 2005-08-22 15:05 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 8/22/05, Russ Cox <russcox@gmail.com> wrote:
> You only need a "good" list if "bad" is the norm.
> If "bad" is the norm, let's address that instead.
> 

Bad is as in badly compressed (that is easy to check for, you uncompress,
mount, diff the trees) or bad meaning a bug in a program inside the
CD?. Booting the
CD in a virtual environment may help on that, though it may be too
much of a hassle.
-- 
- curiosity sKilled the cat


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [9fans] Q: checking CD vs. iso image
@ 2005-08-22 17:11 alexandr babic
  2005-08-22 15:16 ` Gorka guardiola
  2005-08-22 15:20 ` Anselm R. Garbe
  0 siblings, 2 replies; 8+ messages in thread
From: alexandr babic @ 2005-08-22 17:11 UTC (permalink / raw)
  To: 9fans

hi.

and what about to compare one byte from cd with one byte from iso
by following short program, but i haven't plan9 here so you have 
to try by yourself :-)

alexandr.


check.c
------------------------------
#include <u.h>
#include <libc.h> 

void main()
{
int cdfd,isofd,i,r;
unsigned char C,I;

cdfd=open("/dev/sdD0/data",OREAD); 
isofd=open("obraz.iso",OREAD); 

i=0;

while(1)
{
 r=read(cdfd,(void*)&C,1);
 if(r==0) break;
 r=read(isofd,(void*)&I,1);
 if(r==0) break;
 i++;

 if(C==I) print("byte position=%d, bytes are same!\n",i);
 else print("byte position=%d, bytes differ! cd is %d, iso is %d
\n",i,C,I);
}

close(cdfd);
close(isofd);
exits(0);
}



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Q: checking CD vs. iso image
  2005-08-22 17:11 alexandr babic
  2005-08-22 15:16 ` Gorka guardiola
@ 2005-08-22 15:20 ` Anselm R. Garbe
  1 sibling, 0 replies; 8+ messages in thread
From: Anselm R. Garbe @ 2005-08-22 15:20 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 8/22/05, alexandr babic <alexandr@babi.cz> wrote:
> while(1)
> {
>  r=read(cdfd,(void*)&C,1);
>  if(r==0) break;
>  r=read(isofd,(void*)&I,1);
>  if(r==0) break;
>  i++;
> 
>  if(C==I) print("byte position=%d, bytes are same!\n",i);
>  else print("byte position=%d, bytes differ! cd is %d, iso is %d
> \n",i,C,I);
> }

That produces much output and the speed might be too fast to notice a diff ;)

while(1) {
....
    if(C != I)
        exits("cd and iso differ at least at byte position %d\n");
}

print("cd and iso are equal\n");

...

Regards,
-- 
  Anselm R. Garbe  ><><  www.ebrag.de  ><><  GPG key: 0D73F361


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Q: checking CD vs. iso image
  2005-08-22 17:11 alexandr babic
@ 2005-08-22 15:16 ` Gorka guardiola
  2005-08-22 15:20 ` Anselm R. Garbe
  1 sibling, 0 replies; 8+ messages in thread
From: Gorka guardiola @ 2005-08-22 15:16 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Congratulations, you just reinvented cmp(1). You should now go for ps(1).

On 8/22/05, alexandr babic <alexandr@babi.cz> wrote:
> hi.
> 
> and what about to compare one byte from cd with one byte from iso
> by following short program, but i haven't plan9 here so you have
> to try by yourself :-)
> 
> alexandr.
> 
> 
> check.c
> ------------------------------
> #include <u.h>
> #include <libc.h>
> 
> void main()
> {
> int cdfd,isofd,i,r;
> unsigned char C,I;
> 
> cdfd=open("/dev/sdD0/data",OREAD);
> isofd=open("obraz.iso",OREAD);
> 
> i=0;
> 
> while(1)
> {
>  r=read(cdfd,(void*)&C,1);
>  if(r==0) break;
>  r=read(isofd,(void*)&I,1);
>  if(r==0) break;
>  i++;
> 
>  if(C==I) print("byte position=%d, bytes are same!\n",i);
>  else print("byte position=%d, bytes differ! cd is %d, iso is %d
> \n",i,C,I);
> }
> 
> close(cdfd);
> close(isofd);
> exits(0);
> }
> 
> 


-- 
- curiosity sKilled the cat


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-08-22 17:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-22 12:08 [9fans] Q: checking CD vs. iso image pac7
2005-08-22 12:38 ` Russ Cox
2005-08-22 12:46 ` Uriel
2005-08-22 12:55   ` Russ Cox
2005-08-22 15:05     ` Gorka guardiola
2005-08-22 17:11 alexandr babic
2005-08-22 15:16 ` Gorka guardiola
2005-08-22 15:20 ` Anselm R. Garbe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).