kevin3372000
Posts: 14
Joined: Mon Apr 17, 2017 9:55 am

Need to reinstall OS every time after shutdown to boot

Mon Apr 17, 2017 10:08 am

I bought a raspberry pi 3 Model B recent days.

(My OS is the latest version of Raspbian)

And I met a problem : Every time I shutdown, I need to reinstall the OS into SD card to make it boot successfully.

I mean I can boot successfully after I install the OS into my SD card, but every time after I execute this command:

sudo shutdown -h now

to make it shutdown. It cannot boot successfully again.

I always do 'sudo shutdown -h now' and wait until only the red light is lighting. Only after only the red light is lighting, I will remove the power. So, it seems I didn't do any wrong when I shutdown it.

I have googled for two days, and I can't find any solution to this problem. I even tried the another SD card, but it has no help.

Can anyone help me? I really need someone's help. Thanks a lot.

Updated:

Just comment out this line in the config.txt:

Code: Select all

hdmi_force_hotplug=1
And it works!!
Last edited by kevin3372000 on Sat Apr 22, 2017 3:50 pm, edited 3 times in total.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13092
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Need to reinstall OS every time after shutdown to boot

Mon Apr 17, 2017 12:04 pm

Sounds like you are using an SD card that reports a larger size than it actuallly is, and thus during use simply starts overwriting previously written data.
Such Often is the case with "fake" cards that are sold as 8GB cards while being actually just 4GB.

kevin3372000
Posts: 14
Joined: Mon Apr 17, 2017 9:55 am

Re: Need to reinstall OS every time after shutdown to boot

Mon Apr 17, 2017 12:48 pm

mahjongg wrote:Sounds like you are using an SD card that reports a larger size than it actuallly is, and thus during use simply starts overwriting previously written data.
Such Often is the case with "fake" cards that are sold as 8GB cards while being actually just 4GB.
I have two cards. One is made by Transcend, and another one is made by Kinston. Both of this two cards are class10 16GB MicroSD cards.

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Need to reinstall OS every time after shutdown to boot

Mon Apr 17, 2017 1:10 pm

kevin3372000 wrote:
mahjongg wrote:Sounds like you are using an SD card that reports a larger size than it actuallly is, and thus during use simply starts overwriting previously written data.
Such Often is the case with "fake" cards that are sold as 8GB cards while being actually just 4GB.
I have two cards. One is made by Transcend, and another one is made by Kinston. Both of this two cards are class10 16GB MicroSD cards.
Test them with h2testw to see if they're fakes.
https://fightflashfraud.wordpress.com/d ... sh-memory/
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

kevin3372000
Posts: 14
Joined: Mon Apr 17, 2017 9:55 am

Re: Need to reinstall OS every time after shutdown to boot

Mon Apr 17, 2017 2:29 pm

DougieLawson wrote:
kevin3372000 wrote:
mahjongg wrote:Sounds like you are using an SD card that reports a larger size than it actuallly is, and thus during use simply starts overwriting previously written data.
Such Often is the case with "fake" cards that are sold as 8GB cards while being actually just 4GB.
I have two cards. One is made by Transcend, and another one is made by Kinston. Both of this two cards are class10 16GB MicroSD cards.
Test them with h2testw to see if they're fakes.
https://fightflashfraud.wordpress.com/d ... sh-memory/
I tested it using this software and it says "no error". So it means my SD card is not fake, right ?

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Need to reinstall OS every time after shutdown to boot

Mon Apr 17, 2017 3:18 pm

Then you need to look at your power supply and the weedy bit of cable between it and your RPi.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

kevin3372000
Posts: 14
Joined: Mon Apr 17, 2017 9:55 am

Re: Need to reinstall OS every time after shutdown to boot

Tue Apr 18, 2017 9:21 am

DougieLawson wrote:Then you need to look at your power supply and the weedy bit of cable between it and your RPi.
My power supply is 5V/2A, but according to the official website's description, the recommended power supply is 5.1V/2.5A. Would this be the cause of the problem ?

I'm thinking if I need to buy the official one now. Could you give me some advice? Thanks a lot.

drgeoff
Posts: 10765
Joined: Wed Jan 25, 2012 6:39 pm

Re: Need to reinstall OS every time after shutdown to boot

Tue Apr 18, 2017 10:24 am

2 amps is more than enough to power a RPi3 if the only USB peripherals are a mouse and a bog-standard keyboard. But many supplies can't deliver the labelled volts and amps at the same time. That is usually not critical for charging the cells in phones etc but it does matter for RPis. And some USB to micro-USB cables have so much resistance such that the voltage actually delivered to the RPi is too low.

Does the red LED ever blink or go out? If yes, then your powering arrangement is certainly deficient.

kevin3372000
Posts: 14
Joined: Mon Apr 17, 2017 9:55 am

Re: Need to reinstall OS every time after shutdown to boot

Tue Apr 18, 2017 1:41 pm

drgeoff wrote:2 amps is more than enough to power a RPi3 if the only USB peripherals are a mouse and a bog-standard keyboard. But many supplies can't deliver the labelled volts and amps at the same time. That is usually not critical for charging the cells in phones etc but it does matter for RPis. And some USB to micro-USB cables have so much resistance such that the voltage actually delivered to the RPi is too low.

Does the red LED ever blink or go out? If yes, then your powering arrangement is certainly deficient.
I have checked that the red LED didn't blink. Do you think that buying the official power supply will solve my problem ?
Last edited by kevin3372000 on Tue Apr 18, 2017 4:57 pm, edited 1 time in total.

MaxK1
Posts: 1043
Joined: Sun Aug 26, 2012 11:34 pm

Re: Need to reinstall OS every time after shutdown to boot

Tue Apr 18, 2017 1:54 pm

Are you downloading a new image each time, or just reflashing the same image?
You are in a maze of twisty little passages, all alike.
When General Failure and Major Disaster get together, Private Parts usually suffers.

kevin3372000
Posts: 14
Joined: Mon Apr 17, 2017 9:55 am

Re: Need to reinstall OS every time after shutdown to boot

Tue Apr 18, 2017 3:10 pm

MaxK1 wrote:Are you downloading a new image each time, or just reflashing the same image?
I tried both, but neither works. T_T

drgeoff
Posts: 10765
Joined: Wed Jan 25, 2012 6:39 pm

Re: Need to reinstall OS every time after shutdown to boot

Tue Apr 18, 2017 5:05 pm

kevin3372000 wrote:
drgeoff wrote:2 amps is more than enough to power a RPi3 if the only USB peripherals are a mouse and a bog-standard keyboard. But many supplies can't deliver the labelled volts and amps at the same time. That is usually not critical for charging the cells in phones etc but it does matter for RPis. And some USB to micro-USB cables have so much resistance such that the voltage actually delivered to the RPi is too low.

Does the red LED ever blink or go out? If yes, then your powering arrangement is certainly deficient.
I have checked that the red LED didn't blink. Do you think that buying the official power supply will solve my problem ?
No.

kevin3372000
Posts: 14
Joined: Mon Apr 17, 2017 9:55 am

Re: Need to reinstall OS every time after shutdown to boot

Thu Apr 20, 2017 12:17 pm

drgeoff wrote:
kevin3372000 wrote:
drgeoff wrote:2 amps is more than enough to power a RPi3 if the only USB peripherals are a mouse and a bog-standard keyboard. But many supplies can't deliver the labelled volts and amps at the same time. That is usually not critical for charging the cells in phones etc but it does matter for RPis. And some USB to micro-USB cables have so much resistance such that the voltage actually delivered to the RPi is too low.

Does the red LED ever blink or go out? If yes, then your powering arrangement is certainly deficient.
I have checked that the red LED didn't blink. Do you think that buying the official power supply will solve my problem ?
No.
I changed my OS to Ubuntu Mate, and it works!!!

Do you have the same problem when using the latest version of RASPBIAN JESSIE LITE ?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13092
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Need to reinstall OS every time after shutdown to boot

Thu Apr 20, 2017 5:23 pm

Nobody else (that I know of) has this problem with either Raspbian or Raspbian Lite.

Perhaps you need to wait just a tiny bit longer after "just the red light", as after an intense session with many writes to the card (as happens during first run) it might be that the SD-Card itself needs to finish writing (flushing) data to the card from its internal RAM. That can last several seconds after Raspbian itself has shut down.
Its also possible the controller in the card has started some housekeeping tasks (swapping sectors to less used parts of the flash memory) that can last another several seconds.
Try counting to (at least) ten before turning off the power.

kevin3372000
Posts: 14
Joined: Mon Apr 17, 2017 9:55 am

Re: Need to reinstall OS every time after shutdown to boot

Fri Apr 21, 2017 2:28 am

mahjongg wrote:Nobody else (that I know of) has this problem with either Raspbian or Raspbian Lite.

Perhaps you need to wait just a tiny bit longer after "just the red light", as after an intense session with many writes to the card (as happens during first run) it might be that the SD-Card itself needs to finish writing (flushing) data to the card from its internal RAM. That can last several seconds after Raspbian itself has shut down.
Its also possible the controller in the card has started some housekeeping tasks (swapping sectors to less used parts of the flash memory) that can last another several seconds.
Try counting to (at least) ten before turning off the power.
I waited for more that 1 minute, but it still not works. It's really weird.

kevin3372000
Posts: 14
Joined: Mon Apr 17, 2017 9:55 am

Re: Need to reinstall OS every time after shutdown to boot

Fri Apr 21, 2017 9:43 am

mahjongg wrote:Nobody else (that I know of) has this problem with either Raspbian or Raspbian Lite.

Perhaps you need to wait just a tiny bit longer after "just the red light", as after an intense session with many writes to the card (as happens during first run) it might be that the SD-Card itself needs to finish writing (flushing) data to the card from its internal RAM. That can last several seconds after Raspbian itself has shut down.
Its also possible the controller in the card has started some housekeeping tasks (swapping sectors to less used parts of the flash memory) that can last another several seconds.
Try counting to (at least) ten before turning off the power.
I just used NOOBS to install Raspbian and it succeeded !!!

Do you know why this happened?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26659
Joined: Sat Jul 30, 2011 7:41 pm

Re: Need to reinstall OS every time after shutdown to boot

Fri Apr 21, 2017 9:49 am

It does sound very odd. But, it's working now!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

kevin3372000
Posts: 14
Joined: Mon Apr 17, 2017 9:55 am

Re: Need to reinstall OS every time after shutdown to boot

Fri Apr 21, 2017 10:00 am

jamesh wrote:It does sound very odd. But, it's working now!
I follow this guide to install it without NOOBS:

https://www.raspberrypi.org/documentati ... /README.md

Is this guide has any problem ?

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Need to reinstall OS every time after shutdown to boot

Fri Apr 21, 2017 10:06 am

kevin3372000 wrote:
jamesh wrote:It does sound very odd. But, it's working now!
I follow this guide to install it without NOOBS:

https://www.raspberrypi.org/documentati ... /README.md

Is this guide has any problem ?
...are you using an internal or external SD Card Reader ???
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

kevin3372000
Posts: 14
Joined: Mon Apr 17, 2017 9:55 am

Re: Need to reinstall OS every time after shutdown to boot

Fri Apr 21, 2017 10:20 am

fruitoftheloom wrote:
kevin3372000 wrote:
jamesh wrote:It does sound very odd. But, it's working now!
I follow this guide to install it without NOOBS:

https://www.raspberrypi.org/documentati ... /README.md

Is this guide has any problem ?
...are you using an internal or external SD Card Reader ???
I use Mac's SD Card Reader. So, I didn't use an external one.

kevin3372000
Posts: 14
Joined: Mon Apr 17, 2017 9:55 am

Re: Need to reinstall OS every time after shutdown to boot

Fri Apr 21, 2017 12:38 pm

fruitoftheloom wrote:
kevin3372000 wrote:
jamesh wrote:It does sound very odd. But, it's working now!
I follow this guide to install it without NOOBS:

https://www.raspberrypi.org/documentati ... /README.md

Is this guide has any problem ?
...are you using an internal or external SD Card Reader ???
Do you mean I need to use an external SD Card Reader ?

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Need to reinstall OS every time after shutdown to boot

Fri Apr 21, 2017 12:49 pm

kevin3372000 wrote: Do you mean I need to use an external SD Card Reader ?
Some Internal Card Readers IME have issues with SDHC SD Cards, therefore going to Poundland UK to buy a USB Card Reader may be prudent..
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

kevin3372000
Posts: 14
Joined: Mon Apr 17, 2017 9:55 am

Re: Need to reinstall OS every time after shutdown to boot

Sat Apr 22, 2017 2:17 pm

fruitoftheloom wrote:
kevin3372000 wrote: Do you mean I need to use an external SD Card Reader ?
Some Internal Card Readers IME have issues with SDHC SD Cards, therefore going to Poundland UK to buy a USB Card Reader may be prudent..
But it works when I install the Ubuntu Mate...... So maybe the SD Card Reader is not the problem ?

I really want to know if I'm doing any wrong T_T

MaxK1
Posts: 1043
Joined: Sun Aug 26, 2012 11:34 pm

Re: Need to reinstall OS every time after shutdown to boot

Sat Apr 22, 2017 3:12 pm

You could still have a problem with Mate that you haven't hit yet...
You are in a maze of twisty little passages, all alike.
When General Failure and Major Disaster get together, Private Parts usually suffers.

kevin3372000
Posts: 14
Joined: Mon Apr 17, 2017 9:55 am

Re: Need to reinstall OS every time after shutdown to boot

Sat Apr 22, 2017 3:44 pm

MaxK1 wrote:You could still have a problem with Mate that you haven't hit yet...
I finally found the problem !!!!

I compare the config.txt generated by NOOBS and the config.txt installed with raw image. I found that the config.txt generated by NOOBS comments out this line:

Code: Select all

hdmi_force_hotplug=1
Just comment out this line and it works!!!!!!!!!!!!

Return to “Troubleshooting”