Jump to content

Can't Access USB Drive for Storage


jpmk12
 Share

Recommended Posts

Hello,

I am having some issues accessing the USB storage from inside the Pineapple. I also can't install infusions or any software to the USB drive. It is a 16 gig mini stick that I have no issue writing to from SSH. It is partition into 2 ext4 partitions. The stick is plugged directly into the pineapple without a hub. It looks like i may be confused between all the different automatic mount points. I have tried to include any relevant info below.

As you can see in my mount print, the second partition on my disk (as described in the tutorial) doesn't seem to be loading. In my dmesg, it also isnt showing up. I would like this to be set up at the tutorial said. Any ideas why it isn't mounting? Should I make either or both partitions on the drive bootable? I noticed that when i plug in the drive and try to access the pineapple through the web interface, none of the tiles show up until i remove the drive now.

The layout should be sdb1 and sdb2.

Below are my config files:

----------

fstab

-----------

config global automount
option from_fstab 1
option anon_mount 1
config global autoswap
option from_fstab 1
option anon_swap 1
config mount
option target /usb
option device /dev/sdb1
option fstype ext4
option options rw,sync
option enabled 1
option enabled_fsck 0
config swap
option device /dev/sdb2
option enabled 1

-----------------

fdisk

-----------------

Disk /dev/sda doesn't contain a valid partition table
Disk /dev/sdb: 16.0 GB, 16095641600 bytes
255 heads, 63 sectors/track, 1956 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 1603 12875863 83 Linux
/dev/sdb2 1604 1957 2841600 83 Linux
-----------------------
root@Pineapple:~# ls -la /dev/sd*
brw-r--r-- 1 root root 8, 0 Jan 1 1970 /dev/sda
brw-r--r-- 1 root root 8, 16 Dec 25 15:30 /dev/sdb
brw-r--r-- 1 root root 8, 17 Dec 25 15:30 /dev/sdb1
brw-r--r-- 1 root root 8, 18 Dec 25 15:30 /dev/sdb2
------------------
----------
mount
---------
root@Pineapple:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=30904k)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,relatime,lowerdir=/,upperdir=/overlay)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)
/dev/sdb1 on /usb type ext4 (rw,sync,relatime,user_xattr,barrier=1,data=ordered)
---------------------------------------------------------
I get this error when trying to make the swap
--------------------------------------------------------
root@Pineapple:/# mkswap /dev/sdb2
/dev/sdb2: Device or resource busy
root@Pineapple:/#
Current Disk Usage: Filesystem Size Used Available Use% Mounted on
rootfs 4.3M 404.0K 3.9M 9% /
/dev/root 10.8M 10.8M 0 100% /rom
tmpfs 30.2M 112.0K 30.1M 0% /tmp
tmpfs 512.0K 0 512.0K 0% /dev
/dev/mtdblock3 4.3M 404.0K 3.9M 9% /overlay
overlayfs:/overlay 4.3M 404.0K 3.9M 9% /
/dev/sdb1 12.2G 312.4M 11.3G 3% /mnt/sdb1
/dev/sdb2 2.7G 104.9M 2.5G 4% /mnt/sdb2
------------------
DMESG
-----------------
[ 134.690000] usbserial: USB Serial Driver core
[ 136.020000] scsi 1:0:0:0: Direct-Access PNY USB 2.0 FD 1100 PQ: 0 ANSI: 4
[ 136.030000] sd 1:0:0:0: Attached scsi generic sg1 type 0
[ 136.040000] sd 1:0:0:0: [sdb] 31436800 512-byte logical blocks: (16.0 GB/14.9 GiB)
[ 136.040000] sd 1:0:0:0: [sdb] Write Protect is off
[ 136.050000] sd 1:0:0:0: [sdb] Mode Sense: 43 00 00 00
[ 136.050000] sd 1:0:0:0: [sdb] No Caching mode page present
[ 136.050000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 136.060000] sd 1:0:0:0: [sdb] No Caching mode page present
[ 136.070000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 136.080000] sdb: sdb1 sdb2
[ 136.080000] sd 1:0:0:0: [sdb] No Caching mode page present
[ 136.090000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 136.100000] sd 1:0:0:0: [sdb] Attached SCSI removable disk
[ 136.890000] EXT4-fs (sdb1): recovery complete
[ 136.900000] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
Any ideas?
Thanks,
Justin
Edited by jpmk12
Link to comment
Share on other sites

So after spending a few more hours on the forum, I saw where someone said the pineapple no longer supports infusions installed to USB. (An independent verification would be helpful). I see the point of this if it is true.

So I decided restore my pineapple to defaults and install the infusions on the SD card, but I no longer get this option. I restored the pineapple to factory default. I know this worked before. Any ideas on what I did to screw it up?

Below is my FSTAB for trying to install infusions to the SD card.

config global automount
option from_fstab 1
option anon_mount 1
config global autoswap
option from_fstab 1
option anon_swap 0
config mount
option target /sd
option device /dev/sda1
option fstype auto
option options rw,sync
option enabled 1
option enabled_fsck 0
config swap
option device /dev/sda2
option enabled 1
Thanks,
Justin
Link to comment
Share on other sites

After more forum hunting and google searching, i followed this tutorial: https://forums.hak5.org/index.php?/topic/30786-reboot-lost-all-infusions-on-sd-card/

I am not able to complete it though because when i run the commands, i see this.

root@Pineapple:~# blkid
/dev/mtdblock2: TYPE="squashfs"
I dont see my SD card at all.
root@Pineapple:/# ls -la /dev/sd*
brw-r--r-- 1 root root 8, 0 Dec 26 02:59 /dev/sda
/dev/sdcard:
drwxr-xr-x 2 root root 60 Dec 26 02:59 .
drwxr-xr-x 8 root root 880 Dec 26 02:59 ..
lrwxrwxrwx 1 root root 8 Dec 26 02:59 sd -> /dev/sda
config global automount
option from_fstab 1
option anon_mount 1
config global autoswap
option from_fstab 1
option anon_swap 0
config mount
option target /sd
option device /dev/sdcard/sd1
option fstype auto
option options rw,sync
option enabled 1
option enabled_fsck 0
config swap
option device /dev/sdcard/sd2
option enabled 1
Edited by jpmk12
Link to comment
Share on other sites

I noticed today when I tried an FDISK that my SD card now says it has an invalid partition table. Do you see the same? This may have happened when i factory restored or could be an error that happened when i was using the USB flash drive. I am going to try to recreate the SD card and see if that fixes it.

fdisk -l output

Disk /dev/sda: 1887 MB, 1887436800 bytes
59 heads, 62 sectors/track, 1007 cylinders
Units = cylinders of 3658 * 512 = 1872896 bytes
Disk /dev/sda doesn't contain a valid partition table
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...