Welcome! Log In Create A New Profile

Advanced

SOLVED: OMV on GoFlex Net and other booting problem

Posted by amyren 
SOLVED: OMV on GoFlex Net and other booting problem
September 14, 2015 11:58AM
I just got my Goflex Net a couple of weeks ago, and at first I was thinking of putting openwrt on it. But after googling around I read that debian/openmediavault was a better choice.
I have through some of the (outdated) guides out there, and had a few headaches along the way. .. getting the blinking orange led, making an usb_rescue and installed the rescue system to the flash. Started with squeeze and clearing out all the dependencies in order to install openmediavault. And to my joy it did install in the end. But I couldnt get any webgui, and after reboot ssh was closed, even though I tried to enable it in the config.xml file.
Then I started over again, wiping my usb stick and using the latest rootfs in this thread. And I have gooten to the point where I can install OMV ver. 1.19. But still I cant get any webgui working.
I wish there was an updated guide for installing openmediavault on this thing, based images available today.
Or at least if someone could post a ready made img file with omv working, ready to write to an usb stick.
Does anybody know the easiest way to get OMV working on this thing, please let me know.

Secondly, I have another question, pehaps easier to answer..
I did try to install a hdd on my goflex, and found that it failed to boot from usb if a hdd was present. But there was a fix available, forcing it to boot only from a device with a certain label, eg "rootfs"
This is working, but I found that it also breaks booting from the rescue system on the unit.
How can I reset that, in case I want to go back to the state before binding it to boot from rootfs?

Here is the output of fw_printenv

ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_device=0:1
usb_root=/dev/sda1
usb_rootfstype=ext2
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=00:10:75:26:71:9F
rescue_installed=1
arcNumber=3089
usb_init=run usb_scan; setenv usb_root LABEL=rootfs
usb_bootcmd=run usb_init; setenv usb_root LABEL=rootfs; run usb_set_bootargs; run usb_boot

--------------------
Moderator Edit: Made a separate topic.



Edited 3 time(s). Last edit at 09/21/2015 08:50AM by amyren.
Re: OMV on GoFlex Net and ohter booting problem
September 14, 2015 12:11PM
amyren,

That change to boot USB rootfs alone should not break rescue booting. What do you see on serial/net console when you remove all the USB and HDD disks?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: OMV on GoFlex Net and ohter booting problem
September 14, 2015 12:39PM
Thanks for the quick reply.

I did just unplug my usb and it booted right into rescue, so that makes me feel rather stupid..
First time I applied that boot rootfs it failed to boot anything, not even the rescue system.

But I did do one change after this. Because when it failed to boot, I had to look for a serial adapter to connect to the box. Then I noticed that it was looking for ROOTFS (capital letters). This was my fault, because I was lazy and copied the command from a guide where it was written like that.
Then I first re-labeled my usb to ROOTFS and then it did boot. But after this I re-applied the command so that it would look for rootfs (non capital letters).
Pehaps this also affected the rescue boot?
Re: OMV on GoFlex Net and ohter booting problem
September 14, 2015 06:29PM
amyren Wrote:
-------------------------------------------------------
> Thanks for the quick reply.
>
> I did just unplug my usb and it booted right into
> rescue, so that makes me feel rather stupid..
> First time I applied that boot rootfs it failed to
> boot anything, not even the rescue system.
>
> But I did do one change after this. Because when
> it failed to boot, I had to look for a serial
> adapter to connect to the box. Then I noticed that
> it was looking for ROOTFS (capital letters). This
> was my fault, because I was lazy and copied the
> command from a guide where it was written like
> that.
> Then I first re-labeled my usb to ROOTFS and then
> it did boot. But after this I re-applied the
> command so that it would look for rootfs (non
> capital letters).
> Pehaps this also affected the rescue boot?

Yes and no. If the stick had serious problem then it would have booted rescue. But the stick was good, so the kernel was loaded. But after that the rootfs could not be mounted. So the boot process got stuck :) that's how the rescue works (either the stick must fail or kenel file was missing).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: OMV on GoFlex Net and other booting problem
September 15, 2015 08:26AM
I think something is still not as it should be.

The usb stick I'm using was made using the instructions on this forum, http://forum.doozan.com/read.php?2,12096
And I did format it as ext3, and edited the fstab file as well. This usb stick did work and I used that to try to install OMV. I do have an image file backup of this, and have restored this several times.

But now, I use the same usb stick and follow the same instructions again and make the rootfs usb stick, it fail to boot if I format it to ext3. I tried that two times and it fail to boot both times.
Then I just retried with the same usb stick, but this time I formatted it as ext2, and leaving the fstab as it was.
Then the usb stick boots just fine.

Here is the last part of the serial output I get when booting fails with the ext3 rootfs:

[    4.443576] scsi host0: usb-storage 1-1:1.0
[    4.457539] scsi host1: sata_mv
[    4.461253] usbcore: registered new interface driver usb-storage
[    4.480813] scsi host2: sata_mv
[    4.489885] ata1: SATA max UDMA/133 irq 32
[    4.497961] usbcore: registered new interface driver uas
[    4.517327] ata2: SATA max UDMA/133 irq 32
[    4.863502] ata1: SATA link down (SStatus 0 SControl F300)
[    5.233486] ata2: SATA link down (SStatus 0 SControl F300)
[    5.454780] scsi 0:0:0:0: Direct-Access     Corsair  Voyager Mini     1100 PQ: 0 ANSI: 0 CCS
[    5.470384] sd 0:0:0:0: [sda] 7831552 512-byte logical blocks: (4.00 GB/3.73 GiB)
[    5.480213] sd 0:0:0:0: [sda] Write Protect is off
[    5.485701] sd 0:0:0:0: [sda] No Caching mode page found
[    5.491041] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    5.502448]  sda: sda1
[    5.508079] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    5.517276] sd 0:0:0:0: Attached scsi generic sg0 type 0
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
[   15.340250] EXT2-fs (sda1): error: couldn't mount because of unsupported optional features (4)
mount: mounting /dev/disk/by-label/rootfs on /root failed: Invalid argument
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... mount: mounting /dev on /root/dev failed: No such file or directory
done.
Target filesystem doesn't have requested /sbin/init.
No init found. Try passing init= bootarg.
modprobe: module i8042 not found in modules.dep
[   15.513917] uhci_hcd: USB Universal Host Controller Interface driver
[   15.528264] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   15.543323] usbcore: registered new interface driver usbhid
[   15.549027] usbhid: USB HID core driver


BusyBox v1.22.1 (Debian 1:1.22.0-9+b1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
(initramfs) 

Re: OMV on GoFlex Net and other booting problem
September 15, 2015 12:16PM
Quote

mount: mounting /dev/disk/by-label/rootfs on /root failed: Invalid argument

This error points to the mismatch in bootargs and/or fstab. Here is the problem
usb_rootfstype=ext2

Boot and interrupt serial console, remove this env and then boot
setenv usb_rootfstype
boot

If this env is specified, it should be exactly as the rootfs filesystem type. So you could change it to ext3 also (instead of removing it). However, witht the new kernel, it is no longer necessary, fstype will be detected by the kernel.

After booting successfully and consistently, clear it permanently in Debian:

fw_setenv usb_rootfstype

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 09/15/2015 04:14PM by bodhi.
Re: OMV on GoFlex Net and other booting problem
September 16, 2015 02:33AM
bodhi Wrote:
-------------------------------------------------------
>
Quote

mount: mounting /dev/disk/by-label/rootfs
> on /root failed: Invalid argument
>
> This error points to the mismatch in bootargs
> and/or fstab. Here is the problem
>
> usb_rootfstype=ext2
>
>
> Boot and interrupt serial console, remove this env
> and then boot
>
> setenv usb_rootfstype
> boot
>
>
> If this env is specified, it should be exactly as
> the rootfs filesystem type. So you could change
> it to ext3 also (instead of removing it). However,
> witht the new kernel, it is no longer necessary,
> fstype will be detected by the kernel.
>
> After booting successfully and consistently, clear
> it permanently in Debian:
> d
>
> fw_setenv usb_rootfstype
>

Thanks, I'll do that.

Just a thought, I notice there is another entry
usb_root=/dev/sda1
Could that theoreticly cause a problem later in case I want to use an USB Hub later, and my usb_boot stick not automaticly gets mounted as /dev/sda1?
Re: OMV on GoFlex Net and other booting problem
September 16, 2015 03:32AM
amyren,

> Just a thought, I notice there is another entry
> usb_root=/dev/sda1
> Could that theoreticly cause a problem later in
> case I want to use an USB Hub later, and my
> usb_boot stick not automaticly gets mounted as
> /dev/sda1?

Yes, it would definitely be a problem with mutiple drives. I explained the reason and provided solutions (A.2 and B) here:
http://forum.doozan.com/read.php?3,19093

In the next u-boot release, I'll revise the default envs to make the disk scanning a built-in feature. I just have not been able to find enough free time to rebase u-boot.

I might release a new u-boot default envs set that does this automatically before rebasing u-boot. It seems like a more productive thing to do.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: OMV on GoFlex Net and other booting problem
September 17, 2015 09:10AM
Back to the OMV issue:

I have made myself a sort of a "step by step guide" on how to get OMV installed without getting any dependency or broken packages errors.

And everything looks good, exept for the problem that the webgui does not work (only a blank page is displayed)

Start with fresh install with latest rootfs (3.18.5 and kernel update 4.2.0)

rm /etc/ssh/ssh_host*
ssh-keygen -A

echo "deb http://packages.openmediavault.org/public kralizec main" > /etc/apt/sources.list.d/openmediavault.list

wget -O - http://packages.openmediavault.org/public/archive.key | apt-key add -

apt-get update
apt-get upgrade

apt-get install acl acpid anacron bash-completion beep bootlogd bsd-mailx ca-certificates collectd collectd-core cpufrequtils cron cron-apt dh-python dmeventd fontconfig fontconfig-config fonts-dejavu-core fuse gdisk hdparm ifenslave iptables jfsutils libapparmor1 libasn1-8-heimdal libavahi-client3 libcairo2 libcpufreq0 libcups2 libdatrie1 libdbi1 libdevmapper-event1.02.1 libestr0 libfile-copy-recursive-perl libfile-slurp-perl libfontconfig1 libfreetype6 libfuse2 libgd3 libglib2.0-0 libgraphite2-3 libgssapi3-heimdal libharfbuzz0b libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libjavascript-minifier-xs-perl libjbig0 libjpeg62-turbo libjs-extjs4 libjson-c2 libjson-perl libkdc2-heimdal libkrb5-26-heimdal libldb1 liblocale-po-perl liblockfile-bin liblockfile1 liblogging-stdlog0 liblognorm1 libltdl7 liblvm2cmd2.02 libmagic1 libmpdec2 libnewt0.52 libnfnetlink0 libnl-3-200 libnl-genl-3-200 libntdb1 libnss-mdns libonig2 libossp-uuid16 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libparted2 libpci3 libperl4-corelibs-perl libperl5.20 libpixman-1-0 libpython2.7 libpython3-stdlib libpython3.4-minimal libpython3.4-stdlib libqdbm14 libreadline5 libroken18-heimdal librrd4 libsasl2-modules libsensors4 libsnmp-base libsnmp30 libtalloc2 libtdb1 libtevent0 libthai-data libthai0 libtiff5 libvpx1 libwbclient0 libwind0-heimdal libx11-6 libx11-data libxau6 libxcb-render0 libxcb-shm0 libxcb1 libxdmcp6 libxext6 libxpm4 libxrender1 libxslt1.1 lsof lvm2 mdadm monit nginx nginx-common nginx-full ntfs-3g openssh-blacklist-extra php-json-schema php5-cgi php5-cli php5-fpm php5-json pm-utils parted perl perl-modules php5-common postfix powermgmt-base proftpd-basic psmisc python-apt-common python-crypto python-dnspython python-ldb python-ntdb python-samba python-talloc python-tdb python3 python3-apt python3-minimal python3.4 python3.4-minimal quota quotatool resolvconf rrdcached rrdtool rsyslog samba samba-common samba-common-bin samba-dsdb-modules samba-libs sdparm smartmontools snmpd socat ssl-cert sudo tdb-tools tftpd-hpa update-inetd uuid watchdog whiptail xfsprogs xmlstarlet

There will be three packets that needs user input during this install. I set it to the following:
setting mail to 'no configuration'
setting MD Arrays to 'none' when prompted
setting proftpd to 'standalone' when prompted

wget http://packages.openmediavault.org/public/pool/main/p/php5-pam/php5-pam_1.0.3-3_armel.deb
wget http://packages.openmediavault.org/public/pool/main/p/php5-proctitle/php5-proctitle_0.1.2-3_armel.deb
wget http://ftp.us.debian.org/debian/pool/main/p/proftpd-mod-vroot/proftpd-mod-vroot_0.9.2-2+b5_armel.deb
dpkg -i php5-proctitle_0.1.2-3_armel.deb
dpkg -i php5-pam_1.0.3-3_armel.deb
dpkg -i proftpd-mod-vroot_0.9.2-2+b5_armel.deb

At this point every dependency for openmediavault should be met, and no additional packages will be needed besides OMV itself.
I find this a good spot to make a backup of the usb stick, so I dont have to repeat everything later if I just want a working, updated debian installation with services running.
To make such a backup, shut down your goflex and insert the usb stick in your computer.
If this is a linux computer, use dd to make backup, eg. if the usb is sdb1:
dd if=/dev/sdb1 of=usb.backup.img bs=1024 conv=noerror,sync
restore the image with:
dd if=usb_backup.img of=/dev/sdb1 bs=1024 conv=noerror

If you have a windows computer, you can use Win32Imager to make the backup.

apt-get install openmediavault
omv-initsystem

After this there is no webgui, and ssh is closed.

Any ideas on what is wrong?
Re: OMV on GoFlex Net and other booting problem
September 17, 2015 10:34AM
Pardon my interruption, but OMV's own demo is currently on the blank side as well: http://demo.omv-extras.org/
No idea why.

=========
-= Cloud 9 =-
Re: OMV on GoFlex Net and other booting problem
September 18, 2015 01:31AM
JoeyPogoPlugE02 Wrote:
-------------------------------------------------------
> Pardon my interruption, but OMV's own demo is
> currently on the blank side as well:
> http://demo.omv-extras.org/
> No idea why.

At least their demo page source code is not blank:)

I also did get a blank page earlier when I installed it on an older (squeeze) rootfs, and tried with OMV v0.5. So its not just their newest versions that have this issue.
And I think that the OMV webgui is a standalone application, that doesnt need to fetch the content from any remote OMV website, so it shouldnt be blank if I get it correctly installed.
I stand corrected :-)
September 18, 2015 03:29PM
As I'm less advanced as you I'll get out of your hair for now, but know I really, really want to get an OMV-type public resource thing going for my neighborhood. In my case that means Neighborhood LAN and off the Internet grid.

=========
-= Cloud 9 =-
SOLVED: Re: OMV on GoFlex Net and other booting problem
September 21, 2015 08:50AM
The solution was easier than expected.

I did download the latest wheezy based rootfs (ver. 3.17.0) and installed it into an usb stick according to the instructions.
After booting the goflex net with the stick, I performed this procedure:

rm /etc/ssh/ssh_host*
ssh-keygen -A

echo "deb http://packages.openmediavault.org/public kralizec main" > /etc/apt/sources.list.d/openmediavault.list

wget -O - http://packages.openmediavault.org/public/archive.key | apt-key add -

apt-get update

There might be a PUBKEY warning message after apt-update
In my case it it was these numbers below, so I ran the following commands to add the keys
Replace these keys with the keys that you get in your message.
If no errors, just skip this section
gpg --keyserver pgpkeys.mit.edu --recv-key 7638D0442B90D010
gpg --keyserver pgpkeys.mit.edu --recv-key 9D6D8F6BC857C906
gpg -a --export 7638D0442B90D010 | apt-key add -
gpg -a --export 9D6D8F6BC857C906 | apt-key add -

apt-get update

When you have ran apt-get update without error, continue here
apt-get upgrade

dpkg-reconfigure tzdata

apt-get install openmediavault

setting mail to 'no configuration' when prompted
setting MD Arrays to 'none' when prompted
setting proftpd to 'standalone' when prompted

Done. now log into web interface with user: admin, password:openmediavault
Go to SSH and enable, and apply changes.



Edited 1 time(s). Last edit at 09/21/2015 01:12PM by amyren.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: