SD-HDD migration
#1
On one of my rock64 i have omv and its booting from a sd card, im going to get my hands in a week or two on a usb-sata adapter (the same one you guys sell on the store) and a small-ish ssd, and i would like to start to use it to boot, ive read a lot about how to write the spi for this use but what do i need to do to specify a specific usb drive to boot from? i mean AFAIK if you have more than 1 usb drive and you use /dev/sda the names can rotate and the unit wont boot, where/how do i set it to use the drive UUID?
Second question, what is the easier method to copy exactly my install to the ssd? when i need to copy microsd to microsd or do a full backup i use this, would it work with an ssd target? (i know i would have to resize it with gparted after the copy, but its less of a hassle than install everything again) never mind, i just saw their site, apparently it should work with ssd without problem, first question still stands...
Thanks in advance for any help/tip
  Reply
#2
(11-03-2018, 06:32 PM)Trash_Can_Man Wrote: On one of my rock64 i have omv and its booting from a sd card, im going to get my hands in a week or two on a usb-sata adapter (the same one you guys sell on the store) and a small-ish ssd, and i would like to start to use it to boot, ive read a lot about how to write the spi for this use but what do i need to do to specify a specific usb drive to boot from? i mean AFAIK if you have more than 1 usb drive and you use /dev/sda the names can rotate and the unit wont boot, where/how do i set it to use the drive UUID?
Second question, what is the easier method to copy exactly my install to the ssd? when i need to copy microsd to microsd or do a full backup i use this, would it work with an ssd target? (i know i would have to resize it with gparted after the copy, but its less of a hassle than install everything again) never mind, i just saw their site, apparently it should work with ssd without problem, first question still stands...
Thanks in advance for any help/tip

Been a while since I did it on mine, but as far as I remember you just flash the drive with etcher like you would a sdcard, but you need to turn on unsafe mode so you can write to the drive, just make sure you don't flash the wrong drive Smile
  Reply
#3
(11-03-2018, 07:53 PM)evilbunny Wrote:
(11-03-2018, 06:32 PM)Trash_Can_Man Wrote: On one of my rock64 i have omv and its booting from a sd card, im going to get my hands in a week or two on a usb-sata adapter (the same one you guys sell on the store) and a small-ish ssd, and i would like to start to use it to boot, ive read a lot about how to write the spi for this use but what do i need to do to specify a specific usb drive to boot from? i mean AFAIK if you have more than 1 usb drive and you use /dev/sda the names can rotate and the unit wont boot, where/how do i set it to use the drive UUID?
Second question, what is the easier method to copy exactly my install to the ssd? when i need to copy microsd to microsd or do a full backup i use this, would it work with an ssd target? (i know i would have to resize it with gparted after the copy, but its less of a hassle than install everything again) never mind, i just saw their site, apparently it should work with ssd without problem, first question still stands...
Thanks in advance for any help/tip

Been a while since I did it on mine, but as far as I remember you just flash the drive with etcher like you would a sdcard, but you need to turn on unsafe mode so you can write to the drive, just make sure you don't flash the wrong drive Smile

Yea the flashing or writing part as far as i have seen is simple and i have in mind several different options to do that part but what happens when you have 2 usb drives or more? how do i tell uboot to use the right one? i have no root or anything boot related on the second usb drive but i dont know if uboot checks inside the drives what is available, highly doubt it...
  Reply
#4
(11-03-2018, 08:00 PM)Trash_Can_Man Wrote: Yea the flashing or writing part as far as i have seen is simple and i have in mind several different options to do that part but what happens when you have 2 usb drives or more? how do i tell uboot to use the right one? i have no root or anything boot related on the second usb drive but i dont know if uboot checks inside the drives what is available, highly doubt it...


You can use UUID to specify the partitions unique ID number, you can name the partitions, this is the default and you can get a race condition if 2 partitions are named the same thing, so yes it does scan through everything.
  Reply
#5
(11-03-2018, 08:03 PM)evilbunny Wrote:
(11-03-2018, 08:00 PM)Trash_Can_Man Wrote: Yea the flashing or writing part as far as i have seen is simple and i have in mind several different options to do that part but what happens when you have 2 usb drives or more? how do i tell uboot to use the right one? i have no root or anything boot related on the second usb drive but i dont know if uboot checks inside the drives what is available, highly doubt it...


You can use UUID to specify the partitions unique ID number, you can name the partitions, this is the default and you can get a race condition if 2 partitions are named the same thing, so yes it does scan through everything.

Ok, what do i need to edit or what command to send to choose a specific uuid and set it permanently? or its not needed if there are no other drive with valid info to boot from? lets say i only have those 2 mentioned hdd, one with a bootable image and the other without, uboot is smart enough to not give errors and use the one actually bootable on every try?
  Reply
#6
(11-03-2018, 08:08 PM)Trash_Can_Man Wrote: Ok, what do i need to edit or what command to send to choose a specific uuid and set it permanently? or its not needed if there are no other drive with valid info to boot from? lets say i only have those 2 mentioned hdd, one with a bootable image and the other without, uboot is smart enough to not give errors and use the one actually bootable on every try?


Unless a partition is named the same as your boot/root partition you shouldn't have issues, I'd use UUID as a last resort as there is a few files to change to use it.
  Reply
#7
(11-03-2018, 08:18 PM)evilbunny Wrote:
(11-03-2018, 08:08 PM)Trash_Can_Man Wrote: Ok, what do i need to edit or what command to send to choose a specific uuid and set it permanently? or its not needed if there are no other drive with valid info to boot from? lets say i only have those 2 mentioned hdd, one with a bootable image and the other without, uboot is smart enough to not give errors and use the one actually bootable on every try?


Unless a partition is named the same as your boot/root partition you shouldn't have issues, I'd use UUID as a last resort as there is a few files to change to use it.

Keep in mind that you are talking with an advanced user only, no expert by any meter...so it can be selected by partition name, but where do i set it? do i need to label any boot partition i want as "boot" or "root" or where to chose wich to use? (i ask all this because afaik sda1/sda2 can change depending what device answer faster at boot time (wich in this case id asume the ssd is going to answer faster than the hdd but i would like to be sure))
  Reply
#8
(11-03-2018, 08:33 PM)Trash_Can_Man Wrote: Keep in mind that you are talking with an advanced user only, no expert by any meter...so it can be selected by partition name, but where do i set it? do i need to label any boot partition i want as "boot" or "root" or where to chose wich to use? (i ask all this because afaik sda1/sda2 can change depending what device answer faster at boot time (wich in this case id asume the ssd is going to answer faster than the hdd but i would like to be sure))

Ayufan's images set boot as boot and root as linux-root
  Reply
#9
(11-03-2018, 08:36 PM)evilbunny Wrote:
(11-03-2018, 08:33 PM)Trash_Can_Man Wrote: Keep in mind that you are talking with an advanced user only, no expert by any meter...so it can be selected by partition name, but where do i set it? do i need to label any boot partition i want as "boot" or "root" or where to chose wich to use? (i ask all this because afaik sda1/sda2 can change depending what device answer faster at boot time (wich in this case id asume the ssd is going to answer faster than the hdd but i would like to be sure))

Ayufan's images set boot as boot and root as linux-root

In this case its OMV wich afaik is heavily based on ayufan images so i guess its the same and if not i can use one of the ayufan omv images directly i guess, thanks for the info Big Grin
  Reply
#10
(11-03-2018, 08:41 PM)Trash_Can_Man Wrote:
(11-03-2018, 08:36 PM)evilbunny Wrote:
(11-03-2018, 08:33 PM)Trash_Can_Man Wrote: Keep in mind that you are talking with an advanced user only, no expert by any meter...so it can be selected by partition name, but where do i set it? do i need to label any boot partition i want as "boot" or "root" or where to chose wich to use? (i ask all this because afaik sda1/sda2 can change depending what device answer faster at boot time (wich in this case id asume the ssd is going to answer faster than the hdd but i would like to be sure))

Ayufan's images set boot as boot and root as linux-root

In this case its OMV wich afaik is heavily based on ayufan images so i guess its the same and if not i can use one of the ayufan omv images directly i guess, thanks for the info Big Grin

Im here to report that this mostly work 
1- burn spi
2- burn with etcher the omv image on an hdd (ssd in this case) using the jmicro usb-sata adapter
3- remove the jmicro-ssd kit and place it on any linux device with gparted (i used a spare raspi but probably any windows can do too with gparted) to use the whole drive (personally i simply created a new ext4 partition on the free space, there is the option to resize the omv partition i guess but i think there is a problem if you try to share from that partition)
3- boot and use said drive as main drive instead of a microsd/emmc

Im using a Kingston UV400 120gb if anyone wonders and i have a dozen dockers runing from it over omv, works wonders and super fast

BUT! i say that it MOSTLY works because it sometimes wont boot, im not sure what happens but if i reboot the device it works about 99% of the times (seen it only fail once in fact, maybe a different issue that lone time) but if i turn it off and unplug and plug it back (i dont have easy access to the buttons) it fails to start about 50% of the trys, not a big issue and im going to use it as is since i have it on all the time anyway but i would like to know why this happens and to solve it if this have a solution, im not sure if i can provide any logs since the device dont even try to boot from the external hdd, i dont see any of the lights of any of the hdds blink at all when it fails (nor anything on screen ofc), how can i see if there is any uboot log? uboot does any loging? i dont have atm any usb serial adapter and im not planing to buy one but if its the only option ill consider it i guess...thanks for any help...
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)