Welcome! Log In Create A New Profile

Advanced

Pogo E02 - How to change usb hdd?

Posted by Vinay 
Vinay
Pogo E02 - How to change usb hdd?
March 30, 2016 03:52AM
My old ext ntfs hdd (Disk1) attached to the pogo plug e02 got bad sectors. had to remove it since the system would stop functioning with it attached. I did a file system check in windows and removed the errors as much as possible. One file was corrupt due to a bad sector, so I won't be using this drive anymore. Seems to have come to its impending doom after ~5 years in service.

I had put a rule in fstab for the Disk1 to automount.
I want to replace this fstab line with (Disk2) uuid.
I'm facing a problem. If I try to start pogo plug with Disk2, it wont start. The light is orange even after 1/2 an hour. It boots up properly with the disk removed. How do I put UUID of the new Disk2?
Should I:
1 - comment out the line in fstab auto mounting the old disk and save it.
2 - shut down the pogoplug and attach the Disk2
3 - see if pogo starts. if it starts, mount Disk2 to empty folder.
4 - get blkid of Disk2
5 - add the uuid of Disk2 to the fstab and save.

Is this the correct method? Asking cause I've hardly touched the plug from the last time I asked for instructions here. must have been months back.
Re: Pogo E02 - How to change usb hdd?
March 30, 2016 05:11AM
Vinay,

It is best to use a partition label. And it's best done in u-boot env for bootargs. Then you will never need fstab again for booting correct rootfs.

If you like to do that then get the listing of current envs and post here.

fw_printenv

If you don't like changing u-boot env, then try this in fstab (replace your root device). For example,

LABEL=rootfs    /               ext4    noatime,errors=remount-ro 0 1

And label the rootfs partitition with: rootfs

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Vinay
Re: Pogo E02 - How to change usb hdd?
March 30, 2016 09:19AM
Hi Bodhi,
I should have mentioned this earlier. My rootfs is on a Sandisk Usb disk. The disk I want to change (Disk2) is another external usb portable hdd. This Disk2 is what i want to put in fstab. I think I have put the rootfs in fstab too.

login as: root
root@192.168.10.108's password:
Linux debian 3.16.0-kirkwood-tld-2 #2 PREEMPT Sun Aug 31 18:56:01 PDT 2014 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Mar 30 12:59:36 2016 from 192.168.10.110
root@debian:~# 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_installed=0
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_init=run usb_scan
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_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
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=00:25:31:04:76:5C
arcNumber=2097
serverip=192.168.10.109
ipaddr=192.168.10.112
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole

The fstab file:
root@debian:~# nano /etc/fstab
  GNU nano 2.2.6              File: /etc/fstab

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/root      /               ext2    noatime,errors=remount-ro 0 1
tmpfs          /tmp            tmpfs   defaults          0       0
UUID=E812DB1D12DAEF94  /media/external  ntfs-3g  defaults,locale=en_US.utf8  0 0
/swapfile       none    swap    sw      0       0

/dev/root is the sandisk usb
UUID is the external ntfs hdd which has gone bad.
Re: Pogo E02 - How to change usb hdd?
March 30, 2016 06:00PM
See Discussion part B in this post:
http://forum.doozan.com/read.php?3,19093

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogo E02 - How to change usb hdd?
March 31, 2016 03:00AM
Thanks bodhi - helped me as well.

Rainer

===========================
Blog: https://rmkrug.wordpress.com/

1 x Pogoplug E02 (pink): Logitech media server

1 x Pogoplug E02 (pink): FTP server only (throw away configuration - quick to rebuild)

1 x GoFlex Net: running OpenMediaVault
Vinay
Re: Pogo E02 - How to change usb hdd?
March 31, 2016 03:08AM
I did as you told and labelled the rootfs drive and set the booting environment variable.
login as: root
root@192.168.10.108's password:
Linux debian 3.16.0-kirkwood-tld-2 #2 PREEMPT Sun Aug 31 18:56:01 PDT 2014 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Mar 30 19:39:13 2016 from 192.168.10.110
root@debian:~# tune2fs -L rootfs /dev/sda1
tune2fs 1.42.5 (29-Jul-2012)
root@debian:~# fw_setenv usb_init "usb start; setenv usb_root LABEL=rootfs"
root@debian:~# 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_installed=0
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_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
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=00:25:31:04:76:5C
arcNumber=2097
serverip=192.168.10.109
ipaddr=192.168.10.112
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole
usb_init=usb start; setenv usb_root LABEL=rootfs
root@debian:~#

Do I need to change the /etc/fstab file too?
can i load another hdd through fstab with label (example: LABEL=backup) instead of uuid?
Re: Pogo E02 - How to change usb hdd?
March 31, 2016 03:54AM
Vinay,

The envs looks good. It seems you have either Jeff or davygravy u-boot (circa 2012).

> Do I need to change the /etc/fstab file too?
> can i load another hdd through fstab with label
> (example: LABEL=backup) instead of uuid?

You don't need to change fstab, as far as rootfs is concerned. The kernel bootargs takes precedent, so that's enough to boot the correct roots. For the other drive, you could mount it in /etc/rc.local. Fstab is a fixed setting, so it does not have the flexibilty of mounting drives in rc.local. I usuall don't have anything in fstab, except for tmpfs when I need it. The root device specification in fstab is just a fallback when you use bootargs.

So if you use partition label, you can mount the other drive in rc.local like this (add more options after -o as you need):

mount -L backup -o noatime /media/backup

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Vinay
Re: Pogo E02 - How to change usb hdd?
March 31, 2016 10:41AM
Thanks Bodhi. Worked like a charm. :)
Vinay
Re: Pogo E02 - How to change usb hdd?
April 08, 2016 10:00AM
I'm getting the same problem now. The plug will not boot up with the external hdd attached to it.

I've put both of these lines in fstab one at a time and tried to get the disk auto mounted. Both lines don't work. I have given full rw permissions to the /media/external folder for ntfs-3g to mount the disk. If I boot system without disk and connect disk afterwards and do a mount-a, the disk gets mounted.
#Label=SeagateExp   /media/external  ntfs-3g defaults,locale=en_US.utf8  0 0 
/dev/sdb1   /media/external  ntfs-3g defaults,locale=en_US.utf8  0 0

The same lines worked in older version of debian. Why its not working now?

Also, another question. Seems like Deluge uses only systemd to start properly now. It won't start up in systemctl or the init.d etc files like before. I'm sure I haven't put the device to use systemd in fw_setenv. Is it too late now? Do I have to start again from scratch to use systemd? I feel very old now after all this searching on google and nothing working.
Re: Pogo E02 - How to change usb hdd?
April 08, 2016 03:40PM
Forget fstab, mount the 2nd disk in /etc/rc.local with label. If this disk parttion is labeled external, then
mount -L external -o noatime /media/external

You should use disk partition label to mount everything. Mounting with disk device letter will be problematic whenever you upgrade any part of the system that could alter the booting time.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Vinay
Re: Pogo E02 - How to change usb hdd?
April 10, 2016 12:34AM
I see a script for led lights which ends with exit 0. Should i put this mount command after exit 0 or before it?
Don't I have to put settings for ntfs drive, uid, gid, rw etc?

>Mounting with disk device letter will be problematic whenever you upgrade any part of the system that could alter the booting time.

Also what you mentioned about device letter is true. I was looking at dmesg with and without the external hdd. Seems the external hdd is mounted before the rootfs when the external hdd is present. Sometimes its loaded after rootfs. I don't know why its happening but it does.
I removed all entries related to the external hdd from fstab for now. I saw some error in dmesg. Is it bad?

dmesg output (truncated):
[    4.186883] systemd-udevd[83]: starting version 215
[    4.204107] random: systemd-udevd urandom read with 7 bits of entropy available
[    4.278087] SCSI subsystem initialized
[    4.311936] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[    4.359950] scsi host0: usb-storage 1-1.1:1.0
[    4.370771] usbcore: registered new interface driver usb-storage
[    4.410662] scsi host1: uas
[    4.420290] usbcore: registered new interface driver uas
[    4.426469] scsi 1:0:0:0: Direct-Access     Seagate  Expansion        9300 PQ: 0 ANSI: 6
[    4.584452] sd 1:0:0:0: [sda] 2930277167 512-byte logical blocks: (1.50 TB/1.36 TiB)
[    4.592257] sd 1:0:0:0: [sda] 4096-byte physical blocks
[    5.364247] scsi 0:0:0:0: Direct-Access     SanDisk  USB Flash Drive  6.51 PQ: 0 ANSI: 0 CCS
[    5.380337] sd 0:0:0:0: [sdb] 7883775 512-byte logical blocks: (4.03 GB/3.75 GiB)
[    5.389485] sd 1:0:0:0: Attached scsi generic sg0 type 0
[    5.395452] sd 0:0:0:0: [sdb] Write Protect is off
[    5.400279] sd 0:0:0:0: [sdb] Mode Sense: 45 00 00 08
[    5.400743] sd 0:0:0:0: Attached scsi generic sg1 type 0
[    5.406218] sd 0:0:0:0: [sdb] No Caching mode page found
[    5.411559] sd 0:0:0:0: [sdb] Assuming drive cache: write through
[    5.432307]  sdb: sdb1
[    5.444456] sd 0:0:0:0: [sdb] Attached SCSI removable disk
[    6.126320] sd 1:0:0:0: [sda] Write Protect is off
[    6.131146] sd 1:0:0:0: [sda] Mode Sense: 4f 00 00 00
[    6.131915] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.156040]  sda: sda1
[    6.163165] sd 1:0:0:0: [sda] Attached SCSI disk
[   21.574228] EXT4-fs (sdb1): mounting ext3 file system using the ext4 subsystem
[   21.583108] EXT4-fs (sdb1): INFO: recovery required on readonly filesystem
[   21.590091] EXT4-fs (sdb1): write access will be enabled during recovery
[   21.750162] EXT4-fs (sdb1): recovery complete
[   21.821690] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[   23.229703] random: nonblocking pool is initialized
[   23.322923] systemd-udevd[295]: starting version 215
[   23.827232] orion_wdt: Initial timeout 21 sec
[   23.856816] marvell-cesa: probe of f1030000.crypto failed with error -524
[   24.845472] EXT4-fs (sdb1): re-mounted. Opts: (null)
[   25.077354] EXT4-fs (sdb1): re-mounted. Opts: errors=remount-ro
[   26.153723] fuse init (API version 7.23)
[   27.829540] NET: Registered protocol family 10
[   29.017055] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   31.485691] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   31.495645] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
root@debian:~#

How are hdd's loaded in uboot? top most port to bottom next to rj45 port or in reverse?
Vinay
Re: Pogo E02 - How to change usb hdd?
April 12, 2016 10:11AM
I think i figured out the problem. The external usb 3 hdd I'm trying to mount is a 1.5TB single platter hdd. Maybe the old uboot can't mount this capacity disk at boot.
It auto mounts a 1TB usb 3 disk without fail even after 2-3 boots. The boot time takes very long though. Like ~3-4 minutes. With or without the external hdd attached. Is there a way to shorten the boot times?
Re: Pogo E02 - How to change usb hdd?
April 12, 2016 05:54PM
Vinay Wrote:
-------------------------------------------------------
> I think i figured out the problem. The external
> usb 3 hdd I'm trying to mount is a 1.5TB single
> platter hdd. Maybe the old uboot can't mount this
> capacity disk at boot.

That's not true. Your current uboot can handle 1.5TB HDD just fine.

> It auto mounts a 1TB usb 3 disk without fail even
> after 2-3 boots. The boot time takes very long
> though. Like ~3-4 minutes. With or without the
> external hdd attached. Is there a way to shorten
> the boot times?

You need to observe the boot in serial console or neconsole to determine why.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: