using sata disk from usb boot

Support for your TonidoPlug
esclapes
Rookie Tonidoid
Rookie Tonidoid
Posts: 7
Joined: Mon Nov 28, 2011 3:42 pm

Re: using sata disk from usb boot

Postby esclapes » Mon Nov 28, 2011 3:44 pm

Hi there, I followed this instructions two times with no success.

When I reboot I am back to the internal memory. And the sda1 is mounted. Any ideas?

Code: Select all

root@esclapssen:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                 251M     0  251M   0% /lib/init/rw
udev                   10M   24K   10M   1% /dev
tmpfs                 251M  4.0K  251M   1% /dev/shm
rootfs                450M  172M  274M  39% /
/dev/sda1             459G  600M  435G   1% /media/disk3part1
root@esclapssen:~# cd /media/disk3part1
root@esclapssen:/media/disk3part1# ls
bin   dev  home  lost+found  mnt  proc  rootfs.tar.gz  selinux  sys  usr
boot  etc  lib   media       opt  root  sbin           srv      tmp  var
root@esclapssen:/media/disk3part1# cd ..
root@esclapssen:/media# ls
disk1part1  disk2part1  disk3part1
root@esclapssen:/media#

UrbanVoyeur
Tonido MVP
Tonido MVP
Posts: 321
Joined: Fri Oct 21, 2011 8:20 pm

Re: using sata disk from usb boot

Postby UrbanVoyeur » Mon Nov 28, 2011 4:00 pm

esclapes wrote:Hi there, I followed this instructions two times with no success.

When I reboot I am back to the internal memory. And the sda1 is mounted. Any ideas?

Two thing come to mind:
1. Did you format the SATA drive ext3 using mkfs.ext3 /dev/sda

2. Is the partition layout on your SATA MBR/MS-DOS? The plug won't boot if it is GPT. You can check with parted print

esclapes
Rookie Tonidoid
Rookie Tonidoid
Posts: 7
Joined: Mon Nov 28, 2011 3:42 pm

Re: using sata disk from usb boot

Postby esclapes » Mon Nov 28, 2011 4:46 pm

Uups. It is GPT.

Code: Select all

Model: TOSHIBA MK5076GSX (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End    Size   File system  Name     Flags
 1      17.4kB  500GB  500GB  ext3         primary


Does it mean I cannot use this drive?

esclapes
Rookie Tonidoid
Rookie Tonidoid
Posts: 7
Joined: Mon Nov 28, 2011 3:42 pm

Re: using sata disk from usb boot

Postby esclapes » Mon Nov 28, 2011 5:19 pm

UrbanVoyeur wrote:Two thing come to mind:
1. Did you format the SATA drive ext3 using mkfs.ext3 /dev/sda

2. Is the partition layout on your SATA MBR/MS-DOS? The plug won't boot if it is GPT. You can check with parted print

By the way, I did 1 too.

UrbanVoyeur
Tonido MVP
Tonido MVP
Posts: 321
Joined: Fri Oct 21, 2011 8:20 pm

Re: using sata disk from usb boot

Postby UrbanVoyeur » Mon Nov 28, 2011 5:32 pm

esclapes wrote:Uups. It is GPT.
Does it mean I cannot use this drive?

You can use it. You just have to change the partition table layout to MBR/MS-DOS.

From the TonidoPlug bash prompt:

1. Un-mount the disk:

Code: Select all

umount /media/disk1part1  (or wherever it's mounted)

2. Wipe out the existing partition:

Code: Select all

parted
(parted) select /dev/sda
(parted) rm 1
(parted) quit

OR using fdisk:

Code: Select all

fdisk /dev/sda
o to remove all partitions
w to commit changes & sync


3. Change the disk label (partition table layout):

Code: Select all

parted
(parted) select /dev/sda
(parted) mklabel msdos
(parted) quit

3. Use fdisk to create a new partition (its a little friendlier than parted)

Code: Select all

fdisk /dev/sda
o to remove any partitions fdisk may think are there.
n to create a new partition
p for primary
1 for first partition
ENTER through the rest of the defaults
w to commit changes & sync

4. Format the new partition:

Code: Select all

mkfs.ext3 /dev/sda

5. reinstall rootfs.

You can do also it from a Windows machine:
Administrative Tools > Computer Management > Storage > Disk Management > Right Click On "Disk X" where X is the number of your drive > Convert to MBR

Edit: I clarified the parted commands. In short hand they can be cryptic and lead to mistakes if pasted literally.

esclapes
Rookie Tonidoid
Rookie Tonidoid
Posts: 7
Joined: Mon Nov 28, 2011 3:42 pm

Re: using sata disk from usb boot

Postby esclapes » Thu Dec 15, 2011 6:43 pm

Hi UrbanVoyeur,

Thanks a lot for your help. It was really useful.

I didn't see your reply until very late that night, and didn't come back to say that it worked. Your steps for the whole process where far better than anything I found googling around the hours before I came back here.

Accurate and fast. Congrats.

Cheers,
esclapes

UrbanVoyeur
Tonido MVP
Tonido MVP
Posts: 321
Joined: Fri Oct 21, 2011 8:20 pm

Re: using sata disk from usb boot

Postby UrbanVoyeur » Thu Dec 15, 2011 8:58 pm

You're welcome!

RobP
Super Tonidoid
Super Tonidoid
Posts: 28
Joined: Tue Sep 04, 2012 1:58 pm

Re: using sata disk from usb boot

Postby RobP » Mon Sep 10, 2012 5:02 pm

I'm having trouble putting files onto my plug. I'm on a Mac and I tried to mount it as a local drive through Finder -> Connect to Server. I logged in and got this file structure (last image - attachments seem to be reversed ...). I tried transferring a 200mb file (my connected HDD is 1tb ext3) but it said I ran out of space - this implies to me that I was connecting to the Plug and not the HDD (even though the plug should have been booted up off the HDD ... ).

I've tried to boot from my SATA 2 disk. If I go to my plug's homepage, I see this (image 2).

If I go to the TonidoPlug settings menu, I see this (first image).

If I go to TonidoShell and run -fdisk L I see this text:
[root@TonidoPlug2 /]#fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sda1 1 121602 976762583+ ee GPT



So - my setup appears to not work. I can't set /dev/sda as my User Account Directory - a yellow box appears with no text. Help fixing this is appreciated.


Edit: it *seems* to have been fixed by going in with SSH, and doing -fdisk a /dev/sda1. For whatever reason it decided not to keep the drive as a bootable drive. I am now able to map across to my plug (although it goes incredibly slowly, for some reason, maybe because of the heat the plug is kicking out). Now I've gone back in and checked again the Boot flag has been deleted. It's rather confusing but it seems to be working at least to some degree now.
Attachments
Screen Shot 2012-09-10 at 22.48.05.png
User data directory from TonidoPlug settings
Screen Shot 2012-09-10 at 22.48.05.png (21.39 KiB) Viewed 10107 times
Screen Shot 2012-09-10 at 22.45.23.png
Connect to Server through Mac
Screen Shot 2012-09-10 at 22.45.23.png (38.55 KiB) Viewed 10107 times

mathewparet
Veteran Tonidoid
Veteran Tonidoid
Posts: 56
Joined: Sat Nov 07, 2009 2:02 pm

Re: using sata disk from usb boot

Postby mathewparet » Tue Dec 09, 2014 1:05 pm

Could you please help me with this.

Somehow my external sata hard disk stopped booting. So now I attached a USB drive and configured it to boot as per steps in http://www.tonido.com/communitywiki/dok ... es:usbboot

Now I am successfully able to boot to USB.

But I have a lot of data in my sata hard disk. I need to recover them. For that purpose I should be able to boot to either internal flash (512 mb) or USB drive with SATA disk inserted so that I can mound the partitions in SATA and somehow backup the data.

However when SATA is installed the system refuses to boot. From the below quote I am guessing that when SATA is inserted it always tries to boot from it. I also understand I can use uboot to make my plug boot into internal flash or USB with SATA drive installed during boot. But I am not good with unix and never have used uboot. Could you please help me boot to either flash or usb drive (both currently bootable) with the SATA disk inserted so that I can backup the data and fix the boot partition in the SATA?

Tuxedo wrote:
UrbanVoyeur wrote:I've had the same experience - I can boot from the USB flash drive as long as there is no internal hard disk.

I wonder if it has to do with the boot loader pointing to sda1. When the internal SATA drive is installed, it becomes sda1 and the USB is bumped to sdb1. I'll try changing the boot order and report what happens.

You are right. The boot loader always points to /dev/sda1. If you have a SATA drive, then that will be your sda1 always. Look here for more info http://www.tonido.com/support/display/docs/TonidoPlug2+-+Device+Boot+Order Your best bet is to change the boot params in the uboot settings.

dglp
Veteran Tonidoid
Veteran Tonidoid
Posts: 58
Joined: Mon Feb 03, 2014 3:58 am

Re: using sata disk from usb boot

Postby dglp » Sun Jan 11, 2015 7:00 pm

Have you solved this? Had any replies?


Return to “TonidoPlug Support”

Who is online

Users browsing this forum: No registered users and 8 guests