Migrate archlinux from USB 4GB -> USB HDD 160GB

Ask questions about Arch Linux ARM. Please search before making a new topic.

Migrate archlinux from USB 4GB -> USB HDD 160GB

Postby gits4real » Tue Aug 16, 2011 2:11 am

Hello again,

Got the Arch Linux ARM install working mighty fine :).

I have no clue how/if I can move the linux parition and data installed from the 4GB USB stick I used to install archlinux, all over to a bigger 160GB USB hdd. If I can't, no biggy... other than sacraficing a USB stick to always be in the pogoplug :(

Thanks!
gits4real
 
Posts: 8
Joined: Fri Aug 05, 2011 1:39 pm

Re: Migrate archlinux from USB 4GB -> USB HDD 160GB

Postby tramusen » Tue Aug 16, 2011 2:30 am

Do you have a Linux desktop? If so (or with a virtual machine) you can use the dd command to copy the filesystem then gparted to resize. Not at my desk now but I can probably walk you through it if you would like.
tramusen
 
Posts: 29
Joined: Fri Jul 15, 2011 4:23 pm

Re: Migrate archlinux from USB 4GB -> USB HDD 160GB

Postby gits4real » Tue Aug 16, 2011 2:34 am

Yes I have another linux machine. I use Fedora on my laptop... I tried to use cp to move the contents over to the hdd but that didn't work. :/
gits4real
 
Posts: 8
Joined: Fri Aug 05, 2011 1:39 pm

Re: Migrate archlinux from USB 4GB -> USB HDD 160GB

Postby tramusen » Tue Aug 16, 2011 2:48 am

Ok, if you have Fedora it should be pretty easy. All you need to be able to do this is:

A) Ability to identify your drives by device name
B) To make resizing easy, gparted

Here is some light documentation on dd:
http://www.backuphowto.info/linux-backu ... k-clone-dd

So you would use dd to copy the flash to the hdd. Assuming flash is /dev/sdc and hdd is /dev/sdd it would be something like:
$this->bbcode_second_pass_code('', 'sudo dd if=/dev/sdc of=/dev/sdd')

You may even want to first make an image file on your Fedora machine from the flash drive with the Arch install. Just be careful here, and make sure you have if= and of= set to the right things, otherwise you will copy nothing over the top of your Arch install!

From there, you can use gparted to resize the file system to fill the drive, and even add a swap partition if you wanted. I think there are instructions for swap somewhere on the forum or the site, will try to find them and add here.

This probably isn't the most elegant means of doing things, but it should work. I'm guessing the same might be accomplished by making sure the partition is set as active after copying over the files, something along those lines, but I'm a bit tired and not all that useful for the "best" solution at the moment. If you find one of the threads going over how to "fix" your plug using the file system download, you could probably follow those steps as well but using your flash disk instead of the file system to be downloaded.

Also, so long as the HDD is the only thing plugged into your plug things should be fine. If it isn't, you may get boot order issues if something else is detected faster. If I remember right, WarheadsSE (I think?) posted that the port right above the network is ideal for the boot drive?
tramusen
 
Posts: 29
Joined: Fri Jul 15, 2011 4:23 pm

Re: Migrate archlinux from USB 4GB -> USB HDD 160GB

Postby gits4real » Tue Aug 16, 2011 3:00 am

I really appreciate the speedy help! I'll give it a go right now!
gits4real
 
Posts: 8
Joined: Fri Aug 05, 2011 1:39 pm

Re: Migrate archlinux from USB 4GB -> USB HDD 160GB

Postby tramusen » Tue Aug 16, 2011 3:10 am

Here is some much more in-depth information about dd:
http://www.linuxquestions.org/questions ... nd-362506/
tramusen
 
Posts: 29
Joined: Fri Jul 15, 2011 4:23 pm

Re: Migrate archlinux from USB 4GB -> USB HDD 160GB

Postby gits4real » Tue Aug 16, 2011 4:51 am

Okay, thanks to your help I was able to copy all of the data over to the hdd perfectly! Now the only problem is getting uboot to boot the hdd. If I ONLY plug in the hdd, it boots into pogoplug via ssh. If I plug in the usb it boots into the usb drive. If I do not plug anything in, it boots into pogoplug. Can I modify the uboot to select the sda instead of sdb? What file would I have to modify in order to change the boot information?

Thanks!
gits4real
 
Posts: 8
Joined: Fri Aug 05, 2011 1:39 pm

Re: Migrate archlinux from USB 4GB -> USB HDD 160GB

Postby tramusen » Tue Aug 16, 2011 3:13 pm

Well, if you have a Pogoplug Pro / other OXNAS-based device, I have no idea, and asking in that specific area might be more helpful. If it is not an OXNAS plug, then this might help:
viewtopic.php?f=23&t=1357

If you have a non-OXNAS, and any questions on messing with uboot, then that thread might be a good place to ask questions.
tramusen
 
Posts: 29
Joined: Fri Jul 15, 2011 4:23 pm

Re: Migrate archlinux from USB 4GB -> USB HDD 160GB

Postby tramusen » Tue Aug 16, 2011 3:13 pm

$this->bbcode_second_pass_quote('tramusen', 'W')ell, if you have a Pogoplug Pro / other OXNAS-based device, I have no idea, and asking in that specific area might be more helpful. Or it may take booting to HDD, inserting USB, manually mounting USB flash. Unless you need frequent reboots, or remote reboots, that would work pretty well.

If it is not an OXNAS plug, then this might help:
viewtopic.php?f=23&t=1357

If you have a non-OXNAS, and any questions on messing with uboot, then that thread might be a good place to ask questions.
tramusen
 
Posts: 29
Joined: Fri Jul 15, 2011 4:23 pm


Return to User Questions

Who is online

Users browsing this forum: kaithy and 7 guests