Doesn't work on new $129 Pogoplug at all. /sbin/fdisk doesn't work.
How to Partition and Format a USB Drive Directly On Your Pogoplug
Categories: PogoPlug Development
USB drives usually come formatted for Microsoft Windows. However, if you want to do some Linux work on the USB drive, then it really needs to be formatted with an ext2 or ext3 file system. If your main PC runs Linux or is a Mac, then you'll be able to perform this easily. If your main PC is a Windows system, however, then it's not obvious how to format the USB drive.
One solution would be to download a Linux live CD, boot it and use its built-in utilities; a functional approach, but a whole lot of work!
The Pogoplug does come with the fdisk utility so you can partition the USB drive. The Pogoplug does not, however, have the mke2fs utility which creates the ext2/ext3 file systems. It turns out that the mke2fs utility does not have any dependencies and works standalone. I have uploaded a zipped copy of mke2fs to the Development Download section of this site. Read on if you are interested in using this utility on the Pogoplug.
This guide does not change the Pogoplug read only software, so there should be no risk of bricking the Pogoplug - however, as always, proceed carefully and at your own risk. The guide does require connecting to the Pogoplug through either ssh or telnet. Telnet is available on Windows; these instructions were tested using telnet. (You've probably stopped reading if you're using Linux anyway!)
I'm assuming that: you know the IP address of your Pogoplug, the Pogoplug is connected to your home network, your Windows PC is connected to your home network, your home network is connected to the internet and last but not least, the USB drive you want to format has no useful data as it will be LOST by following this guide. All text in bold in the following are what you need to type or cut and paste. Let's get started!
- Power up the Pogoplug with the USB drive you want to format plugged directly into the Pogoplug USB socket.
- On your Windows PC, open a browser and navigate to "my.pogoplug.com" and eject the USB drive.
- On your Windows PC, bring up a command prompt and connect to the plug with telnet xxx.xxx.xxx.xxx replacing the x's with the Plug's IP address. Login as root with the ceadmin password. You will now be at "/root".
- Type mount which will list the mounted file systems, the only reference to "/dev"should be "/dev/pts". If there is a reference to "/dev/sda1" then the USB drive has not been properly ejected. Check on "my.pogoplug.com"
- Lets change to the tmp folder by typing cd /tmp We're going to get the mke2fs utility we mentioned earlier. Typing pwd will list your path and typing ls will list the contents of the folder which should be "var" and "resolv.conf".
- To get the mke2fs utility we use the wget utility. Wget goes out to the specified web URL and downloads the file to the current folder. Type the following: wget http://download.capablenet.com/pogoplug/mke2fs.zip It should only take a few seconds to download.
- Type ls again and you should now see the "mke2fs.zip" file. Unzip it by typing unzip mke2fs.zip. ls will show the unzipped "mke2fs" utility. We'll use that after we have partitioned the USB drive. But, before we can use it, we must make it executable.
- Type chmod 755 mke2fs to make it executable. It's executable if it is listed in green text using ls.
- Now, lets partition the USB drive.Type fdisk /dev/sda typing m will list the commands. Type p to print the current partitions, d to delete partitions and n to create new partitions. When you have the partitions as you want them, use w to write the partition table and exit fdisk. We're ready to create the file system (format?) on the partition(s) we created.
- To create an ext2 file system on the first partition type ./mke2fs /dev/sda1 It will take a few seconds and give you some statistics about the file system before returning to the bash prompt. An ext3 file system requires a -j option as in ./mke2fs -j /dev/sda1 The partitioning and formatting are complete, now we just need to remount the USB drive.
- The simplest way to remount the USB drive is to unplug the USB drive and plug it back in. The Pogoplug software will recognize the USB drive and mount it automatically.
- Return to "my.pogoplug.com", click "refresh" on "My Library" and you should see your USB drive with a "lost+found" folder. We're done with telnet so type exit to get back to the command prompt.
The USB drive is now ready to use with the Pogoplug. You will need to download some special software (Explore2fs – WIN32 explorer for Linux ext2fs partitions) to read the USB drive if you plug it directly into your Windows PC. The mke2fs.zip file that we downloaded to the /tmp folder was in RAM so it will be lost when the Pogoplug is rebooted.
I have some ideas for other articles that will use an ext2 formatted usb drive... so stay tuned!
-bash-3.2# /sbin/fdisk /dev/sda
fdisk: cannot open /dev/sda
I think the 500GB Freecom drive I initially plugged in might have been /dev/sda but I have ejected and unplugged that one for safety, as my intention is to install PlugApps on an 8GB USB stick.
Can anyone foresee any problems with this, and what is the /dev/.... handle likely to be? If it makes any difference, I have plugged the USB stick into the second USB port from the top on the Pogoplug. (My 500GB Freecom drive *was* plugged into the top USB port.)
Hi Ian,
I had setup Openpogo with Firefly and everything was working great until I upgraded the firmware on my router and Friefly went down. I think I corrupted it. I should have done a proper shutdown. Anyway I am staing from scratch again. I am having a problem partitioning my usb stick. I ejected the usb stick. When I type the command /sbin/fdisk /dev/sda I get an error message
fdisk: cannont open /dev/sda. I have no idea what the problem is. The only way fdisk will work when it is attached but then I can right the partition table. I get an error. I understand why I get the error but no matter what I still get the error fdisk: cannot open /dev/sda. Can you please give me a hand? Thank you.
Scot
I was having problem with my drive showing up in my PogoPlug, so I followed these instructions to format my drive as ext2. My drive still wouldn't show up, so I connected it directly to my Windows XP machine, split it into 3 primary partitions, formatted the partitions as NTFS, and copied content to each drive. Windows saw everything just fine. So, I plugged the drive back into the PogoPlug, and it still shows up as "this drive is not available". PogoPlug support has been uselesss - they haven't told me to do anything I hadn't already tried. More importantly, I now can't telnet into the PogoPlug, even though I can ping it, and register it when I remove it from py.pogoplg. Ideas?
Hi PeeDub,
Can I ask you, is this a regular internal hard drive that you bought in the store and put it into an enclosure or is this a external hard drive that you bought in a store? Yes it does matter. Let me know, we will go on from there.
Scot
Scot,
This is a Western Digital Elements 1.5 TB external drive (WDBAAU0015HBK-NESN) bought from Newegg specifically for this. - Pat
trying to telnet and it's getting blocked "could not open connection to the host , on port 23 connection failed"
Hi Lh,
Is your PogoPlug connected to the network via a cable? Does the light on the front show up in green or is it amber? Thanks.
Scot
lh said: trying to telnet and it's getting blocked "could not open connection to the host , on port 23 connection failed"
Telnet is turned off by default on the Pogoplug. They don't provide an easy way to turn it on. You could use SSH though by turning it on at my.pogoplug
scotg said: Hi Lh, Is your PogoPlug connected to the network via a cable? Does the light on the front show up in green or is it amber? Thanks. Scotyes via cable and light is solid green
Edit: Never mind, I got it. For anyone else having the same problem, it appears that ejecting (at least for a USB flash drive) does more than just unmount the filesystem, it effectively removes the device altogether.
What I tried and initially failed to do instead was umount the drive. This didn't work because the device was "busy". It turned out that the PogoPlug service (hwdb?) was tying it up. I ended up killing it (don't remember the exact step and I'm not in front of my PogoPlug right now, but I looked in /etc/init.d/rcS for the name of the command that started it, and did the opposite), and it went as far as umounting all my drives while leaving the devices available. I was then able to fdisk and mke2fs my thumb drive.
Note that at least for me, stopping the service umounted ALL connected drives, so make sure they are not being accessed before you do this.
-------------
Has anyone had any luck with fdisk? I'm getting the same problem as someone else mentioned. fdisk only sees my thumb drive if it's mounted. Eject it, and fdisk reports "cannot open /dev/sdb1". fdisk -l only lists /dev/sdb1 if it is mounted. Thanks.
I got an error: /dev/sda1 is apparently in use by the system; will not make a filesystem here!
doing as tizzo said ("killall hbwd") kills the pogoplug service to allow you to format the drive.

RSS


