Booting TonidoPlug using USB Drive

Support for your TonidoPlug
Tuxedo
Tonido Team
Tonido Team
Posts: 1458
Joined: Wed Jan 28, 2009 11:30 pm

Re: Tonidoplug U-Boot support

Postby Tuxedo » Sat Aug 29, 2009 11:09 am

Ok, here are the steps that you need to follow to put a root filesystem on a external USB drive.

1. Connect the USB drive to TonidoPlug. The USB drive will be automounted on /media/usb0. Stop samba server and unmount the USB drive before proceeding. To do this SSH to the TonidoPlug and run the following commands.

Code: Select all

 
# /etc/init.d/samba stop
# umount /media/usb0


2. Make sure the external USB drive is not mounted anywhere else. Check the output of the following command.

Code: Select all

# mount
rootfs on / type rootfs (rw)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,nosuid,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
tmpfs on /var/cache/apt type tmpfs (rw,noatime)

As you can see the USB harddrive (usually /dev/sdaX) is not mounted anywhere else

3. Format the USB drive partition. You are about to create EXT3 filesystem on the USB drive partition. Warning: This command will wipe all the data on the partition.

Code: Select all

# mkfs.ext3 /dev/sda1

Note: If you have multiple partitions in your USB drive, you have to always use the first partition, because the TonidoPlug will boot only from the first partition of the external drive.

4. Once the formatting is completed, mount the partition on a temporary directory

Code: Select all

# mount /dev/sda1 /media/usb0


5. Download the root and modules tar ball from TonidoPlug site and place in the newly created ext3 partition.

Code: Select all

# cd /media/usb0
# wget http://www.tonido.com/downloads/plug/rootfs.tar.gz
# wget http://www.tonido.com/downloads/plug/modules.tar.gz

Please make sure the checksum of the files match the following values

Code: Select all

# md5sum  rootfs.tar.gz
958a32161e1daf1c79d88b1c6f6e85bf  rootfs.tar.gz
# md5sum modules.tar.gz
c2b89c8dd681656427b27a2fc1db725f  modules.tar.gz


6. Untar the downloaded tar file onto the ext3 partition.

Code: Select all

# tar zxvf rootfs.tar.gz
# tar zxvf modules.tar.gz


7. Now stop tonido and copy the tonido directory from your existing internal flash disk.

Code: Select all

# initctl emit tstop
# cp -dpr /root/app/ /media/usb0/root/


8. Now everything is ready. You can unmount the drive and reboot the plug. Leave the USB harddisk on the plug itself. When the plug reboots, it should reboot off the USB drive.

Code: Select all

# cd /root
# umount /media/usb0
# reboot


9. You can ensure that the plug has booted on the external HDD by using the following command.

Code: Select all

# df -h /
Filesystem            Size  Used Avail Use% Mounted on
rootfs                3.8G  669M  2.9G  19% /

You can see that we have booted the plug of the 4GB USB stick. If you see 512MB then probably you are still booting of the internal flash.

ezelkow1
Veteran Tonidoid
Veteran Tonidoid
Posts: 66
Joined: Thu Aug 20, 2009 4:09 pm

Re: Tonidoplug U-Boot support

Postby ezelkow1 » Sat Aug 29, 2009 3:08 pm

Sweet, thank you very much, Ill try this later this week. It may be a good idea to copy your post and make it sticky somewhere since I have seen alot of people wanting to do this.

Thanks again

papai
Super Tonidoid
Super Tonidoid
Posts: 36
Joined: Sun Aug 23, 2009 4:05 pm
Location: Miami, FL
Contact:

Re: Booting TonidoPlug using USB Drive

Postby papai » Sat Aug 29, 2009 4:20 pm

:D

Thank you. Thank you. Thanks for the tweet.

I followed the instructions and just added a couple of steps, first I had to run fdisk to undo all the tests that I had done yesterday trying to do it on my own. No way. I also added a small swap partition, just in case.

This idea of a green server is just right. I am sending a box I was using for a similar purpose to the dumpster. I am sure I will be saving some dollars and pay for the Plug in a few month.

As for these instructions as ezelkow1 suggest make them sticky because I am positive many users will go for it.

Code: Select all

Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs               1440073624    868820 1366053232   1% /


Tonido Plug $99
1.5 TB disk $160

Access to your data from anywhere... Priceless

For everything else, including sharing safely and privately with friends and family...
Well, there is plenty of space. :lol:

User avatar
madhan
Admin Tonidoid
Admin Tonidoid
Posts: 8617
Joined: Tue Dec 30, 2008 12:13 am
Location: Austin, TX, USA
Contact:

Re: Booting TonidoPlug using USB Drive

Postby madhan » Sat Aug 29, 2009 4:22 pm

Tonido Plug $99
1.5 TB disk $160

Access to your data from anywhere... Priceless

For everything else, including sharing safely and privately with friends and family...
Well, there is plenty of space. :lol:


Thats great! Thank you! you should do our marketing! :-)

papai
Super Tonidoid
Super Tonidoid
Posts: 36
Joined: Sun Aug 23, 2009 4:05 pm
Location: Miami, FL
Contact:

Re: Booting TonidoPlug using USB Drive

Postby papai » Sat Aug 29, 2009 6:15 pm

A couple of details that I forgot to mention. After downloading and installing the file system and re-booting, the root password reverts back to nosoup4u. Of course, I did not copy /etc/passwd, /etc/shadow and /etc/group files from flash to HD. No big deal, I had not created any users or group in there.

The other detail is that the HD is no longer seen as a USB device, it replaces the internal flash drive as the file system.

I understand the USB concept a bit better. I can use a USB bridge and plug additional drives identified as additional drives and I can move files or simple expand the storage. I wonder what else I can plug there. My camera, my MP3 player? If this is so this is a very use "toy". Need to explore this a bit better.

Anyway, great product, hardware and software. Great potential.

pacmano
Rookie Tonidoid
Rookie Tonidoid
Posts: 4
Joined: Wed Sep 02, 2009 12:30 pm

Re: Booting TonidoPlug using USB Drive

Postby pacmano » Wed Sep 02, 2009 1:15 pm

I believe I followed these instructions to the letter - but I still can't get the plug to boot off the 1TB external hard drive (although the plug does mount the disk on boot at /media/usb0)

from fdisk:
---------
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xcbce2081

Device Boot Start End Blocks Id System
/dev/sda1 * 1 121601 976760032 83 Linux
--------
Any pointers on where to look for error messages? Please see attached for /var/log/messages and dmesg
Attachments
dmesg.txt
(8.81 KiB) Downloaded 270 times
var_log_messages.txt
(123.09 KiB) Downloaded 281 times

Tuxedo
Tonido Team
Tonido Team
Posts: 1458
Joined: Wed Jan 28, 2009 11:30 pm

Re: Booting TonidoPlug using USB Drive

Postby Tuxedo » Wed Sep 02, 2009 4:34 pm

My guess is that you took these message files after you booted the plug with internal flash. Unfortunately these files won't have error messages for an USB boot.
These messages should be in the external hard disk when it booted.

Can you please send us the following information.

1) After the plug is up, connect the USB HDD and mount it on /media/usb0. Now we need the output of these command.

Code: Select all

 # ls -l /media/usb0
# ls -l /media/usb0/boot
# du -hs /media/usb0/lib/modules/2.6.30-rc6/


2) Copy of the file /media/usb0/var/log/messages

ezelkow1
Veteran Tonidoid
Veteran Tonidoid
Posts: 66
Joined: Thu Aug 20, 2009 4:09 pm

Re: Booting TonidoPlug using USB Drive

Postby ezelkow1 » Wed Sep 02, 2009 4:41 pm

You should also make sure that since your booting off a hub that you have no other drives plugged in. Ive noticed on mine that if I want to boot from my usb disk I have to unplug all other hdds from my hub in order for the plug to boot from it. Im not sure if is an issue with just the order that the hdds are coming up from the hub and that if I moved the usb disk to another port it would work, but its something to try if you are.

pacmano
Rookie Tonidoid
Rookie Tonidoid
Posts: 4
Joined: Wed Sep 02, 2009 12:30 pm

Re: Booting TonidoPlug using USB Drive

Postby pacmano » Wed Sep 02, 2009 7:29 pm

There is no hub (drive is plugged directly into the plug), files as requested are attached.

Files in zip file are self named (so to speak). "messages" is in fact empty.

I should add a few things:

- I have blown away all partitions on the USB HDD.
- Recreated - fdisk:

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xcbce2081

Device Boot Start End Blocks Id System
/dev/sda1 * 1 26109 209720511 83 Linux
/dev/sda2 26110 26175 530145 82 Linux swap / Solaris

- Partition has been set bootable (not sure if this matters), it is a primary partition
- The plug automounts /dev/sda1 this time around (once again wiped drive and followed instructions to the letter unless old age is creeping up :D ).
Attachments
work.zip
(1.09 KiB) Downloaded 253 times

Tuxedo
Tonido Team
Tonido Team
Posts: 1458
Joined: Wed Jan 28, 2009 11:30 pm

Re: Booting TonidoPlug using USB Drive

Postby Tuxedo » Wed Sep 02, 2009 9:00 pm

Everything seems to look right. Now the only variable is the harddisk itself.

1) Can you please tell us the make, model of the harddisk

2) Can you please copy the FS, kernel and modules onto an USB stick or another harddisk and try booting from it.

Thanks


Return to “TonidoPlug Support”

Who is online

Users browsing this forum: No registered users and 13 guests