User avatar
piglet
Posts: 911
Joined: Sat Aug 27, 2011 1:16 pm

WD Pidrive - problems

Fri Oct 06, 2017 7:24 pm

Hi all,

How do you use a WD Pidrive Foundation Edition as a normal Raspbian boot drive on a Pi3 without still having to use an SD card?

I've set the OTP bit and validated that it's set, and also checked that after that I can boot from a USB stick with Stretch on it.

The Pidrive appears to work OK using the WD Noobs installer - however that leaves you dependant on an SD card to boot from which then passes over to the hard drive.

If I write the latest Stretch image (downloaded today) to the Pidrive and try to boot from that all I get is stuck at the rainbow splash.

User avatar
DougieLawson
Posts: 36310
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: WD Pidrive - problems

Sat Oct 07, 2017 6:52 am

Get Raspbian Stretch on a SDCard and boot your RPi from that.
Run the GUI Clone Tool with your PiDrive as the output. Shutdown, pull the SDCard and boot the system.

Or if you want to do it from the command line. Boot the system from an SDCard. Open a LXTerminal and run
sudo dd if=/dev/mmcblk0 of=/dev/sda bs=100M shutdown, pull the SDCard and boot from the PiDrive.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
piglet
Posts: 911
Joined: Sat Aug 27, 2011 1:16 pm

Re: WD Pidrive - problems

Sat Oct 07, 2017 10:31 am

Thanks Dougie,

I tried that.

The first reboot didn't even get the rainbow splash.

The second reboot the drive light flashed about 9 times, the green LED on the pi came on and that was that.

The third reboot something happened! Boot messages appeared ending in ending in Kernel Panic: "not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance."

The fourth reboot the drive light flashed about 9 times, the green LED on the pi came on and that was that.

The fifth reboot the drive light is still flashing, the green LED on the pi is on. Nothing showing to screen.

I'm stuck.



Code: Select all

pi@raspberrypi:~$ sudo dd if=/dev/mmcblk0 of=/dev/sda bs=100M
148+1 records in
148+1 records out
15523119104 bytes (16 GB, 14 GiB) copied, 882.237 s, 17.6 MB/s
pi@raspberrypi:~$ sudo shutdown -h now

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: WD Pidrive - problems

Sat Oct 07, 2017 10:46 am

Just use an SD card. It's a lot simpler. It's what I do with my PiDrive. The usual /boot stuff is on the SD card; the rootfs is on the hard disk.

This is one of those "XY Problems". OP thinks he needs to solve a problem one way, when it is really easier to solve the underlying problem another way. Usually, forum participants are called upon to figure out what OP's actual, underlying, problem is.
If this post appears in the wrong forums category, my apologies.

DirkS
Posts: 9963
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: WD Pidrive - problems

Sat Oct 07, 2017 11:00 am

Martin Frezman wrote:
Sat Oct 07, 2017 10:46 am
Just use an SD card. It's a lot simpler. It's what I do with my PiDrive. The usual /boot stuff is on the SD card; the rootfs is on the hard disk.

This is one of those "XY Problems". OP thinks he needs to solve a problem one way, when it is really easier to solve the underlying problem another way. Usually, forum participants are called upon to figure out what OP's actual, underlying, problem is.
Can't you just accept that some people really know what they want?
I for one find it silly to use an 8 or 16GB SD card with a few MB on it just to boot from it.
If I use an HD or SSD on a Pi I prefer to boot from it too, it's a lot simpler...

User avatar
piglet
Posts: 911
Joined: Sat Aug 27, 2011 1:16 pm

Re: WD Pidrive - problems

Sat Oct 07, 2017 12:28 pm

Agreed. I really don't want to use an SD card to boot. That's why I bought the drive in the first place.

I have network storage attached to the router and mounted on the pi's fstab for things I want to share, and can plug in and mount thumb drives or hard drives and point the root partition to them without going the WD route. I bought the Pidrive Foundation Edition as it was specifically designed to work with the Pi.

I don't want to rely on third party custom NOOBS, and come to think of it I absolutely don't want to use NOOBS at all. The word it's based around is usually used as a derogatory term and it puts my back up. Regardless, I know what operating system I want to use so I don't need the functionality it provides.

I would have thought booting from USB on a Pi set up to do that on a hard drive specifically identified for Pi would be more simple. I don't like being stuck...so I'll keep trying to work out how to do it and will be grateful for any other informed suggestions on how to proceed.

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: WD Pidrive - problems

Sat Oct 07, 2017 1:26 pm

Unless you plan to unsolder the SD card reader from the board - and we've seen from a recent thread what a good idea *that* is (de-soldering components from the Pi board for weird/esoteric/no reasons) - I don't see any reason not to use it to boot from. It's not like you're going to be using for any other purpose. And even if you do want to do that, there's nothing to stop you - once the initial boot (loading the kernel) has occurred, the SD card becomes removable - so if you want to use it for loading data or whatever, you can.

This whole "pure boot from USB" thing is just an academic enterprise. I wouldn't be surprised if a future version allowed you to boot off your fingernail (say, using a fingerprint reading device to read the inital boot info off a suitably prepared fingernail). That strikes me as being at least as useful as this "pure boot from USB" thing.
If this post appears in the wrong forums category, my apologies.

User avatar
piglet
Posts: 911
Joined: Sat Aug 27, 2011 1:16 pm

Re: WD Pidrive - problems

Sat Oct 07, 2017 1:33 pm

Much as I appreciate what you're saying, if you've nothing helpful to say in resolution of this issue please find another thread. If I wanted to boot from SD card I wouldn't have bought this hard drive. This thread is about how to learn enough to get it booting from USB alone.

I've done many more attempts at booting and not one after the kernel panic has even got to the rainbow screen.

User avatar
DougieLawson
Posts: 36310
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: WD Pidrive - problems

Sat Oct 07, 2017 2:33 pm

Can you boot from an SDCard and run

sudo -i
fdisk -l
blkid
cat /etc/fstab
fsck -f -y /dev/sda1
mount /dev/sda1 /mnt
cat /mnt/config.txt
cat /mnt/cmdline.txt
exit


You should get somethings like

Code: Select all

root@endeavour:~ # fdisk -l
[...SNIP: lots of stuff removed here ...]

Disk /dev/sda: 349.3 GiB, 375049420800 bytes, 732518400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x20a75729

Device     Boot    Start       End   Sectors   Size Id Type
/dev/sda1           8192    137215    129024    63M  e W95 FAT16 (LBA)
/dev/sda2         137216 732518399 732381184 349.2G  5 Extended
/dev/sda5         139264   8312831   8173568   3.9G 83 Linux
/dev/sda6       16586752 732518399 715931648 341.4G 83 Linux

Code: Select all

root@endeavour:~ # blkid
/dev/sda1: SEC_TYPE="msdos" LABEL="RECOVERY" UUID="0427-12C4" TYPE="vfat" PARTUUID="20a75729-01"
/dev/sda5: UUID="673b8ab6-6426-474b-87d3-71bff0fcebc3" TYPE="ext4" PARTUUID="20a75729-05"
/dev/sda6: LABEL="root0" UUID="7071b576-1bcd-4ea5-aa82-fba27baffcf1" TYPE="ext4" PARTUUID="20a75729-06"
root@endeavour:~ #

Code: Select all

root@endeavour:~ # cat /mnt/config.txt
total_mem=1024
hdmi_force_hotplug=1
hdmi_group=1
hdmi_mode=16
dtparam=audio=on
dtparam=spi=on
dtparam=i2c_arm=on
disable_splash=1
root@endeavour:~ #

Code: Select all

root@endeavour:~ # cat /mnt/cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=20a75729-06 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait rootdelay=10
root@endeavour:~ #

Code: Select all

root@endeavour:~ # cat /etc/fstab
proc /proc proc defaults 0 0
UUID=0427-12C4 /boot vfat defaults 0 2
UUID=7071b576-1bcd-4ea5-aa82-fba27baffcf1 / ext4 defaults,noatime 0 1
root@endeavour:~ #
Do you see how /dev/sda6 comes out in the output from blkid and that UUID is used in /etc/fstab, in cmdline.txt I'm using the PARTUUID for /dev/sda6 to define it as the root filesystem.

Note: Those HDMI parameters in config.txt are only there so I can use RealVNC on a headless system.

Get that stuff and we should be able to create a working /etc/fstab and a working /boot/cmdline.txt to get your PiDrive booting without ANY SDCard.

BTW, I've got Frezman blocked (as a "foe") on the forum as there's nothing useful that ever emerges from his meaningless, interfering postings. ucp.php?i=ucp_zebra&mode=foes
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
piglet
Posts: 911
Joined: Sat Aug 27, 2011 1:16 pm

Re: WD Pidrive - problems

Sat Oct 07, 2017 3:45 pm

Thanks from one *cough*20+ year*cough* IBM Mainframe chap to another.

The HD should be a copy of the card at the point I did it, which is why the IDs are the same and I suppose this time it's not liking auto mounting:

Code: Select all

root@raspberrypi:~# fdisk -l
Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram4: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram5: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram6: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram7: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram8: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram9: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram10: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram11: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram12: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram13: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram14: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram15: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mmcblk0: 14.5 GiB, 15523119104 bytes, 30318592 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8fa9f2e8

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1       8192    93814    85623 41.8M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      94208 30318591 30224384 14.4G 83 Linux


Disk /dev/sda: 349.3 GiB, 375049420800 bytes, 732518400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8fa9f2e8

Device     Boot Start      End  Sectors  Size Id Type
/dev/sda1        8192    93814    85623 41.8M  c W95 FAT32 (LBA)
/dev/sda2       94208 30318591 30224384 14.4G 83 Linux
root@raspberrypi:~# blkid
/dev/mmcblk0p1: LABEL="boot" UUID="13C6-2676" TYPE="vfat" PARTUUID="8fa9f2e8-01"
/dev/mmcblk0p2: UUID="037616fd-28fe-4652-8248-2042ea30b929" TYPE="ext4" PARTUUID="8fa9f2e8-02"
/dev/mmcblk0: PTUUID="8fa9f2e8" PTTYPE="dos"
/dev/sda1: LABEL="boot" UUID="13C6-2676" TYPE="vfat" PARTUUID="8fa9f2e8-01"
/dev/sda2: UUID="037616fd-28fe-4652-8248-2042ea30b929" TYPE="ext4" PARTUUID="8fa9f2e8-02"

Code: Select all

root@raspberrypi:~# cat /etc/fstab
proc            /proc           proc    defaults          0       0
PARTUUID=8fa9f2e8-01  /boot           vfat    defaults          0       2
PARTUUID=8fa9f2e8-02  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that

************removed a couple of lines about my network storage here *********

root@raspberrypi:~# fsck -f -y /dev/sda1
fsck from util-linux 2.29.2
fsck.fat 4.1 (2017-01-24)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
 Automatically removing dirty bit.
Performing changes.
/dev/sda1: 147 files, 42947/84273 clusters

program_usb_boot_mode left on for now

Code: Select all

root@raspberrypi:~# cat /mnt/config.txt
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=0

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

program_usb_boot_mode=1

I tried with and without "rootdelay=5" at the end

Code: Select all

root@raspberrypi:~# cat /mnt/cmdline.txt
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=8fa9f2e8-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

User avatar
DougieLawson
Posts: 36310
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: WD Pidrive - problems

Sat Oct 07, 2017 4:42 pm

piglet wrote:
Sat Oct 07, 2017 3:45 pm

Code: Select all

/dev/sda1: LABEL="boot" UUID="13C6-2676" TYPE="vfat" PARTUUID="8fa9f2e8-01"
/dev/sda2: UUID="037616fd-28fe-4652-8248-2042ea30b929" TYPE="ext4" PARTUUID="8fa9f2e8-02"
That bit is the exciting stuff.

So we can code the following

sudo mount /dev/sda2 /mnt
sudo mount /dev/sda1 /mnt/boot


Create the following

/mnt/etc/fstab

Code: Select all

proc /proc proc defaults 0 0
UUID=13C6-2676 /boot vfat defaults 0 2
UUID=037616fd-28fe-4652-8248-2042ea30b929 / ext4 defaults,noatime 0 1
/mnt/boot/cmdline.txt

Code: Select all

dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=8fa9f2e8-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait rootdelay=10
Unmount everything
sudo umount /mnt/boot
sudo umount /mnt
sudo poweroff


Pull the power.
Pull the SDCard.
Put the power back on.

Grab a beer and celebrate a job well done.

Then you can start writing some COBOL or PL/1 code.

I've been doing mainframe things since December 1981 and systems programming things since December 1982.

You can remove

Code: Select all

program_usb_boot_mode=1
from /mnt/boot/config.txt as long as it's been booted once like that. With the PiDrive I'm using rootdelay=10 to allow them to spin up.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: WD Pidrive - problems

Sat Oct 07, 2017 4:49 pm

piglet wrote:
Sat Oct 07, 2017 1:33 pm
Much as I appreciate what you're saying, if you've nothing helpful to say in resolution of this issue please find another thread. If I wanted to boot from SD card I wouldn't have bought this hard drive. This thread is about how to learn enough to get it booting from USB alone.

I've done many more attempts at booting and not one after the kernel panic has even got to the rainbow screen.
It is a time-honored tradition on this (and other) board(s) to answer the real underlying problem, and basically ignore whatever OP says he is trying to do. Just ask a certain poster (one with over 20K posts) for confirmation of this tradition.
If this post appears in the wrong forums category, my apologies.

User avatar
piglet
Posts: 911
Joined: Sat Aug 27, 2011 1:16 pm

Re: WD Pidrive - problems

Sun Oct 08, 2017 10:24 am

Thanks Dougie,

No more COBOL for me these days. We moved the application area I work on from Mainframe to arrays of massive Linux machines, and now most of what I do is fire-fighting/design/hitting my head against a desk. Programming is mostly off-shored. Code quality? No comment.

OK getting somewhere. Now I get the rainbow screen and 7 green flashes: "7 flashes: kernel.img not found"...which seems a little odd to me as it must be able to read that part of the disk in order to have got as far as it did.

After rebooting wih SD card and remounting the hard drive:

-rwxr-xr-x 1 root root 4381216 Aug 11 18:03 /mnt/boot/kernel.img

Code: Select all

pi@raspberrypi:~ $ sudo blkid
...
/dev/sda1: LABEL="boot" UUID="13C6-2676" TYPE="vfat" PARTUUID="8fa9f2e8-01"
/dev/sda2: UUID="037616fd-28fe-4652-8248-2042ea30b929" TYPE="ext4" PARTUUID="8fa9f2e8-02"

Code: Select all

pi@raspberrypi:~ $ cat /mnt/etc/fstab
proc /proc proc defaults 0 0
UUID=13C6-2676 /boot vfat defaults 0 2
UUID=037616fd-28fe-4652-8248-2042ea30b929 / ext4 defaults,noatime 0 1

Code: Select all

pi@raspberrypi:~ $ cat /mnt/boot/cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=8fa9f2e8-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait rootdelay=10

User avatar
DougieLawson
Posts: 36310
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: WD Pidrive - problems

Sun Oct 08, 2017 10:41 am

What's in /boot and /lib/modules, are those a complete clone from your SDCard?

You could chroot the system and run rpi-update to get latest 4.9.53-v7+ #1040 kernel, bootcode and /lib/modules on your hard drive.

sudo mount /dev/sda2 /mnt
sudo mount /dev/sda1 /mnt/boot
sudo mount -t proc proc /mnt/proc
sudo mount -o bind /dev /mnt/dev
sudo mount -o bind /sys /mnt/sys
cd /mnt
sudo chroot .
sudo rpi-update


Since it's an experimental system, it's OK to run with that rpi-update kernel (which I've had running on my RPis for a couple of days and haven't found any bugs).
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
piglet
Posts: 911
Joined: Sat Aug 27, 2011 1:16 pm

Re: WD Pidrive - problems

Sun Oct 08, 2017 1:44 pm

Yes, it's a direct DD copy of the card I'm posting this using.

Code: Select all

root@raspberrypi:/# sudo rpi-update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Performing self-update
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13403  100 13403    0     0  46164      0 --:--:-- --:--:-- --:--:-- 46377
 *** Relaunching after update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** We're running for the first time
 *** Backing up files (this will take a few minutes)
 *** Backing up firmware
 *** Backing up modules 4.9.41-v7+
#############################################################
This update bumps to rpi-4.9.y linux tree
Be aware there could be compatibility issues with some drivers
Discussion here:
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=167934
##############################################################
 *** Downloading specific firmware revision (this will take a few minutes)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   168    0   168    0     0    317      0 --:--:-- --:--:-- --:--:--   317
100 54.0M  100 54.0M    0     0  5039k      0  0:00:10  0:00:10 --:--:-- 5707k
 *** Updating firmware
 *** Updating kernel modules
 *** depmod 4.9.53+
 *** depmod 4.9.53-v7+
 *** Updating VideoCore libraries
 *** Using HardFP libraries
 *** Updating SDK
 *** Running ldconfig
 *** Storing current firmware revision
 *** Deleting downloaded files
 *** Syncing changes to disk
 *** If no errors appeared, your firmware was successfully updated to 5d03351413d4021cc3feeb04459eea98bcb731c0
 *** A reboot is needed to activate the new firmware

Code: Select all

root@raspberrypi:/# ls /boot && ls /lib/modules
bcm2708-rpi-0-w.dtb	bcm2709-rpi-2-b.dtb  cmdline.txt	  fixup_cd.dat	issue.txt	  LICENSE.oracle  start.elf
bcm2708-rpi-b.dtb	bcm2710-rpi-3-b.dtb  cmdline.txt.predoug  fixup.dat	kernel7.img	  overlays	  start_x.elf
bcm2708-rpi-b-plus.dtb	bcm2710-rpi-cm3.dtb  config.txt		  fixup_db.dat	kernel.img	  start_cd.elf	  System Volume Information
bcm2708-rpi-cm.dtb	bootcode.bin	     COPYING.linux	  fixup_x.dat	LICENCE.broadcom  start_db.elf

root@raspberrypi:/# ls /lib/modules
4.9.41+  4.9.41-v7+  4.9.53+  4.9.53-v7+
Just shutting down to try now

User avatar
piglet
Posts: 911
Joined: Sat Aug 27, 2011 1:16 pm

Re: WD Pidrive - problems

Sun Oct 08, 2017 3:11 pm

Yay! On fourth or fifth startup try it booted.

Doesn't seem like a good percentage though.

If you have any idea how to get it more reliably booting I would appreciate it. Do I need to be careful with any apt-get upgrades having done the rpi-update, or should it all just work?

User avatar
DougieLawson
Posts: 36310
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: WD Pidrive - problems

Sun Oct 08, 2017 4:12 pm

All of my raspberries that have root filesystems on USB devices don't have any problems.

I have three RPi3Bs, one that boots from a 32GB Sandisk USB stick, two that boot from a PiDrive. I have a Zero that boots from a SDCard and has rootfs on a PiDrive and my B+ boots from an SDCard and has rootfs on a Toshiba Canvio drive.

My most unreliable RPis are my A+ that has a horrible USB WiFi that keeps dropping from the network and my other Zero that can be reluctant to boot from its SDCard.

Best thing with the PiDrive is the big/fat 3.5A 5V power supply that comes with it.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
piglet
Posts: 911
Joined: Sat Aug 27, 2011 1:16 pm

Re: WD Pidrive - problems

Sun Oct 08, 2017 9:00 pm

3.5A? Hmm - I had to buy the PSU separate from the pidrive, and all they offered was a 2A and a choice of 3A supply "WD Power Kit (3A)" or "PiDrive Cable & Power Kit - 3A" - the second was cheaper, appeared to have exactly the same PSU and had a pidrive cable included...so that's what I got

Could the "3A" supply for the Pi3B and disk together with (not a fancy) keyboard and basic USB mouse be marginal causing boot reluctance? I don't see any lightening bolt during or after boot, and everything seems stable.

Now it's running I don't particularly want to try rebooting to find out whether it will work again just in case it doesn't! The Pi is monitoring a game server and keeping the problem players away...


I'm still slightly confused as to why the changes you kindly suggested had any impact:

1) Change fstab to use UUID instead of PARTUUID
2) Added console=serial0,115200 and rootdelay=10 to a disk we know must be spun up enough to read the configuration in the first place
3) Tried the bleeding edge kernel

I'm missing something here!

User avatar
DougieLawson
Posts: 36310
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: WD Pidrive - problems

Wed Oct 11, 2017 4:51 pm

UUID vs PARTUUID are virtually interchangeable.
That console= sneaked in from the machine I was looking at - it's irrelvant.
rootdelay=10 is good idea for any system with rootfs on a chrome plated spinning thing.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
piglet
Posts: 911
Joined: Sat Aug 27, 2011 1:16 pm

Re: WD Pidrive - problems

Thu Oct 12, 2017 3:38 pm

DougieLawson wrote:
Wed Oct 11, 2017 4:51 pm
rootdelay=10 is good idea for any system with rootfs on a chrome plated spinning thing.
Hmmm. I can understand that where the boot partition is still on the SD card. It gives the spinny thing time to...well...spin. However here the boot partition is on the spinny thing, so in order to read the boot stuff (including the "wait 10 seconds for spinny thing to spin") the spiny thing has to be indeed spinning enough to be read.

I'm very confused.

If the UUID vs PARTUUID doesn't matter and the console thing isn't relevant either, then is booting success going to be pot luck and the changes made no difference and it just happened to boot properly on the n'th time? (no superscript tag here?!)

User avatar
piglet
Posts: 911
Joined: Sat Aug 27, 2011 1:16 pm

Re: WD Pidrive - problems

Sat Oct 14, 2017 3:09 pm

sudo reboot....-> no reboot.

Meh!

User avatar
DougieLawson
Posts: 36310
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: WD Pidrive - problems

Sat Oct 14, 2017 11:03 pm

Can you boot from a SDCard?

run
sudo fsck -f -y /dev/sda1
sudo fsck -f -y /dev/sda5
sudo fsck -f -y /dev/sda6
sudo poweroff


Then pull the SDcard and try again from your USB PiDrive.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Return to “Troubleshooting”