Root access with SMB

Is your drive powered off the Pi ?

This error means either you unplugged the drive in the middle of it being used, or you have a low voltage problem.

Low voltage will cause USB devices to disconnect unexpectedly on a Pi.

Low level formatting, bad blocks, … Don’t be put off by the terminology.

You have a disc where one (or more) parts of it (sectors) can’t be read properly.
That sort of thing happens. Computers can take care of it.

That can happen at the filesystem level (the part of the system that organises what you see into what the disc stores), or at the device level (the disc drive knows that part is bad and uses a spare, or alternate, part of the disc).
It is better to handle it at the device level, for all sorts of reasons I won’t bore you with :slight_smile:

So there are 2 different sorts of formatting. There is “low level” formatting (used to be writing the sector markers, like drawing a grid on a piece of paper); these days it is much more about handling bad blocks.
Your disc drive manufacturer will probably have special software to do that, even for a Mac. Look around their web site or contact their support (Hitachi).
Once your drive is sorted out (bad sector), then you can worry about what higher level formatting (filesystem) you use on it :slight_smile:

If you actually want to learn about Linux, creating filesystems, how then to (or not to) access them from your Mac, … then start with the OSMC WiKi article and Google your way out from there.
If you just want to be able to play your movies, format it as “exfat” on your Mac, plug in to your OSMC box, and enjoy :slight_smile:

yes it is powerd by the pi2

df to find the drive (using my laptop as an example)

Filesystem     1K-blocks     Used Available Use% Mounted on
udev             4013896        0   4013896   0% /dev
tmpfs             806480    83276    723204  11% /run
/dev/dm-0      106845232 55166848  46227840  55% /
tmpfs            4032384    76696   3955688   2% /dev/shm
tmpfs               5120        4      5116   1% /run/lock
tmpfs            4032384        0   4032384   0% /sys/fs/cgroup
/dev/sda1         240972    55382    173149  25% /mnt/ext_disk
cgmfs                100        0       100   0% /run/cgmanager/fs
tmpfs             806480       52    806428   1% /run/user/1000

the drive is /dev/sda
unmount the drive with
sudo umount /dev/sda1
now to format that drive we need to remove the partition on it so next command is
sudo fdisk /dev/sda d 1 there might be more then one partition on the drive then just change it to 2,3,4 if there are more.
nenter until it creates the partion
w write changes to disk

then
sudo mkfs.ext4 /dev/sda1

thats the jist of it for more info look at these guides

http://www.unixmen.com/how-to-format-usb-drive-in-the-terminal/

ps never be afraid to break a system shit happens and its easy to re-install thats the way one learns not to repeat the last mistake :slight_smile:

Try powering it via a powered USB hub or a power adaptor of its own then. Almost certainly insufficient power through the Pi’s USB ports to power it from what I can see in the log.

1 Like

Apologies; I saw the same block number (488396576) multiple times in the debug trace, so I assumed he was having a recurrent problem with the same sector. In fact, it’s just the same error being reported in different logs in the same debug output :slight_smile:

@drchiller, may be even simpler - just externally power your drive (you said you were using a 2.4A PSU - is it a good quality 2.4A PSU?).

it is an apple power supply.

not powerful enough to power a drive and a pi at the same time

No good.

Buy one specifically made for the Pi - at least 2 amp.

So is that good or bad? :slight_smile:

Try externally powering your drive. If it still doesn’t work (and esp. if you see the number 488396576 appear again in the logs :slight_smile:) get a low-level format utility from Hitachi and sort it out at the device level.

And congratulations - you’ve just destroyed your “/boot/” partition and made the system unusable. Nice instructions …

It’s a consumer device. You wouldn’t expect to have to “ssh” to your TV and repartition storage on it to watch a TV program. Different instructions, different fixes, are appropriate in different situations and for different people.
Please learn to differentiate between them before you give someone else instructions on how to brick their system …

The OP has an SD card install so /boot is /dev/mmcblk0p1

/dev/sda1 is the first partition on the first external USB drive :wink:

Yes, but not in the example @Toast gave - if someone looked at his output, saw he was using “/dev/sda1” (which is listed as being the device for “/boot/”), they may very well pick the device for their “/boot/” and do the same. He used output from his laptop which doesn’t match what the OP will see.

(Very) bad example …

lool @THEM i used to be support at this forum before so please you can try and fail over and over to get one up on me but no its not gonna happen :slight_smile:

and it is an example have to use your brain a bit to see that its the right drive cause an example is not the OP system.

is there an active usb hub you can suggest?

I can’t see where you quoted /dev/sda1 240972 55382 173149 25% /boot from ?

my example that i clearly stated was MY laptop

Oh grow up - I’m not “trying to get one up” on you. And, from the looks of your profile picture, I was probably providing IT technical support about 20 years before you were born.

Yes, so make that clear in your post, esp. when you’re obviously dealing with someone with minimal Unix knowledge …

Perhaps that’s why you’re not support on the forum any longer? Who knows (who cares …).

That’s because @Toast has since edited his post and removed it :slight_smile:

your the one that cried over an example so i edited :slight_smile: so you dont get confused