New Pi

halt on linux is the same as "shutdown -h now" unless you add some extra arguments.

--
umop apisdn
Reply to
Jasen Betts
Loading thread data ...

Worst case is a bricked SD card. I've seen it a few times with early pi firmware.

--
umop apisdn
Reply to
Jasen Betts

Hmm that is bad. I would have expected flash controllers to do the remapping operation in such a way that it would not corrupt the storage when it is interrupted halfway.

(i.e. first erase an area, then copy the data that has to be there, and only then change the pointer table to indicate that the data at that blocknumber is to be found at the new location, and free the original location)

Reply to
Rob

I have bricked one SD card and it was not while it was in the Pi. (but in the cardreader used to write it on a PC)

Most likely the problem was the quality of the card.

Reply to
Rob

yep. Its the one that doesn't that gets you

we had a server. SCO unix actually. For years when the power went down it came back up, grumbling, but it came.

ALL the company data and years of bits of source code were on it.

A lot of it was backed up, but not all. It grew to have many disks inside it.

At leasts two I think. Maybe more.

Then we had a powercut. It went down. Then the power came on for 5 seconds as it was rebooting. Then the power went again.

That finished it. The boot disk was totally unrecoverable. IT didnt even have recognisable partitions on it.

The big company data was on the second drive however and that was OK, so we didn't lose all of it.

I stopped autobooting servers on power on after that.

99 times out of a hundred on a system tat isn't busy, pulling the power wont cause irreparable damage. But if the system IS busy around the boot sector you can utterly destroy it.

whether we had a head crash, or a random write to a sector I will never know.

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
lead are elected by the least capable of producing, and where the  
members of society least likely to sustain themselves or succeed, are  
rewarded with goods and services paid for by the confiscated wealth of a  
diminishing number of producers.
Reply to
The Natural Philosopher

bricked to the point where you cant even format it?

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
lead are elected by the least capable of producing, and where the  
members of society least likely to sustain themselves or succeed, are  
rewarded with goods and services paid for by the confiscated wealth of a  
diminishing number of producers.
Reply to
The Natural Philosopher

supercapacitiors and intelligence in the card may in time solve that.

weird things happen when power goes up and down though.

I have no idea how modern computers work, but we used to actually build stuff into cicuitry so that if the supply rails was lower than a certain capacitor, that meant power had gone and you would then had few clock cycles to set an interrupt going to at least preserve the most important stuff.

'watchdog' in my day meant a series of JMP RESET instructions inserted into random places between code blocks in ROM so that in the event of the instruction pointer having been corrupted (typically by a nearby nuclear EMP pulse) the system would at least reboot into some semblance of where it was....we used static ram too, for similar reasons.

Software cannot be guaranteed to work when a register or memory cell changes under your feet..

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
lead are elected by the least capable of producing, and where the  
members of society least likely to sustain themselves or succeed, are  
rewarded with goods and services paid for by the confiscated wealth of a  
diminishing number of producers.
Reply to
The Natural Philosopher

Seen that on several USB sticks, and the technology is the same. Typically Windsows will report it as a 512 Kbyte device, i.e. just one block visible.

--
Alan Adams, from Northamptonshire 
alan@adamshome.org.uk 
http://www.nckc.org.uk/
Reply to
Alan Adams

Did you use the Microsoft programs that came with your Windows OS to format and/or copy? As I understand it "format" and "copy" have different meanings for Microsoft and the SD Association. The SD Association's formatter is here . An SD Card copier that runs under Windows is here . To round out your collection of SD Card utilities "the" SD card test and speed benchmark program is here . The site is German but the program has an English option.

Reply to
Gordon Levi

Hmm.

how DOES a card report its size, ex of being formatted?

>
--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
lead are elected by the least capable of producing, and where the  
members of society least likely to sustain themselves or succeed, are  
rewarded with goods and services paid for by the confiscated wealth of a  
diminishing number of producers.
Reply to
The Natural Philosopher

Not on a UPS then? And if the UPS has shutdown as well doesn't start up again until it has recharged its batteries enough to maintain power long enough for conected kit to cleanly shutdown (again).

--
Cheers 
Dave.
Reply to
Dave Liquorice

My experience with UPSes has not been that good... Maybe they are better today, but the ones I used were usually not too clever. For example, when the power drops and it detects it has a certain number of minutes left, it shuts down the systems (or better: the systems shutdown themselves after receiving an indication from the UPS) and then when the power returns before the time actually runs out, the UPS goes back to online mode and the systems are and remain OFF. Of course, once it has given the indication that shutdown should be done it should always cycle the power even when the input mains is back.

Others could not be turned on when the batteries are charged but no input is available. So you can put them online and they will take over when power drops, but you cannot get one fully charged out of storage and use it to power some equipment during a blackout. And it even is inconvenient to use one to vacuum your car interior. (you need to plug it in and switch it on in the house, then carry it to the car while it is running)

Furthermore, the MTBF of a typical UPS is shorter than that of the mains itself, over here. But that varies a lot depending on location.

Reply to
Rob

WE weren't in them days.

I dont use it now either.

Home server only with mirror disks. Chances are one will make it.

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
lead are elected by the least capable of producing, and where the  
members of society least likely to sustain themselves or succeed, are  
rewarded with goods and services paid for by the confiscated wealth of a  
diminishing number of producers.
Reply to
The Natural Philosopher

I have made some useful progress today. Using the above formatter and disk manager I put noobs onto a new SD card and it booted immediatly, so now have a backup card. However the original corupted card I reformatted using SD formatter4. I then tried to burn the disc image onto the card to be told there was insufficent space. Then on the Iyo I copied the Noobs files onto the card. They went into the space available. Tried it in the Pi but still would not boot..

Will try the cycle again.

Malcolm

--
T M Smith 
Using an Iyonix and RISC OS 5.20 in the North Riding of Yorkshire
Reply to
T M Smith

All the same, with all the dire warnings about power cuts from 2015 onward thanks to a lack of gummint and powerco spending on replacement generating kit I'm seriously considering getting a small UPS that can at least keep my main box alive long enough for it to do a clean shutdown. An automatic restart when the power comes back would be nice but not essential.

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

Icky, but that was written 9 years ago. Have things moved on since and, if so, in which direction?

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

TBH I'm not overly enamoured either but the small UPS I have is mainly there to maintain the phone system (two VOIP lines over ADSL).

'tis true but if there is no one here to press the servers power button it's no great problem.

That sort of depends on how you have your systems set up. Do you keep things powered until the battery is almost exhausted then shutdown or do you shutdown say 2 mins after the power has gone thus load shedding and keeping battery for "essential" low power kit? I do the latter.

Mine will "cold start".

A guesstimated average would be about 1 or 2 outages a year here. But that can be anything from an auto recloser cycle (off for a couple seconds) to 36+ hours (ice storm bringing down lines and snapping poles).

The UPS will keep the phone system running for about 6 hours, if the outage is going to be much longer than that I'll be dragging the genset out of the garage to power the heating system, fridges and freezers etc

--
Cheers 
Dave.
Reply to
Dave Liquorice

yeah, can't format it with three different SD card readers on three different PCs,

Some of them were Kingston and some Sandisk and some A-Data, IIRC not no-name parts.

--
umop apisdn
Reply to
Jasen Betts

If you have a Windoz machine, try chkdsk : /f in a CMD window.

Reply to
hamilton

Here is one manufacturers advice on how to recover a severely damaged USB stick . The instructions work on my laptop under Windows 7 for an internal SD card reader. Do be careful not to repartition a working hard drive!

Reply to
Gordon Levi

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.