Booting TonidoPlug with an external USB disk

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

Booting TonidoPlug with an external USB disk

Postby Tuxedo » Sat Sep 12, 2009 11:29 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.

stopthinking80
Regular Tonidoid
Regular Tonidoid
Posts: 24
Joined: Mon Oct 12, 2009 3:02 am

Re: Booting TonidoPlug with an external USB disk

Postby stopthinking80 » Mon Oct 12, 2009 2:31 pm

this doesn't work for me.
followed instructions on usb-thumb and 500gb hard-drive.
any ideas? does later tonido software prevent this?

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

Re: Booting TonidoPlug with an external USB disk

Postby ezelkow1 » Mon Oct 12, 2009 11:04 pm

Im wondering sorta the same thing. After I updated and eventually rebooted my plug appears to boot from my flash disk at first, but then after I start plugging in other external drives it loses all functionality. It doesnt know where the /bin and all other directories are, so I cant even do an ls.

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

Re: Booting TonidoPlug with an external USB disk

Postby Tuxedo » Mon Oct 12, 2009 11:19 pm

@stopthinking80: What error are you seeing? Can you do a SSH ? BTW tonido shouldn't be affecting the USB boot.

@ezelkow1: Are you connecting multiple HDDs via USB hub. Can you try connecting just usb stick with rootfs directly to the plug.

stopthinking80
Regular Tonidoid
Regular Tonidoid
Posts: 24
Joined: Mon Oct 12, 2009 3:02 am

Re: Booting TonidoPlug with an external USB disk

Postby stopthinking80 » Mon Oct 12, 2009 11:23 pm

i have now booted from usb-thumb successfully again after connecting it directly to the plug. before that the thumbdrive was connected via a powered usb-hub.

When the hub is connected the boot process takes several minutes. it seems the plug doesn't know how to get started. after trying for about 3 minutes it boot up normally (not from usb) and i can ssh into the system.

df -h shows that the connected thumbdrive is mounted at /media/usb0


Is this common? Or are there perhaps size limitations for the connected bootable device? the thumbdrive is 2gb.

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

Re: Booting TonidoPlug with an external USB disk

Postby Tuxedo » Tue Oct 13, 2009 12:11 am

From other posts in the forum, it seems this is completely dependent on the USB hub being used.
Also I have my USB harddisk connected via powered hub. I have no problem in booting the plug with a usb stick (4GB size though) via the powered hub.

stopthinking80
Regular Tonidoid
Regular Tonidoid
Posts: 24
Joined: Mon Oct 12, 2009 3:02 am

Re: Booting TonidoPlug with an external USB disk

Postby stopthinking80 » Tue Oct 13, 2009 12:15 am

@tuxedo

do you also have more than one external HDD connected?

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

Re: Booting TonidoPlug with an external USB disk

Postby ezelkow1 » Tue Oct 13, 2009 12:29 am

My plug does boot up fine when it is just the flash disk that has the rootfs on it connected to the hub. The problem comes in after the plug has already booted up off of the flash disk. I checked and made sure it was using it. Then I would plug in another hdd to the hub and I could see it being recognized and mounted in the dmesg logs. After a minute or so though I would then lose all the rootfs directories like I said above. It just seems wierd, like once it sees the new usb hdd it tries to start using that as its rootfs or something.

stopthinking80
Regular Tonidoid
Regular Tonidoid
Posts: 24
Joined: Mon Oct 12, 2009 3:02 am

Re: Booting TonidoPlug with an external USB disk

Postby stopthinking80 » Tue Oct 13, 2009 12:51 am

@ezelkow1

this happened to me too.

stopthinking80
Regular Tonidoid
Regular Tonidoid
Posts: 24
Joined: Mon Oct 12, 2009 3:02 am

Re: Booting TonidoPlug with an external USB disk

Postby stopthinking80 » Wed Oct 14, 2009 1:20 am

After another evening of fiddling about and a new hub I can confirm the following:

- Plug only boots from a USB drive when no other drive is connected.
- Messing around with /etc/fstab to assign drives to other mount points doesn't help (sadly).
- Setting the bootable flag on a partition also doesn't help.

Can we hope for an update to remedy these issues, or will just have to connect larger drives for more storage? Do you know of any workarounds to have more than one drive connected at boot time?

Anyway, great support here. I love that you guys really take the time to answer our questions!


Return to “TonidoPlug Support”

Who is online

Users browsing this forum: No registered users and 2 guests