Page 1 of 1

Issue after Jessie upgrade

Posted: Mon Nov 30, 2015 9:20 pm
by BobSwi
I upgraded to jessie over the the weekend, everything mostly went as planned. I have nginx installed with a site stored on /data which is mounted from /dev/sda1 on boot, and I've had bootdelay=5 in cmdline.txt since wheezy.
However now, after every few reboots, my USB drive is not available or seems to be mounting late and nginx fails with:
2015/11/30 15:08:22 [emerg] 403#0: open() "/data/.../logs/error.log" failed (2: No such file or directory)
I can start nginx manually after I log in and it runs fine, or even just reboot the pi and it comes up fine sometimes.
Is there someplace I can check if something else is happening during boot?

Thanks!

Re: Issue after Jessie upgrade

Posted: Mon Nov 30, 2015 11:20 pm
by DougieLawson
What's in /etc/fstab?

Change

Code: Select all

/dev/sda1  /data ext4 defaults,noatime 0 0
to

Code: Select all

/dev/sda1   /data  ext4 defaults,noatime,x-systemd.automount 0 0
Or even better change it to

Code: Select all

UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /data     ext4    defaults,noatime,x-systemd.automount       0 0
where you get the UUID by running blkid /dev/sda1 then it doesn't matter if your drive appears as /dev/sda1 or /dev/sdq1 it will still mount.

Re: Issue after Jessie upgrade

Posted: Mon Nov 30, 2015 11:34 pm
by BobSwi
Thanks, i'll set that up and test. My current fstab was

Code: Select all

/dev/sda1  /data  ext4  defaults,nofail 0 2
Edit: Thanks, that seems to have done the trick, everything is working after multiple reboots!

Re: Issue after Jessie upgrade

Posted: Tue Dec 01, 2015 4:00 pm
by Tom_A
DougieLawson wrote:What's in /etc/fstab?

Change

Code: Select all

/dev/sda1  /data ext4 defaults,noatime 0 0
to

Code: Select all

/dev/sda1   /data  ext4 defaults,noatime,x-systemd.automount 0 0
Or even better change it to

Code: Select all

UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /data     ext4    defaults,noatime,x-systemd.automount       0 0
where you get the UUID by running blkid /dev/sda1 then it doesn't matter if your drive appears as /dev/sda1 or /dev/sdq1 it will still mount.
I seem to remember having to do something extra to get UUIDs to work with Wheezy on USB installs. Is this no longer necessary?

Re: Issue after Jessie upgrade

Posted: Wed Dec 02, 2015 12:35 am
by DougieLawson
The UUID for my Jessie system that has a rootfs on a hard drive works without any struggle. The UUID is in /boot/cmdline.txt and in /etc/fstab.

cmdline

Code: Select all

dwc_otg.lpm_enable=0 console=tty1 root=UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rootfstype=ext4 elevator=deadline rootwait rootdelay=5
fstab

Code: Select all

proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /     ext4    defaults,noatime       0 1
#/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1
#

Re: Issue after Jessie upgrade

Posted: Wed Dec 02, 2015 6:28 am
by rpdom
Tom_A wrote:[I seem to remember having to do something extra to get UUIDs to work with Wheezy on USB installs. Is this no longer necessary?
Was it something to do with using an initrd? I think dougie mentioned that he'd done that at some point.

Re: Issue after Jessie upgrade

Posted: Wed Dec 02, 2015 12:31 pm
by DougieLawson
rpdom wrote:
Tom_A wrote:[I seem to remember having to do something extra to get UUIDs to work with Wheezy on USB installs. Is this no longer necessary?
Was it something to do with using an initrd? I think Dougie mentioned that he'd done that at some point.
I've got an initramfs created with mkinitramfs -o /boot/initrd.sda and referenced with

Code: Select all

initramfs initrd.sda followkernel
in config.txt