Welcome! Log In Create A New Profile

Advanced

Who has had success with 3TB GFH? [Solved]

Posted by handy1 
Who has had success with 3TB GFH? [Solved]
December 24, 2012 07:55PM
I have solved my problems below. The short answer is that I was not using an appropriate kernel. I updated and now all is well. My setup is described below:

my uboot:
http://download.doozan.com/uboot/files/uboot/uboot.mtd0.goflexhome.davygravy-2012-04-19.kwb

my kernel:
Linux-3.3.2-kirkwide from the rescue image

my partitions:
Recovery/transformation command (? for help): p
Disk /dev/sda: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): E6D0FDC0-0A69-47A9-B3DF-672B315FAB76
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048        33556479   16.0 GiB    8300  Linux filesystem
   2        33556480      5860533134   2.7 TiB     8300  Linux filesystem

Recovery/transformation command (? for help): o

Disk size is 5860533168 sectors (2.7 TiB)
MBR disk identifier: 0x00000000
MBR partitions:

Number  Boot  Start Sector   End Sector   Status      Code
   1      *           2048     33556479   primary     0x83
   4                     1         2047   primary     0xEE

my filesystems:
ext3 for /dev/sda1 (boot/root)
ext4 for /dev/sda2 (media storage)

Original post below:
___________________________________________________________________________________

I am having some trouble with my 3TB GFH.

I would like to know who has had full success with the 3TB GFH. By full success I mean:

  • Successfuly boot linux from the drive
  • Have access to the entirety of the drive (bonus if this is nearly all in 1 partition)
  • No significant compromises (net/usb booting, awkward partition setup with symlinks, etc)

I am particularly interested in a few aspects of the setup.
  1. The partitioning scheme
  2. Software versions (kernel and uboot, and setup if non-standard)
  3. The filesystem choice (ext2/3/4 or other)

I have been trying to do my setup with a hybrid MBR using the latest "official" (April 2012) release of uboot from Jeff and Davy. I have yet to get it to boot. I have found that information on a good hybrid MBR setup is very scattered, with people saying that they were successful, but not giving the details. (At least not clearly enough for my feeble mind)

I notice that a lot of people separate their boot and root partitions, is there a need for this for using the Hybrid MBR or is this just their personal partitioning choice? and what about the following question?
"Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N)"

I ultimately want to have 2 partitions: one for the system, and one for data to be served up on the network.

I have tried the following setups (all partitions formatted ext4): (hybrid MBRs were setup according to my understanding of rodsbooks - Creating a Hybrid MBR)

1
GPT: boot and root in one partition,data storage in another
Hybrid MBR: Boot/Root Partition

2
GPT: boot and root in one partition,data storage in another
Hybrid MBR: both partitions

3
GPT: boot and root in one partition,data storage in another
Hybrid MBR: no hybrid

4
GPT: boot and root in one partition, no other partitions
Hybrid MBR: boot/root partition

5
Normal MBR: boot and root in one partition, no other partitions

I have not had any success with any of these.

I believe that the uboot environment that I have setup is pretty standard. I try to boot USB, then SATA, then rescue and have no problem booting the other two.

Is ext4 the problem?



Edited 2 time(s). Last edit at 12/25/2012 01:19PM by handy1.
Re: Who has had success with 3TB GFH? [Solved] -- for me too ...
January 21, 2013 10:30AM
-------------------
So, before handy1 or anybody else reads this rather long post: I have just been able to solve my problem as well by reading a post on the archlinuxarm.org forum.

It really is all about answering the questions correctly when hybridizing the MBR.

So, I can finally go about installing Open Media Vault and using LVM along with it ...

-------------------
Hi handy1,

sorry for the follow-up, but I am having similar troubles to what you described and I do not know what the difference of the uboot environment you posted and the one you get when you download uBoot according to Jeff's tutorial is, since I have no clue as to how to inspect kwb files. So, I guess my question is whether you had to somehow let uBoot know about the 2048 alignment instead of the 512 or make any other changes in the uBoot environment to make it recognize (hybrid) MBRs?

To explain my situation in a bit more detail, here is what was/is the situation:

a) I installed uBoot according to the tutorial (giving me "U-Boot 2011.12 (Apr 18 2012 - 23:08:20)") and the rescue system.
b) I updated uBoot so as to be able to boot from both USB and HDD, with USB taking precedence (see this post) and a separate boot partition. This results in the following uBoot environment

rescue:~# 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_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootdelay=10
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
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
ethaddr=XX:XX:XX:XX:XX:XX
arcNumber=3338
serverip=192.XXX.XXX.XXX
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 5; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole
ipaddr=192.XXX.XXX.XXX
usb_scan_1=usb=0:1 dev=sda2
usb_scan_2=usb=1:1 dev=sdb2
usb_scan_3=usb=2:1 dev=sdc2
usb_scan_4=usb=3:1 dev=sdd2
usb_rootfstype=ext4
usb_root_label=USB-Root
usb_set_bootargs=setenv bootargs console=$console root=LABEL=$usb_root_label rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
ide_scan=ide_scan_done=0;for scan in $ide_scan_list; do run ide_scan_$scan; if test $ide_scan_done -eq 0 && ext2load ide $ide 0x800000 /boot/uImage 1; then ide_scan_done=1; echo "Found bootable drive on ide $ide"; setenv ide_device $ide; setenv ide_root /dev/$dev; fi; done
ide_init=ide reset; run ide_scan
ide_scan_list=1 2
ide_scan_1=ide=0:1 dev=sda2
ide_scan_2=ide=1:1 dev=sdb2
ide_rootfstype=ext4
ide_rootdelay=10
ide_set_bootargs=setenv bootargs console=$console root=LABEL=$ide_root_label rootdelay=$ide_rootdelay rootfstype=$ide_rootfstype $mtdparts $ide_custom_params
ide_boot=ext2load ide $ide_device 0x800000 /boot/uImage; ext2load ide $ide_device 0x1100000 /boot/uInitrd; run ide_set_bootargs; bootm 0x800000 0x1100000
ide_bootcmd=run ide_init; run ide_boot
bootcmd=usb start; usb_stop; usb_start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run ide_bootcmd; run rescue_bootcmd; run pogo_bootcmd; reset
rescue_installed=1
ide_root_label=HDD-Root

The test for 2 harddisk stems from the fact that I use the same environment on my GoFlex Net, where I want to be able to boot from either disk and it does not hurt here.

At first, I did not pay attention and just created partitions with an msdos partition table. I was able to boot from HDD, but, like others have reported, the remaining part of the 3TB disk was recognized as having 740GB+ capacity only.

Ok, I hybridized the MBR giving me the following:

rescue:~# blkid
/dev/sda1: LABEL="HDD-Boot" UUID="f24cd4da-19c5-4868-951a-80dd734211fa" TYPE="ext2" 
/dev/sda2: LABEL="HDD-Root" UUID="f2cc90ef-6338-4462-a5a7-d98d9e1c6a64" TYPE="ext4" 
/dev/sda3: UUID="bdc7b7f8-efec-469e-bb1b-40a2ad94bf6d" TYPE="swap" 
/dev/sda4: UUID="8y8UaH-aHxy-rUhZ-Q2ce-ibda-g8H5-jknncc" TYPE="lvm2pv" 
rescue:~# gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): r

Recovery/transformation command (? for help): p
Disk /dev/sda: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): FA87030F-1005-4B21-B8AA-649C50CFFB55
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          264191   128.0 MiB   8300  Linux filesystem
   2          264192        10749951   5.0 GiB     8300  Linux filesystem
   3        10749952        11798527   512.0 MiB   8300  Linux filesystem
   4        11798528      5860533134   2.7 TiB     8300  Linux filesystem

Recovery/transformation command (? for help): o

Disk size is 5860533168 sectors (2.7 TiB)
MBR disk identifier: 0x00000000
MBR partitions:

Number  Boot  Start Sector   End Sector   Status      Code
   1                     1         2047   primary     0xEE
   2      *           2048       264191   primary     0x83
   3      *         264192     10749951   primary     0x83
   4              10749952     11798527   primary     0x83

Upon trying to boot, however, this is what netconsole tells me:

U-Boot 2011.12 (Apr 18 2012 - 23:08:20)
Seagate GoFlexNet
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot:  0 
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 1 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
Unknown command 'usb_stop' - try 'help'
Unknown command 'usb_start' - try 'help'
** Block device usb 0 not supported

** Invalid boot device **
Creating 1 MTD partitions on "nand0":
0x000002500000-0x000010000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI error: validate_ec_hdr: bad VID header offset 2048, expected 512
UBI error: validate_ec_hdr: bad EC header
UBI error: ubi_io_read_ec_hdr: validation failed for PEB 0
UBI error: ubi_init: cannot attach mtd1
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
UBI init error 22
** Block device usb 0 not supported
** Block device usb 1 not supported
** Block device usb 2 not supported
** Block device usb 3 not supported
** Block device usb 0 not supported
** Block device usb 0 not supported
Wrong Image Format for bootm command
ERROR: can't get kernel image!
stopping USB..

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: ST3000DM001-1CH166 Firm: CC44 Ser#: W1F1P3N3
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 764436.4 MB = 746.5 GB (1565565872 x 512)
Loading file "/boot/uImage" from ide device 0:1 (hda1)
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - ide 0:1 **
** Bad partition 1 **
** No boot file defined **
** No boot file defined **
Wrong Image Format for bootm command
ERROR: can't get kernel image!

NAND read: device 0 offset 0x100000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.3.2-kirkwide
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3627768 Bytes = 3.5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

On the other hand, booting the exact same uImage it finds on ide 0:1 (hda1) from usb works without a problem. The kernel I am using is davygravy's.

So, again, it would be nice to know if you made any relevant changes to uBoot in order to make it work with the hybridized MBR.

Cheers,

chessplayer

---
Standart ist der Standardfehler



Edited 1 time(s). Last edit at 01/21/2013 11:15AM by chessplayer.
Re: Who has had success with 3TB GFH? [Solved] -- for me too ...
February 27, 2013 02:43PM
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N) answer No.

The only partition I added to the hybrid MBR is the root/boot partition.

This is my uboot environment I customized for GFH.

arcNumber=3089
baudrate=115200
bootcmd=run sata_bootcmd; run usb_bootcmd; run rescue_bootcmd; reset
bootdelay=5
console=ttyS0,115200
ethact=egiga0
ethaddr=xx:xx:xx:xx:xx:xx
ipaddr=10.10.10.6
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
nc_start=setenv stdin nc; setenv stdout nc; setenv stderr nc; version
nc_test=ping $ncip
ncip=10.10.10.5
ncipk=10.10.10.4
partition=nand0,2
preboot=run nc_test nc_start
rescue_bootcmd=run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
rescue_installed=1
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts
sata_boot=ide reset; mw 0x800000 0 1; ext2load ide $sata_device 0x800000 /boot/uImage; if ext2load ide $sata_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_bootcmd=run sata_set_bootargs; run sata_boot
sata_custom_params=ignore_loglevel netconsole=6665@10.10.10.3/eth0,6666@10.10.10.4/ elevator=bfq
sata_device=0:1
sata_root=/dev/sda1
sata_rootdelay=10
sata_rootfstype=ext3
sata_set_bootargs=setenv bootargs console=$console root=$sata_root rootdelay=$sata_rootdelay rootfstype=$sata_rootfstype $mtdparts $sata_custom_params
serverip=10.10.10.3
stderr=serial
stdin=serial
stdout=serial
usb_boot=usb start; 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
usb_bootcmd=run usb_set_bootargs; run usb_boot
usb_custom_params=ignore_loglevel netconsole=6665@10.10.10.3/eth0,6666@10.10.10.4/ elevator=bfq
usb_device=0:1
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext3
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params

Please let me know if there are any caveats. I'm just trying to hack along logically.

The rescue system update 2.8.2 installed nicely. The additional tools are definitely helpful. The one issue I did / do have is with network access. A minor issue is with the ArcNumber. Rescue was unhaapy unless set to the GoFlex Net ArcNumber. In fairness, I have not checked the latest Rescue version. This may be due to my setup. I have a Windows 8 machine with a wireless card for internet access and using ICS from the LAN port to the GFH. I'm also using VMware Player for linux. I had to disable netcfg and enable dhcpcd in Arch. I could not get a network connection otherwise. Probably something funky with Windows ICS. Still trying to determine if I can setup ICS act as another gateway on my primary network. This way all machines can be on the same subnet.

If anyone has information to share, please feel free.
Author:

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: