It is currently Sat May 18, 2013 10:14 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Booting TonidoPlug with an external USB disk
PostPosted: Sat Sep 12, 2009 11:29 am 
Tonido Team
Tonido Team
Joined: Wed Jan 28, 2009 11:30 pm
Posts: 1349

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:
 
# /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:
# 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:
# 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:
# 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:
# 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:
# 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:
# 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:
# 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:
# 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:
# 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.


Offline
 Profile  
 Post subject: Re: Booting TonidoPlug with an external USB disk
PostPosted: Mon Oct 12, 2009 2:31 pm 
Regular Tonidoid
Regular Tonidoid
Joined: Mon Oct 12, 2009 3:02 am
Posts: 24

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


Offline
 Profile  
 Post subject: Re: Booting TonidoPlug with an external USB disk
PostPosted: Mon Oct 12, 2009 11:04 pm 
Veteran Tonidoid
Veteran Tonidoid
Joined: Thu Aug 20, 2009 4:09 pm
Posts: 66

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.


Offline
 Profile  
 Post subject: Re: Booting TonidoPlug with an external USB disk
PostPosted: Mon Oct 12, 2009 11:19 pm 
Tonido Team
Tonido Team
Joined: Wed Jan 28, 2009 11:30 pm
Posts: 1349

@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.


Offline
 Profile  
 Post subject: Re: Booting TonidoPlug with an external USB disk
PostPosted: Mon Oct 12, 2009 11:23 pm 
Regular Tonidoid
Regular Tonidoid
Joined: Mon Oct 12, 2009 3:02 am
Posts: 24

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.


Offline
 Profile  
 Post subject: Re: Booting TonidoPlug with an external USB disk
PostPosted: Tue Oct 13, 2009 12:11 am 
Tonido Team
Tonido Team
Joined: Wed Jan 28, 2009 11:30 pm
Posts: 1349

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.


Offline
 Profile  
 Post subject: Re: Booting TonidoPlug with an external USB disk
PostPosted: Tue Oct 13, 2009 12:15 am 
Regular Tonidoid
Regular Tonidoid
Joined: Mon Oct 12, 2009 3:02 am
Posts: 24

@tuxedo

do you also have more than one external HDD connected?


Offline
 Profile  
 Post subject: Re: Booting TonidoPlug with an external USB disk
PostPosted: Tue Oct 13, 2009 12:29 am 
Veteran Tonidoid
Veteran Tonidoid
Joined: Thu Aug 20, 2009 4:09 pm
Posts: 66

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.


Offline
 Profile  
 Post subject: Re: Booting TonidoPlug with an external USB disk
PostPosted: Tue Oct 13, 2009 12:51 am 
Regular Tonidoid
Regular Tonidoid
Joined: Mon Oct 12, 2009 3:02 am
Posts: 24

@ezelkow1

this happened to me too.


Offline
 Profile  
 Post subject: Re: Booting TonidoPlug with an external USB disk
PostPosted: Wed Oct 14, 2009 1:20 am 
Regular Tonidoid
Regular Tonidoid
Joined: Mon Oct 12, 2009 3:02 am
Posts: 24

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!


Offline
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC - 6 hours [ DST ]


 Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: