Create NDIF disk image from RasPi SD card

Hello Jan,

Skipped a lot of quotes.

HD>> When sailing and traveling with my foldable bike, HD>> I do not have enough room to transport a large amount of computer HD> hardware. HD>> So next time I have to take 2 cardreaders with me, and leave that clean HD>> underware out of my case ;-). HD>> I did not use it anyway this time. HD>> But if I take two cardreaders with me, you should see I only need one, HD>> and because of an accident (bad meal), I do not have clean underware. HD>> So it is always trouble to pack the right things when traveling ;-).

JP> Yes, that is complicated, you could go naked though, only wear a JP> backpack.

No do it the other way round, wear the long and tick heavy clothes you need local, and pack just the small parts to keep it compact on bike/train. Ok, it's hot when traveling, but then you can carry as much as possible.

JP> You did say 'you do not use machine during copying' JP> Linux is very much alive, it is doing things all the time, type JP> ps avx JP> to see some processes. JP> or type JP> top

I knew there were, but not the amount of it.

JP> That sort of fiddling is not a chance I want to take, JP> but maybe for an emergency copy..

Yes, that was the case here.

JP> The other problem you then have is that you cannot run a verify. JP> diff myimage /dev/sd?

Until now I never did. I just tried if the copy works well. But indeed shut down the source card, and making a backup of it when it not runs is the best procedure.

JP> I wrote a special program for that to compare dvd and bluray images, but JP> it will compare anything: JP>

formatting link
JP> dvdimagecmp -a /dev/sd? -b myimage.iso JP> should work

Some time I will have a look at it, thanks.

JP> Every disk burn here is compared with it, it gives relative speed JP> compared to CDs and reports sectors that differ too.

For CD's that comparision is really necessarry, as CD's are not as reliable as magnetic storage is.

JP> Anyways, for 'on the road' (or in a train) I have a small Asus eeepc JP> that runs Linux with a Huawei 3G USB stick to connect to the net, JP> takes hardly any space, and has a real keyboard.

That real keyboard is a must I think. But the EEEPC has little memory and small storage.

JP> Usually I just ssh -Y to my home LAN with it,

Some Dutch friend in FidoNet used a Raspberry Pi 3B in his backpack running on a local powerbank using WiFi and 3G. His very small portable machine was connected to it via his own WiFi. Nice to see at the HCC computerclub in De Bilt last year. He has internet connection to his home and nobody sees a 3G dongle ;-).

JP> and nobody could tell I was not there.

Ofcourse one can say that. Your mobile connection was via a GSM mast. You are watched by camera's everywhere today, and the police can find you via your mobile phone and/or cash dispencers you used, or digital payments with your PIN card. So donot tell the phrase you did above, it simply is not true ;-). And second your connection has two weak links, the 3G provider, and your local ISP at home, i.e. ADSL or Fibre.

When the Boiler at home has a leakage, the RCD could shut down and your home router and internetconnection also. Luckily I do not have such a boiler, but many years ago I had a timerswitch which activated my RCD ones a day, until I found out the source of the problem. So modern technology is not allways working well, donot rely to much on it.

Henri.

Reply to
Henri Derksen
Loading thread data ...

Hello Dennis,

HD>> When sailing and traveling with my foldable bike, HD>> I do not have enough room to transport a large amount of computer HD> hardware. HD>> So next time I have to take 2 cardreaders with me, and leave that clean HD>> underware out of my case ;-).

DLB> I have a uSD card reader that is about the size of a large Chiclet gum. DLB> Or, to put it in terms of something readily available, DLB> the size of the standard USB /connector/ shell with a small bit of DLB> plastic on the exposed end --> with a slot for the uSD card.

I know, and have the same myself. The last one I bought was Euro 1.95. I was a little suprised at that price. But did you see my smiley at the end of my previous phrase? The keyboard and monitor are the two biggest items to take with you, so I left that away.

DLB> If you've got room for a pair of dice, you've got room for 4-6 of these DLB> readers.

formatting link

I only need two at a time. But with 4 you can make two backups at the same time. You know I have 5 Pi's, so running more than one (at home) is simply possible. Although I do not have 5 power supplies. The problem is when I am sailing with my bike. Normally I am going to computerclubs by car, and then there is enough room for carrying many Pi's and other stuff needed, i.e. monitor, cabling etc.. Going to ships by train and bike is limiting the transportation capacity. About 12 days I am going to Germany by train and bike for sailing at the rivers Rhine and Neckar for one week. But I donot need a computer there. At the old ships reunion in Leiden.nl last weekend I needed it much more.

Henri.

Reply to
Henri Derksen

Hello Jan,

I wrote to you:

JP>> The other problem you then have is that you cannot run a verify. JP>> diff myimage /dev/sd?

HD> Until now I never did. HD> I just tried if the copy works well. HD> But indeed shut down the source card, and making a backup of it when it HD> not runs is the best procedure.

A friend of my at the Dutch RISC OS Big Ben Computer club in Drachten.NL, and lives in Groningen.NL, told me in october 2016 to use the following syntax: sudo dd if=jessie.img of=/dev/sda bs=4M And he said that it is very important to use: sync after the copy with the dd command has finished. That "sync" writes the last bytes from the buffer to the destination SDcard. After that you can verify its contents if the copy did succeed properly.

My friend also suggests to use the command df for finding the right devices. But I have remarked that it only works for mounted devices, not the unmounted SDcard reader/writers, emty or not. If a SDcard has the same UUID as the one booted from, it will NOT be mounted since Raspbian Stretch ;-(. Of course there is a command to find out witch devices are connected. Now I have to find out that ;-) Until now I used the internal SDcopier util for it. But there is a better way for sure.

I think it is a good idea to create a 16 GB stretch.img at a 64 GB card or USB stick after I am ready configuring this new card.

If you have time also try to come to our computerclub in Drachten.nl every 3rd Thursday of every month, except July and August. So at the 20 th of September 2018 after 19:30 h, we are coming together again, and also all the next months. Normally I am not the most early bird that evenings ;-). But I am there until the end at 23:00 h. Ask for the adres by private (e-)mail. You can also find it at the website .

Henri.

Reply to
Henri Derksen

On a sunny day (Fri, 03 Aug 2018 09:46:00 +1200) it happened snipped-for-privacy@f1208.n80.z2.binkp.net (Henri Derksen) wrote in :

The eeePC could in principle also connect to Ziggo WiFi anywhere where people have their routers configured for it. It is a service from Ziggo where you can allow others to use your WiFi. Works most places and is then free. But I have that WiFi off. Was hacked long ago here. As for memory size, yes, but I have a large USB stick and it will just boot into opencpn with that. It is not fast though.

The PIN system has now failed a couple of times here, millions of Euros damage as people could not pay for their shopping, there is a lot of bad IT, kids without in depth knowledge of the stuff seem to be let lose to create large networks, the tax system IT was a disaster that did cost millions and still is not working it seems, project had to be stopped?

People here are talking about buying a safe and getting their money / saving from the banks.

What I meant is that I can post to Usenet and the source IP quoted in the headers will be my home IP address. Not all Usenet providers do quote the source IP though. You seem to be using a New Zealand Usenet provider?

Yes, I know they know everything, that is why (but I trust you do not tell anyone OK) I keep the invasion plans for the US on a separate laptop screened with alufoil buried under 'het torentje' in The Hague.

RCD to me means 'Radio Control Dienst' (radio law enforcement for the English lurkers), these days I have a ham license.... In the long ago past the RCD was something to watch out for. These days they are called 'Agentschap Telecom', you probably know, I assume you have Marcom A/B.

With more and more 'tronics all that is needed is a large EMP pulse and the world will come to a standstill, that includes modern cars, navigation, power, etc, just a matter of time. If humans do not do it, then a big solar eruption may.

I design 'tronix and am well aware of its limitations.

And hackers, the little raspi webserver I run for test most of the day on http://217.120.43.67 try it, with a copy of my real website, sees many hacking attempts from all countries in the world all day long. Its logged.

Give it some years and perhaps everybody gets a chip at birth. Then new technology, identity theft, hackers.. EMP, possibly the next upcoming nuke war will kill all tronix and we will be free .. ?? Sail away

Its is like when I dropped that many GB harddisk, with so much valuable stuff on it. Oh well, life goes on.

Greetings Jan

Reply to
Jan Panteltje

Hello Jan,

JP>>> AND I have some MDISKs, supposed to last a century.

HD>> What's that MDISKs?

JP> Dutch: JP>

formatting link

JP> English: JP>

formatting link

Nice to read and see. But if that disks survives 100 years, does the drives to read them still exists? You know electronics does not stay forever working, especially not the capacitors in it, they dry out.

I once hope to see an affordable storage system that has a long stay independend of a large temperature shift, dust and humidity etc. At the moment backing up to several harddisks every 10 years at different places is also a reliable way, of course never 100%, but at least it comes nearby that figure. W'll see what technics are coming.

Greetings from Henri.

Reply to
Henri Derksen

Hello Jan,

JP>>> and nobody could tell I was not there.

HD>> Ofcourse one can say that. Your mobile connection was via a GSM mast.

JP> The eeePC could in principle also connect to Ziggo WiFi anywhere where JP> people have their routers configured for it. JP> It is a service from Ziggo where you can allow others to use your WiFi. JP> Works most places and is then free.

I see, but I am no client of Ziggo for inet, only for coax cable tv.

JP> But I have that WiFi off. Was hacked long ago here.

You donot have a good protected router?

JP> As for memory size, yes, but I have a large USB stick and it will just JP> boot into opencpn with that.

Sure. OpenCPN works even at a Pi with 1 GB.

JP> It is not fast though.

Not for navigation. Drawing charts is a busy processing job.

JP> The PIN system has now failed a couple of times here, millions of Euros JP> damage as people could not pay for their shopping,

A real problem, when your car tank is emty and you can not fill it again at nights to drive home. Lucky me I can travel 1100 km at one tank filling.

JP> there is a lot of bad IT, kids without in depth knowledge of the stuff JP> seem to be let lose to create large networks, JP> the tax system IT was a disaster that did cost millions JP> and still is not working it seems, project had to be stopped?

I have heard that many times yes.

JP> People here are talking about buying a safe and getting their money / JP> saving from the banks.

For emergency purposes you always have to do that yes. Every good inland skipper knows that for sure and for years. Always keep a large storage of frequently used goods. You never know when the next moment will be there to buy goods again when sailing. So take every chance to fill up your storage.

HD>> So donot tell the phrase you did above, it simply is not true ;-). HD>> And second your connection has two weak links, the 3G provider, HD>> and your local ISP at home, i.e. ADSL or Fibre.

JP> What I meant is that I can post to Usenet and the source IP quoted in JP> the headers will be my home IP address.

I understand that SSH way you described.

JP> Not all Usenet providers do quote the source IP though. JP> You seem to be using a New Zealand Usenet provider?

You are faked ;-) I am using FidoNet by POTS, and my mail is going through WorldWide FidoNet and also via that usenet gateway, very comfortable indeed.

JP> Yes, I know they know everything, that is why (but I trust you do not JP> tell anyone OK) JP> I keep the invasion plans for the US on a separate laptop screened with JP> alufoil buried under 'het torentje' in The Hague.

You do not know if Trump does read this area too ? ;-).

JP>> When the Boiler at home has a leakage, the RCD could shut down and your JP> home JP>> router and internetconnection also.

JP> RCD to me means 'Radio Control Dienst' (radio law enforcement for the JP> English lurkers),

You never have heard about the Reduced Current Device? They also called it an Earthleakage Switch (Dutch: AardLekSchakelaar).

JP> these days I have a ham license....

I donot, only have a 27 MHz transceiver with FM, AM, USB and LSB and it is not used anymore because of my bad hearing. The antenna is dismantled because the nabours could not sleep when there are heavy winds. I only kept it for packet radio plans with a AEA PK87 packtcontrolle to run AX25 messages through the air. I have the RISC OS software versions for the Acorn RISC PC here. Never tried it life.

JP> In the long ago past the RCD was something to watch out for. JP> These days they are called 'Agentschap Telecom', you probably know, JP> I assume you have Marcom A/B.

No, only the basic marine radio license for inland VHF, not at sea.

HD>> So modern technology is not allways working well, donot rely to much on HD> it.

JP> With more and more 'tronics all that is needed is a large EMP pulse JP> and the world will come to a standstill, that includes modern cars, JP> navigation, power, etc, just a matter of time.

I know.

JP> If humans do not do it, then a big solar eruption may.

If we are still alive to stand the heat?

JP> I design 'tronix and am well aware of its limitations. JP> And hackers, the little raspi webserver I run for test most of the day JP> on http://217.120.43.67 JP> try it, with a copy of my real website, sees many hacking attempts from JP> all countries in the world all day long. Its logged.

Good.

JP> Give it some years and perhaps everybody gets a chip at birth.

I hate that idea ;-(.

JP> Then new technology, identity theft, hackers.. EMP, JP> possibly the next upcoming nuke war will kill all tronix and we will be JP> free ..?? JP> Sail away

Yes, let us keep it simple.

JP> Its is like when I dropped that many GB harddisk, with so much valuable JP> stuff on it. JP> Oh well, life goes on.

But you now have that M-DISKS ;-). They will get older than you?

Greetings Henri.

Reply to
Henri Derksen

On a sunny day (Sat, 04 Aug 2018 11:21:00 +1200) it happened snipped-for-privacy@f1208.n80.z2.binkp.net (Henri Derksen) wrote in :

Yes, I have the old Unix habit of typing 'sync' 3 times every now and then.

An other thing I notice with my USB sticks is that even after copy and sync the LED on the USB stick keeps flashing, sometimes for up to a minute or so. I once asked in a Linux group if it was safe to remove the USB stick when that LED was still flashing and was told that was OK... Nevertheless I always wait until it is off. For SDcards it is hard to tell, no LED, but I think the internal controller on the cards / sticks does some housekeeping even after the copy has finished. So maybe it is better to leave it in for a minute or so longer.

I always type dmesg then insert the new card, and type dmesg again. The new card should be mentioned in the last report.

Before inserting SDcard (here on the PC for demo): ~# dmesg

3277686.710313] sd 111:0:0:3: Attached scsi generic sg6 type 0 [3277686.710639] sd 111:0:0:1: [sdd] Attached SCSI removable disk [3277686.713316] sd 111:0:0:2: [sde] Attached SCSI removable disk [3277686.714815] sd 111:0:0:3: [sdf] Attached SCSI removable disk

After inserting SDcard ~# dmesg [3277710.813919] sd 114:0:0:0: [sdc] 7733248 512-byte logical blocks: (3.95 GB/3.68 GiB) [3277710.823929] sd 114:0:0:2: [sde] Attached SCSI removable disk [3277710.863908] sd 114:0:0:0: [sdc] Write Protect is off [3277710.863912] sd 114:0:0:0: [sdc] Mode Sense: 03 00 00 00 [3277710.863915] sd 114:0:0:0: [sdc] Assuming drive cache: write through [3277710.983879] sd 114:0:0:3: [sdf] Attached SCSI removable disk [3277710.995120] sd 114:0:0:0: [sdc] Assuming drive cache: write through [3277711.012886] sdc: sdc1 [3277711.042892] sd 114:0:0:0: [sdc] Assuming drive cache: write through [3277711.042900] sd 114:0:0:0: [sdc] Attached SCSI removable disk

So the card is /dev/sdc, and it has partition sdc1 and is a 4 GB card (from my Canon camera in this demo), and has 512 bytes / sector.

What is mounted you can find by typing mount If I then do mount /dev/sdc1 /mnt/sdc1 and type mount again, then I should see it listed

You can also type df to see what is mounted and how much space you have.

Thank you for the invitation, I appreciate it Greetings Jan

Reply to
Jan Panteltje

Its more important to *always* unmount the card before removing it, i.e. click 'Unmount' on the card's icon if you're using a graphical file manager or use the "umount" command if you're working from the command line.

The unmount process waits for any activities using the device to end, makes sure any cached data is flushed to the device and disconnects it when all related activities have ended. Do this for all removable storage media, not just SD cards and USB sticks.

NOTE that 'sync' just flushes cached data while 'umount' does quite a lot more. 'umount' will not allow a device to be unmounted if:

- there are still files open on it

- a process's working directory is on it

- it contains a swap file that's in use.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

On a sunny day (Sun, 5 Aug 2018 11:15:24 +0000 (UTC)) it happened Martin Gregorie wrote in :

Indeed, of course only when it was mounted first :-) If you just copied _from_ an image umount is not needed.

dd if=/dev/sd* of=myimage.iso does not need a mountg and umount.

Yes, the interesting thing is that even after umount the USB stick LED will flash for a while. Try it.

Reply to
Jan Panteltje

I can't try that: I have very few USB sticks and none of them have LED's fitted. However, I'm not particularly surprised that activity would continue because the USB controllers must be very small and low powered and they have to deal with wear levelling some time and its a fairly safe bet that it will have a lower priority than handling data transfer requests.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

Never seen here.

Reply to
Andreas Neumann

I see it all the time, but only on Windows boxes. But they're famous for lying, e.g. about when they've finished writing.

--
/~\  cgibbs@kltpzyxm.invalid (Charlie Gibbs) 
\ /  I'm really at ac.dekanfrus if you read it the right way. 
 X   Top-posted messages will probably be ignored.  See RFC1855. 
/ \  Fight low-contrast text in web pages!  http://contrastrebellion.com
Reply to
Charlie Gibbs

On a sunny day (5 Aug 2018 18:16:16 GMT) it happened Charlie Gibbs wrote in :

I have only Linux.

Reply to
Jan Panteltje

The flashing LED means there is USB activity. It does not imply there are writes occurring as the OS could be doing a number USB control endpoint actions that do not have an effect on the actual filesystem.

Reply to
mm0fmf
08-05-18 16:38 Henri Derksen wrote to Jan Panteltje about Create NDIF disk image fr Howdy! Henri,

-snip- JP> these days I have a ham license....

HD> I donot, only have a 27 MHz transceiver with FM, AM, USB and LSB HD> and it is not used anymore because of my bad hearing. HD> The antenna is dismantled because the nabours could not sleep when HD> there are heavy winds. HD> I only kept it for packet radio plans with a AEA PK87 packtcontrolle to HD> run AX25 messages through the air.

I'm wondering if what You wrote about Packet Radio meant it is being used on 27 Mc/s? ..--..

... I took the road less traveled & ended up with no phone signal.

Reply to
Ed Vance

On a sunny day (Sun, 05 Aug 2018 16:38:00 +1200) it happened snipped-for-privacy@f1208.n80.z2.binkp.net (Henri Derksen) wrote in :

There is an option that you can activate the WiFi in your router (if you have Ziggo) to create a 'hotspot'. If you do that, then you can use other Ziggo user's hotspots all over the country. It is free, but your router needs to be on all the time. At least it was that way a few years back Google 'ziggo hotspots', cannot connect to their web site now, not working again, called the helpdesk, 'sorry we are working on it', what a bunch of clowns.

I think they came in via a security camera with WiFi 'War driving'. I think I know who it was, but hard to prove.

Ah!

Can he read? I thought he only watched Fox news...

But for sure, both US and UK monitor and store everything on that transatlantic cable. That is why we prepare for the revolution using pieces of paper with Caesar cipher to commie-nukate the secret password is 00000000, the same at the US launch codes, they will never figure that out.

Ah, aardlek schakelaar, dat wel.

I wrote the packet software long time ago for a Z80 system I had at that time. That was 1200 Bd,

formatting link
bottom page, baycom packet modem card. I still have 2 27 MHz sets, these days there is sound card software for packet, no need for a special card. I hear no activity here on a small antenna on 27 MHz. The big GPA is stored in the attic.

Scares me too.

One wonders, what people will do with that big box with all those discs... And I could not care less.

Greetings Jan

Reply to
Jan Panteltje

On a sunny day (Sun, 05 Aug 2018 15:49:00 +1200) it happened snipped-for-privacy@f1208.n80.z2.binkp.net (Henri Derksen) wrote in :

Good question.

I once used 51/4 inch floppies for my CP/M system. Then one day the disc drive failed. I still do have a USB drive for 3.5 inch floppies... And a lot of those, even with old win 3.1 on it.

You sort of hope that when a later civilization digs up our old optical disks the archaeologists will go to some university and have them 'decode' what is on it...

I have a big alu box (BIG) with close to a thousand optical disks, from old CD-R, CD-RW, DVD-R, DVD-RW, and bluray. The interesting thing is, as it is 100% light proof, I get still zero errors on most old CD-R last time I looked. Some go back to year 2000 or 2001.

18 years. The trick: store optical disk in the dark. And dry,. I had to return some that had some fungus spots in it when new.

And I have a 1TB disc with magnetic backups of much stuff.

Greetings Jan

Reply to
Jan Panteltje

Did you know that NASA very nearly lost all the data, held on mag tape, from the Apollo and early Mars and moon missions? They had all the tapes carefully stored but some accountant or non-technical manager decided that the space occupied by the (large?) tape drives was wasted and sent them to the tip. Then some years later that data was needed....

Fortunately a retired engineer had 'diverted' two of the drives to his garage and, even more fortunately, they still worked when cleaned up and interfaced to a computer.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

Thats how I manage.

several hard disks of whatever the latest technology is.

And a 'nice'd up copy program for when a new drive goes in

--
"I am inclined to tell the truth and dislike people who lie consistently. 
This makes me unfit for the company of people of a Left persuasion, and  
all women"
Reply to
The Natural Philosopher

On a sunny day (Mon, 6 Aug 2018 13:08:37 +0100) it happened The Natural Philosopher wrote in :

And in case the place burned down, was nuked, or whatever, I carry a USB stick with the programs I wrote and my often used scripts. And in case.. there is a backup of much in the cloud, rented space. The old Duracell USB sticks I have have a hole where you can put a cord and wear it around your neck. Bit of code to commie-nuke-aid:

formatting link

The small micro SDcards can be hidden almost anywhere.

Best is to use postal pigeons with those card for data, it is cheaper and faster per GB than the internet ;-)

It is fun to play with 'high tech' and show its limits.

Reply to
Jan Panteltje

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.