expand rootfs lead to not working sshd


10 posts
by otacon7b » Mon Aug 20, 2012 9:58 am
I'm using the last raspbian image on a compatible 16gb card.
When I execute the expand rootsf in raspi-config the process ends up without any error. But after the reboot the sshd deamon stops working, impairing the possibility to use my rspi.

-I do not own any device with hdmi input nor usb keyboard.

- I do not own any operative systems capables to write on ext2 fs (so I can't replace boot.rc with the sshd version after the reboot using directly the card).

Anyone has experienced a similar issue?
Any suggestion for a workaround?
Posts: 2
Joined: Mon Aug 20, 2012 9:50 am
by kosson » Tue Aug 21, 2012 4:35 pm
I have the same issue here!
For 2012-07-15-wheezy-raspbian.img
Posts: 3
Joined: Tue Aug 21, 2012 4:33 pm
by jojopi » Tue Aug 21, 2012 6:24 pm
Selecting the expand_rootfs option only modifies the partition table and then says "The filesystem will be enlarged upon the next reboot". That process on reboot happens before sshd is started, and it can take many minutes on a large card.

So, resizing does not stop sshd from working, but it does delay its next start. It could also stop the Pi booting at all, if it happens to run into a problem with the SD card or crash during the resize.

Unfortunately, with no display attached it will be hard to tell what is going on. The main clues will be the LEDs. If the network lights come on then the kernel is definitely running, and if OK is flashing there is still activity on the SD card. If the network lights do not come on then check the OK light for repeating diagnostic code.
User avatar
Posts: 2122
Joined: Tue Oct 11, 2011 8:38 pm
by drgeoff » Tue Aug 21, 2012 6:31 pm
That is a bit strange. Expanding the partition should not cause the ssh daemon to stop working. Are you sure the RPi is booting OK? Can you ping it?

If you have a PC that will boot from CD-ROM or USB flashdrive, you could use a 'Live Linux'. No need to install on the hard drive. That will allow you to look at and edit files on the SD card.
Posts: 3010
Joined: Wed Jan 25, 2012 6:39 pm
by kosson » Tue Aug 21, 2012 6:52 pm
I believe in my case is not clear if impatience was the culprit or the system shutting down the ssh daemon.
What I have done is to connect Pi to a monitor. By that moment I have restarted and seen that the expanding was on the way... gulp
To be sure I run the raspi-config and enabled ssh.

After all this it runs well!

Maybe it was me impatient?!
Posts: 3
Joined: Tue Aug 21, 2012 4:33 pm
by zenod » Wed Aug 22, 2012 12:39 am
Hi,

When I instigated an expansion from 4g's to 16g's I noticed that there were a couple of warnings given about run levels arguments not matching defaults for resize2fs. This probably has nothing to do with the issue, but is worth correcting . [resize-fs_once start arguments (2 3 4 5) do not match LSB Default-Start values (2 3 4 5 S) ... _stop once arguments (0 1 6) do not match ....Default (none)]

Regards
Posts: 6
Joined: Wed Aug 22, 2012 12:29 am
by otacon7b » Thu Aug 23, 2012 8:17 am
I'm quite sure that rbpi ends the boot procedure, since I can ping it. By the end of this month I will have a monitor with hdmi. I will add my analysis to this thread as soon as I get the new monitor.
Posts: 2
Joined: Mon Aug 20, 2012 9:50 am
by SirLagz » Thu Aug 23, 2012 8:37 am
otacon7b wrote:I'm quite sure that rbpi ends the boot procedure, since I can ping it. By the end of this month I will have a monitor with hdmi. I will add my analysis to this thread as soon as I get the new monitor.


Just because you can ping it doens't mean it has finished booting.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by tudza » Wed Sep 12, 2012 10:39 am
This topic was most helpful. I was about to complain that the raspi-config routine was killing ssh into my card, but it seems what I was seeing was a delay while the rootfs on the SD card was being resized after reboot.

My first time through I followed the YouTube video explaining how to do this procedure manually, so I knew that the process could take some time, I just did not make the connection.

The process seems to have worked. I waited half an hour and I can ssh to my card again.

Perhaps there should be some text that explains this in the raspi-config tool. "After reboot, the rootfs expansion procedure may take some time depending on the size of your SD card and ssh will not function until it is complete." or something like that.
Posts: 3
Joined: Tue Sep 11, 2012 7:37 am
by b0b_z » Sat Sep 15, 2012 1:59 pm
We're in the 30 minute waiting period hoping I didn't bork the file system

Of course I re-booted more than once to ensure that I wrecked it

Time for a cuppa and wait...
Posts: 21
Joined: Sat Sep 15, 2012 1:56 pm