HP mediavault 2120 [guide]

Install Arch Linux ARM on other devices.

HP mediavault 2120 [guide]

Postby billyburly » Wed Mar 23, 2011 3:45 am

EDIT: Got ArchLinux Arm booting on the HP mv2120. There is a guide further down. I have left the old guide up for reference as well.

I'm trying to get Arch Linux ARM linux working on my HP mediavault 2120 which has a marvell orion chip, the predecessor to the kirkwood which runs the plug computers. Previously I had been running debian on it, but I would much rather be running something based on arch. Using the debian net installer for the mediavault I was able to download the rootfs.tar.gz to the internal hard drive and extract it. When I go to boot my mediavault, it just hangs after loading the kernel. There are two things that I could think of that are happening. Either I need to compile a kernel specific for my arm processor, or there is no initrd. I would have thought a initrd would have been in the rootfs.tar.gz but there wasnt.

Anyone have any suggestions? I'm appending a copy of the console output when I attempt to boot.

$this->bbcode_second_pass_code('', ' __ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__| ** Forcing LOADER mode only **
** MARVELL BOARD: RD-88F5182-NAS-P2 LE

U-Boot 1.1.4 (Oct 12 2007 - 12:30:28) Marvell version: 2.3.11_HP_1_3_1_Built@HP

U-Boot code: 00200000 -> 0026FFF0 BSS: -> 0027FDBC

Soc: 88F5182 A2 (DDR2)
CPU running @ 500Mhz
SysClock = 166Mhz , TClock = 166Mhz

DRAM CS[0] base 0x00000000 size 128MB
DRAM Total size 128MB 32bit width
[512kB@fff80000] Flash: 512 kB
Addresses 4M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (4M - 3M): Done

CPU : ARM926 (Rev 0)
88F5182 A2 streaming disabled
USB 0: host mode
USB 1: host mode
PCI 0: PCI Express Root Complex Interface
Net: egiga0 [PRIME]
Hit any key to stop autoboot: 0

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
Device 0: OK
Model: ST3500630AS Firm: 3.CHN Ser#: 9QG7SXL7
Type: Hard Disk
Supports 48-bit addressing
Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)

ext2load ide 0:1 400000 /boot/uImage

3111196 bytes read
bootm 400000
## Booting image at 00400000 ...
Image Name: Linux-2.6.37
Created: 2011-02-23 0:30:40 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3111132 Bytes = 3 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK')
Last edited by billyburly on Sat Jan 28, 2012 4:04 am, edited 2 times in total.
billyburly
 
Posts: 11
Joined: Wed Mar 23, 2011 3:19 am

Re: HP mediavault 2120

Postby billyburly » Wed Mar 23, 2011 4:36 am

It appears to be the kernel. I switched the kernel from the one in the rootfs.tar.gz, to the one that I had previously with debian and it boots up. So now I need to figure out how to build a custom kernel for it.

Currently the system fails a file check on boot. Trying to fix that first.
$this->bbcode_second_pass_code('', ':: Mounting Root Read-only [FAIL]
:: Checking Filesystems [BUSY] fsck.ext3: Is a directory while trying to open /
/:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

[FAIL]

***************** FILESYSTEM CHECK FAILED ****************
* *
* Please repair manually and reboot. Note that the root *
* file system is currently mounted read-only. To remount *
* it read-write type: mount -n -o remount,rw / *
* When you exit the maintenance shell the system will *
* reboot automatically. *
* *
************************************************************
')

EDIT: fixed, had a messed up /etc/fstab. now back to making a custom kernel
billyburly
 
Posts: 11
Joined: Wed Mar 23, 2011 3:19 am

Re: HP mediavault 2120

Postby kmihelich » Thu Mar 24, 2011 11:11 pm

I'll look into making an Orion kernel since I'm working on the 2.6.38 package now anyway.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: HP mediavault 2120

Postby billyburly » Tue Mar 29, 2011 5:00 am

Here's how I got Arch Linux ARM up and running on the mediavault. I have tried to condense/unify everything that I did, and all the things I learned from troubleshooting.

I strongly recommend that you have a way to connect to the serial console. It is the only way to troubleshoot if the mediavault does not boot, or does not connect to your network.

$this->bbcode_list('1')
  • Get the HP recovery tool for windows, or uphpmvault for linux.
  • Get the debian net installer
  • Put the mediavault into recovery mode. Do this by holding the reset button (hole in the front by the USB port, use a paper clip) and then press and hold the power button. Hold both for about 5 seconds.
  • You can now use one of the restore tools to send the mediavault the installer image. For uphpmvault type $this->bbcode_second_pass_code('', 'uphpmvault netboot.img')Follow these instructions to use the windows tool
  • Once the status lights have stopped blinking and have turned solid, the installer has loaded and ssh has started. You can now ssh into the installer. The user is installer and the password is install.
  • If you have not previously partitioned the drive, or are not comfortable using command line partition tools, follow the debian installer and allow it to partition the hard drive. By default HP set it up using LVM. You want to have an ext2 /boot partition, the bootloader uboot, does not support ext3/4. You also want to have a swap partition since the media vault only has 128mb of ram. You can make your root partition an ext3 or ext4 partition (or whatever else you like).
  • Press the ESC key to exit the debian installer to the main menu. Select start a shell and press Enter..
  • Setup the mount points. $this->bbcode_second_pass_code('', 'mkdir /mnt/boot
    mkdir /mnt/fs')
  • Mount the partitions. Substitute in values to match your partitioning scheme. $this->bbcode_second_pass_code('', 'mount -t ext2 -o rw /dev/sda1 /mnt/boot
    mount -t ext3 -o rw /dev/sda2 /mnt/fs')
  • Enter the root partition on the internal hard drive $this->bbcode_second_pass_code('', 'cd /mnt/fs')
  • If you had previously partitioned the drive from running another distro and did not wipe it, clean it out now. You could leave any file you want to keep on the drive. When done you want either a clean drive, or one or two folders that have your files but are not named the same as anything that is contained in the rootfs.tar.gz.
  • Get the Arch Linux ARM rootfs $this->bbcode_second_pass_code('', 'wget http://Arch Linux ARM.com/os/2011.02/PlugApps-Linux-2011.02-rootfs.tar.gz')
  • Unpack the rootfs $this->bbcode_second_pass_code('', 'tar zxvf PlugApps-Linux-2011.02-rootfs.tar.gz')
  • Delete the tar.gz file $this->bbcode_second_pass_code('', 'rm PlugApps-Linux-2011.02-rootfs.tar.gz')
  • Empty the boot folder $this->bbcode_second_pass_code('', 'rm -r boot/*')
  • Get the debian kernel. The Arch Linux ARM kernel does not currently support the Orion chip $this->bbcode_second_pass_code('', 'mkdir k
    cd k
    wget http://ftp.us.debian.org/debian/pool/main/l/linux-2.6/linux-image-2.6.32-5-orion5x_2.6.32-31_armel.deb
    dpkg -x linux-image-2.6.32-5-orion5x_2.6.32-31_armel.deb .')
  • Place the kerenl image in the boot partition. Clean out the boot partition if you need to. You probably will want to make a backup copy of the uImage file. This will get overwritten by any kernel updates from pacman and you will have to replace it. $this->bbcode_second_pass_code('', 'cp boot/* /mnt/boot/')
  • Place the kernel modules in their proper location $this->bbcode_second_pass_code('', 'mv lib/modules/2.6.32-5-orion5x /mnt/fs/lib/modules')
  • Place the documentation in its location $this->bbcode_second_pass_code('', 'mv usr/share/doc/linux-image-2.6.32-5-orion5x /mnt/fs/usr/share/doc')
  • Clean up the files from downloading the kernel. $this->bbcode_second_pass_code('', 'cd ..
    rm -r k')
  • Create a boot folder symlink on the boot partition. U-boot looks for a boot folder on the first two ext2 partitions on the drive sda. $this->bbcode_second_pass_code('', 'cd /mnt/boot
    ln -s . boot
    cd /mnt/fs')
  • Generate the modules.dep file. You need to do this so that the kernel loads modules, the most important being ethernet. $this->bbcode_second_pass_code('', 'depmod -b /mnt/fs/lib/modules/2.6.32-5-orion5x')
    Note: I performed this from a serial console after booting up into Arch Linux ARM. I am not sure if the debian installer has the depmod command. If it does not, then you will have to chroot into Arch Linux ARM to run it.
  • Edit the fstab file to reflect your partition scheme. Comment out devpts, Arch Linux ARM complained about it being already mounted when booting. $this->bbcode_second_pass_code('', 'nano etc/fstab')
    /etc/fstab:
    $this->bbcode_second_pass_code('', '#
    # /etc/fstab: static file system information
    #
    # <file system> <dir> <type> <options> <dump> <pass>
    #devpts /dev/pts devpts defaults 0 0
    shm /dev/shm tmpfs nodev,nosuid 0 0
    /dev/sda1 /boot ext2 defaults 0 0
    /dev/sda2 / ext3 defaults 0 1
    /dev/sda5 swap swap defaults 0 0')
  • Edit the rc.conf file to reflect any preferences you have. Change the timezone. $this->bbcode_second_pass_code('', ' nano etc/rc.conf')
  • You should now have a bootable Arch Linux ARM system running on your mediavault. Reboot the mediavault and wait a couple minutes and you should be able to ssh into the box. If you cannot ssh into the box or it doesnt boot, you will need to hook up the serial console to see whats going on.
  • Last edited by billyburly on Tue Mar 29, 2011 5:03 am, edited 1 time in total.
    billyburly
     
    Posts: 11
    Joined: Wed Mar 23, 2011 3:19 am

    Re: HP mediavault 2120

    Postby billyburly » Tue Mar 29, 2011 5:00 am

    References
    http://tech.groups.yahoo.com/group/hack ... essage/301 - uphpmvault
    http://tech.groups.yahoo.com/group/hack ... essage/376 - using the debian install image w/hp restore tool
    http://www.cyrius.com/debian/orion/hp/m ... stall.html - debian on the mediavault
    http://www.cyrius.com/debian/orion/hp/m ... erial.html - serial console info
    http://k0lee.com/hpmediavault/levelshift.htm - more serial console info

    Place to get a serial cable. If using one of these you only need to connect GND, Tx, and Rx. :
    http://www.adafruit.com/index.php?main_ ... ucts_id=70
    http://www.sparkfun.com/products/9717
    billyburly
     
    Posts: 11
    Joined: Wed Mar 23, 2011 3:19 am

    Updated MediaVault 2120 install guide (part 1: hard drive se

    Postby billyburly » Sat Jan 28, 2012 3:42 am

    I strongly recommend that you have a way to connect to the serial console. It is the only way to troubleshoot if the mediavault does not boot, or does not connect to your network.

    $this->bbcode_list('1')
  • Get the HP recovery tool for windows, or uphpmvault for linux.
  • Get the debian net installer
  • Put the mediavault into recovery mode. Do this by holding the reset button (hole in the front by the USB port, use a paper clip) and then press and hold the power button. Hold both for about 5 seconds.
  • You can now use one of the restore tools to send the mediavault the installer image. For uphpmvault type $this->bbcode_second_pass_code('', 'uphpmvault netboot.img')Follow these instructions to use the windows tool
  • Once the status lights have stopped blinking and have turned solid, the installer has loaded and ssh has started. You can now ssh into the installer. The user is installer and the password is install.
  • Select Start Installer (expert mode) and then choose Download installer components and select cfdisk and tell it to continue. ImageImageImage
  • Now in the main menu choose to start a shell.
  • At the shell type in cfdisk /dev/sda. This will start the partition tool. Clear out any old partitions and create three new ones. Make the first one about 100MB. This will be /boot. Then make another that takes up the rest of the space - 2GB for the / partitions and make a 2GB swap partition. You will end up with a setup like this:Image
  • Now you format the partitions, make /boot ext2 (uboot cannot boot from ext3/4), and / ext4.
    $this->bbcode_second_pass_code('', 'mkfs.ext2 /dev/sda1
    mkfs.ext4 /dev/sda2
    mkswap /dev/sda3')
  • Now you can mount the partitions.
    $this->bbcode_second_pass_code('', 'mkdir /mnt/boot
    mkdir /mnt/root
    mount -t ext2 -o rw /dev/sda1 /mnt/boot/
    depmod
    modprobe ext4
    mount -t ext4 -o rw /dev/sda2 /mnt/root/
    cd /mnt/root/')
  • billyburly
     
    Posts: 11
    Joined: Wed Mar 23, 2011 3:19 am

    Updated guide (part 2: the install)

    Postby billyburly » Sat Jan 28, 2012 4:00 am

    $this->bbcode_list('1')
  • Now you want to get the ArchLinux Arm rootfs tarball and extract it to your root parition.
    $this->bbcode_second_pass_code('', 'wget http://archlinuxarm.org/os/armv5te/ArchLinuxARM-2012.01-armv5te-rootfs.tar.gz
    tar zxvf ArchLinuxARM-2012.01-armv5te-rootfs.tar.gz')
  • Move the kernel and create the symlink uboot needs to work.
    $this->bbcode_second_pass_code('', 'mv /mnt/root/boot/uImage /mnt/boot/
    cd /mnt/boot
    ln -s . boot
    cd /mnt/root
    umount /mnt/boot/
    mount -t ext2 -o rw /dev/sda1 /mnt/root/boot')
  • Edit your fstab to match how the drive is paritioned
    $this->bbcode_second_pass_code('', 'nano etc/fstab')
    Image
  • Now edit rc.conf and set your hostname, timezone, etc
    $this->bbcode_second_pass_code('', 'nano etc/rc.conf')
  • Edit pacman.conf to include the repo with the linux-orion kernel
    $this->bbcode_second_pass_code('', 'nano etc/pacman.conf')
    Use the following repo entry:
    $this->bbcode_second_pass_code('', '[linux-orion]
    Server = http://repo.billyburly.com/linux-orion')
    Image
  • Enter into a chroot
    $this->bbcode_second_pass_code('', 'cp /etc/resolv.conf /mnt/root/etc/resolv.conf
    mount -t proc proc /mnt/root/proc/
    mount -t sysfs sys /mnt/root/sys/
    mount -o bind /dev /mnt/root/dev/
    chroot /mnt/root/ /bin/bash')
    Image
  • You can now install the linux-orion kernel package. You will be told that is in conflict with the linux package. Answer y and remove it.
    $this->bbcode_second_pass_code('', 'pacman -Sy
    pacman -S linux-orion')
    Image
  • The kernel for the Arm Orion chips needs a header prepended to it. You must tell the kernel which Orion you have. Choose 12 for the mv2120.
    Image
  • You now have a working arch system running on a HP mv2120. Exit the chroot, unmount and reboot.
    $this->bbcode_second_pass_code('', 'exit
    cd /
    umount /mnt/root/proc
    umount /mnt/root/sys
    umount /mnt/root/dev
    umount /mnt/root/boot
    umount /mnt/root
    reboot')
  • billyburly
     
    Posts: 11
    Joined: Wed Mar 23, 2011 3:19 am


    Return to [Please read announcement] Community-Supported Devices

    Who is online

    Users browsing this forum: No registered users and 6 guests