gdesilva
Posts: 4
Joined: Fri Feb 23, 2018 10:36 am

rootfs on usb driver fails to boot

Fri Feb 23, 2018 11:06 am

Hi, I moved the root file system to an external powered USB drive and got the raspi to boot initially but after some time I noted that I was getting 'bus errors' reported occasionally. Then a couple of days ago the raspi failed to boot from the USB drive.

I reverted back to SD card boot and re-did the installation a couple of times and also followed the instructions given in
viewtopic.php?f=28&t=53832 but the result is the same.

lsusb gives me

Code: Select all

root@redbelly:~# lsusb
Bus 001 Device 005: ID 152d:2338 JMicron Technology Corp. / JMicron USA Technology Corp. JM20337 Hi-Speed USB to SATA & PATA Combo Bridge
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 


dmesg gives me the following

Code: Select all

root@redbelly:~# dmesg
[ 1000.135516] usb 1-1.5: new high-speed USB device number 5 using dwc_otg
[ 1000.266704] usb 1-1.5: New USB device found, idVendor=152d, idProduct=2338
[ 1000.266718] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[ 1000.266727] usb 1-1.5: Product: USB to ATA/ATAPI bridge
[ 1000.266734] usb 1-1.5: Manufacturer: JMicron
[ 1000.266742] usb 1-1.5: SerialNumber: 00000010DE81
[ 1000.268428] usb-storage 1-1.5:1.0: USB Mass Storage device detected
[ 1000.270366] scsi host0: usb-storage 1-1.5:1.0
[ 1001.286453] scsi 0:0:0:0: Direct-Access     SAMSUNG  HD080HJ/P             PQ: 0 ANSI: 5
[ 1001.287667] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 1001.288840] sd 0:0:0:0: [sda] 156250000 512-byte logical blocks: (80.0 GB/74.5 GiB)
[ 1001.289564] sd 0:0:0:0: [sda] Write Protect is off
[ 1001.289579] sd 0:0:0:0: [sda] Mode Sense: 28 00 00 00
[ 1001.290019] sd 0:0:0:0: [sda] No Caching mode page found
[ 1001.290029] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 1001.334317]  sda: sda1
[ 1001.337171] sd 0:0:0:0: [sda] Attached SCSI disk
I have added rootdelay=8 in cmdline.txt when booting off the USB drive.

The drive is readily accessible when plugged into raspi or any other PC.

I would appreciate any assistance in troubleshooting this issue which to me seems like a hardware fault?

Thanks in advance.

gdesilva
Posts: 4
Joined: Fri Feb 23, 2018 10:36 am

[SOLVED]Re: rootfs on usb driver fails to boot

Sat Feb 24, 2018 1:20 am

Just got it to work but not sure why....here is what I did.

Firstly, plugged the USB drive to my PC and using gparted created a new partition msdos partition table and a new ext4 partition

Followed, the instructions given in the Sticky Post and booted - voila!, was able to boot without any issues.

What is strange is that the instructions in the Sticky does create a GPT partition table prior to creating the ext4 partition so one would think that creating a msdos partition table using gparted was a waste of time? Perhaps, some bright spark can shed some light here.

Any way, the problem is solved so will close this post.

gdesilva
Posts: 4
Joined: Fri Feb 23, 2018 10:36 am

Re: rootfs on usb driver fails to boot

Sat Feb 24, 2018 3:02 am

Addendum:

Although I was able to successfully boot first time when I rebooted my RPI I ended up having the same problem of not being able to boot off the USB drive.

I then plugged in both the SD card and the USB drive on to my PC and checked the partition information on both drives using gparted.

I found that mmcblk0p1 is MMC type and the mmcblk0p2 has a msdos partition table (not a GPT) while my USB drive had gpt partition table.

Recreated the USB with a msdos partition table with an ext4 partition and rsync'ed mmcblk0p2 to USB partition, modified /etc/fstab to mount /dev/sda1 under root and rebooted three times and all looks good.

I guess this means it would be imperative to check and make sure that the mmcblk0p2 and sda1 both are using the same type of partition tables - ie. either msdos or gpt. Mix types lead to disaster and lost time :evil:


gdesilva
Posts: 4
Joined: Fri Feb 23, 2018 10:36 am

Re: rootfs on usb driver fails to boot

Sat Feb 24, 2018 8:16 am

Thanks Ron - I should have done a better search of the relevant posts. Will save this link for future references.

Return to “Troubleshooting”

Who is online

Users browsing this forum: Baidu [Spider], jerrm, Yahoo [Bot] and 43 guests