Mounting usb-stick at boot leeds to emergency mode

This forum is for supported devices using an ARMv7 Allwinner SoC.

Mounting usb-stick at boot leeds to emergency mode

Postby databyte » Sun Nov 09, 2014 5:56 pm

Hi,

I have a banana pi and want to use it as server (for things such as git and owncloud). I installed owncloud and it runs fine.
All data should be stored on an external usb stick (ext4), which is mounted at /mnt/data. I used the command

$this->bbcode_second_pass_code('', 'mount /dev/sda /mnt/data')

and that worked just fine. Now I want the usb-stick to be mounted at boot. So i tried to add a fstab entry:

$this->bbcode_second_pass_code('', '/dev/sda /mnt/data ext4 defaults 0 0')

But on reboot, it started directly into the emergency mode. After removing the fstab entry, I was able to reboot normaly again.
I also tried some other fstab-options, but I wasnt able to mount the usb correctly. I also tried the UUID in fstab...

What am I doing wrong? I also was not able to figure out, what exactly went wrong. Is there a way to see the boot-errors?
databyte
 
Posts: 2
Joined: Sun Nov 09, 2014 5:50 pm

Re: Mounting usb-stick at boot leeds to emergency mode

Postby krabat » Sun Nov 09, 2014 7:49 pm

Is there any particular reason why you don't partition the drive? It's afaik not recommended to do so.
Thus I'd first partition and format the drive and see what happens.

As for the boot messages 'journalctl -b0' (run as root) should show all from the recent boot. Also, you could try and hook up an UART adaptor and use a serial console (which is something rather mandatory to get things running well anyway, imho).
krabat
 
Posts: 57
Joined: Wed Jun 04, 2014 8:03 pm

Re: Mounting usb-stick at boot leeds to emergency mode

Postby databyte » Sun Nov 09, 2014 8:40 pm

What do you mean with partition the drive? I formated the usb-stick with mkfs.ext4. Is that not enough?
databyte
 
Posts: 2
Joined: Sun Nov 09, 2014 5:50 pm

Re: Mounting usb-stick at boot leeds to emergency mode

Postby krabat » Sun Nov 09, 2014 9:05 pm

Well, what I meant by "partition" is this, achieved on Linux e. g. by fdisk (MBR / partition table) or gdisk (GUID partition table aka GPT). Partitions are addressed as sdxn, e. g. sda1, sda2 or so.
Creating file systems, the so called "high-level formatting", should normally take place on those partitions, not on the drive as a whole as you did.
krabat
 
Posts: 57
Joined: Wed Jun 04, 2014 8:03 pm


Return to Allwinner

Who is online

Users browsing this forum: No registered users and 5 guests